mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
Refactored issue certificate
This commit is contained in:
parent
267f0ed654
commit
5178d1e808
13 changed files with 472 additions and 199 deletions
1
frontend/components.d.ts
vendored
1
frontend/components.d.ts
vendored
|
@ -32,6 +32,7 @@ declare module '@vue/runtime-core' {
|
||||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||||
|
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||||
AreaChart: typeof import('./src/components/Chart/AreaChart.vue')['default']
|
AreaChart: typeof import('./src/components/Chart/AreaChart.vue')['default']
|
||||||
AResult: typeof import('ant-design-vue/es')['Result']
|
AResult: typeof import('ant-design-vue/es')['Result']
|
||||||
ARow: typeof import('ant-design-vue/es')['Row']
|
ARow: typeof import('ant-design-vue/es')['Row']
|
||||||
|
|
|
@ -3,3 +3,7 @@
|
||||||
.directive-editor-extra {
|
.directive-editor-extra {
|
||||||
background-color: rgba(0, 0, 0, 0.84) !important;
|
background-color: rgba(0, 0, 0, 0.84) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.issue-cert-log-container {
|
||||||
|
background-color: rgba(0, 0, 0, 0.84) !important;
|
||||||
|
}
|
||||||
|
|
|
@ -7,4 +7,15 @@ export const msg = [
|
||||||
$gettext('Prohibit changing root password in demo'),
|
$gettext('Prohibit changing root password in demo'),
|
||||||
$gettext('Prohibit deleting the default user'),
|
$gettext('Prohibit deleting the default user'),
|
||||||
$gettext('Failed to get certificate information'),
|
$gettext('Failed to get certificate information'),
|
||||||
|
|
||||||
|
$gettext('Generating private key for registering account'),
|
||||||
|
$gettext('Preparing lego configurations'),
|
||||||
|
$gettext('Creating client facilitates communication with the CA server'),
|
||||||
|
$gettext('Using HTTP01 challenge provider'),
|
||||||
|
$gettext('Registering user'),
|
||||||
|
$gettext('Obtaining certificate'),
|
||||||
|
$gettext('Writing certificate to disk'),
|
||||||
|
$gettext('Writing certificate private key to disk'),
|
||||||
|
$gettext('Reloading nginx'),
|
||||||
|
$gettext('Finished')
|
||||||
]
|
]
|
||||||
|
|
|
@ -60,7 +60,7 @@ msgstr "Auto-renewal disabled for %{name}"
|
||||||
msgid "Auto-renewal enabled for %{name}"
|
msgid "Auto-renewal enabled for %{name}"
|
||||||
msgstr "Auto-renewal enabled for %{name}"
|
msgstr "Auto-renewal enabled for %{name}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:166
|
#: src/views/domain/DomainEdit.vue:178
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "Back"
|
msgstr "Back"
|
||||||
|
|
||||||
|
@ -86,22 +86,22 @@ msgstr "Build with"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Cancel"
|
msgstr "Cancel"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:40
|
#: src/views/domain/cert/CertInfo.vue:24
|
||||||
msgid "Certificate has expired"
|
msgid "Certificate has expired"
|
||||||
msgstr "Certificate has expired"
|
msgstr "Certificate has expired"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:44
|
#: src/views/domain/cert/CertInfo.vue:28
|
||||||
msgid "Certificate is valid"
|
msgid "Certificate is valid"
|
||||||
msgstr "Certificate is valid"
|
msgstr "Certificate is valid"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:30
|
#: src/views/domain/cert/CertInfo.vue:14
|
||||||
msgid "Certificate Status"
|
msgid "Certificate Status"
|
||||||
msgstr "Certificate Status"
|
msgstr "Certificate Status"
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
||||||
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:154
|
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:155
|
||||||
msgid "Comments"
|
msgid "Comments"
|
||||||
msgstr "Comments"
|
msgstr "Comments"
|
||||||
|
|
||||||
|
@ -138,6 +138,10 @@ msgstr "Create Another"
|
||||||
msgid "Created at"
|
msgid "Created at"
|
||||||
msgstr "Created at"
|
msgstr "Created at"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:13
|
||||||
|
msgid "Creating client facilitates communication with the CA server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/routes/index.ts:26
|
#: src/routes/index.ts:26
|
||||||
msgid "Dashboard"
|
msgid "Dashboard"
|
||||||
msgstr "Dashboard"
|
msgstr "Dashboard"
|
||||||
|
@ -180,7 +184,7 @@ msgstr "Disable auto-renewal failed for %{name}"
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Disabled"
|
msgstr "Disabled"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:101 src/views/domain/DomainList.vue:64
|
#: src/views/domain/DomainEdit.vue:112 src/views/domain/DomainList.vue:64
|
||||||
msgid "Disabled successfully"
|
msgid "Disabled successfully"
|
||||||
msgstr "Disabled successfully"
|
msgstr "Disabled successfully"
|
||||||
|
|
||||||
|
@ -226,7 +230,7 @@ msgstr "Enable TLS"
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Enabled"
|
msgstr "Enabled"
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:92
|
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:103
|
||||||
#: src/views/domain/DomainList.vue:54
|
#: src/views/domain/DomainList.vue:54
|
||||||
msgid "Enabled successfully"
|
msgid "Enabled successfully"
|
||||||
msgstr "Enabled successfully"
|
msgstr "Enabled successfully"
|
||||||
|
@ -235,15 +239,15 @@ msgstr "Enabled successfully"
|
||||||
msgid "Encrypt website with Let's Encrypt"
|
msgid "Encrypt website with Let's Encrypt"
|
||||||
msgstr "Encrypt website with Let's Encrypt"
|
msgstr "Encrypt website with Let's Encrypt"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:33
|
#: src/views/domain/cert/CertInfo.vue:17
|
||||||
msgid "Expiration Date: %{date}"
|
msgid "Expiration Date: %{date}"
|
||||||
msgstr "Expiration Date: %{date}"
|
msgstr "Expiration Date: %{date}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:104 src/views/domain/DomainList.vue:68
|
#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68
|
||||||
msgid "Failed to disable %{msg}"
|
msgid "Failed to disable %{msg}"
|
||||||
msgstr "Failed to disable %{msg}"
|
msgstr "Failed to disable %{msg}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:95 src/views/domain/DomainList.vue:58
|
#: src/views/domain/DomainEdit.vue:106 src/views/domain/DomainList.vue:58
|
||||||
msgid "Failed to enable %{msg}"
|
msgid "Failed to enable %{msg}"
|
||||||
msgstr "Failed to enable %{msg}"
|
msgstr "Failed to enable %{msg}"
|
||||||
|
|
||||||
|
@ -255,10 +259,14 @@ msgstr ""
|
||||||
msgid "File Not Found"
|
msgid "File Not Found"
|
||||||
msgstr "File Not Found"
|
msgstr "File Not Found"
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:7
|
#: src/language/constants.ts:20 src/views/domain/DomainAdd.vue:7
|
||||||
msgid "Finished"
|
msgid "Finished"
|
||||||
msgstr "Finished"
|
msgstr "Finished"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:11
|
||||||
|
msgid "Generating private key for registering account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:85
|
#: src/views/domain/cert/IssueCert.vue:85
|
||||||
msgid "Getting the certificate, please wait..."
|
msgid "Getting the certificate, please wait..."
|
||||||
msgstr "Getting the certificate, please wait..."
|
msgstr "Getting the certificate, please wait..."
|
||||||
|
@ -276,7 +284,7 @@ msgstr "Install"
|
||||||
msgid "Install successfully"
|
msgid "Install successfully"
|
||||||
msgstr "Enabled successfully"
|
msgstr "Enabled successfully"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:31
|
#: src/views/domain/cert/CertInfo.vue:15
|
||||||
msgid "Intermediate Certification Authorities: %{issuer}"
|
msgid "Intermediate Certification Authorities: %{issuer}"
|
||||||
msgstr "Intermediate Certification Authorities: %{issuer}"
|
msgstr "Intermediate Certification Authorities: %{issuer}"
|
||||||
|
|
||||||
|
@ -384,7 +392,7 @@ msgstr "No"
|
||||||
msgid "Not Found"
|
msgid "Not Found"
|
||||||
msgstr "Not Found"
|
msgstr "Not Found"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:35
|
#: src/views/domain/cert/CertInfo.vue:19
|
||||||
msgid "Not Valid Before: %{date}"
|
msgid "Not Valid Before: %{date}"
|
||||||
msgstr "Not Valid Before: %{date}"
|
msgstr "Not Valid Before: %{date}"
|
||||||
|
|
||||||
|
@ -396,6 +404,10 @@ msgstr ""
|
||||||
"Note: The server_name in the current configuration must be the domain name "
|
"Note: The server_name in the current configuration must be the domain name "
|
||||||
"you need to get the certificate."
|
"you need to get the certificate."
|
||||||
|
|
||||||
|
#: src/language/constants.ts:16
|
||||||
|
msgid "Obtaining certificate"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdCurd.vue:27
|
#: src/components/StdDataDisplay/StdCurd.vue:27
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:40
|
#: src/components/StdDataDisplay/StdTable.vue:40
|
||||||
#: src/views/domain/DomainList.vue:26
|
#: src/views/domain/DomainList.vue:26
|
||||||
|
@ -435,6 +447,11 @@ msgstr "Please input your password!"
|
||||||
msgid "Please input your username!"
|
msgid "Please input your username!"
|
||||||
msgstr "Please input your username!"
|
msgstr "Please input your username!"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:12
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Preparing lego configurations"
|
||||||
|
msgstr "Configurations"
|
||||||
|
|
||||||
#: src/language/constants.ts:7
|
#: src/language/constants.ts:7
|
||||||
msgid "Prohibit changing root password in demo"
|
msgid "Prohibit changing root password in demo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -455,11 +472,19 @@ msgstr "Reads"
|
||||||
msgid "Receive"
|
msgid "Receive"
|
||||||
msgstr "Receive"
|
msgstr "Receive"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:15
|
||||||
|
msgid "Registering user"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:19
|
||||||
|
msgid "Reloading nginx"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:187
|
#: src/components/StdDataDisplay/StdTable.vue:187
|
||||||
msgid "Reset"
|
msgid "Reset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:169
|
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:181
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr "Save"
|
msgstr "Save"
|
||||||
|
|
||||||
|
@ -479,7 +504,7 @@ msgid "Save Successfully"
|
||||||
msgstr "Saved successfully"
|
msgstr "Saved successfully"
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43
|
#: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43
|
||||||
#: src/views/domain/DomainEdit.vue:80
|
#: src/views/domain/DomainEdit.vue:91
|
||||||
msgid "Saved successfully"
|
msgid "Saved successfully"
|
||||||
msgstr "Saved successfully"
|
msgstr "Saved successfully"
|
||||||
|
|
||||||
|
@ -488,10 +513,9 @@ msgid "Send"
|
||||||
msgstr "Send"
|
msgstr "Send"
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:112
|
#: src/components/StdDataDisplay/StdTable.vue:112
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:94
|
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56
|
||||||
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:44
|
#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77
|
||||||
#: src/views/domain/DomainEdit.vue:56 src/views/domain/DomainEdit.vue:65
|
#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78
|
||||||
#: src/views/domain/DomainEdit.vue:83 src/views/domain/DomainList.vue:78
|
|
||||||
#: src/views/other/Install.vue:71
|
#: src/views/other/Install.vue:71
|
||||||
msgid "Server error"
|
msgid "Server error"
|
||||||
msgstr "Server error"
|
msgstr "Server error"
|
||||||
|
@ -529,7 +553,7 @@ msgstr "Status"
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
msgstr "Storage"
|
msgstr "Storage"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:32
|
#: src/views/domain/cert/CertInfo.vue:16
|
||||||
msgid "Subject Name: %{name}"
|
msgid "Subject Name: %{name}"
|
||||||
msgstr "Subject Name: %{name}"
|
msgstr "Subject Name: %{name}"
|
||||||
|
|
||||||
|
@ -579,6 +603,10 @@ msgstr "Username"
|
||||||
msgid "Username (*)"
|
msgid "Username (*)"
|
||||||
msgstr "Username (*)"
|
msgstr "Username (*)"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:14
|
||||||
|
msgid "Using HTTP01 challenge provider"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24
|
#: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
msgstr "Warning"
|
msgstr "Warning"
|
||||||
|
@ -588,6 +616,14 @@ msgstr "Warning"
|
||||||
msgid "Writes"
|
msgid "Writes"
|
||||||
msgstr "Writes"
|
msgstr "Writes"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:18
|
||||||
|
msgid "Writing certificate private key to disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:17
|
||||||
|
msgid "Writing certificate to disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "Yes"
|
msgstr "Yes"
|
||||||
|
|
|
@ -54,7 +54,7 @@ msgstr ""
|
||||||
msgid "Auto-renewal enabled for %{name}"
|
msgid "Auto-renewal enabled for %{name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:166
|
#: src/views/domain/DomainEdit.vue:178
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -79,22 +79,22 @@ msgstr ""
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:40
|
#: src/views/domain/cert/CertInfo.vue:24
|
||||||
msgid "Certificate has expired"
|
msgid "Certificate has expired"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:44
|
#: src/views/domain/cert/CertInfo.vue:28
|
||||||
msgid "Certificate is valid"
|
msgid "Certificate is valid"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:30
|
#: src/views/domain/cert/CertInfo.vue:14
|
||||||
msgid "Certificate Status"
|
msgid "Certificate Status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
||||||
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:154
|
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:155
|
||||||
msgid "Comments"
|
msgid "Comments"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -131,6 +131,10 @@ msgstr ""
|
||||||
msgid "Created at"
|
msgid "Created at"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:13
|
||||||
|
msgid "Creating client facilitates communication with the CA server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/routes/index.ts:26
|
#: src/routes/index.ts:26
|
||||||
msgid "Dashboard"
|
msgid "Dashboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -175,7 +179,7 @@ msgstr ""
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:101
|
#: src/views/domain/DomainEdit.vue:112
|
||||||
#: src/views/domain/DomainList.vue:64
|
#: src/views/domain/DomainList.vue:64
|
||||||
msgid "Disabled successfully"
|
msgid "Disabled successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -226,7 +230,7 @@ msgid "Enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:46
|
#: src/views/domain/DomainAdd.vue:46
|
||||||
#: src/views/domain/DomainEdit.vue:92
|
#: src/views/domain/DomainEdit.vue:103
|
||||||
#: src/views/domain/DomainList.vue:54
|
#: src/views/domain/DomainList.vue:54
|
||||||
msgid "Enabled successfully"
|
msgid "Enabled successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -235,16 +239,16 @@ msgstr ""
|
||||||
msgid "Encrypt website with Let's Encrypt"
|
msgid "Encrypt website with Let's Encrypt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:33
|
#: src/views/domain/cert/CertInfo.vue:17
|
||||||
msgid "Expiration Date: %{date}"
|
msgid "Expiration Date: %{date}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:104
|
#: src/views/domain/DomainEdit.vue:115
|
||||||
#: src/views/domain/DomainList.vue:68
|
#: src/views/domain/DomainList.vue:68
|
||||||
msgid "Failed to disable %{msg}"
|
msgid "Failed to disable %{msg}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:95
|
#: src/views/domain/DomainEdit.vue:106
|
||||||
#: src/views/domain/DomainList.vue:58
|
#: src/views/domain/DomainList.vue:58
|
||||||
msgid "Failed to enable %{msg}"
|
msgid "Failed to enable %{msg}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -258,10 +262,15 @@ msgstr ""
|
||||||
msgid "File Not Found"
|
msgid "File Not Found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:20
|
||||||
#: src/views/domain/DomainAdd.vue:7
|
#: src/views/domain/DomainAdd.vue:7
|
||||||
msgid "Finished"
|
msgid "Finished"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:11
|
||||||
|
msgid "Generating private key for registering account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:85
|
#: src/views/domain/cert/IssueCert.vue:85
|
||||||
msgid "Getting the certificate, please wait..."
|
msgid "Getting the certificate, please wait..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -279,7 +288,7 @@ msgstr ""
|
||||||
msgid "Install successfully"
|
msgid "Install successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:31
|
#: src/views/domain/cert/CertInfo.vue:15
|
||||||
msgid "Intermediate Certification Authorities: %{issuer}"
|
msgid "Intermediate Certification Authorities: %{issuer}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -387,7 +396,7 @@ msgstr ""
|
||||||
msgid "Not Found"
|
msgid "Not Found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:35
|
#: src/views/domain/cert/CertInfo.vue:19
|
||||||
msgid "Not Valid Before: %{date}"
|
msgid "Not Valid Before: %{date}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -395,6 +404,10 @@ msgstr ""
|
||||||
msgid "Note: The server_name in the current configuration must be the domain name you need to get the certificate."
|
msgid "Note: The server_name in the current configuration must be the domain name you need to get the certificate."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:16
|
||||||
|
msgid "Obtaining certificate"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdCurd.vue:27
|
#: src/components/StdDataDisplay/StdCurd.vue:27
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:40
|
#: src/components/StdDataDisplay/StdTable.vue:40
|
||||||
#: src/views/domain/DomainList.vue:26
|
#: src/views/domain/DomainList.vue:26
|
||||||
|
@ -437,6 +450,10 @@ msgstr ""
|
||||||
msgid "Please input your username!"
|
msgid "Please input your username!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:12
|
||||||
|
msgid "Preparing lego configurations"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/language/constants.ts:7
|
#: src/language/constants.ts:7
|
||||||
msgid "Prohibit changing root password in demo"
|
msgid "Prohibit changing root password in demo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -458,12 +475,20 @@ msgstr ""
|
||||||
msgid "Receive"
|
msgid "Receive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:15
|
||||||
|
msgid "Registering user"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:19
|
||||||
|
msgid "Reloading nginx"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:187
|
#: src/components/StdDataDisplay/StdTable.vue:187
|
||||||
msgid "Reset"
|
msgid "Reset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:52
|
#: src/views/config/ConfigEdit.vue:52
|
||||||
#: src/views/domain/DomainEdit.vue:169
|
#: src/views/domain/DomainEdit.vue:181
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -484,7 +509,7 @@ msgstr ""
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:34
|
#: src/views/config/ConfigEdit.vue:34
|
||||||
#: src/views/domain/DomainAdd.vue:43
|
#: src/views/domain/DomainAdd.vue:43
|
||||||
#: src/views/domain/DomainEdit.vue:80
|
#: src/views/domain/DomainEdit.vue:91
|
||||||
msgid "Saved successfully"
|
msgid "Saved successfully"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -494,12 +519,11 @@ msgid "Send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:112
|
#: src/components/StdDataDisplay/StdTable.vue:112
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:94
|
|
||||||
#: src/views/config/ConfigEdit.vue:22
|
#: src/views/config/ConfigEdit.vue:22
|
||||||
#: src/views/domain/DomainEdit.vue:44
|
|
||||||
#: src/views/domain/DomainEdit.vue:56
|
#: src/views/domain/DomainEdit.vue:56
|
||||||
#: src/views/domain/DomainEdit.vue:65
|
#: src/views/domain/DomainEdit.vue:68
|
||||||
#: src/views/domain/DomainEdit.vue:83
|
#: src/views/domain/DomainEdit.vue:77
|
||||||
|
#: src/views/domain/DomainEdit.vue:94
|
||||||
#: src/views/domain/DomainList.vue:78
|
#: src/views/domain/DomainList.vue:78
|
||||||
#: src/views/other/Install.vue:71
|
#: src/views/other/Install.vue:71
|
||||||
msgid "Server error"
|
msgid "Server error"
|
||||||
|
@ -539,7 +563,7 @@ msgstr ""
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:32
|
#: src/views/domain/cert/CertInfo.vue:16
|
||||||
msgid "Subject Name: %{name}"
|
msgid "Subject Name: %{name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -587,6 +611,10 @@ msgstr ""
|
||||||
msgid "Username (*)"
|
msgid "Username (*)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:14
|
||||||
|
msgid "Using HTTP01 challenge provider"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:12
|
#: src/views/domain/cert/IssueCert.vue:12
|
||||||
#: src/views/domain/DomainAdd.vue:24
|
#: src/views/domain/DomainAdd.vue:24
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
|
@ -598,6 +626,14 @@ msgstr ""
|
||||||
msgid "Writes"
|
msgid "Writes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:18
|
||||||
|
msgid "Writing certificate private key to disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:17
|
||||||
|
msgid "Writing certificate to disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -62,7 +62,7 @@ msgstr "成功关闭 %{name} 自动续签"
|
||||||
msgid "Auto-renewal enabled for %{name}"
|
msgid "Auto-renewal enabled for %{name}"
|
||||||
msgstr "成功启用 %{name} 自动续签"
|
msgstr "成功启用 %{name} 自动续签"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:166
|
#: src/views/domain/DomainEdit.vue:178
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "返回"
|
msgstr "返回"
|
||||||
|
|
||||||
|
@ -87,22 +87,22 @@ msgstr "构建基于"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "取消"
|
msgstr "取消"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:40
|
#: src/views/domain/cert/CertInfo.vue:24
|
||||||
msgid "Certificate has expired"
|
msgid "Certificate has expired"
|
||||||
msgstr "此证书已过期"
|
msgstr "此证书已过期"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:44
|
#: src/views/domain/cert/CertInfo.vue:28
|
||||||
msgid "Certificate is valid"
|
msgid "Certificate is valid"
|
||||||
msgstr "此证书有效"
|
msgstr "此证书有效"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:30
|
#: src/views/domain/cert/CertInfo.vue:14
|
||||||
msgid "Certificate Status"
|
msgid "Certificate Status"
|
||||||
msgstr "证书状态"
|
msgstr "证书状态"
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
||||||
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:154
|
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:155
|
||||||
msgid "Comments"
|
msgid "Comments"
|
||||||
msgstr "注释"
|
msgstr "注释"
|
||||||
|
|
||||||
|
@ -139,6 +139,10 @@ msgstr "再创建一个"
|
||||||
msgid "Created at"
|
msgid "Created at"
|
||||||
msgstr "创建时间"
|
msgstr "创建时间"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:13
|
||||||
|
msgid "Creating client facilitates communication with the CA server"
|
||||||
|
msgstr "正在创建客户端用于与 CA 服务器通信"
|
||||||
|
|
||||||
#: src/routes/index.ts:26
|
#: src/routes/index.ts:26
|
||||||
msgid "Dashboard"
|
msgid "Dashboard"
|
||||||
msgstr "仪表盘"
|
msgstr "仪表盘"
|
||||||
|
@ -181,7 +185,7 @@ msgstr "关闭 %{name} 自动续签失败"
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "禁用"
|
msgstr "禁用"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:101 src/views/domain/DomainList.vue:64
|
#: src/views/domain/DomainEdit.vue:112 src/views/domain/DomainList.vue:64
|
||||||
msgid "Disabled successfully"
|
msgid "Disabled successfully"
|
||||||
msgstr "禁用成功"
|
msgstr "禁用成功"
|
||||||
|
|
||||||
|
@ -227,7 +231,7 @@ msgstr "启用 TLS"
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "启用"
|
msgstr "启用"
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:92
|
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:103
|
||||||
#: src/views/domain/DomainList.vue:54
|
#: src/views/domain/DomainList.vue:54
|
||||||
msgid "Enabled successfully"
|
msgid "Enabled successfully"
|
||||||
msgstr "启用成功"
|
msgstr "启用成功"
|
||||||
|
@ -236,15 +240,15 @@ msgstr "启用成功"
|
||||||
msgid "Encrypt website with Let's Encrypt"
|
msgid "Encrypt website with Let's Encrypt"
|
||||||
msgstr "用 Let's Encrypt 对网站进行加密"
|
msgstr "用 Let's Encrypt 对网站进行加密"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:33
|
#: src/views/domain/cert/CertInfo.vue:17
|
||||||
msgid "Expiration Date: %{date}"
|
msgid "Expiration Date: %{date}"
|
||||||
msgstr "过期时间: %{date}"
|
msgstr "过期时间: %{date}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:104 src/views/domain/DomainList.vue:68
|
#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68
|
||||||
msgid "Failed to disable %{msg}"
|
msgid "Failed to disable %{msg}"
|
||||||
msgstr "禁用失败 %{msg}"
|
msgstr "禁用失败 %{msg}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:95 src/views/domain/DomainList.vue:58
|
#: src/views/domain/DomainEdit.vue:106 src/views/domain/DomainList.vue:58
|
||||||
msgid "Failed to enable %{msg}"
|
msgid "Failed to enable %{msg}"
|
||||||
msgstr "启用失败 %{msg}"
|
msgstr "启用失败 %{msg}"
|
||||||
|
|
||||||
|
@ -256,10 +260,14 @@ msgstr "获取证书信息失败"
|
||||||
msgid "File Not Found"
|
msgid "File Not Found"
|
||||||
msgstr "未找到文件"
|
msgstr "未找到文件"
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:7
|
#: src/language/constants.ts:20 src/views/domain/DomainAdd.vue:7
|
||||||
msgid "Finished"
|
msgid "Finished"
|
||||||
msgstr "完成"
|
msgstr "完成"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:11
|
||||||
|
msgid "Generating private key for registering account"
|
||||||
|
msgstr "正在生成私钥用于注册账户"
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:85
|
#: src/views/domain/cert/IssueCert.vue:85
|
||||||
msgid "Getting the certificate, please wait..."
|
msgid "Getting the certificate, please wait..."
|
||||||
msgstr "正在获取证书,请稍等..."
|
msgstr "正在获取证书,请稍等..."
|
||||||
|
@ -276,7 +284,7 @@ msgstr "安装"
|
||||||
msgid "Install successfully"
|
msgid "Install successfully"
|
||||||
msgstr "安装成功"
|
msgstr "安装成功"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:31
|
#: src/views/domain/cert/CertInfo.vue:15
|
||||||
msgid "Intermediate Certification Authorities: %{issuer}"
|
msgid "Intermediate Certification Authorities: %{issuer}"
|
||||||
msgstr "中级证书颁发机构: %{issuer}"
|
msgstr "中级证书颁发机构: %{issuer}"
|
||||||
|
|
||||||
|
@ -383,7 +391,7 @@ msgstr "取消"
|
||||||
msgid "Not Found"
|
msgid "Not Found"
|
||||||
msgstr "找不到页面"
|
msgstr "找不到页面"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:35
|
#: src/views/domain/cert/CertInfo.vue:19
|
||||||
msgid "Not Valid Before: %{date}"
|
msgid "Not Valid Before: %{date}"
|
||||||
msgstr "此前无效: %{date}"
|
msgstr "此前无效: %{date}"
|
||||||
|
|
||||||
|
@ -393,6 +401,10 @@ msgid ""
|
||||||
"you need to get the certificate."
|
"you need to get the certificate."
|
||||||
msgstr "注意:当前配置中的 server_name 必须为需要申请证书的域名。"
|
msgstr "注意:当前配置中的 server_name 必须为需要申请证书的域名。"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:16
|
||||||
|
msgid "Obtaining certificate"
|
||||||
|
msgstr "正在获取证书"
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdCurd.vue:27
|
#: src/components/StdDataDisplay/StdCurd.vue:27
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:40
|
#: src/components/StdDataDisplay/StdTable.vue:40
|
||||||
#: src/views/domain/DomainList.vue:26
|
#: src/views/domain/DomainList.vue:26
|
||||||
|
@ -432,6 +444,10 @@ msgstr "请输入您的密码!"
|
||||||
msgid "Please input your username!"
|
msgid "Please input your username!"
|
||||||
msgstr "请输入您的用户名!"
|
msgstr "请输入您的用户名!"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:12
|
||||||
|
msgid "Preparing lego configurations"
|
||||||
|
msgstr "正在准备 Lego 的配置"
|
||||||
|
|
||||||
#: src/language/constants.ts:7
|
#: src/language/constants.ts:7
|
||||||
msgid "Prohibit changing root password in demo"
|
msgid "Prohibit changing root password in demo"
|
||||||
msgstr "禁止在演示模式下修改 root 账户的密码"
|
msgstr "禁止在演示模式下修改 root 账户的密码"
|
||||||
|
@ -452,11 +468,19 @@ msgstr "读"
|
||||||
msgid "Receive"
|
msgid "Receive"
|
||||||
msgstr "下载"
|
msgstr "下载"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:15
|
||||||
|
msgid "Registering user"
|
||||||
|
msgstr "正在注册用户"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:19
|
||||||
|
msgid "Reloading nginx"
|
||||||
|
msgstr "正在重载 Nginx"
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:187
|
#: src/components/StdDataDisplay/StdTable.vue:187
|
||||||
msgid "Reset"
|
msgid "Reset"
|
||||||
msgstr "重置"
|
msgstr "重置"
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:169
|
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:181
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr "保存"
|
msgstr "保存"
|
||||||
|
|
||||||
|
@ -475,7 +499,7 @@ msgid "Save Successfully"
|
||||||
msgstr "保存成功"
|
msgstr "保存成功"
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43
|
#: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43
|
||||||
#: src/views/domain/DomainEdit.vue:80
|
#: src/views/domain/DomainEdit.vue:91
|
||||||
msgid "Saved successfully"
|
msgid "Saved successfully"
|
||||||
msgstr "保存成功"
|
msgstr "保存成功"
|
||||||
|
|
||||||
|
@ -484,10 +508,9 @@ msgid "Send"
|
||||||
msgstr "上传"
|
msgstr "上传"
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:112
|
#: src/components/StdDataDisplay/StdTable.vue:112
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:94
|
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56
|
||||||
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:44
|
#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77
|
||||||
#: src/views/domain/DomainEdit.vue:56 src/views/domain/DomainEdit.vue:65
|
#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78
|
||||||
#: src/views/domain/DomainEdit.vue:83 src/views/domain/DomainList.vue:78
|
|
||||||
#: src/views/other/Install.vue:71
|
#: src/views/other/Install.vue:71
|
||||||
msgid "Server error"
|
msgid "Server error"
|
||||||
msgstr "服务器错误"
|
msgstr "服务器错误"
|
||||||
|
@ -525,7 +548,7 @@ msgstr "状态"
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
msgstr "存储"
|
msgstr "存储"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:32
|
#: src/views/domain/cert/CertInfo.vue:16
|
||||||
msgid "Subject Name: %{name}"
|
msgid "Subject Name: %{name}"
|
||||||
msgstr "主体名称: %{name}"
|
msgstr "主体名称: %{name}"
|
||||||
|
|
||||||
|
@ -573,6 +596,10 @@ msgstr "用户名"
|
||||||
msgid "Username (*)"
|
msgid "Username (*)"
|
||||||
msgstr "用户名 (*)"
|
msgstr "用户名 (*)"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:14
|
||||||
|
msgid "Using HTTP01 challenge provider"
|
||||||
|
msgstr "使用 HTTP01 challenge provider"
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24
|
#: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
msgstr "警告"
|
msgstr "警告"
|
||||||
|
@ -582,6 +609,14 @@ msgstr "警告"
|
||||||
msgid "Writes"
|
msgid "Writes"
|
||||||
msgstr "写"
|
msgstr "写"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:18
|
||||||
|
msgid "Writing certificate private key to disk"
|
||||||
|
msgstr "正在将证书私钥写入磁盘"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:17
|
||||||
|
msgid "Writing certificate to disk"
|
||||||
|
msgstr "正在将证书写入磁盘"
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "是的"
|
msgstr "是的"
|
||||||
|
|
|
@ -64,7 +64,7 @@ msgstr "已關閉 %{name} 自動續簽"
|
||||||
msgid "Auto-renewal enabled for %{name}"
|
msgid "Auto-renewal enabled for %{name}"
|
||||||
msgstr "已啟用 %{name} 自動續簽"
|
msgstr "已啟用 %{name} 自動續簽"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:166
|
#: src/views/domain/DomainEdit.vue:178
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr "返回"
|
msgstr "返回"
|
||||||
|
|
||||||
|
@ -90,22 +90,22 @@ msgstr "構建基於"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "取消"
|
msgstr "取消"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:40
|
#: src/views/domain/cert/CertInfo.vue:24
|
||||||
msgid "Certificate has expired"
|
msgid "Certificate has expired"
|
||||||
msgstr "此憑證已過期"
|
msgstr "此憑證已過期"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:44
|
#: src/views/domain/cert/CertInfo.vue:28
|
||||||
msgid "Certificate is valid"
|
msgid "Certificate is valid"
|
||||||
msgstr "此憑證有效"
|
msgstr "此憑證有效"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:30
|
#: src/views/domain/cert/CertInfo.vue:14
|
||||||
msgid "Certificate Status"
|
msgid "Certificate Status"
|
||||||
msgstr "憑證狀態"
|
msgstr "憑證狀態"
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:29
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
#: src/views/domain/ngx_conf/LocationEditor.vue:21
|
||||||
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
#: src/views/domain/ngx_conf/LocationEditor.vue:7
|
||||||
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:154
|
#: src/views/domain/ngx_conf/NgxConfigEditor.vue:155
|
||||||
msgid "Comments"
|
msgid "Comments"
|
||||||
msgstr "註釋"
|
msgstr "註釋"
|
||||||
|
|
||||||
|
@ -142,6 +142,10 @@ msgstr "再創建一個"
|
||||||
msgid "Created at"
|
msgid "Created at"
|
||||||
msgstr "建立時間"
|
msgstr "建立時間"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:13
|
||||||
|
msgid "Creating client facilitates communication with the CA server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/routes/index.ts:26
|
#: src/routes/index.ts:26
|
||||||
msgid "Dashboard"
|
msgid "Dashboard"
|
||||||
msgstr "儀表盤"
|
msgstr "儀表盤"
|
||||||
|
@ -185,7 +189,7 @@ msgstr "關閉 %{name} 自動續簽失敗"
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "禁用"
|
msgstr "禁用"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:101 src/views/domain/DomainList.vue:64
|
#: src/views/domain/DomainEdit.vue:112 src/views/domain/DomainList.vue:64
|
||||||
msgid "Disabled successfully"
|
msgid "Disabled successfully"
|
||||||
msgstr "禁用成功"
|
msgstr "禁用成功"
|
||||||
|
|
||||||
|
@ -231,7 +235,7 @@ msgstr "啟用 TLS"
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "啟用"
|
msgstr "啟用"
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:92
|
#: src/views/domain/DomainAdd.vue:46 src/views/domain/DomainEdit.vue:103
|
||||||
#: src/views/domain/DomainList.vue:54
|
#: src/views/domain/DomainList.vue:54
|
||||||
msgid "Enabled successfully"
|
msgid "Enabled successfully"
|
||||||
msgstr "啟用成功"
|
msgstr "啟用成功"
|
||||||
|
@ -240,15 +244,15 @@ msgstr "啟用成功"
|
||||||
msgid "Encrypt website with Let's Encrypt"
|
msgid "Encrypt website with Let's Encrypt"
|
||||||
msgstr "用 Let's Encrypt 對網站進行加密"
|
msgstr "用 Let's Encrypt 對網站進行加密"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:33
|
#: src/views/domain/cert/CertInfo.vue:17
|
||||||
msgid "Expiration Date: %{date}"
|
msgid "Expiration Date: %{date}"
|
||||||
msgstr "過期時間: %{date}"
|
msgstr "過期時間: %{date}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:104 src/views/domain/DomainList.vue:68
|
#: src/views/domain/DomainEdit.vue:115 src/views/domain/DomainList.vue:68
|
||||||
msgid "Failed to disable %{msg}"
|
msgid "Failed to disable %{msg}"
|
||||||
msgstr "禁用失敗 %{msg}"
|
msgstr "禁用失敗 %{msg}"
|
||||||
|
|
||||||
#: src/views/domain/DomainEdit.vue:95 src/views/domain/DomainList.vue:58
|
#: src/views/domain/DomainEdit.vue:106 src/views/domain/DomainList.vue:58
|
||||||
msgid "Failed to enable %{msg}"
|
msgid "Failed to enable %{msg}"
|
||||||
msgstr "啟用失敗 %{msg}"
|
msgstr "啟用失敗 %{msg}"
|
||||||
|
|
||||||
|
@ -260,10 +264,14 @@ msgstr ""
|
||||||
msgid "File Not Found"
|
msgid "File Not Found"
|
||||||
msgstr "未找到檔案"
|
msgstr "未找到檔案"
|
||||||
|
|
||||||
#: src/views/domain/DomainAdd.vue:7
|
#: src/language/constants.ts:20 src/views/domain/DomainAdd.vue:7
|
||||||
msgid "Finished"
|
msgid "Finished"
|
||||||
msgstr "完成"
|
msgstr "完成"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:11
|
||||||
|
msgid "Generating private key for registering account"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:85
|
#: src/views/domain/cert/IssueCert.vue:85
|
||||||
msgid "Getting the certificate, please wait..."
|
msgid "Getting the certificate, please wait..."
|
||||||
msgstr "正在獲取憑證,請稍等..."
|
msgstr "正在獲取憑證,請稍等..."
|
||||||
|
@ -281,7 +289,7 @@ msgstr "安裝"
|
||||||
msgid "Install successfully"
|
msgid "Install successfully"
|
||||||
msgstr "啟用成功"
|
msgstr "啟用成功"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:31
|
#: src/views/domain/cert/CertInfo.vue:15
|
||||||
msgid "Intermediate Certification Authorities: %{issuer}"
|
msgid "Intermediate Certification Authorities: %{issuer}"
|
||||||
msgstr "中級憑證頒發機構: %{issuer}"
|
msgstr "中級憑證頒發機構: %{issuer}"
|
||||||
|
|
||||||
|
@ -390,7 +398,7 @@ msgstr "取消"
|
||||||
msgid "Not Found"
|
msgid "Not Found"
|
||||||
msgstr "找不到頁面"
|
msgstr "找不到頁面"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:35
|
#: src/views/domain/cert/CertInfo.vue:19
|
||||||
msgid "Not Valid Before: %{date}"
|
msgid "Not Valid Before: %{date}"
|
||||||
msgstr "此前無效: %{date}"
|
msgstr "此前無效: %{date}"
|
||||||
|
|
||||||
|
@ -401,6 +409,10 @@ msgid ""
|
||||||
"you need to get the certificate."
|
"you need to get the certificate."
|
||||||
msgstr "注意:當前配置中的 server_name 必須為需要申請憑證的域名。"
|
msgstr "注意:當前配置中的 server_name 必須為需要申請憑證的域名。"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:16
|
||||||
|
msgid "Obtaining certificate"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdCurd.vue:27
|
#: src/components/StdDataDisplay/StdCurd.vue:27
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:40
|
#: src/components/StdDataDisplay/StdTable.vue:40
|
||||||
#: src/views/domain/DomainList.vue:26
|
#: src/views/domain/DomainList.vue:26
|
||||||
|
@ -440,6 +452,11 @@ msgstr "請輸入您的密碼!"
|
||||||
msgid "Please input your username!"
|
msgid "Please input your username!"
|
||||||
msgstr "請輸入您的使用者名稱!"
|
msgstr "請輸入您的使用者名稱!"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:12
|
||||||
|
#, fuzzy
|
||||||
|
msgid "Preparing lego configurations"
|
||||||
|
msgstr "配置"
|
||||||
|
|
||||||
#: src/language/constants.ts:7
|
#: src/language/constants.ts:7
|
||||||
msgid "Prohibit changing root password in demo"
|
msgid "Prohibit changing root password in demo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -460,11 +477,19 @@ msgstr "讀"
|
||||||
msgid "Receive"
|
msgid "Receive"
|
||||||
msgstr "下載"
|
msgstr "下載"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:15
|
||||||
|
msgid "Registering user"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:19
|
||||||
|
msgid "Reloading nginx"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:187
|
#: src/components/StdDataDisplay/StdTable.vue:187
|
||||||
msgid "Reset"
|
msgid "Reset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:169
|
#: src/views/config/ConfigEdit.vue:52 src/views/domain/DomainEdit.vue:181
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr "儲存"
|
msgstr "儲存"
|
||||||
|
|
||||||
|
@ -484,7 +509,7 @@ msgid "Save Successfully"
|
||||||
msgstr "儲存成功"
|
msgstr "儲存成功"
|
||||||
|
|
||||||
#: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43
|
#: src/views/config/ConfigEdit.vue:34 src/views/domain/DomainAdd.vue:43
|
||||||
#: src/views/domain/DomainEdit.vue:80
|
#: src/views/domain/DomainEdit.vue:91
|
||||||
msgid "Saved successfully"
|
msgid "Saved successfully"
|
||||||
msgstr "儲存成功"
|
msgstr "儲存成功"
|
||||||
|
|
||||||
|
@ -493,10 +518,9 @@ msgid "Send"
|
||||||
msgstr "上傳"
|
msgstr "上傳"
|
||||||
|
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:112
|
#: src/components/StdDataDisplay/StdTable.vue:112
|
||||||
#: src/components/StdDataDisplay/StdTable.vue:94
|
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:56
|
||||||
#: src/views/config/ConfigEdit.vue:22 src/views/domain/DomainEdit.vue:44
|
#: src/views/domain/DomainEdit.vue:68 src/views/domain/DomainEdit.vue:77
|
||||||
#: src/views/domain/DomainEdit.vue:56 src/views/domain/DomainEdit.vue:65
|
#: src/views/domain/DomainEdit.vue:94 src/views/domain/DomainList.vue:78
|
||||||
#: src/views/domain/DomainEdit.vue:83 src/views/domain/DomainList.vue:78
|
|
||||||
#: src/views/other/Install.vue:71
|
#: src/views/other/Install.vue:71
|
||||||
msgid "Server error"
|
msgid "Server error"
|
||||||
msgstr "伺服器錯誤"
|
msgstr "伺服器錯誤"
|
||||||
|
@ -534,7 +558,7 @@ msgstr "狀態"
|
||||||
msgid "Storage"
|
msgid "Storage"
|
||||||
msgstr "儲存"
|
msgstr "儲存"
|
||||||
|
|
||||||
#: src/views/domain/cert/CertInfo.vue:32
|
#: src/views/domain/cert/CertInfo.vue:16
|
||||||
msgid "Subject Name: %{name}"
|
msgid "Subject Name: %{name}"
|
||||||
msgstr "主體名稱: %{name}"
|
msgstr "主體名稱: %{name}"
|
||||||
|
|
||||||
|
@ -585,6 +609,10 @@ msgstr "使用者名稱"
|
||||||
msgid "Username (*)"
|
msgid "Username (*)"
|
||||||
msgstr "使用者名稱 (*)"
|
msgstr "使用者名稱 (*)"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:14
|
||||||
|
msgid "Using HTTP01 challenge provider"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24
|
#: src/views/domain/cert/IssueCert.vue:12 src/views/domain/DomainAdd.vue:24
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
msgstr "警告"
|
msgstr "警告"
|
||||||
|
@ -594,6 +622,14 @@ msgstr "警告"
|
||||||
msgid "Writes"
|
msgid "Writes"
|
||||||
msgstr "寫"
|
msgstr "寫"
|
||||||
|
|
||||||
|
#: src/language/constants.ts:18
|
||||||
|
msgid "Writing certificate private key to disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/language/constants.ts:17
|
||||||
|
msgid "Writing certificate to disk"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
#: src/views/domain/ngx_conf/directive/DirectiveEditor.vue:16
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "是的"
|
msgstr "是的"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {useGettext} from 'vue3-gettext'
|
import {useGettext} from 'vue3-gettext'
|
||||||
import {computed, nextTick, ref, watch} from 'vue'
|
import {computed, h, nextTick, onMounted, ref, VNode, watch} from 'vue'
|
||||||
import {message} from 'ant-design-vue'
|
import {message} from 'ant-design-vue'
|
||||||
import domain from '@/api/domain'
|
import domain from '@/api/domain'
|
||||||
import websocket from '@/lib/websocket'
|
import websocket from '@/lib/websocket'
|
||||||
|
@ -12,6 +12,7 @@ const props = defineProps(['directivesMap', 'current_server_directives', 'enable
|
||||||
const emit = defineEmits(['changeEnabled', 'callback', 'update:enabled'])
|
const emit = defineEmits(['changeEnabled', 'callback', 'update:enabled'])
|
||||||
|
|
||||||
const issuing_cert = ref(false)
|
const issuing_cert = ref(false)
|
||||||
|
const modalVisible = ref(false)
|
||||||
|
|
||||||
function onchange(r: boolean) {
|
function onchange(r: boolean) {
|
||||||
emit('changeEnabled', r)
|
emit('changeEnabled', r)
|
||||||
|
@ -81,8 +82,25 @@ function change_auto_cert(r: boolean) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const logContainer = ref(null)
|
||||||
|
|
||||||
|
function log(msg: string) {
|
||||||
|
const para = document.createElement('p')
|
||||||
|
para.appendChild(document.createTextNode($gettext(msg)));
|
||||||
|
|
||||||
|
(logContainer.value as any as Node).appendChild(para);
|
||||||
|
|
||||||
|
(logContainer.value as any as Element).scroll({top: 320, left: 0, behavior: 'smooth'})
|
||||||
|
}
|
||||||
|
|
||||||
const issue_cert = async (server_name: string, callback: Function) => {
|
const issue_cert = async (server_name: string, callback: Function) => {
|
||||||
message.info($gettext('Getting the certificate, please wait...'), 15)
|
progressStatus.value = 'active'
|
||||||
|
modalClosable.value = false
|
||||||
|
modalVisible.value = true
|
||||||
|
progressPercent.value = 0;
|
||||||
|
(logContainer.value as any as Element).innerHTML = ''
|
||||||
|
|
||||||
|
log($gettext('Getting the certificate, please wait...'))
|
||||||
|
|
||||||
const ws = websocket('/api/cert/issue/' + server_name, false)
|
const ws = websocket('/api/cert/issue/' + server_name, false)
|
||||||
|
|
||||||
|
@ -92,23 +110,25 @@ const issue_cert = async (server_name: string, callback: Function) => {
|
||||||
|
|
||||||
ws.onmessage = m => {
|
ws.onmessage = m => {
|
||||||
const r = JSON.parse(m.data)
|
const r = JSON.parse(m.data)
|
||||||
|
log(r.message)
|
||||||
|
|
||||||
switch (r.status) {
|
switch (r.status) {
|
||||||
case 'success':
|
|
||||||
message.success(r.message, 10)
|
|
||||||
break
|
|
||||||
case 'info':
|
case 'info':
|
||||||
message.info(r.message, 10)
|
progressPercent.value += 5
|
||||||
break
|
break
|
||||||
case 'error':
|
default:
|
||||||
message.error(r.message, 10)
|
modalClosable.value = true
|
||||||
|
issuing_cert.value = false
|
||||||
|
|
||||||
|
if (r.status === 'success' && r.ssl_certificate !== undefined && r.ssl_certificate_key !== undefined) {
|
||||||
|
progressStatus.value = 'success'
|
||||||
|
progressPercent.value = 100
|
||||||
|
callback(r.ssl_certificate, r.ssl_certificate_key)
|
||||||
|
} else {
|
||||||
|
progressStatus.value = 'exception'
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.status === 'success' && r.ssl_certificate !== undefined && r.ssl_certificate_key !== undefined) {
|
|
||||||
callback(r.ssl_certificate, r.ssl_certificate_key)
|
|
||||||
}
|
|
||||||
|
|
||||||
issuing_cert.value = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,9 +163,34 @@ watch(no_server_name, () => {
|
||||||
emit('update:enabled', false)
|
emit('update:enabled', false)
|
||||||
onchange(false)
|
onchange(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const progressStrokeColor = {
|
||||||
|
from: '#108ee9',
|
||||||
|
to: '#87d068',
|
||||||
|
}
|
||||||
|
|
||||||
|
const progressPercent = ref(0)
|
||||||
|
|
||||||
|
const progressStatus = ref('active')
|
||||||
|
|
||||||
|
const modalClosable = ref(false)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:title="$gettext('Obtaining certificate')"
|
||||||
|
v-model:visible="modalVisible"
|
||||||
|
:footer="null" :closable="modalClosable" force-render>
|
||||||
|
<a-progress
|
||||||
|
:stroke-color="progressStrokeColor"
|
||||||
|
:percent="progressPercent"
|
||||||
|
:status="progressStatus"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="issue-cert-log-container" ref="logContainer">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a-modal>
|
||||||
<div>
|
<div>
|
||||||
<a-form-item :label="$gettext('Encrypt website with Let\'s Encrypt')">
|
<a-form-item :label="$gettext('Encrypt website with Let\'s Encrypt')">
|
||||||
<a-switch
|
<a-switch
|
||||||
|
@ -185,6 +230,22 @@ watch(no_server_name, () => {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.issue-cert-log-container {
|
||||||
|
height: 320px;
|
||||||
|
overflow: scroll;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.switch-wrapper {
|
.switch-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -8,9 +8,43 @@ import (
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
Success = "success"
|
||||||
|
Info = "info"
|
||||||
|
Error = "error"
|
||||||
|
)
|
||||||
|
|
||||||
|
type IssueCertResponse struct {
|
||||||
|
Status string `json:"status"`
|
||||||
|
Message string `json:"message"`
|
||||||
|
SSLCertificate string `json:"ssl_certificate,omitempty"`
|
||||||
|
SSLCertificateKey string `json:"ssl_certificate_key,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleIssueCertLogChan(conn *websocket.Conn, logChan chan string) {
|
||||||
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
log.Println("api.handleIssueCertLogChan recover", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
for logString := range logChan {
|
||||||
|
|
||||||
|
err := conn.WriteJSON(IssueCertResponse{
|
||||||
|
Status: Info,
|
||||||
|
Message: logString,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Error handleIssueCertLogChan", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func IssueCert(c *gin.Context) {
|
func IssueCert(c *gin.Context) {
|
||||||
domain := c.Param("domain")
|
domain := c.Param("domain")
|
||||||
|
|
||||||
|
@ -36,97 +70,71 @@ func IssueCert(c *gin.Context) {
|
||||||
|
|
||||||
// read
|
// read
|
||||||
mt, message, err := ws.ReadMessage()
|
mt, message, err := ws.ReadMessage()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if mt == websocket.TextMessage && string(message) == "go" {
|
if mt != websocket.TextMessage || string(message) != "go" {
|
||||||
|
return
|
||||||
err = cert.IssueCert(domain)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
|
|
||||||
log.Println(err)
|
|
||||||
|
|
||||||
err = ws.WriteJSON(gin.H{
|
|
||||||
"status": "error",
|
|
||||||
"message": err.Error(),
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
sslCertificatePath := nginx.GetNginxConfPath("ssl/" + domain + "/fullchain.cer")
|
|
||||||
_, err = os.Stat(sslCertificatePath)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Println("[found]", "fullchain.cer")
|
|
||||||
|
|
||||||
err = ws.WriteJSON(gin.H{
|
|
||||||
"status": "success",
|
|
||||||
"message": "[found] fullchain.cer",
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
sslCertificateKeyPath := nginx.GetNginxConfPath("ssl/" + domain + "/" + domain + ".key")
|
|
||||||
_, err = os.Stat(sslCertificateKeyPath)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Println("[found]", "cert key")
|
|
||||||
err = ws.WriteJSON(gin.H{
|
|
||||||
"status": "success",
|
|
||||||
"message": "[found] Certificate Key",
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
certModel, err := model.FirstCert(domain)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = certModel.Updates(&model.Cert{
|
|
||||||
SSLCertificatePath: sslCertificatePath,
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = ws.WriteJSON(gin.H{
|
|
||||||
"status": "success",
|
|
||||||
"message": "Issued certificate successfully",
|
|
||||||
"ssl_certificate": sslCertificatePath,
|
|
||||||
"ssl_certificate_key": sslCertificateKeyPath,
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logChan := make(chan string, 1)
|
||||||
|
errChan := make(chan error, 1)
|
||||||
|
|
||||||
|
go cert.IssueCert(domain, logChan, errChan)
|
||||||
|
|
||||||
|
go handleIssueCertLogChan(ws, logChan)
|
||||||
|
|
||||||
|
// block, unless errChan closed
|
||||||
|
for err = range errChan {
|
||||||
|
log.Println("Error cert.IssueCert", err)
|
||||||
|
|
||||||
|
err = ws.WriteJSON(IssueCertResponse{
|
||||||
|
Status: Error,
|
||||||
|
Message: err.Error(),
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
close(logChan)
|
||||||
|
|
||||||
|
sslCertificatePath := nginx.GetNginxConfPath("ssl/" + domain + "/fullchain.cer")
|
||||||
|
sslCertificateKeyPath := nginx.GetNginxConfPath("ssl/" + domain + "/" + domain + ".key")
|
||||||
|
|
||||||
|
certModel, err := model.FirstCert(domain)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = certModel.Updates(&model.Cert{
|
||||||
|
SSLCertificatePath: sslCertificatePath,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = ws.WriteJSON(IssueCertResponse{
|
||||||
|
Status: Success,
|
||||||
|
Message: "Issued certificate successfully",
|
||||||
|
SSLCertificate: sslCertificatePath,
|
||||||
|
SSLCertificateKey: sslCertificateKeyPath,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,18 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func handleIssueCertLogChan(logChan chan string) {
|
||||||
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
log.Println("[Auto Cert] handleIssueCertLogChan", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
for logString := range logChan {
|
||||||
|
log.Println("[Auto Cert] Info", logString)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func AutoCert() {
|
func AutoCert() {
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
|
@ -24,7 +36,7 @@ func AutoCert() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if certModel.SSLCertificatePath != "" {
|
if certModel.SSLCertificatePath == "" {
|
||||||
log.Println("[AutoCert] Error ssl_certificate_path is empty, " +
|
log.Println("[AutoCert] Error ssl_certificate_path is empty, " +
|
||||||
"try to reopen auto-cert for this domain:" + domain)
|
"try to reopen auto-cert for this domain:" + domain)
|
||||||
continue
|
continue
|
||||||
|
@ -41,9 +53,18 @@ func AutoCert() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// after 1 mo, reissue certificate
|
// after 1 mo, reissue certificate
|
||||||
err = IssueCert(domain)
|
logChan := make(chan string, 1)
|
||||||
if err != nil {
|
errChan := make(chan error, 1)
|
||||||
log.Println(err)
|
|
||||||
|
go IssueCert(domain, logChan, errChan)
|
||||||
|
|
||||||
|
go handleIssueCertLogChan(logChan)
|
||||||
|
|
||||||
|
// block, unless errChan closed
|
||||||
|
for err = range errChan {
|
||||||
|
log.Println("Error cert.IssueCert", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(logChan)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,13 +35,22 @@ func (u *MyUser) GetPrivateKey() crypto.PrivateKey {
|
||||||
return u.key
|
return u.key
|
||||||
}
|
}
|
||||||
|
|
||||||
func IssueCert(domain string) error {
|
func IssueCert(domain string, logChan chan string, errChan chan error) {
|
||||||
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
log.Println("Issue Cert recover", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Create a user. New accounts need an email and private key to start.
|
// Create a user. New accounts need an email and private key to start.
|
||||||
|
logChan <- "Generating private key for registering account"
|
||||||
privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "issue cert generate key error")
|
errChan <- errors.Wrap(err, "issue cert generate key error")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logChan <- "Preparing lego configurations"
|
||||||
myUser := MyUser{
|
myUser := MyUser{
|
||||||
Email: settings.ServerSettings.Email,
|
Email: settings.ServerSettings.Email,
|
||||||
key: privateKey,
|
key: privateKey,
|
||||||
|
@ -55,26 +64,32 @@ func IssueCert(domain string) error {
|
||||||
|
|
||||||
config.Certificate.KeyType = certcrypto.RSA2048
|
config.Certificate.KeyType = certcrypto.RSA2048
|
||||||
|
|
||||||
|
logChan <- "Creating client facilitates communication with the CA server"
|
||||||
// A client facilitates communication with the CA server.
|
// A client facilitates communication with the CA server.
|
||||||
client, err := lego.NewClient(config)
|
client, err := lego.NewClient(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "issue cert new client error")
|
errChan <- errors.Wrap(err, "issue cert new client error")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logChan <- "Using HTTP01 challenge provider"
|
||||||
err = client.Challenge.SetHTTP01Provider(
|
err = client.Challenge.SetHTTP01Provider(
|
||||||
http01.NewProviderServer("",
|
http01.NewProviderServer("",
|
||||||
settings.ServerSettings.HTTPChallengePort,
|
settings.ServerSettings.HTTPChallengePort,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "issue cert challenge fail")
|
errChan <- errors.Wrap(err, "issue cert challenge fail")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// New users will need to register
|
// New users will need to register
|
||||||
|
logChan <- "Registering user"
|
||||||
reg, err := client.Registration.Register(registration.RegisterOptions{TermsOfServiceAgreed: true})
|
reg, err := client.Registration.Register(registration.RegisterOptions{TermsOfServiceAgreed: true})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
errChan <- errors.Wrap(err, "issue cert register fail")
|
||||||
return errors.Wrap(err, "issue cert register fail")
|
return
|
||||||
}
|
}
|
||||||
myUser.Registration = reg
|
myUser.Registration = reg
|
||||||
|
|
||||||
|
@ -82,37 +97,46 @@ func IssueCert(domain string) error {
|
||||||
Domains: []string{domain},
|
Domains: []string{domain},
|
||||||
Bundle: true,
|
Bundle: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logChan <- "Obtaining certificate"
|
||||||
certificates, err := client.Certificate.Obtain(request)
|
certificates, err := client.Certificate.Obtain(request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "issue cert fail to obtain")
|
errChan <- errors.Wrap(err, "issue cert fail to obtain")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
saveDir := nginx.GetNginxConfPath("ssl/" + domain)
|
saveDir := nginx.GetNginxConfPath("ssl/" + domain)
|
||||||
if _, err = os.Stat(saveDir); os.IsNotExist(err) {
|
if _, err = os.Stat(saveDir); os.IsNotExist(err) {
|
||||||
err = os.Mkdir(saveDir, 0755)
|
err = os.Mkdir(saveDir, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "issue cert fail to create")
|
errChan <- errors.Wrap(err, "issue cert fail to create")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Each certificate comes back with the cert bytes, the bytes of the client's
|
// Each certificate comes back with the cert bytes, the bytes of the client's
|
||||||
// private key, and a certificate URL. SAVE THESE TO DISK.
|
// private key, and a certificate URL. SAVE THESE TO DISK.
|
||||||
|
logChan <- "Writing certificate to disk"
|
||||||
err = os.WriteFile(filepath.Join(saveDir, "fullchain.cer"),
|
err = os.WriteFile(filepath.Join(saveDir, "fullchain.cer"),
|
||||||
certificates.Certificate, 0644)
|
certificates.Certificate, 0644)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
errChan <- errors.Wrap(err, "error issue cert write fullchain.cer")
|
||||||
return errors.Wrap(err, "issue cert write fullchain.cer fail")
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logChan <- "Writing certificate private key to disk"
|
||||||
err = os.WriteFile(filepath.Join(saveDir, domain+".key"),
|
err = os.WriteFile(filepath.Join(saveDir, domain+".key"),
|
||||||
certificates.PrivateKey, 0644)
|
certificates.PrivateKey, 0644)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
errChan <- errors.Wrap(err, "error issue cert write key")
|
||||||
return errors.Wrap(err, "issue cert write key fail")
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(errChan)
|
||||||
|
logChan <- "Reloading nginx"
|
||||||
|
|
||||||
nginx.ReloadNginx()
|
nginx.ReloadNginx()
|
||||||
|
|
||||||
return nil
|
logChan <- "Finished"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue