Skip to content

Commit 956a64c

Browse files
feat: Support managing application upgrades for all nodes on a single page (#11325)
1 parent 6f9a8d5 commit 956a64c

File tree

15 files changed

+59
-9
lines changed

15 files changed

+59
-9
lines changed

core/constant/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ var WebUrlMap = map[string]struct{}{
169169
"/xpack/simple-node": {},
170170
"/xpack/exchange/file": {},
171171
"/xpack/app": {},
172+
"/xpack/app-upgrade": {},
172173

173174
"/xpack/cluster/mysql": {},
174175
"/xpack/cluster/postgres": {},

frontend/src/api/interface/setting.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,4 +287,9 @@ export namespace Setting {
287287
smsUsed: number;
288288
smsTotal: number;
289289
}
290+
291+
export interface NodeAppItem {
292+
name: string;
293+
updateCount: number;
294+
}
290295
}

frontend/src/api/modules/app.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ export const changePort = (params: App.ChangePort) => {
4141
return http.post<any>('apps/installed/port/change', params);
4242
};
4343

44-
export const searchAppInstalled = (search: App.AppInstallSearch) => {
45-
return http.post<ResPage<App.AppInstallDto>>('apps/installed/search', search);
44+
export const searchAppInstalled = (search: App.AppInstallSearch, node?: string) => {
45+
const params = node ? `?operateNode=${node}` : '';
46+
return http.post<ResPage<App.AppInstallDto>>(`apps/installed/search${params}`, search);
4647
};
4748

4849
export const listAppInstalled = () => {
@@ -89,8 +90,9 @@ export const getAppService = (key: string | undefined, node?: string) => {
8990
return http.get<App.AppService[]>(`apps/services/${key}${params}`);
9091
};
9192

92-
export const getAppUpdateVersions = (req: App.AppUpdateVersionReq) => {
93-
return http.post<any>(`apps/installed/update/versions`, req);
93+
export const getAppUpdateVersions = (req: App.AppUpdateVersionReq, node?: string) => {
94+
const params = node ? `?operateNode=${node}` : '';
95+
return http.post<any>(`apps/installed/update/versions${params}`, req);
9496
};
9597

9698
export const getAppDefaultConfig = (key: string, name: string) => {

frontend/src/api/modules/setting.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export const getLicenseSmsInfo = () => {
5555
return http.get<Setting.SmsInfo>(`/core/licenses/sms/info`);
5656
};
5757

58+
export const listAppNodes = () => {
59+
return http.get<Array<Setting.NodeAppItem>>(`/core/xpack/nodes/apps/update`);
60+
};
61+
5862
// agent
5963
export const loadBaseDir = () => {
6064
return http.get<string>(`/settings/basedir`);

frontend/src/lang/modules/en.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3817,6 +3817,9 @@ const message = {
38173817
offline: 'Offline mode',
38183818
freeCount: 'Free quota [{0}]',
38193819
offlineHelper: 'Used when the node is in an offline environment',
3820+
3821+
appUpgrade: 'App Upgrade',
3822+
appUpgradeHelper: 'There are {0} apps that need to be upgraded',
38203823
},
38213824
customApp: {
38223825
name: 'Custom App Repository',

frontend/src/lang/modules/es-es.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3771,6 +3771,9 @@ const message = {
37713771
offline: 'Modo Offline',
37723772
freeCount: 'Cuota gratuita [{0}]',
37733773
offlineHelper: 'Usado cuando el nodo está en un entorno sin conexión',
3774+
3775+
appUpgrade: 'Actualización de la aplicación',
3776+
appUpgradeHelper: 'Hay {0} aplicaciones que necesitan ser actualizadas',
37743777
},
37753778
customApp: {
37763779
name: 'Repositorio de Apps Personalizadas',

frontend/src/lang/modules/ja.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,6 +3705,9 @@ const message = {
37053705
offline: 'オフラインモード',
37063706
freeCount: '無料枠 [{0}]',
37073707
offlineHelper: 'ノードがオフライン環境にある場合に使用',
3708+
3709+
appUpgrade: 'アプリのアップグレード',
3710+
appUpgradeHelper: 'アップグレードが必要なアプリが {0} 個あります',
37083711
},
37093712
customApp: {
37103713
name: 'カスタムアプリリポジトリ',

frontend/src/lang/modules/ko.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3636,6 +3636,9 @@ const message = {
36363636
offline: '오프라인 모드',
36373637
freeCount: '무료 할당량 [{0}]',
36383638
offlineHelper: '노드가 오프라인 환경일 때 사용',
3639+
3640+
appUpgrade: '앱 업그레이드',
3641+
appUpgradeHelper: '업그레이드가 필요한 앱이 {0}개 있습니다',
36393642
},
36403643
customApp: {
36413644
name: '사용자 정의 앱 저장소',

frontend/src/lang/modules/ms.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3774,6 +3774,9 @@ const message = {
37743774
offline: 'Mod luar talian',
37753775
freeCount: 'Had percuma [{0}]',
37763776
offlineHelper: 'Digunakan apabila nod berada dalam persekitaran luar talian',
3777+
3778+
appUpgrade: 'Naik Taraf Apl',
3779+
appUpgradeHelper: 'Terdapat {0} apl yang perlu dinaik taraf',
37773780
},
37783781
customApp: {
37793782
name: 'Repositori Aplikasi Khusus',

frontend/src/lang/modules/pt-br.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,6 +3793,9 @@ const message = {
37933793
offline: 'Modo offline',
37943794
freeCount: 'Cota gratuita [{0}]',
37953795
offlineHelper: 'Usado quando o nó está em ambiente offline',
3796+
3797+
appUpgrade: 'Atualização do Aplicativo',
3798+
appUpgradeHelper: 'Existem {0} aplicativos que precisam ser atualizados',
37963799
},
37973800
customApp: {
37983801
name: 'Repositório de Aplicativos Personalizados',

0 commit comments

Comments
 (0)