瀏覽代碼

[v1.3 RC] Enhanced domain add, optimized dashboard.

Jacky 3 年之前
父節點
當前提交
b3cf13ad50

+ 20 - 19
README-zh_CN.md

@@ -76,6 +76,7 @@ Nginx 网络管理界面,由  [0xJacky](https://jackyu.cn/) 与 [Hintay](https
 - 在线编辑 Nginx 配置文件,编辑器支持 Nginx 配置语法高亮
 - 在线编辑 Nginx 配置文件,编辑器支持 Nginx 配置语法高亮
 - 使用 Go 和 Vue 开发,发行版本为单个可执行的二进制文件
 - 使用 Go 和 Vue 开发,发行版本为单个可执行的二进制文件
 - 前端支持暗夜模式
 - 前端支持暗夜模式
+- 保存配置文件后自动测试配置文件并重载 Nginx
 
 
 ### 国际化
 ### 国际化
 
 
@@ -195,51 +196,51 @@ go build -o nginx-ui -v main.go
 **安装或升级**
 **安装或升级**
 
 
 ```shell
 ```shell
-bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) install
+bash <(curl -L -s https://ghproxy.com/https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) install -r https://ghproxy.com/
 ```
 ```
 一键安装脚本默认设置的监听端口为 `9000`,HTTP Challenge 端口默认为 `9180`,如果出现端口冲突请进入 `/usr/local/etc/nginx-ui/app.ini` 修改,并使用 `systemctl restart nginx-ui` 重启 Nginx UI 服务。
 一键安装脚本默认设置的监听端口为 `9000`,HTTP Challenge 端口默认为 `9180`,如果出现端口冲突请进入 `/usr/local/etc/nginx-ui/app.ini` 修改,并使用 `systemctl restart nginx-ui` 重启 Nginx UI 服务。
 
 
 **卸载 Nginx UI 但保留配置和数据库文件**
 **卸载 Nginx UI 但保留配置和数据库文件**
 
 
 ```shell
 ```shell
-bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) remove
+bash <(curl -L -s https://ghproxy.com/https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) remove
 ```
 ```
 
 
 ### 更多用法
 ### 更多用法
 
 
 ````shell
 ````shell
-bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) help
+bash <(curl -L -s https://ghproxy.com/https://raw.githubusercontent.com/0xJacky/nginx-ui/master/install.sh) help
 ````
 ````
 
 
 ## Nginx 反向代理配置示例
 ## Nginx 反向代理配置示例
 
 
 ```nginx
 ```nginx
 server {
 server {
-    listen	80;
-    listen	[::]:80;
+    listen          80;
+    listen          [::]:80;
 
 
-    server_name	<your_server_name>;
+    server_name     <your_server_name>;
     rewrite ^(.*)$  https://$host$1 permanent;
     rewrite ^(.*)$  https://$host$1 permanent;
 }
 }
 
 
 server {
 server {
-    listen	443 ssl http2;
-    listen	[::]:443 ssl http2;
+    listen  443       ssl http2;
+    listen  [::]:443  ssl http2;
 
 
-    server_name	<your_server_name>;
+    server_name         <your_server_name>;
 
 
-    ssl_certificate	/path/to/ssl_cert;
-    ssl_certificate_key	/path/to/ssl_cert_key;
+    ssl_certificate     /path/to/ssl_cert;
+    ssl_certificate_key /path/to/ssl_cert_key;
 
 
     location / {
     location / {
-        proxy_set_header Host $host;
-        proxy_set_header   X-Real-IP            $remote_addr;
-        proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
-        proxy_set_header   X-Forwarded-Proto    $scheme;
-        proxy_http_version 1.1;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection upgrade;
-        proxy_pass http://127.0.0.1:9000/;
+        proxy_set_header    Host                $host;
+        proxy_set_header    X-Real-IP           $remote_addr;
+        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
+        proxy_set_header    X-Forwarded-Proto   $scheme;
+        proxy_http_version  1.1;
+        proxy_set_header    Upgrade             $http_upgrade;
+        proxy_set_header    Connection          upgrade;
+        proxy_pass          http://127.0.0.1:9000/;
     }
     }
 }
 }
 ```
 ```

+ 17 - 16
README-zh_TW.md

@@ -78,6 +78,7 @@ Nginx 網路管理介面,由  [0xJacky](https://jackyu.cn/) 與 [Hintay](https
 - 線上編輯 Nginx 配置檔案,編輯器支援 Nginx 配置語法高亮
 - 線上編輯 Nginx 配置檔案,編輯器支援 Nginx 配置語法高亮
 - 使用 Go 和 Vue 開發,發行版本為單個可執行的二進位制檔案
 - 使用 Go 和 Vue 開發,發行版本為單個可執行的二進位制檔案
 - 前端支援暗夜模式
 - 前端支援暗夜模式
+- 保存配置文件後自動測試配置文件並重載 Nginx
 
 
 ### 國際化
 ### 國際化
 
 
@@ -215,31 +216,31 @@ bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/inst
 
 
 ```nginx
 ```nginx
 server {
 server {
-    listen	80;
-    listen	[::]:80;
+    listen          80;
+    listen          [::]:80;
 
 
-    server_name	<your_server_name>;
+    server_name     <your_server_name>;
     rewrite ^(.*)$  https://$host$1 permanent;
     rewrite ^(.*)$  https://$host$1 permanent;
 }
 }
 
 
 server {
 server {
-    listen	443 ssl http2;
-    listen	[::]:443 ssl http2;
+    listen  443       ssl http2;
+    listen  [::]:443  ssl http2;
 
 
-    server_name	<your_server_name>;
+    server_name         <your_server_name>;
 
 
-    ssl_certificate	/path/to/ssl_cert;
-    ssl_certificate_key	/path/to/ssl_cert_key;
+    ssl_certificate     /path/to/ssl_cert;
+    ssl_certificate_key /path/to/ssl_cert_key;
 
 
     location / {
     location / {
-        proxy_set_header Host $host;
-        proxy_set_header   X-Real-IP            $remote_addr;
-        proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
-        proxy_set_header   X-Forwarded-Proto    $scheme;
-        proxy_http_version 1.1;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection upgrade;
-        proxy_pass http://127.0.0.1:9000/;
+        proxy_set_header    Host                $host;
+        proxy_set_header    X-Real-IP           $remote_addr;
+        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
+        proxy_set_header    X-Forwarded-Proto   $scheme;
+        proxy_http_version  1.1;
+        proxy_set_header    Upgrade             $http_upgrade;
+        proxy_set_header    Connection          upgrade;
+        proxy_pass          http://127.0.0.1:9000/;
     }
     }
 }
 }
 ```
 ```

+ 17 - 16
README.md

@@ -74,6 +74,7 @@ URL:[https://nginxui.jackyu.cn](https://nginxui.jackyu.cn)
 - Online editing websites configuration files, the editor support highlight nginx configuration syntax.
 - Online editing websites configuration files, the editor support highlight nginx configuration syntax.
 - Written in Go and Vue, distribution is a single executable binary.
 - Written in Go and Vue, distribution is a single executable binary.
 - Frontend support Dark Mode
 - Frontend support Dark Mode
+- Automatically test configuration file and reload nginx after saving configuration.
 
 
 ### Internationalization
 ### Internationalization
 
 
@@ -214,31 +215,31 @@ bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/inst
 
 
 ```nginx
 ```nginx
 server {
 server {
-    listen	80;
-    listen	[::]:80;
+    listen          80;
+    listen          [::]:80;
 
 
-    server_name	<your_server_name>;
+    server_name     <your_server_name>;
     rewrite ^(.*)$  https://$host$1 permanent;
     rewrite ^(.*)$  https://$host$1 permanent;
 }
 }
 
 
 server {
 server {
-    listen	443 ssl http2;
-    listen	[::]:443 ssl http2;
+    listen  443       ssl http2;
+    listen  [::]:443  ssl http2;
 
 
-    server_name	<your_server_name>;
+    server_name         <your_server_name>;
 
 
-    ssl_certificate	/path/to/ssl_cert;
-    ssl_certificate_key	/path/to/ssl_cert_key;
+    ssl_certificate     /path/to/ssl_cert;
+    ssl_certificate_key /path/to/ssl_cert_key;
 
 
     location / {
     location / {
-        proxy_set_header Host $host;
-        proxy_set_header   X-Real-IP            $remote_addr;
-        proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
-        proxy_set_header   X-Forwarded-Proto    $scheme;
-        proxy_http_version 1.1;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection upgrade;
-        proxy_pass http://127.0.0.1:9000/;
+        proxy_set_header    Host                $host;
+        proxy_set_header    X-Real-IP           $remote_addr;
+        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
+        proxy_set_header    X-Forwarded-Proto   $scheme;
+        proxy_http_version  1.1;
+        proxy_set_header    Upgrade             $http_upgrade;
+        proxy_set_header    Connection          upgrade;
+        proxy_pass          http://127.0.0.1:9000/;
     }
     }
 }
 }
 ```
 ```

+ 7 - 7
frontend/src/components/Chart/RadialBarChart.vue

@@ -35,7 +35,7 @@ export default {
                 series: this.series,
                 series: this.series,
                 chart: {
                 chart: {
                     type: 'radialBar',
                     type: 'radialBar',
-                    offsetY: 0
+                    offsetY: -30
                 },
                 },
                 plotOptions: {
                 plotOptions: {
                     radialBar: {
                     radialBar: {
@@ -43,12 +43,12 @@ export default {
                         endAngle: 135,
                         endAngle: 135,
                         dataLabels: {
                         dataLabels: {
                             name: {
                             name: {
-                                fontSize: '15px',
+                                fontSize: '14px',
                                 color: this.colors,
                                 color: this.colors,
-                                offsetY: 56
+                                offsetY: 36
                             },
                             },
                             value: {
                             value: {
-                                offsetY: 60,
+                                offsetY: 50,
                                 fontSize: '14px',
                                 fontSize: '14px',
                                 color: undefined,
                                 color: undefined,
                                 formatter: () => {return ''}
                                 formatter: () => {return ''}
@@ -82,16 +82,16 @@ export default {
 .container {
 .container {
     position: relative;
     position: relative;
     margin: 0 auto;
     margin: 0 auto;
-    height: 172px;
+    height: 112px!important;
     .text {
     .text {
         position: absolute;
         position: absolute;
-        top: calc(50% - 3px);
+        top: calc(50% - 5px);
         width: 100%;
         width: 100%;
         text-align: center;
         text-align: center;
     }
     }
     .bottom_text {
     .bottom_text {
         position: absolute;
         position: absolute;
-        top: calc(152px);
+        top: calc(106px);
         font-weight: 600;
         font-weight: 600;
         width: 100%;
         width: 100%;
         text-align: center;
         text-align: center;

+ 3 - 1
frontend/src/lazy.js

@@ -47,7 +47,8 @@ import {
     Tabs,
     Tabs,
     Tooltip,
     Tooltip,
     Transfer,
     Transfer,
-    Upload
+    Upload,
+    Tag
 } from 'ant-design-vue'
 } from 'ant-design-vue'
 
 
 Vue.use(ConfigProvider)
 Vue.use(ConfigProvider)
@@ -97,6 +98,7 @@ Vue.use(Result)
 Vue.use(pageHeader)
 Vue.use(pageHeader)
 Vue.use(Switch)
 Vue.use(Switch)
 Vue.use(Space)
 Vue.use(Space)
+Vue.use(Tag)
 
 
 Vue.prototype.$confirm = Modal.confirm
 Vue.prototype.$confirm = Modal.confirm
 Vue.prototype.$message = message
 Vue.prototype.$message = message

+ 53 - 39
frontend/src/locale/en/LC_MESSAGES/app.po

@@ -27,14 +27,18 @@ msgstr ""
 msgid "Add Site"
 msgid "Add Site"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:86 src/views/domain/DomainEdit.vue:172
+#: src/views/domain/DomainAdd.vue:89 src/views/domain/DomainEdit.vue:164
 msgid "Auto-renewal disabled for %{name}"
 msgid "Auto-renewal disabled for %{name}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:80 src/views/domain/DomainEdit.vue:166
+#: src/views/domain/DomainAdd.vue:83 src/views/domain/DomainEdit.vue:158
 msgid "Auto-renewal enabled for %{name}"
 msgid "Auto-renewal enabled for %{name}"
 msgstr ""
 msgstr ""
 
 
+#: src/views/domain/DomainEdit.vue:38
+msgid "Back"
+msgstr ""
+
 #: src/views/domain/DomainAdd.vue:37
 #: src/views/domain/DomainAdd.vue:37
 msgid "Base information"
 msgid "Base information"
 msgstr ""
 msgstr ""
@@ -43,7 +47,7 @@ msgstr ""
 msgid "Build with"
 msgid "Build with"
 msgstr ""
 msgstr ""
 
 
-#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:24
+#: src/views/config/ConfigEdit.vue:5
 msgid "Cancel"
 msgid "Cancel"
 msgstr ""
 msgstr ""
 
 
@@ -79,7 +83,7 @@ msgstr ""
 msgid "Configure SSL"
 msgid "Configure SSL"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:207
+#: src/views/dashboard/DashBoard.vue:211
 msgid "CPU Status"
 msgid "CPU Status"
 msgstr ""
 msgstr ""
 
 
@@ -111,32 +115,32 @@ msgstr ""
 msgid "Development Mode"
 msgid "Development Mode"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:88 src/views/domain/DomainEdit.vue:174
+#: src/views/domain/DomainAdd.vue:91 src/views/domain/DomainEdit.vue:166
 msgid "Disable auto-renewal failed for %{name}"
 msgid "Disable auto-renewal failed for %{name}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainList.vue:7 src/views/domain/DomainList.vue:2
-#: src/views/domain/DomainList.vue:17
+#: src/views/domain/DomainEdit.vue:63 src/views/domain/DomainList.vue:7
+#: src/views/domain/DomainList.vue:2 src/views/domain/DomainList.vue:17
 msgid "Disabled"
 msgid "Disabled"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainList.vue:55
+#: src/views/domain/DomainEdit.vue:180 src/views/domain/DomainList.vue:55
 msgid "Disabled successfully"
 msgid "Disabled successfully"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:285
+#: src/views/dashboard/DashBoard.vue:289
 msgid "Disk IO"
 msgid "Disk IO"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainEdit.vue:134
+#: src/views/domain/DomainEdit.vue:124
 msgid "Do you want to change the template to support the TLS?"
 msgid "Do you want to change the template to support the TLS?"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:111
+#: src/views/domain/DomainAdd.vue:112
 msgid "Domain Config Created Successfully"
 msgid "Domain Config Created Successfully"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainEdit.vue:42
+#: src/views/domain/DomainEdit.vue:47
 msgid "Edit %{n}"
 msgid "Edit %{n}"
 msgstr ""
 msgstr ""
 
 
@@ -144,7 +148,7 @@ msgstr ""
 msgid "Edit Configuration"
 msgid "Edit Configuration"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainEdit.vue:95
+#: src/views/domain/DomainEdit.vue:134
 msgid "Edit Configuration File"
 msgid "Edit Configuration File"
 msgstr ""
 msgstr ""
 
 
@@ -156,11 +160,11 @@ msgstr ""
 msgid "Email (*)"
 msgid "Email (*)"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:82 src/views/domain/DomainEdit.vue:168
+#: src/views/domain/DomainAdd.vue:85 src/views/domain/DomainEdit.vue:160
 msgid "Enable auto-renewal failed for %{name}"
 msgid "Enable auto-renewal failed for %{name}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:39
+#: src/views/domain/DomainAdd.vue:40
 msgid "Enable failed"
 msgid "Enable failed"
 msgstr ""
 msgstr ""
 
 
@@ -168,12 +172,14 @@ msgstr ""
 msgid "Enable TLS"
 msgid "Enable TLS"
 msgstr ""
 msgstr ""
 
 
+#: src/views/domain/DomainEdit.vue:54 src/views/domain/DomainEdit.vue:71
 #: src/views/domain/DomainList.vue:8 src/views/domain/DomainList.vue:3
 #: src/views/domain/DomainList.vue:8 src/views/domain/DomainList.vue:3
 #: src/views/domain/DomainList.vue:16
 #: src/views/domain/DomainList.vue:16
 msgid "Enabled"
 msgid "Enabled"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainAdd.vue:36 src/views/domain/DomainList.vue:46
+#: src/views/domain/DomainAdd.vue:37 src/views/domain/DomainEdit.vue:172
+#: src/views/domain/DomainList.vue:46
 msgid "Enabled successfully"
 msgid "Enabled successfully"
 msgstr ""
 msgstr ""
 
 
@@ -181,11 +187,11 @@ msgstr ""
 msgid "Expiration Date: %{date}"
 msgid "Expiration Date: %{date}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainList.vue:59
+#: src/views/domain/DomainEdit.vue:183 src/views/domain/DomainList.vue:59
 msgid "Failed to disable %{msg}"
 msgid "Failed to disable %{msg}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainList.vue:50
+#: src/views/domain/DomainEdit.vue:175 src/views/domain/DomainList.vue:50
 msgid "Failed to enable %{msg}"
 msgid "Failed to enable %{msg}"
 msgstr ""
 msgstr ""
 
 
@@ -198,7 +204,7 @@ msgid "Finished"
 msgstr ""
 msgstr ""
 
 
 #: src/views/domain/DomainAdd.vue:13 src/views/domain/DomainAdd.vue:2
 #: src/views/domain/DomainAdd.vue:13 src/views/domain/DomainAdd.vue:2
-#: src/views/domain/DomainEdit.vue:9 src/views/domain/DomainEdit.vue:3
+#: src/views/domain/DomainEdit.vue:22 src/views/domain/DomainEdit.vue:3
 msgid "Getting Certificate from Let's Encrypt"
 msgid "Getting Certificate from Let's Encrypt"
 msgstr ""
 msgstr ""
 
 
@@ -259,7 +265,7 @@ msgstr ""
 msgid "Logout successful"
 msgid "Logout successful"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
+#: src/views/domain/DomainEdit.vue:25 src/views/domain/DomainEdit.vue:6
 msgid ""
 msgid ""
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "HTTPChallengePort (default: 9180) before getting the certificate."
 "HTTPChallengePort (default: 9180) before getting the certificate."
@@ -277,10 +283,14 @@ msgstr ""
 msgid "Manage Users"
 msgid "Manage Users"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:103
+#: src/views/dashboard/DashBoard.vue:105
 msgid "Memory"
 msgid "Memory"
 msgstr ""
 msgstr ""
 
 
+#: src/views/dashboard/DashBoard.vue:93
+msgid "Memory and Storage"
+msgstr ""
+
 #: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
 #: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
 msgid "Modify Config"
 msgid "Modify Config"
 msgstr ""
 msgstr ""
@@ -289,15 +299,19 @@ msgstr ""
 msgid "Name"
 msgid "Name"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:234
+#: src/views/dashboard/DashBoard.vue:238
 msgid "Network"
 msgid "Network"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:168
+#: src/views/dashboard/DashBoard.vue:163
+msgid "Network Statistics"
+msgstr ""
+
+#: src/views/dashboard/DashBoard.vue:172
 msgid "Network Total Receive"
 msgid "Network Total Receive"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:177
+#: src/views/dashboard/DashBoard.vue:181
 msgid "Network Total Send"
 msgid "Network Total Send"
 msgstr ""
 msgstr ""
 
 
@@ -355,11 +369,11 @@ msgstr ""
 msgid "Project Team"
 msgid "Project Team"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:308
+#: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:312
 msgid "Reads"
 msgid "Reads"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:243
+#: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:247
 msgid "Receive"
 msgid "Receive"
 msgstr ""
 msgstr ""
 
 
@@ -367,25 +381,25 @@ msgstr ""
 msgid "Root Directory (root)"
 msgid "Root Directory (root)"
 msgstr ""
 msgstr ""
 
 
-#: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainEdit.vue:27
+#: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainEdit.vue:41
 msgid "Save"
 msgid "Save"
 msgstr ""
 msgstr ""
 
 
-#: src/views/config/ConfigEdit.vue:47 src/views/domain/DomainAdd.vue:43
-#: src/views/domain/DomainAdd.vue:54 src/views/domain/DomainEdit.vue:152
+#: src/views/config/ConfigEdit.vue:47 src/views/domain/DomainAdd.vue:44
+#: src/views/domain/DomainAdd.vue:55 src/views/domain/DomainEdit.vue:142
 msgid "Save error %{msg}"
 msgid "Save error %{msg}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/config/ConfigEdit.vue:44 src/views/domain/DomainAdd.vue:33
-#: src/views/domain/DomainAdd.vue:51 src/views/domain/DomainEdit.vue:146
+#: src/views/config/ConfigEdit.vue:44 src/views/domain/DomainAdd.vue:34
+#: src/views/domain/DomainAdd.vue:52 src/views/domain/DomainEdit.vue:136
 msgid "Saved successfully"
 msgid "Saved successfully"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:257
+#: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:261
 msgid "Send"
 msgid "Send"
 msgstr ""
 msgstr ""
 
 
-#: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:72
+#: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:75
 #: src/views/other/Login.vue:35
 #: src/views/other/Login.vue:35
 msgid "Server error"
 msgid "Server error"
 msgstr ""
 msgstr ""
@@ -410,7 +424,7 @@ msgstr ""
 msgid "Status"
 msgid "Status"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:135
+#: src/views/dashboard/DashBoard.vue:137
 msgid "Storage"
 msgid "Storage"
 msgstr ""
 msgstr ""
 
 
@@ -418,7 +432,7 @@ msgstr ""
 msgid "Subject Name: %{name}"
 msgid "Subject Name: %{name}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:119
+#: src/views/dashboard/DashBoard.vue:121
 msgid "Swap"
 msgid "Swap"
 msgstr ""
 msgstr ""
 
 
@@ -438,7 +452,7 @@ msgstr ""
 msgid "The filename cannot contain the following characters: %{c}"
 msgid "The filename cannot contain the following characters: %{c}"
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainEdit.vue:4
+#: src/views/domain/DomainEdit.vue:17
 msgid ""
 msgid ""
 "The following values will only take effect if you have the corresponding "
 "The following values will only take effect if you have the corresponding "
 "fields in your configuration file. The configuration filename cannot be "
 "fields in your configuration file. The configuration filename cannot be "
@@ -446,11 +460,11 @@ msgid ""
 msgstr ""
 msgstr ""
 
 
 #: src/views/domain/DomainAdd.vue:15 src/views/domain/DomainAdd.vue:4
 #: src/views/domain/DomainAdd.vue:15 src/views/domain/DomainAdd.vue:4
-#: src/views/domain/DomainEdit.vue:11 src/views/domain/DomainEdit.vue:5
+#: src/views/domain/DomainEdit.vue:24 src/views/domain/DomainEdit.vue:5
 msgid "This feature is not available in demo."
 msgid "This feature is not available in demo."
 msgstr ""
 msgstr ""
 
 
-#: src/views/domain/DomainEdit.vue:135
+#: src/views/domain/DomainEdit.vue:125
 msgid "This operation will lose the custom configuration."
 msgid "This operation will lose the custom configuration."
 msgstr ""
 msgstr ""
 
 
@@ -471,6 +485,6 @@ msgstr ""
 msgid "Username (*)"
 msgid "Username (*)"
 msgstr ""
 msgstr ""
 
 
-#: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:294
+#: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:298
 msgid "Writes"
 msgid "Writes"
 msgstr ""
 msgstr ""

二進制
frontend/src/locale/zh_CN/LC_MESSAGES/app.mo


+ 53 - 39
frontend/src/locale/zh_CN/LC_MESSAGES/app.po

@@ -29,14 +29,18 @@ msgstr "操作"
 msgid "Add Site"
 msgid "Add Site"
 msgstr "添加站点"
 msgstr "添加站点"
 
 
-#: src/views/domain/DomainAdd.vue:86 src/views/domain/DomainEdit.vue:172
+#: src/views/domain/DomainAdd.vue:89 src/views/domain/DomainEdit.vue:164
 msgid "Auto-renewal disabled for %{name}"
 msgid "Auto-renewal disabled for %{name}"
 msgstr "成功关闭 %{name} 自动续签"
 msgstr "成功关闭 %{name} 自动续签"
 
 
-#: src/views/domain/DomainAdd.vue:80 src/views/domain/DomainEdit.vue:166
+#: src/views/domain/DomainAdd.vue:83 src/views/domain/DomainEdit.vue:158
 msgid "Auto-renewal enabled for %{name}"
 msgid "Auto-renewal enabled for %{name}"
 msgstr "成功启用 %{name} 自动续签"
 msgstr "成功启用 %{name} 自动续签"
 
 
+#: src/views/domain/DomainEdit.vue:38
+msgid "Back"
+msgstr "返回"
+
 #: src/views/domain/DomainAdd.vue:37
 #: src/views/domain/DomainAdd.vue:37
 msgid "Base information"
 msgid "Base information"
 msgstr "基本信息"
 msgstr "基本信息"
@@ -45,7 +49,7 @@ msgstr "基本信息"
 msgid "Build with"
 msgid "Build with"
 msgstr "构建基于"
 msgstr "构建基于"
 
 
-#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:24
+#: src/views/config/ConfigEdit.vue:5
 msgid "Cancel"
 msgid "Cancel"
 msgstr "取消"
 msgstr "取消"
 
 
@@ -81,7 +85,7 @@ msgstr "配置"
 msgid "Configure SSL"
 msgid "Configure SSL"
 msgstr "配置 SSL"
 msgstr "配置 SSL"
 
 
-#: src/views/dashboard/DashBoard.vue:207
+#: src/views/dashboard/DashBoard.vue:211
 msgid "CPU Status"
 msgid "CPU Status"
 msgstr "CPU 状态"
 msgstr "CPU 状态"
 
 
@@ -113,32 +117,32 @@ msgstr "检测到版本更新,页面将会刷新。"
 msgid "Development Mode"
 msgid "Development Mode"
 msgstr "开发模式"
 msgstr "开发模式"
 
 
-#: src/views/domain/DomainAdd.vue:88 src/views/domain/DomainEdit.vue:174
+#: src/views/domain/DomainAdd.vue:91 src/views/domain/DomainEdit.vue:166
 msgid "Disable auto-renewal failed for %{name}"
 msgid "Disable auto-renewal failed for %{name}"
 msgstr "关闭 %{name} 自动续签失败"
 msgstr "关闭 %{name} 自动续签失败"
 
 
-#: src/views/domain/DomainList.vue:7 src/views/domain/DomainList.vue:2
-#: src/views/domain/DomainList.vue:17
+#: src/views/domain/DomainEdit.vue:63 src/views/domain/DomainList.vue:7
+#: src/views/domain/DomainList.vue:2 src/views/domain/DomainList.vue:17
 msgid "Disabled"
 msgid "Disabled"
 msgstr "禁用"
 msgstr "禁用"
 
 
-#: src/views/domain/DomainList.vue:55
+#: src/views/domain/DomainEdit.vue:180 src/views/domain/DomainList.vue:55
 msgid "Disabled successfully"
 msgid "Disabled successfully"
 msgstr "禁用成功"
 msgstr "禁用成功"
 
 
-#: src/views/dashboard/DashBoard.vue:285
+#: src/views/dashboard/DashBoard.vue:289
 msgid "Disk IO"
 msgid "Disk IO"
 msgstr "磁盘 IO"
 msgstr "磁盘 IO"
 
 
-#: src/views/domain/DomainEdit.vue:134
+#: src/views/domain/DomainEdit.vue:124
 msgid "Do you want to change the template to support the TLS?"
 msgid "Do you want to change the template to support the TLS?"
 msgstr "你想要改变模板以支持 TLS 吗?"
 msgstr "你想要改变模板以支持 TLS 吗?"
 
 
-#: src/views/domain/DomainAdd.vue:111
+#: src/views/domain/DomainAdd.vue:112
 msgid "Domain Config Created Successfully"
 msgid "Domain Config Created Successfully"
 msgstr "域名配置文件创建成功"
 msgstr "域名配置文件创建成功"
 
 
-#: src/views/domain/DomainEdit.vue:42
+#: src/views/domain/DomainEdit.vue:47
 msgid "Edit %{n}"
 msgid "Edit %{n}"
 msgstr "编辑 %{n}"
 msgstr "编辑 %{n}"
 
 
@@ -146,7 +150,7 @@ msgstr "编辑 %{n}"
 msgid "Edit Configuration"
 msgid "Edit Configuration"
 msgstr "编辑配置"
 msgstr "编辑配置"
 
 
-#: src/views/domain/DomainEdit.vue:95
+#: src/views/domain/DomainEdit.vue:134
 msgid "Edit Configuration File"
 msgid "Edit Configuration File"
 msgstr "编辑配置文件"
 msgstr "编辑配置文件"
 
 
@@ -158,11 +162,11 @@ msgstr "编辑站点"
 msgid "Email (*)"
 msgid "Email (*)"
 msgstr "邮箱 (*)"
 msgstr "邮箱 (*)"
 
 
-#: src/views/domain/DomainAdd.vue:82 src/views/domain/DomainEdit.vue:168
+#: src/views/domain/DomainAdd.vue:85 src/views/domain/DomainEdit.vue:160
 msgid "Enable auto-renewal failed for %{name}"
 msgid "Enable auto-renewal failed for %{name}"
 msgstr "启用 %{name} 自动续签失败"
 msgstr "启用 %{name} 自动续签失败"
 
 
-#: src/views/domain/DomainAdd.vue:39
+#: src/views/domain/DomainAdd.vue:40
 msgid "Enable failed"
 msgid "Enable failed"
 msgstr "启用失败"
 msgstr "启用失败"
 
 
@@ -170,12 +174,14 @@ msgstr "启用失败"
 msgid "Enable TLS"
 msgid "Enable TLS"
 msgstr "启用 TLS"
 msgstr "启用 TLS"
 
 
+#: src/views/domain/DomainEdit.vue:54 src/views/domain/DomainEdit.vue:71
 #: src/views/domain/DomainList.vue:8 src/views/domain/DomainList.vue:3
 #: src/views/domain/DomainList.vue:8 src/views/domain/DomainList.vue:3
 #: src/views/domain/DomainList.vue:16
 #: src/views/domain/DomainList.vue:16
 msgid "Enabled"
 msgid "Enabled"
 msgstr "启用"
 msgstr "启用"
 
 
-#: src/views/domain/DomainAdd.vue:36 src/views/domain/DomainList.vue:46
+#: src/views/domain/DomainAdd.vue:37 src/views/domain/DomainEdit.vue:172
+#: src/views/domain/DomainList.vue:46
 msgid "Enabled successfully"
 msgid "Enabled successfully"
 msgstr "启用成功"
 msgstr "启用成功"
 
 
@@ -183,11 +189,11 @@ msgstr "启用成功"
 msgid "Expiration Date: %{date}"
 msgid "Expiration Date: %{date}"
 msgstr "过期时间: %{date}"
 msgstr "过期时间: %{date}"
 
 
-#: src/views/domain/DomainList.vue:59
+#: src/views/domain/DomainEdit.vue:183 src/views/domain/DomainList.vue:59
 msgid "Failed to disable %{msg}"
 msgid "Failed to disable %{msg}"
 msgstr "禁用失败 %{msg}"
 msgstr "禁用失败 %{msg}"
 
 
-#: src/views/domain/DomainList.vue:50
+#: src/views/domain/DomainEdit.vue:175 src/views/domain/DomainList.vue:50
 msgid "Failed to enable %{msg}"
 msgid "Failed to enable %{msg}"
 msgstr "启用失败 %{msg}"
 msgstr "启用失败 %{msg}"
 
 
@@ -200,7 +206,7 @@ msgid "Finished"
 msgstr "完成"
 msgstr "完成"
 
 
 #: src/views/domain/DomainAdd.vue:13 src/views/domain/DomainAdd.vue:2
 #: src/views/domain/DomainAdd.vue:13 src/views/domain/DomainAdd.vue:2
-#: src/views/domain/DomainEdit.vue:9 src/views/domain/DomainEdit.vue:3
+#: src/views/domain/DomainEdit.vue:22 src/views/domain/DomainEdit.vue:3
 msgid "Getting Certificate from Let's Encrypt"
 msgid "Getting Certificate from Let's Encrypt"
 msgstr "从 Let's Encrypt 获取证书"
 msgstr "从 Let's Encrypt 获取证书"
 
 
@@ -261,7 +267,7 @@ msgstr "登录成功"
 msgid "Logout successful"
 msgid "Logout successful"
 msgstr "登出成功"
 msgstr "登出成功"
 
 
-#: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
+#: src/views/domain/DomainEdit.vue:25 src/views/domain/DomainEdit.vue:6
 msgid ""
 msgid ""
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "HTTPChallengePort (default: 9180) before getting the certificate."
 "HTTPChallengePort (default: 9180) before getting the certificate."
@@ -281,10 +287,14 @@ msgstr "网站管理"
 msgid "Manage Users"
 msgid "Manage Users"
 msgstr "用户管理"
 msgstr "用户管理"
 
 
-#: src/views/dashboard/DashBoard.vue:103
+#: src/views/dashboard/DashBoard.vue:105
 msgid "Memory"
 msgid "Memory"
 msgstr "内存"
 msgstr "内存"
 
 
+#: src/views/dashboard/DashBoard.vue:93
+msgid "Memory and Storage"
+msgstr "内存与存储"
+
 #: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
 #: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
 msgid "Modify Config"
 msgid "Modify Config"
 msgstr "修改配置文件"
 msgstr "修改配置文件"
@@ -293,15 +303,19 @@ msgstr "修改配置文件"
 msgid "Name"
 msgid "Name"
 msgstr "名称"
 msgstr "名称"
 
 
-#: src/views/dashboard/DashBoard.vue:234
+#: src/views/dashboard/DashBoard.vue:238
 msgid "Network"
 msgid "Network"
 msgstr "网络"
 msgstr "网络"
 
 
-#: src/views/dashboard/DashBoard.vue:168
+#: src/views/dashboard/DashBoard.vue:163
+msgid "Network Statistics"
+msgstr "流量统计"
+
+#: src/views/dashboard/DashBoard.vue:172
 msgid "Network Total Receive"
 msgid "Network Total Receive"
 msgstr "下载流量"
 msgstr "下载流量"
 
 
-#: src/views/dashboard/DashBoard.vue:177
+#: src/views/dashboard/DashBoard.vue:181
 msgid "Network Total Send"
 msgid "Network Total Send"
 msgstr "上传流量"
 msgstr "上传流量"
 
 
@@ -359,11 +373,11 @@ msgstr "私钥路径 (ssl_certificate_key)"
 msgid "Project Team"
 msgid "Project Team"
 msgstr "项目团队"
 msgstr "项目团队"
 
 
-#: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:308
+#: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:312
 msgid "Reads"
 msgid "Reads"
 msgstr "读"
 msgstr "读"
 
 
-#: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:243
+#: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:247
 msgid "Receive"
 msgid "Receive"
 msgstr "下载"
 msgstr "下载"
 
 
@@ -371,25 +385,25 @@ msgstr "下载"
 msgid "Root Directory (root)"
 msgid "Root Directory (root)"
 msgstr "网站根目录 (root)"
 msgstr "网站根目录 (root)"
 
 
-#: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainEdit.vue:27
+#: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainEdit.vue:41
 msgid "Save"
 msgid "Save"
 msgstr "保存"
 msgstr "保存"
 
 
-#: src/views/config/ConfigEdit.vue:47 src/views/domain/DomainAdd.vue:43
-#: src/views/domain/DomainAdd.vue:54 src/views/domain/DomainEdit.vue:152
+#: src/views/config/ConfigEdit.vue:47 src/views/domain/DomainAdd.vue:44
+#: src/views/domain/DomainAdd.vue:55 src/views/domain/DomainEdit.vue:142
 msgid "Save error %{msg}"
 msgid "Save error %{msg}"
 msgstr "保存错误 %{msg}"
 msgstr "保存错误 %{msg}"
 
 
-#: src/views/config/ConfigEdit.vue:44 src/views/domain/DomainAdd.vue:33
-#: src/views/domain/DomainAdd.vue:51 src/views/domain/DomainEdit.vue:146
+#: src/views/config/ConfigEdit.vue:44 src/views/domain/DomainAdd.vue:34
+#: src/views/domain/DomainAdd.vue:52 src/views/domain/DomainEdit.vue:136
 msgid "Saved successfully"
 msgid "Saved successfully"
 msgstr "保存成功"
 msgstr "保存成功"
 
 
-#: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:257
+#: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:261
 msgid "Send"
 msgid "Send"
 msgstr "上传"
 msgstr "上传"
 
 
-#: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:72
+#: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:75
 #: src/views/other/Login.vue:35
 #: src/views/other/Login.vue:35
 msgid "Server error"
 msgid "Server error"
 msgstr "服务器错误"
 msgstr "服务器错误"
@@ -414,7 +428,7 @@ msgstr "跳过"
 msgid "Status"
 msgid "Status"
 msgstr "状态"
 msgstr "状态"
 
 
-#: src/views/dashboard/DashBoard.vue:135
+#: src/views/dashboard/DashBoard.vue:137
 msgid "Storage"
 msgid "Storage"
 msgstr "存储"
 msgstr "存储"
 
 
@@ -422,7 +436,7 @@ msgstr "存储"
 msgid "Subject Name: %{name}"
 msgid "Subject Name: %{name}"
 msgstr "主体名称: %{name}"
 msgstr "主体名称: %{name}"
 
 
-#: src/views/dashboard/DashBoard.vue:119
+#: src/views/dashboard/DashBoard.vue:121
 msgid "Swap"
 msgid "Swap"
 msgstr ""
 msgstr ""
 
 
@@ -444,7 +458,7 @@ msgstr ""
 msgid "The filename cannot contain the following characters: %{c}"
 msgid "The filename cannot contain the following characters: %{c}"
 msgstr "文件名不能包含以下字符: %{c}"
 msgstr "文件名不能包含以下字符: %{c}"
 
 
-#: src/views/domain/DomainEdit.vue:4
+#: src/views/domain/DomainEdit.vue:17
 msgid ""
 msgid ""
 "The following values will only take effect if you have the corresponding "
 "The following values will only take effect if you have the corresponding "
 "fields in your configuration file. The configuration filename cannot be "
 "fields in your configuration file. The configuration filename cannot be "
@@ -454,11 +468,11 @@ msgstr ""
 "可修改。"
 "可修改。"
 
 
 #: src/views/domain/DomainAdd.vue:15 src/views/domain/DomainAdd.vue:4
 #: src/views/domain/DomainAdd.vue:15 src/views/domain/DomainAdd.vue:4
-#: src/views/domain/DomainEdit.vue:11 src/views/domain/DomainEdit.vue:5
+#: src/views/domain/DomainEdit.vue:24 src/views/domain/DomainEdit.vue:5
 msgid "This feature is not available in demo."
 msgid "This feature is not available in demo."
 msgstr "该功能在 Demo 中不可用。"
 msgstr "该功能在 Demo 中不可用。"
 
 
-#: src/views/domain/DomainEdit.vue:135
+#: src/views/domain/DomainEdit.vue:125
 msgid "This operation will lose the custom configuration."
 msgid "This operation will lose the custom configuration."
 msgstr "该操作将会丢失自定义配置。"
 msgstr "该操作将会丢失自定义配置。"
 
 
@@ -479,7 +493,7 @@ msgstr "用户名"
 msgid "Username (*)"
 msgid "Username (*)"
 msgstr "用户名 (*)"
 msgstr "用户名 (*)"
 
 
-#: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:294
+#: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:298
 msgid "Writes"
 msgid "Writes"
 msgstr "写"
 msgstr "写"
 
 

二進制
frontend/src/locale/zh_TW/LC_MESSAGES/app.mo


+ 55 - 43
frontend/src/locale/zh_TW/LC_MESSAGES/app.po

@@ -30,14 +30,18 @@ msgstr "操作"
 msgid "Add Site"
 msgid "Add Site"
 msgstr "新增站點"
 msgstr "新增站點"
 
 
-#: src/views/domain/DomainAdd.vue:86 src/views/domain/DomainEdit.vue:172
+#: src/views/domain/DomainAdd.vue:89 src/views/domain/DomainEdit.vue:164
 msgid "Auto-renewal disabled for %{name}"
 msgid "Auto-renewal disabled for %{name}"
 msgstr "成功關閉 %{name} 自動續簽"
 msgstr "成功關閉 %{name} 自動續簽"
 
 
-#: src/views/domain/DomainAdd.vue:80 src/views/domain/DomainEdit.vue:166
+#: src/views/domain/DomainAdd.vue:83 src/views/domain/DomainEdit.vue:158
 msgid "Auto-renewal enabled for %{name}"
 msgid "Auto-renewal enabled for %{name}"
 msgstr "成功啟用 %{name} 自動續簽"
 msgstr "成功啟用 %{name} 自動續簽"
 
 
+#: src/views/domain/DomainEdit.vue:38
+msgid "Back"
+msgstr "返回"
+
 #: src/views/domain/DomainAdd.vue:37
 #: src/views/domain/DomainAdd.vue:37
 msgid "Base information"
 msgid "Base information"
 msgstr "基本訊息"
 msgstr "基本訊息"
@@ -46,7 +50,7 @@ msgstr "基本訊息"
 msgid "Build with"
 msgid "Build with"
 msgstr "構建基於"
 msgstr "構建基於"
 
 
-#: src/views/config/ConfigEdit.vue:5 src/views/domain/DomainEdit.vue:24
+#: src/views/config/ConfigEdit.vue:5
 msgid "Cancel"
 msgid "Cancel"
 msgstr "取消"
 msgstr "取消"
 
 
@@ -82,7 +86,7 @@ msgstr "配置"
 msgid "Configure SSL"
 msgid "Configure SSL"
 msgstr "配置 SSL"
 msgstr "配置 SSL"
 
 
-#: src/views/dashboard/DashBoard.vue:207
+#: src/views/dashboard/DashBoard.vue:211
 msgid "CPU Status"
 msgid "CPU Status"
 msgstr "中央處理器狀態"
 msgstr "中央處理器狀態"
 
 
@@ -114,32 +118,32 @@ msgstr "檢測到版本更新,頁面將會重新整理。"
 msgid "Development Mode"
 msgid "Development Mode"
 msgstr "開發模式"
 msgstr "開發模式"
 
 
-#: src/views/domain/DomainAdd.vue:88 src/views/domain/DomainEdit.vue:174
+#: src/views/domain/DomainAdd.vue:91 src/views/domain/DomainEdit.vue:166
 msgid "Disable auto-renewal failed for %{name}"
 msgid "Disable auto-renewal failed for %{name}"
 msgstr "關閉 %{name} 自動續簽失敗"
 msgstr "關閉 %{name} 自動續簽失敗"
 
 
-#: src/views/domain/DomainList.vue:7 src/views/domain/DomainList.vue:2
-#: src/views/domain/DomainList.vue:17
+#: src/views/domain/DomainEdit.vue:63 src/views/domain/DomainList.vue:7
+#: src/views/domain/DomainList.vue:2 src/views/domain/DomainList.vue:17
 msgid "Disabled"
 msgid "Disabled"
 msgstr "禁用"
 msgstr "禁用"
 
 
-#: src/views/domain/DomainList.vue:55
+#: src/views/domain/DomainEdit.vue:180 src/views/domain/DomainList.vue:55
 msgid "Disabled successfully"
 msgid "Disabled successfully"
 msgstr "禁用成功"
 msgstr "禁用成功"
 
 
-#: src/views/dashboard/DashBoard.vue:285
+#: src/views/dashboard/DashBoard.vue:289
 msgid "Disk IO"
 msgid "Disk IO"
 msgstr "磁碟 IO"
 msgstr "磁碟 IO"
 
 
-#: src/views/domain/DomainEdit.vue:134
+#: src/views/domain/DomainEdit.vue:124
 msgid "Do you want to change the template to support the TLS?"
 msgid "Do you want to change the template to support the TLS?"
 msgstr "你想要改變模板以支援 TLS 嗎?"
 msgstr "你想要改變模板以支援 TLS 嗎?"
 
 
-#: src/views/domain/DomainAdd.vue:111
+#: src/views/domain/DomainAdd.vue:112
 msgid "Domain Config Created Successfully"
 msgid "Domain Config Created Successfully"
 msgstr "域名配置文件創建成功"
 msgstr "域名配置文件創建成功"
 
 
-#: src/views/domain/DomainEdit.vue:42
+#: src/views/domain/DomainEdit.vue:47
 msgid "Edit %{n}"
 msgid "Edit %{n}"
 msgstr "編輯 %{n}"
 msgstr "編輯 %{n}"
 
 
@@ -147,7 +151,7 @@ msgstr "編輯 %{n}"
 msgid "Edit Configuration"
 msgid "Edit Configuration"
 msgstr "編輯配置"
 msgstr "編輯配置"
 
 
-#: src/views/domain/DomainEdit.vue:95
+#: src/views/domain/DomainEdit.vue:134
 msgid "Edit Configuration File"
 msgid "Edit Configuration File"
 msgstr "編輯配置檔案"
 msgstr "編輯配置檔案"
 
 
@@ -159,11 +163,11 @@ msgstr "編輯站點"
 msgid "Email (*)"
 msgid "Email (*)"
 msgstr "郵箱 (*)"
 msgstr "郵箱 (*)"
 
 
-#: src/views/domain/DomainAdd.vue:82 src/views/domain/DomainEdit.vue:168
+#: src/views/domain/DomainAdd.vue:85 src/views/domain/DomainEdit.vue:160
 msgid "Enable auto-renewal failed for %{name}"
 msgid "Enable auto-renewal failed for %{name}"
 msgstr "啟用 %{name} 自動續簽失敗"
 msgstr "啟用 %{name} 自動續簽失敗"
 
 
-#: src/views/domain/DomainAdd.vue:39
+#: src/views/domain/DomainAdd.vue:40
 msgid "Enable failed"
 msgid "Enable failed"
 msgstr "啟用失敗"
 msgstr "啟用失敗"
 
 
@@ -171,12 +175,14 @@ msgstr "啟用失敗"
 msgid "Enable TLS"
 msgid "Enable TLS"
 msgstr "啟用 TLS"
 msgstr "啟用 TLS"
 
 
+#: src/views/domain/DomainEdit.vue:54 src/views/domain/DomainEdit.vue:71
 #: src/views/domain/DomainList.vue:8 src/views/domain/DomainList.vue:3
 #: src/views/domain/DomainList.vue:8 src/views/domain/DomainList.vue:3
 #: src/views/domain/DomainList.vue:16
 #: src/views/domain/DomainList.vue:16
 msgid "Enabled"
 msgid "Enabled"
 msgstr "啟用"
 msgstr "啟用"
 
 
-#: src/views/domain/DomainAdd.vue:36 src/views/domain/DomainList.vue:46
+#: src/views/domain/DomainAdd.vue:37 src/views/domain/DomainEdit.vue:172
+#: src/views/domain/DomainList.vue:46
 msgid "Enabled successfully"
 msgid "Enabled successfully"
 msgstr "啟用成功"
 msgstr "啟用成功"
 
 
@@ -184,11 +190,11 @@ msgstr "啟用成功"
 msgid "Expiration Date: %{date}"
 msgid "Expiration Date: %{date}"
 msgstr "過期時間: %{date}"
 msgstr "過期時間: %{date}"
 
 
-#: src/views/domain/DomainList.vue:59
+#: src/views/domain/DomainEdit.vue:183 src/views/domain/DomainList.vue:59
 msgid "Failed to disable %{msg}"
 msgid "Failed to disable %{msg}"
 msgstr "禁用失敗 %{msg}"
 msgstr "禁用失敗 %{msg}"
 
 
-#: src/views/domain/DomainList.vue:50
+#: src/views/domain/DomainEdit.vue:175 src/views/domain/DomainList.vue:50
 msgid "Failed to enable %{msg}"
 msgid "Failed to enable %{msg}"
 msgstr "啟用失敗 %{msg}"
 msgstr "啟用失敗 %{msg}"
 
 
@@ -201,7 +207,7 @@ msgid "Finished"
 msgstr "完成"
 msgstr "完成"
 
 
 #: src/views/domain/DomainAdd.vue:13 src/views/domain/DomainAdd.vue:2
 #: src/views/domain/DomainAdd.vue:13 src/views/domain/DomainAdd.vue:2
-#: src/views/domain/DomainEdit.vue:9 src/views/domain/DomainEdit.vue:3
+#: src/views/domain/DomainEdit.vue:22 src/views/domain/DomainEdit.vue:3
 msgid "Getting Certificate from Let's Encrypt"
 msgid "Getting Certificate from Let's Encrypt"
 msgstr "從 Let's Encrypt 獲取證書"
 msgstr "從 Let's Encrypt 獲取證書"
 
 
@@ -262,8 +268,7 @@ msgstr "登入成功"
 msgid "Logout successful"
 msgid "Logout successful"
 msgstr "登出成功"
 msgstr "登出成功"
 
 
-#: src/views/domain/DomainEdit.vue:12 src/views/domain/DomainEdit.vue:6
-#, fuzzy
+#: src/views/domain/DomainEdit.vue:25 src/views/domain/DomainEdit.vue:6
 msgid ""
 msgid ""
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "Make sure you have configured a reverse proxy for .well-known directory to "
 "HTTPChallengePort (default: 9180) before getting the certificate."
 "HTTPChallengePort (default: 9180) before getting the certificate."
@@ -283,10 +288,14 @@ msgstr "網站管理"
 msgid "Manage Users"
 msgid "Manage Users"
 msgstr "使用者管理"
 msgstr "使用者管理"
 
 
-#: src/views/dashboard/DashBoard.vue:103
+#: src/views/dashboard/DashBoard.vue:105
 msgid "Memory"
 msgid "Memory"
 msgstr "記憶體"
 msgstr "記憶體"
 
 
+#: src/views/dashboard/DashBoard.vue:93
+msgid "Memory and Storage"
+msgstr "記憶體和存儲"
+
 #: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
 #: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
 msgid "Modify Config"
 msgid "Modify Config"
 msgstr "修改配置"
 msgstr "修改配置"
@@ -295,15 +304,19 @@ msgstr "修改配置"
 msgid "Name"
 msgid "Name"
 msgstr "名稱"
 msgstr "名稱"
 
 
-#: src/views/dashboard/DashBoard.vue:234
+#: src/views/dashboard/DashBoard.vue:238
 msgid "Network"
 msgid "Network"
 msgstr "網路"
 msgstr "網路"
 
 
-#: src/views/dashboard/DashBoard.vue:168
+#: src/views/dashboard/DashBoard.vue:163
+msgid "Network Statistics"
+msgstr "網路統計"
+
+#: src/views/dashboard/DashBoard.vue:172
 msgid "Network Total Receive"
 msgid "Network Total Receive"
 msgstr "下載流量"
 msgstr "下載流量"
 
 
-#: src/views/dashboard/DashBoard.vue:177
+#: src/views/dashboard/DashBoard.vue:181
 msgid "Network Total Send"
 msgid "Network Total Send"
 msgstr "上傳流量"
 msgstr "上傳流量"
 
 
@@ -361,11 +374,11 @@ msgstr "私鑰路徑 (ssl_certificate_key)"
 msgid "Project Team"
 msgid "Project Team"
 msgstr "專案團隊"
 msgstr "專案團隊"
 
 
-#: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:308
+#: src/views/dashboard/DashBoard.vue:61 src/views/dashboard/DashBoard.vue:312
 msgid "Reads"
 msgid "Reads"
 msgstr "讀"
 msgstr "讀"
 
 
-#: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:243
+#: src/views/dashboard/DashBoard.vue:51 src/views/dashboard/DashBoard.vue:247
 msgid "Receive"
 msgid "Receive"
 msgstr "下載"
 msgstr "下載"
 
 
@@ -373,25 +386,25 @@ msgstr "下載"
 msgid "Root Directory (root)"
 msgid "Root Directory (root)"
 msgstr "網站根目錄 (root)"
 msgstr "網站根目錄 (root)"
 
 
-#: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainEdit.vue:27
+#: src/views/config/ConfigEdit.vue:6 src/views/domain/DomainEdit.vue:41
 msgid "Save"
 msgid "Save"
 msgstr "儲存"
 msgstr "儲存"
 
 
-#: src/views/config/ConfigEdit.vue:47 src/views/domain/DomainAdd.vue:43
-#: src/views/domain/DomainAdd.vue:54 src/views/domain/DomainEdit.vue:152
+#: src/views/config/ConfigEdit.vue:47 src/views/domain/DomainAdd.vue:44
+#: src/views/domain/DomainAdd.vue:55 src/views/domain/DomainEdit.vue:142
 msgid "Save error %{msg}"
 msgid "Save error %{msg}"
 msgstr "儲存錯誤 %{msg}"
 msgstr "儲存錯誤 %{msg}"
 
 
-#: src/views/config/ConfigEdit.vue:44 src/views/domain/DomainAdd.vue:33
-#: src/views/domain/DomainAdd.vue:51 src/views/domain/DomainEdit.vue:146
+#: src/views/config/ConfigEdit.vue:44 src/views/domain/DomainAdd.vue:34
+#: src/views/domain/DomainAdd.vue:52 src/views/domain/DomainEdit.vue:136
 msgid "Saved successfully"
 msgid "Saved successfully"
 msgstr "儲存成功"
 msgstr "儲存成功"
 
 
-#: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:257
+#: src/views/dashboard/DashBoard.vue:54 src/views/dashboard/DashBoard.vue:261
 msgid "Send"
 msgid "Send"
 msgstr "上傳"
 msgstr "上傳"
 
 
-#: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:72
+#: src/views/config/ConfigEdit.vue:35 src/views/domain/DomainEdit.vue:75
 #: src/views/other/Login.vue:35
 #: src/views/other/Login.vue:35
 msgid "Server error"
 msgid "Server error"
 msgstr "伺服器錯誤"
 msgstr "伺服器錯誤"
@@ -416,7 +429,7 @@ msgstr "跳過"
 msgid "Status"
 msgid "Status"
 msgstr "狀態"
 msgstr "狀態"
 
 
-#: src/views/dashboard/DashBoard.vue:135
+#: src/views/dashboard/DashBoard.vue:137
 msgid "Storage"
 msgid "Storage"
 msgstr "儲存"
 msgstr "儲存"
 
 
@@ -424,7 +437,7 @@ msgstr "儲存"
 msgid "Subject Name: %{name}"
 msgid "Subject Name: %{name}"
 msgstr "主體名稱: %{name}"
 msgstr "主體名稱: %{name}"
 
 
-#: src/views/dashboard/DashBoard.vue:119
+#: src/views/dashboard/DashBoard.vue:121
 msgid "Swap"
 msgid "Swap"
 msgstr "交換空間"
 msgstr "交換空間"
 
 
@@ -446,22 +459,21 @@ msgstr ""
 msgid "The filename cannot contain the following characters: %{c}"
 msgid "The filename cannot contain the following characters: %{c}"
 msgstr "檔名不能包含以下字元: %{c}"
 msgstr "檔名不能包含以下字元: %{c}"
 
 
-#: src/views/domain/DomainEdit.vue:4
-#, fuzzy
+#: src/views/domain/DomainEdit.vue:17
 msgid ""
 msgid ""
 "The following values will only take effect if you have the corresponding "
 "The following values will only take effect if you have the corresponding "
 "fields in your configuration file. The configuration filename cannot be "
 "fields in your configuration file. The configuration filename cannot be "
 "changed after it has been created."
 "changed after it has been created."
 msgstr ""
 msgstr ""
-"只有在您的配置檔案中有相應欄位時,下列的配置才能生效。配置檔名稱建立後不可"
-"改。"
+"只有在您的配置檔案中有相應欄位時,下列的配置才能生效。配置檔名稱建立後不可"
+"改。"
 
 
 #: src/views/domain/DomainAdd.vue:15 src/views/domain/DomainAdd.vue:4
 #: src/views/domain/DomainAdd.vue:15 src/views/domain/DomainAdd.vue:4
-#: src/views/domain/DomainEdit.vue:11 src/views/domain/DomainEdit.vue:5
+#: src/views/domain/DomainEdit.vue:24 src/views/domain/DomainEdit.vue:5
 msgid "This feature is not available in demo."
 msgid "This feature is not available in demo."
 msgstr "此功能在演示中不可用。"
 msgstr "此功能在演示中不可用。"
 
 
-#: src/views/domain/DomainEdit.vue:135
+#: src/views/domain/DomainEdit.vue:125
 msgid "This operation will lose the custom configuration."
 msgid "This operation will lose the custom configuration."
 msgstr "該操作將會丟失自定義配置。"
 msgstr "該操作將會丟失自定義配置。"
 
 
@@ -482,7 +494,7 @@ msgstr "使用者名稱"
 msgid "Username (*)"
 msgid "Username (*)"
 msgstr "使用者名稱 (*)"
 msgstr "使用者名稱 (*)"
 
 
-#: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:294
+#: src/views/dashboard/DashBoard.vue:58 src/views/dashboard/DashBoard.vue:298
 msgid "Writes"
 msgid "Writes"
 msgstr "寫"
 msgstr "寫"
 
 

File diff suppressed because it is too large
+ 0 - 0
frontend/src/translations.json


+ 11 - 11
frontend/src/views/dashboard/DashBoard.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <div>
     <div>
         <a-row :gutter="[16,16]" class="first-row">
         <a-row :gutter="[16,16]" class="first-row">
-            <a-col :xl="6" :lg="24" :md="24">
+            <a-col :xl="7" :lg="24" :md="24">
                 <a-card :title="$gettext('Server Info')">
                 <a-card :title="$gettext('Server Info')">
                     <p>
                     <p>
                         <translate>Uptime:</translate>
                         <translate>Uptime:</translate>
@@ -25,9 +25,9 @@
                     </p>
                     </p>
                 </a-card>
                 </a-card>
             </a-col>
             </a-col>
-            <a-col :xl="12" :lg="18" :md="24" class="chart_dashboard">
-                <a-card>
-                    <a-row>
+            <a-col :xl="10" :lg="16" :md="24" class="chart_dashboard">
+                <a-card :title="$gettext('Memory and Storage')">
+                    <a-row :gutter="[0,16]">
                         <a-col :xs="24" :sm="24" :md="8">
                         <a-col :xs="24" :sm="24" :md="8">
                             <radial-bar-chart :name="$gettext('Memory')" :series="[memory_pressure]"
                             <radial-bar-chart :name="$gettext('Memory')" :series="[memory_pressure]"
                                               :centerText="memory_used" :bottom-text="memory_total" colors="#36a3eb"/>
                                               :centerText="memory_used" :bottom-text="memory_total" colors="#36a3eb"/>
@@ -44,14 +44,14 @@
                     </a-row>
                     </a-row>
                 </a-card>
                 </a-card>
             </a-col>
             </a-col>
-            <a-col :xl="6" :lg="6" :sm="24" class="chart_dashboard">
-                <a-card>
+            <a-col :xl="7" :lg="8" :sm="24" class="chart_dashboard">
+                <a-card :title="$gettext('Network Statistics')">
                     <a-row :gutter="16">
                     <a-row :gutter="16">
-                        <a-col :span="24">
+                        <a-col :span="12">
                             <a-statistic :value="bytesToSize(net.last_recv)"
                             <a-statistic :value="bytesToSize(net.last_recv)"
                                          :title="$gettext('Network Total Receive')"/>
                                          :title="$gettext('Network Total Receive')"/>
                         </a-col>
                         </a-col>
-                        <a-col :span="24">
+                        <a-col :span="12">
                             <a-statistic :value="bytesToSize(net.last_sent)"
                             <a-statistic :value="bytesToSize(net.last_sent)"
                                          :title="$gettext('Network Total Send')"/>
                                          :title="$gettext('Network Total Send')"/>
                         </a-col>
                         </a-col>
@@ -60,7 +60,7 @@
             </a-col>
             </a-col>
         </a-row>
         </a-row>
         <a-row class="row-two" :gutter="[16,32]">
         <a-row class="row-two" :gutter="[16,32]">
-            <a-col :xl="7" :lg="24" :md="24" :sm="24">
+            <a-col :xl="8" :lg="24" :md="24" :sm="24">
                 <a-card :title="$gettext('CPU Status')">
                 <a-card :title="$gettext('CPU Status')">
                     <a-statistic :value="cpu" title="CPU">
                     <a-statistic :value="cpu" title="CPU">
                         <template v-slot:suffix>
                         <template v-slot:suffix>
@@ -70,7 +70,7 @@
                     <c-p-u-chart :series="cpu_analytic_series"/>
                     <c-p-u-chart :series="cpu_analytic_series"/>
                 </a-card>
                 </a-card>
             </a-col>
             </a-col>
-            <a-col :xl="10" :lg="12" :md="24" :sm="24">
+            <a-col :xl="8" :lg="12" :md="24" :sm="24">
                 <a-card :title="$gettext('Network')">
                 <a-card :title="$gettext('Network')">
                     <a-row :gutter="16">
                     <a-row :gutter="16">
                         <a-col :span="12">
                         <a-col :span="12">
@@ -92,7 +92,7 @@
                     <net-chart :series="net_analytic"/>
                     <net-chart :series="net_analytic"/>
                 </a-card>
                 </a-card>
             </a-col>
             </a-col>
-            <a-col :xl="7" :lg="12" :md="24" :sm="24">
+            <a-col :xl="8" :lg="12" :md="24" :sm="24">
                 <a-card :title="$gettext('Disk IO')">
                 <a-card :title="$gettext('Disk IO')">
                     <a-row :gutter="16">
                     <a-row :gutter="16">
                         <a-col :span="12">
                         <a-col :span="12">

+ 5 - 4
frontend/src/views/domain/DomainAdd.vue

@@ -15,6 +15,7 @@
                     type="primary" ghost
                     type="primary" ghost
                     style="margin: 10px 0"
                     style="margin: 10px 0"
                     :disabled="is_demo"
                     :disabled="is_demo"
+                    :loading="issuing_cert"
                 >
                 >
                     <translate>Getting Certificate from Let's Encrypt</translate>
                     <translate>Getting Certificate from Let's Encrypt</translate>
                 </a-button>
                 </a-button>
@@ -55,10 +56,7 @@
                     <translate>Next</translate>
                     <translate>Next</translate>
                 </a-button>
                 </a-button>
             </a-space>
             </a-space>
-
         </div>
         </div>
-
-
     </a-card>
     </a-card>
 </template>
 </template>
 
 
@@ -80,7 +78,8 @@ export default {
             columns: columns.slice(0, -1), // 隐藏SSL支持开关
             columns: columns.slice(0, -1), // 隐藏SSL支持开关
             error: {},
             error: {},
             current_step: 0,
             current_step: 0,
-            columnsSSL
+            columnsSSL,
+            issuing_cert: false
         }
         }
     },
     },
     watch: {
     watch: {
@@ -123,11 +122,13 @@ export default {
 
 
         },
         },
         issue_cert() {
         issue_cert() {
+            this.issuing_cert = true
             issue_cert(this.config.server_name, this.callback)
             issue_cert(this.config.server_name, this.callback)
         },
         },
         callback(ssl_certificate, ssl_certificate_key) {
         callback(ssl_certificate, ssl_certificate_key) {
             this.$set(this.config, 'ssl_certificate', ssl_certificate)
             this.$set(this.config, 'ssl_certificate', ssl_certificate)
             this.$set(this.config, 'ssl_certificate_key', ssl_certificate_key)
             this.$set(this.config, 'ssl_certificate_key', ssl_certificate_key)
+            this.issuing_cert = false
         },
         },
         goto_modify() {
         goto_modify() {
             this.$router.push('/domain/'+this.config.name)
             this.$router.push('/domain/'+this.config.name)

+ 60 - 30
frontend/src/views/domain/DomainEdit.vue

@@ -1,22 +1,37 @@
 <template>
 <template>
     <div>
     <div>
         <a-collapse :bordered="false" default-active-key="1">
         <a-collapse :bordered="false" default-active-key="1">
-            <a-collapse-panel key="1" :header="$gettextInterpolate($gettext('Edit %{n}'), {n: name})">
-                <p v-translate>The following values will only take effect if you have the corresponding fields in your configuration file. The configuration filename cannot be changed after it has been created.</p>
-                <std-data-entry :data-list="columns" v-model="config"/>
-                <template v-if="config.support_ssl">
-                    <cert-info :domain="name" ref="cert-info" v-if="name"/>
-                    <a-button
-                        @click="issue_cert"
-                        type="primary" ghost
-                        style="margin: 10px 0"
-                        :disabled="is_demo"
-                    >
-                        <translate>Getting Certificate from Let's Encrypt</translate>
-                    </a-button>
-                    <p v-if="is_demo" v-translate>This feature is not available in demo.</p>
-                    <p v-else v-translate>Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.</p>
+            <a-collapse-panel key="1">
+                <template v-slot:header>
+                    <span style="margin-right: 10px">{{ $gettextInterpolate($gettext('Edit %{n}'), {n: name}) }}</span>
+                    <a-tag color="blue" v-if="enabled">
+                        {{ $gettext('Enabled') }}
+                    </a-tag>
+                    <a-tag color="orange" v-else>
+                        {{ $gettext('Disabled') }}
+                    </a-tag>
                 </template>
                 </template>
+                <div class="container">
+                    <a-form-item :label="$gettext('Enabled')">
+                        <a-switch v-model="enabled" @change="checked=>{checked?enable():disable()}"/>
+                    </a-form-item>
+                    <p v-translate>The following values will only take effect if you have the corresponding fields in your configuration file. The configuration filename cannot be changed after it has been created.</p>
+                    <std-data-entry :data-list="columns" v-model="config"/>
+                    <template v-if="config.support_ssl">
+                        <cert-info :domain="name" ref="cert-info" v-if="name"/>
+                        <a-button
+                            @click="issue_cert"
+                            type="primary" ghost
+                            style="margin: 10px 0"
+                            :disabled="is_demo"
+                            :loading="issuing_cert"
+                        >
+                            <translate>Getting Certificate from Let's Encrypt</translate>
+                        </a-button>
+                        <p v-if="is_demo" v-translate>This feature is not available in demo.</p>
+                        <p v-else v-translate>Make sure you have configured a reverse proxy for .well-known directory to HTTPChallengePort (default: 9180) before getting the certificate.</p>
+                    </template>
+                </div>
             </a-collapse-panel>
             </a-collapse-panel>
         </a-collapse>
         </a-collapse>
 
 
@@ -27,7 +42,7 @@
         <footer-tool-bar>
         <footer-tool-bar>
             <a-space>
             <a-space>
                 <a-button @click="$router.go(-1)">
                 <a-button @click="$router.go(-1)">
-                    <translate>Cancel</translate>
+                    <translate>Back</translate>
                 </a-button>
                 </a-button>
                 <a-button type="primary" @click="save">
                 <a-button type="primary" @click="save">
                     <translate>Save</translate>
                     <translate>Save</translate>
@@ -65,9 +80,11 @@ export default {
                 support_ssl: false,
                 support_ssl: false,
                 auto_cert: false
                 auto_cert: false
             },
             },
+            enabled: false,
             configText: '',
             configText: '',
             ws: null,
             ws: null,
-            ok: false
+            ok: false,
+            issuing_cert: false
         }
         }
     },
     },
     watch: {
     watch: {
@@ -105,6 +122,7 @@ export default {
                 this.$api.domain.get(this.name).then(r => {
                 this.$api.domain.get(this.name).then(r => {
                     this.configText = r.config
                     this.configText = r.config
                     this.config.auto_cert = r.auto_cert
                     this.config.auto_cert = r.auto_cert
+                    this.enabled = r.enabled
                     this.parse(r).then(() => {
                     this.parse(r).then(() => {
                         this.ok = true
                         this.ok = true
                     })
                     })
@@ -112,19 +130,6 @@ export default {
                     console.log(r)
                     console.log(r)
                     this.$message.error($gettext('Server error'))
                     this.$message.error($gettext('Server error'))
                 })
                 })
-            } else {
-                this.config = {
-                    http_listen_port: 80,
-                    https_listen_port: null,
-                    server_name: '',
-                    index: '',
-                    root: '',
-                    ssl_certificate: '',
-                    ssl_certificate_key: '',
-                    support_ssl: false,
-                    auto_cert: false,
-                }
-                this.get_template()
             }
             }
         },
         },
         async parse(r) {
         async parse(r) {
@@ -194,12 +199,14 @@ export default {
             })
             })
         },
         },
         issue_cert() {
         issue_cert() {
+            this.issuing_cert = true
             issue_cert(this.config.server_name, this.callback)
             issue_cert(this.config.server_name, this.callback)
         },
         },
         callback(ssl_certificate, ssl_certificate_key) {
         callback(ssl_certificate, ssl_certificate_key) {
             this.$set(this.config, 'ssl_certificate', ssl_certificate)
             this.$set(this.config, 'ssl_certificate', ssl_certificate)
             this.$set(this.config, 'ssl_certificate_key', ssl_certificate_key)
             this.$set(this.config, 'ssl_certificate_key', ssl_certificate_key)
             if (this.$refs['cert-info']) this.$refs['cert-info'].get()
             if (this.$refs['cert-info']) this.$refs['cert-info'].get()
+            this.issuing_cert = false
         },
         },
         change_auto_cert() {
         change_auto_cert() {
             if (this.config.auto_cert) {
             if (this.config.auto_cert) {
@@ -215,6 +222,22 @@ export default {
                     this.$message.error(e.message ?? $interpolate($gettext('Disable auto-renewal failed for %{name}', {name: this.name})))
                     this.$message.error(e.message ?? $interpolate($gettext('Disable auto-renewal failed for %{name}', {name: this.name})))
                 })
                 })
             }
             }
+        },
+        enable() {
+            this.$api.domain.enable(this.name).then(() => {
+                this.$message.success($gettext('Enabled successfully'))
+                this.enabled = true
+            }).catch(r => {
+                this.$message.error($interpolate($gettext('Failed to enable %{msg}'), {msg: r.message ?? ''}), 10)
+            })
+        },
+        disable() {
+            this.$api.domain.disable(this.name).then(() => {
+                this.$message.success($gettext('Disabled successfully'))
+                this.enabled = false
+            }).catch(r => {
+                this.$message.error($interpolate($gettext('Failed to disable %{msg}'), {msg: r.message ?? ''}))
+            })
         }
         }
     },
     },
     computed: {
     computed: {
@@ -259,5 +282,12 @@ export default {
         margin: 10px 0;
         margin: 10px 0;
     }
     }
 }
 }
+.container {
+    max-width: 800px;
+    margin: 0 auto;
+    /deep/.ant-form-item-label > label::after {
+        content: none;
+    }
+}
 
 
 </style>
 </style>

Some files were not shown because too many files changed in this diff