From 5807570fa52af2e69cea41d9a4c997d336d0a610 Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Sat, 10 Aug 2024 13:50:03 +0500 Subject: [PATCH] NAS-130333 / 24.10 / Adds roles for app related api endpoint access elements (#10417) --- src/app/enums/role.enum.ts | 2 ++ src/app/interfaces/api/api-job-directory.interface.ts | 4 +--- src/app/interfaces/app.interface.ts | 2 -- .../app-details-header/app-details-header.component.html | 2 ++ .../app-details-header/app-details-header.component.ts | 3 +++ .../available-apps-header/available-apps-header.component.ts | 2 +- .../catalog-settings/catalog-settings.component.html | 1 + .../components/catalog-settings/catalog-settings.component.ts | 2 ++ .../app-rollback-modal/app-rollback-modal.component.spec.ts | 4 ++-- .../app-rollback-modal/app-rollback-modal.component.ts | 2 +- .../app-settings-button/app-settings-button.component.html | 2 ++ .../app-settings-button/app-settings-button.component.spec.ts | 2 ++ .../app-settings-button/app-settings-button.component.ts | 3 +++ src/assets/i18n/af.json | 1 + src/assets/i18n/ar.json | 1 + src/assets/i18n/ast.json | 1 + src/assets/i18n/az.json | 1 + src/assets/i18n/be.json | 1 + src/assets/i18n/bg.json | 1 + src/assets/i18n/bn.json | 1 + src/assets/i18n/br.json | 1 + src/assets/i18n/bs.json | 1 + src/assets/i18n/ca.json | 1 + src/assets/i18n/cs.json | 1 + src/assets/i18n/cy.json | 1 + src/assets/i18n/da.json | 1 + src/assets/i18n/de.json | 1 + src/assets/i18n/dsb.json | 1 + src/assets/i18n/el.json | 1 + src/assets/i18n/en-au.json | 1 + src/assets/i18n/en-gb.json | 1 + src/assets/i18n/en.json | 1 + src/assets/i18n/eo.json | 1 + src/assets/i18n/es-ar.json | 1 + src/assets/i18n/es-co.json | 1 + src/assets/i18n/es-mx.json | 1 + src/assets/i18n/es-ni.json | 1 + src/assets/i18n/es-ve.json | 1 + src/assets/i18n/es.json | 1 + src/assets/i18n/et.json | 1 + src/assets/i18n/eu.json | 1 + src/assets/i18n/fa.json | 1 + src/assets/i18n/fi.json | 1 + src/assets/i18n/fr.json | 1 + src/assets/i18n/fy.json | 1 + src/assets/i18n/ga.json | 1 + src/assets/i18n/gd.json | 1 + src/assets/i18n/gl.json | 1 + src/assets/i18n/he.json | 1 + src/assets/i18n/hi.json | 1 + src/assets/i18n/hr.json | 1 + src/assets/i18n/hsb.json | 1 + src/assets/i18n/hu.json | 1 + src/assets/i18n/ia.json | 1 + src/assets/i18n/id.json | 1 + src/assets/i18n/io.json | 1 + src/assets/i18n/is.json | 1 + src/assets/i18n/it.json | 1 + src/assets/i18n/ja.json | 1 + src/assets/i18n/ka.json | 1 + src/assets/i18n/kk.json | 1 + src/assets/i18n/km.json | 1 + src/assets/i18n/kn.json | 1 + src/assets/i18n/ko.json | 1 + src/assets/i18n/lb.json | 1 + src/assets/i18n/lt.json | 1 + src/assets/i18n/lv.json | 1 + src/assets/i18n/mk.json | 1 + src/assets/i18n/ml.json | 1 + src/assets/i18n/mn.json | 1 + src/assets/i18n/mr.json | 1 + src/assets/i18n/my.json | 1 + src/assets/i18n/nb.json | 1 + src/assets/i18n/ne.json | 1 + src/assets/i18n/nl.json | 1 + src/assets/i18n/nn.json | 1 + src/assets/i18n/os.json | 1 + src/assets/i18n/pa.json | 1 + src/assets/i18n/pl.json | 1 + src/assets/i18n/pt-br.json | 1 + src/assets/i18n/pt.json | 1 + src/assets/i18n/ro.json | 1 + src/assets/i18n/ru.json | 1 + src/assets/i18n/sk.json | 1 + src/assets/i18n/sl.json | 1 + src/assets/i18n/sq.json | 1 + src/assets/i18n/sr-latn.json | 1 + src/assets/i18n/sr.json | 1 + src/assets/i18n/strings.json | 1 + src/assets/i18n/sv.json | 1 + src/assets/i18n/sw.json | 1 + src/assets/i18n/ta.json | 1 + src/assets/i18n/te.json | 1 + src/assets/i18n/th.json | 1 + src/assets/i18n/tr.json | 1 + src/assets/i18n/tt.json | 1 + src/assets/i18n/udm.json | 1 + src/assets/i18n/uk.json | 1 + src/assets/i18n/vi.json | 1 + src/assets/i18n/zh-hans.json | 1 + src/assets/i18n/zh-hant.json | 1 + src/assets/ui-searchable-elements.json | 4 +++- 102 files changed, 113 insertions(+), 10 deletions(-) diff --git a/src/app/enums/role.enum.ts b/src/app/enums/role.enum.ts index 4734e694ebd..81d67d385f1 100644 --- a/src/app/enums/role.enum.ts +++ b/src/app/enums/role.enum.ts @@ -102,6 +102,7 @@ export enum Role { VmWrite = 'VM_WRITE', DirectoryServiceRead = 'DIRECTORY_SERVICE_READ', DirectoryServiceWrite = 'DIRECTORY_SERVICE_WRITE', + DockerWrite = 'DOCKER_WRITE', } export const roleNames = new Map([ @@ -209,4 +210,5 @@ export const roleNames = new Map([ [Role.VmWrite, T('VM Write')], [Role.DirectoryServiceRead, T('Directory Service Read')], [Role.DirectoryServiceWrite, T('Directory Service Write')], + [Role.DockerWrite, T('Docker Write')], ]); diff --git a/src/app/interfaces/api/api-job-directory.interface.ts b/src/app/interfaces/api/api-job-directory.interface.ts index b6d8cf851a8..36c9864689f 100644 --- a/src/app/interfaces/api/api-job-directory.interface.ts +++ b/src/app/interfaces/api/api-job-directory.interface.ts @@ -80,9 +80,7 @@ export interface ApiJobDirectory { 'app.stop': { params: AppStartQueryParams; response: void }; 'app.delete': { params: AppDeleteParams; response: boolean }; 'app.upgrade': { params: AppUpgradeParams; response: App }; - - // Chart Release - 'chart.release.rollback': { params: [name: string, params: ChartRollbackParams]; response: App }; + 'app.rollback': { params: [name: string, params: ChartRollbackParams]; response: App }; // CloudBackup 'cloud_backup.sync': { params: [id: number, params?: { dry_run: boolean }]; response: void }; diff --git a/src/app/interfaces/app.interface.ts b/src/app/interfaces/app.interface.ts index 18f9b16c386..d5b59a73699 100644 --- a/src/app/interfaces/app.interface.ts +++ b/src/app/interfaces/app.interface.ts @@ -298,8 +298,6 @@ export type AppDeleteParams = [ ]; export interface ChartRollbackParams { - force_rollback?: boolean; - recreate_resources?: boolean; rollback_snapshot?: boolean; app_version: string; } diff --git a/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.html b/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.html index e6cdc596388..07cd9e6ce7b 100644 --- a/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.html +++ b/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.html @@ -14,6 +14,7 @@ @if (!!(dockerStore.selectedPool$ | async)) {