Skip to content

Commit

Permalink
Optimized Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed May 8, 2022
1 parent 13689f8 commit da31777
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 120 deletions.
38 changes: 19 additions & 19 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,51 +196,51 @@ go build -o nginx-ui -v main.go
**安装或升级**

```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 服务。

**卸载 Nginx UI 但保留配置和数据库文件**

```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
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
server {
listen 80;
listen [::]:80;
listen 80;
listen [::]:80;
server_name <your_server_name>;
server_name <your_server_name>;
rewrite ^(.*)$ https://$host$1 permanent;
}
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 / {
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/;
}
}
```
Expand Down
32 changes: 16 additions & 16 deletions README-zh_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,31 +216,31 @@ bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/inst

```nginx
server {
listen 80;
listen [::]:80;
listen 80;
listen [::]:80;
server_name <your_server_name>;
server_name <your_server_name>;
rewrite ^(.*)$ https://$host$1 permanent;
}
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 / {
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/;
}
}
```
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,31 +215,31 @@ bash <(curl -L -s https://raw.githubusercontent.com/0xJacky/nginx-ui/master/inst

```nginx
server {
listen 80;
listen [::]:80;
listen 80;
listen [::]:80;
server_name <your_server_name>;
server_name <your_server_name>;
rewrite ^(.*)$ https://$host$1 permanent;
}
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 / {
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/;
}
}
```
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/Chart/RadialBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ export default {
series: this.series,
chart: {
type: 'radialBar',
offsetY: 0
offsetY: -30
},
plotOptions: {
radialBar: {
startAngle: -135,
endAngle: 135,
dataLabels: {
name: {
fontSize: '15px',
fontSize: '14px',
color: this.colors,
offsetY: 56
offsetY: 36
},
value: {
offsetY: 60,
offsetY: 50,
fontSize: '14px',
color: undefined,
formatter: () => {return ''}
Expand Down Expand Up @@ -82,16 +82,16 @@ export default {
.container {
position: relative;
margin: 0 auto;
height: 172px;
height: 112px!important;
.text {
position: absolute;
top: calc(50% - 3px);
top: calc(50% - 5px);
width: 100%;
text-align: center;
}
.bottom_text {
position: absolute;
top: calc(152px);
top: calc(106px);
font-weight: 600;
width: 100%;
text-align: center;
Expand Down
45 changes: 27 additions & 18 deletions frontend/src/locale/en/LC_MESSAGES/app.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgstr ""
msgid "Configure SSL"
msgstr ""

#: src/views/dashboard/DashBoard.vue:207
#: src/views/dashboard/DashBoard.vue:211
msgid "CPU Status"
msgstr ""

Expand Down Expand Up @@ -119,16 +119,16 @@ msgstr ""
msgid "Disable auto-renewal failed for %{name}"
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"
msgstr ""

#: src/views/domain/DomainEdit.vue:180 src/views/domain/DomainList.vue:55
msgid "Disabled successfully"
msgstr ""

#: src/views/dashboard/DashBoard.vue:285
#: src/views/dashboard/DashBoard.vue:289
msgid "Disk IO"
msgstr ""

Expand All @@ -140,15 +140,15 @@ msgstr ""
msgid "Domain Config Created Successfully"
msgstr ""

#: src/views/domain/DomainEdit.vue:49
#: src/views/domain/DomainEdit.vue:47
msgid "Edit %{n}"
msgstr ""

#: src/router/index.js:69 src/views/config/ConfigEdit.vue:15
msgid "Edit Configuration"
msgstr ""

#: src/views/domain/DomainEdit.vue:136
#: src/views/domain/DomainEdit.vue:134
msgid "Edit Configuration File"
msgstr ""

Expand All @@ -172,8 +172,9 @@ msgstr ""
msgid "Enable TLS"
msgstr ""

#: src/views/domain/DomainEdit.vue:73 src/views/domain/DomainList.vue:8
#: src/views/domain/DomainList.vue:3 src/views/domain/DomainList.vue:16
#: 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:16
msgid "Enabled"
msgstr ""

Expand Down Expand Up @@ -282,10 +283,14 @@ msgstr ""
msgid "Manage Users"
msgstr ""

#: src/views/dashboard/DashBoard.vue:103
#: src/views/dashboard/DashBoard.vue:105
msgid "Memory"
msgstr ""

#: src/views/dashboard/DashBoard.vue:93
msgid "Memory and Storage"
msgstr ""

#: src/views/domain/DomainAdd.vue:28 src/views/domain/DomainAdd.vue:2
msgid "Modify Config"
msgstr ""
Expand All @@ -294,15 +299,19 @@ msgstr ""
msgid "Name"
msgstr ""

#: src/views/dashboard/DashBoard.vue:234
#: src/views/dashboard/DashBoard.vue:238
msgid "Network"
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"
msgstr ""

#: src/views/dashboard/DashBoard.vue:177
#: src/views/dashboard/DashBoard.vue:181
msgid "Network Total Send"
msgstr ""

Expand Down Expand Up @@ -360,11 +369,11 @@ msgstr ""
msgid "Project Team"
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"
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"
msgstr ""

Expand All @@ -386,7 +395,7 @@ msgstr ""
msgid "Saved successfully"
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"
msgstr ""

Expand Down Expand Up @@ -415,15 +424,15 @@ msgstr ""
msgid "Status"
msgstr ""

#: src/views/dashboard/DashBoard.vue:135
#: src/views/dashboard/DashBoard.vue:137
msgid "Storage"
msgstr ""

#: src/views/domain/CertInfo.vue:4
msgid "Subject Name: %{name}"
msgstr ""

#: src/views/dashboard/DashBoard.vue:119
#: src/views/dashboard/DashBoard.vue:121
msgid "Swap"
msgstr ""

Expand Down Expand Up @@ -476,6 +485,6 @@ msgstr ""
msgid "Username (*)"
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"
msgstr ""
Binary file modified frontend/src/locale/zh_CN/LC_MESSAGES/app.mo
Binary file not shown.
Loading

0 comments on commit da31777

Please sign in to comment.