Skip to content

Commit 8ba5714

Browse files
committed
feat: upgrade core online
1 parent 61613ee commit 8ba5714

File tree

24 files changed

+1113
-343
lines changed

24 files changed

+1113
-343
lines changed

.github/embed.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package _github
2+
3+
import "embed"
4+
5+
//go:embed build/build_info.json
6+
var DistFS embed.FS

frontend/package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nginx-ui-frontend-next",
33
"private": true,
4-
"version": "1.7.1",
4+
"version": "1.7.2",
55
"type": "commonjs",
66
"scripts": {
77
"dev": "vite",
@@ -12,25 +12,27 @@
1212
},
1313
"dependencies": {
1414
"@ant-design/icons-vue": "^6.1.0",
15+
"@types/lodash": "^4.14.188",
16+
"@types/marked": "^4.0.8",
17+
"@types/sortablejs": "^1.15.0",
1518
"ant-design-vue": "^3.2.15",
1619
"apexcharts": "^3.36.3",
1720
"axios": "^1.2.2",
1821
"dayjs": "^1.11.7",
22+
"marked": "^4.2.5",
1923
"pinia": "^2.0.28",
2024
"pinia-plugin-persistedstate": "^3.0.2",
2125
"reconnecting-websocket": "^4.4.0",
22-
"vite-plugin-build-id": "^0.2.2",
26+
"vite-plugin-build-id": "^0.2.3",
2327
"vue": "^3.2.45",
2428
"vue-router": "4",
2529
"vue3-ace-editor": "^2.2.2",
2630
"vue3-apexcharts": "^1.4.1",
2731
"vue3-gettext": "^2.3.4",
32+
"vuedraggable": "^4.1.0",
2833
"xterm": "^5.0.0",
2934
"xterm-addon-attach": "^0.7.0",
30-
"xterm-addon-fit": "^0.6.0",
31-
"@types/lodash": "^4.14.188",
32-
"vuedraggable": "^4.1.0",
33-
"@types/sortablejs": "^1.15.0"
35+
"xterm-addon-fit": "^0.6.0"
3436
},
3537
"devDependencies": {
3638
"@vitejs/plugin-vue": "^4.0.0",
@@ -41,6 +43,6 @@
4143
"unplugin-vue-components": "^0.22.12",
4244
"vite": "^4.0.4",
4345
"vite-plugin-html": "^3.2.0",
44-
"vue-tsc": "^1.0.22"
46+
"vue-tsc": "^1.0.24"
4547
}
4648
}

frontend/src/api/upgrade.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import http from '@/lib/http'
2+
3+
const upgrade = {
4+
get_latest_release() {
5+
return http.get('/upgrade/release')
6+
},
7+
current_version() {
8+
return http.get('/upgrade/current')
9+
}
10+
}
11+
12+
export default upgrade

frontend/src/language/en/app.po

Lines changed: 92 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr ""
99
"Content-Transfer-Encoding: 8bit\n"
1010
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1111

12-
#: src/routes/index.ts:134
12+
#: src/routes/index.ts:141
1313
msgid "About"
1414
msgstr "About"
1515

@@ -50,6 +50,11 @@ msgstr "Add Site"
5050
msgid "Advance Mode"
5151
msgstr "Advance Mode"
5252

53+
#: src/views/system/Upgrade.vue:12 src/views/system/Upgrade.vue:13
54+
#: src/views/system/Upgrade.vue:17 src/views/system/Upgrade.vue:21
55+
msgid "Arch"
56+
msgstr ""
57+
5358
#: src/components/StdDataDisplay/StdTable.vue:54
5459
#: src/views/domain/DomainList.vue:26
5560
#, fuzzy
@@ -129,7 +134,7 @@ msgstr "Basic Mode"
129134
msgid "Batch Modify"
130135
msgstr "Modify Config"
131136

132-
#: src/views/other/About.vue:21
137+
#: src/views/system/About.vue:21
133138
msgid "Build with"
134139
msgstr "Build with"
135140

@@ -163,6 +168,11 @@ msgstr "Certificate is valid"
163168
msgid "Change Certificate"
164169
msgstr "Certificate is valid"
165170

171+
#: src/views/system/Upgrade.vue:16 src/views/system/Upgrade.vue:17
172+
#: src/views/system/Upgrade.vue:21 src/views/system/Upgrade.vue:25
173+
msgid "Check again"
174+
msgstr ""
175+
166176
#: src/views/domain/ngx_conf/directive/DirectiveEditorItem.vue:34
167177
#: src/views/domain/ngx_conf/LocationEditor.vue:31
168178
#: src/views/domain/ngx_conf/LocationEditor.vue:47
@@ -193,6 +203,10 @@ msgstr "Configure SSL"
193203
msgid "Content"
194204
msgstr "Content"
195205

206+
#: src/views/system/Upgrade.vue:3
207+
msgid "Core Upgrade"
208+
msgstr ""
209+
196210
#: src/views/dashboard/DashBoard.vue:64
197211
msgid "CPU Status"
198212
msgstr "CPU Status"
@@ -213,6 +227,11 @@ msgstr "Created at"
213227
msgid "Creating client facilitates communication with the CA server"
214228
msgstr ""
215229

230+
#: src/views/system/Upgrade.vue:10 src/views/system/Upgrade.vue:11
231+
#: src/views/system/Upgrade.vue:15 src/views/system/Upgrade.vue:19
232+
msgid "Current Version"
233+
msgstr ""
234+
216235
#: src/views/domain/ngx_conf/ConfigTemplate.vue:22
217236
#: src/views/domain/ngx_conf/ConfigTemplate.vue:23
218237
#: src/views/domain/ngx_conf/ConfigTemplate.vue:26
@@ -258,7 +277,7 @@ msgstr ""
258277
msgid "Description"
259278
msgstr ""
260279

261-
#: src/views/other/About.vue:7 src/views/other/About.vue:8
280+
#: src/views/system/About.vue:7 src/views/system/About.vue:8
262281
msgid "Development Mode"
263282
msgstr "Development Mode"
264283

@@ -344,14 +363,19 @@ msgstr "Enabled"
344363
msgid "Enabled successfully"
345364
msgstr "Enabled successfully"
346365

347-
#: src/views/domain/cert/IssueCert.vue:18
366+
#: src/views/domain/cert/IssueCert.vue:17
348367
msgid "Encrypt website with Let's Encrypt"
349368
msgstr "Encrypt website with Let's Encrypt"
350369

351370
#: src/routes/index.ts:113 src/views/domain/ngx_conf/LogEntry.vue:68
352371
msgid "Error Logs"
353372
msgstr ""
354373

374+
#: src/views/system/Upgrade.vue:13 src/views/system/Upgrade.vue:14
375+
#: src/views/system/Upgrade.vue:18 src/views/system/Upgrade.vue:22
376+
msgid "Executable Path"
377+
msgstr ""
378+
355379
#: src/views/domain/cert/CertInfo.vue:12
356380
msgid "Expiration Date: %{date}"
357381
msgstr "Expiration Date: %{date}"
@@ -433,7 +457,7 @@ msgstr ""
433457
msgid "HTTP Port"
434458
msgstr ""
435459

436-
#: src/routes/index.ts:144 src/views/other/Install.vue:128
460+
#: src/routes/index.ts:153 src/views/other/Install.vue:128
437461
msgid "Install"
438462
msgstr "Install"
439463

@@ -455,6 +479,11 @@ msgstr "Enabled successfully"
455479
msgid "Jwt Secret"
456480
msgstr ""
457481

482+
#: src/views/system/Upgrade.vue:14 src/views/system/Upgrade.vue:15
483+
#: src/views/system/Upgrade.vue:19 src/views/system/Upgrade.vue:23
484+
msgid "Last checked at"
485+
msgstr ""
486+
458487
#: src/views/user/User.vue:26
459488
msgid "Leave blank for no change"
460489
msgstr "Leave blank for no change"
@@ -478,7 +507,7 @@ msgstr "Location"
478507
msgid "Locations"
479508
msgstr "Locations"
480509

481-
#: src/routes/index.ts:150 src/views/other/Login.vue:104
510+
#: src/routes/index.ts:159 src/views/other/Login.vue:104
482511
msgid "Login"
483512
msgstr "Login"
484513

@@ -490,7 +519,7 @@ msgstr "Login successful"
490519
msgid "Logout successful"
491520
msgstr "Logout successful"
492521

493-
#: src/views/domain/cert/IssueCert.vue:211
522+
#: src/views/domain/cert/IssueCert.vue:210
494523
msgid ""
495524
"Make sure you have configured a reverse proxy for .well-known directory to "
496525
"HTTPChallengePort (default: 9180) before getting the certificate."
@@ -560,6 +589,10 @@ msgstr "Network Total Receive"
560589
msgid "Network Total Send"
561590
msgstr "Network Total Send"
562591

592+
#: src/views/system/Upgrade.vue:34
593+
msgid "New version released"
594+
msgstr ""
595+
563596
#: src/views/domain/DomainAdd.vue:136
564597
msgid "Next"
565598
msgstr "Next"
@@ -588,15 +621,15 @@ msgstr ""
588621
msgid "No"
589622
msgstr "No"
590623

591-
#: src/routes/index.ts:156 src/routes/index.ts:158
624+
#: src/routes/index.ts:165 src/routes/index.ts:167
592625
msgid "Not Found"
593626
msgstr "Not Found"
594627

595628
#: src/views/domain/cert/CertInfo.vue:14
596629
msgid "Not Valid Before: %{date}"
597630
msgstr "Not Valid Before: %{date}"
598631

599-
#: src/views/domain/cert/IssueCert.vue:38
632+
#: src/views/domain/cert/IssueCert.vue:37
600633
msgid "Note"
601634
msgstr ""
602635

@@ -612,6 +645,12 @@ msgstr ""
612645
msgid "OK"
613646
msgstr ""
614647

648+
#: src/views/system/Upgrade.vue:11 src/views/system/Upgrade.vue:12
649+
#: src/views/system/Upgrade.vue:16 src/views/system/Upgrade.vue:20
650+
#, fuzzy
651+
msgid "OS"
652+
msgstr "OS:"
653+
615654
#: src/views/dashboard/DashBoard.vue:147
616655
msgid "OS:"
617656
msgstr "OS:"
@@ -662,7 +701,7 @@ msgstr ""
662701
msgid "Prohibit deleting the default user"
663702
msgstr ""
664703

665-
#: src/views/other/About.vue:19
704+
#: src/views/system/About.vue:19
666705
msgid "Project Team"
667706
msgstr "Project Team"
668707

@@ -678,6 +717,19 @@ msgstr "Receive"
678717
msgid "Registering user"
679718
msgstr ""
680719

720+
#: src/views/system/Upgrade.vue:24 src/views/system/Upgrade.vue:25
721+
#: src/views/system/Upgrade.vue:29 src/views/system/Upgrade.vue:33
722+
#: src/views/system/Upgrade.vue:36 src/views/system/Upgrade.vue:39
723+
#, fuzzy
724+
msgid "Reinstall"
725+
msgstr "Install"
726+
727+
#: src/views/system/Upgrade.vue:31 src/views/system/Upgrade.vue:32
728+
#: src/views/system/Upgrade.vue:36 src/views/system/Upgrade.vue:40
729+
#: src/views/system/Upgrade.vue:43 src/views/system/Upgrade.vue:48
730+
msgid "Release Note"
731+
msgstr ""
732+
681733
#: src/language/constants.ts:19
682734
msgid "Reloading nginx"
683735
msgstr ""
@@ -757,7 +809,7 @@ msgstr "Server Info"
757809
msgid "server_name not found in directives"
758810
msgstr "server_name not found in directives"
759811

760-
#: src/views/domain/cert/IssueCert.vue:195 src/views/domain/DomainAdd.vue:111
812+
#: src/views/domain/cert/IssueCert.vue:194 src/views/domain/DomainAdd.vue:111
761813
msgid "server_name parameter is required"
762814
msgstr "server_name parameter is required"
763815

@@ -811,6 +863,10 @@ msgstr "Subject Name: %{name}"
811863
msgid "Swap"
812864
msgstr "Swap"
813865

866+
#: src/routes/index.ts:134
867+
msgid "System"
868+
msgstr ""
869+
814870
#: src/components/StdDataDisplay/StdCurd.vue:3
815871
#, fuzzy
816872
msgid "Table"
@@ -824,7 +880,7 @@ msgstr "Terminal"
824880
msgid "Terminal Start Command"
825881
msgstr ""
826882

827-
#: src/views/domain/cert/IssueCert.vue:207
883+
#: src/views/domain/cert/IssueCert.vue:206
828884
msgid ""
829885
"The certificate for the domain will be checked every hour, and will be "
830886
"renewed if it has been more than 1 month since it was last issued."
@@ -836,7 +892,7 @@ msgstr ""
836892
msgid "The filename cannot contain the following characters: %{c}"
837893
msgstr "The filename cannot contain the following characters: %{c}"
838894

839-
#: src/views/domain/cert/IssueCert.vue:203
895+
#: src/views/domain/cert/IssueCert.vue:202
840896
#, fuzzy
841897
msgid ""
842898
"The server_name in the current configuration must be the domain name you "
@@ -867,6 +923,18 @@ msgstr "Updated at"
867923
msgid "Updated successfully"
868924
msgstr "Saved successfully"
869925

926+
#: src/routes/index.ts:145 src/views/system/Upgrade.vue:16
927+
#: src/views/system/Upgrade.vue:26 src/views/system/Upgrade.vue:27
928+
#: src/views/system/Upgrade.vue:31 src/views/system/Upgrade.vue:35
929+
#: src/views/system/Upgrade.vue:38 src/views/system/Upgrade.vue:41
930+
#: src/views/system/Upgrade.vue:42
931+
msgid "Upgrade"
932+
msgstr ""
933+
934+
#: src/views/system/Upgrade.vue:63
935+
msgid "Upgrading Nginx UI, please wait..."
936+
msgstr ""
937+
870938
#: src/views/dashboard/DashBoard.vue:137
871939
msgid "Uptime:"
872940
msgstr "Uptime:"
@@ -889,7 +957,7 @@ msgstr ""
889957
msgid "View"
890958
msgstr ""
891959

892-
#: src/views/domain/cert/IssueCert.vue:27 src/views/domain/DomainAdd.vue:22
960+
#: src/views/domain/cert/IssueCert.vue:26 src/views/domain/DomainAdd.vue:22
893961
msgid "Warning"
894962
msgstr "Warning"
895963

@@ -911,7 +979,16 @@ msgstr ""
911979
msgid "Yes"
912980
msgstr "Yes"
913981

914-
#: src/views/other/About.vue:27
982+
#: src/views/system/Upgrade.vue:30
983+
msgid "You are using the latest version"
984+
msgstr ""
985+
986+
#: src/views/system/Upgrade.vue:10 src/views/system/Upgrade.vue:14
987+
#: src/views/system/Upgrade.vue:18 src/views/system/Upgrade.vue:9
988+
msgid "You can check Nginx UI upgrade at this page."
989+
msgstr ""
990+
991+
#: src/views/system/About.vue:27
915992
msgctxt "Project"
916993
msgid "License"
917994
msgstr "License"

0 commit comments

Comments
 (0)