From 77c0ceb60e8c3ccecb192064e0b7f6847ce5eb55 Mon Sep 17 00:00:00 2001 From: ysh Date: Fri, 29 Nov 2024 10:04:58 +0900 Subject: [PATCH] update UI / UI build file --- applicationFE/src/api/softwareCatalog.ts | 57 +++---- applicationFE/src/common/request.ts | 1 + .../src/views/repository/RepositoryList.vue | 10 +- .../views/softwareCatalog/SoftwareCatalog.vue | 18 +- .../components/applicationActionConfirm.vue | 104 +++++++++++ .../applicationInstallationForm.vue | 12 +- .../components/applicationStatusList.vue | 161 +++++++----------- .../components/softwareCatalogList.vue | 6 +- applicationFE/src/views/type/type.ts | 28 --- .../static/assets/IconPlus-Ut5FpUsC.js | 16 ++ .../static/assets/IconPlus-WJaQoBnv.js | 16 ++ .../static/assets/OssList-BWeNlBPM.js | 17 ++ .../static/assets/OssList-DvKzmFSz.js | 17 ++ .../assets/RepositoryDetail-CQI4_BPa.js | 15 ++ .../assets/RepositoryDetail-qrOuviBl.js | 15 ++ .../static/assets/RepositoryList-CTjMi9zT.js | 1 + .../static/assets/RepositoryList-DKzFHK_p.js | 1 + ...ue_type_script_setup_true_lang-BQgw8Rnf.js | 17 ++ ...ue_type_script_setup_true_lang-ByTr0rsA.js | 17 ++ .../static/assets/SoftwareCatalog-BMoZOU6M.js | 68 ++++++++ .../static/assets/SoftwareCatalog-DBgoqaQe.js | 68 ++++++++ .../SoftwareCatalogListTest-COZExEE1.js | 6 + .../SoftwareCatalogListTest-ScVUFghZ.js | 6 + ...ue_type_script_setup_true_lang-BVsdm7C9.js | 1 + ...ue_type_script_setup_true_lang-CAzqMgYM.js | 1 + ...ue_vue_type_style_index_0_lang-DH8KGYiw.js | 22 +++ ...ue_vue_type_style_index_0_lang-Dmu7xujW.js | 22 +++ .../static/assets/YamlGenerate-BY1EmqYv.js | 1 + .../static/assets/YamlGenerate-CsjvLXhk.js | 1 + .../resources/static/assets/index-D3T95vNm.js | 42 +++++ .../resources/static/assets/index-DeRM_aDz.js | 42 +++++ .../static/assets/lodash-CAolBhd9.js | 27 +++ .../static/assets/lodash-CZrbLC7d.js | 27 +++ .../static/assets/repository-CNnE45Ml.js | 1 + .../static/assets/repository-ZO0S3VlE.js | 1 + .../static/assets/request-C2GHfbVL.js | 1 + .../static/assets/request-DDEURQ0f.js | 1 + .../assets/softwareCatalogForm-CNq1F4pv.css | 1 + .../assets/softwareCatalogForm-CxzPN3D1.js | 11 ++ .../assets/softwareCatalogForm-oL-MgVLq.js | 11 ++ src/main/resources/static/index.html | 2 +- 41 files changed, 712 insertions(+), 180 deletions(-) create mode 100644 applicationFE/src/views/softwareCatalog/components/applicationActionConfirm.vue create mode 100644 src/main/resources/static/assets/IconPlus-Ut5FpUsC.js create mode 100644 src/main/resources/static/assets/IconPlus-WJaQoBnv.js create mode 100644 src/main/resources/static/assets/OssList-BWeNlBPM.js create mode 100644 src/main/resources/static/assets/OssList-DvKzmFSz.js create mode 100644 src/main/resources/static/assets/RepositoryDetail-CQI4_BPa.js create mode 100644 src/main/resources/static/assets/RepositoryDetail-qrOuviBl.js create mode 100644 src/main/resources/static/assets/RepositoryList-CTjMi9zT.js create mode 100644 src/main/resources/static/assets/RepositoryList-DKzFHK_p.js create mode 100644 src/main/resources/static/assets/RepositoryList.vue_vue_type_script_setup_true_lang-BQgw8Rnf.js create mode 100644 src/main/resources/static/assets/RepositoryList.vue_vue_type_script_setup_true_lang-ByTr0rsA.js create mode 100644 src/main/resources/static/assets/SoftwareCatalog-BMoZOU6M.js create mode 100644 src/main/resources/static/assets/SoftwareCatalog-DBgoqaQe.js create mode 100644 src/main/resources/static/assets/SoftwareCatalogListTest-COZExEE1.js create mode 100644 src/main/resources/static/assets/SoftwareCatalogListTest-ScVUFghZ.js create mode 100644 src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-BVsdm7C9.js create mode 100644 src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CAzqMgYM.js create mode 100644 src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-DH8KGYiw.js create mode 100644 src/main/resources/static/assets/Tabulator.vue_vue_type_style_index_0_lang-Dmu7xujW.js create mode 100644 src/main/resources/static/assets/YamlGenerate-BY1EmqYv.js create mode 100644 src/main/resources/static/assets/YamlGenerate-CsjvLXhk.js create mode 100644 src/main/resources/static/assets/index-D3T95vNm.js create mode 100644 src/main/resources/static/assets/index-DeRM_aDz.js create mode 100644 src/main/resources/static/assets/lodash-CAolBhd9.js create mode 100644 src/main/resources/static/assets/lodash-CZrbLC7d.js create mode 100644 src/main/resources/static/assets/repository-CNnE45Ml.js create mode 100644 src/main/resources/static/assets/repository-ZO0S3VlE.js create mode 100644 src/main/resources/static/assets/request-C2GHfbVL.js create mode 100644 src/main/resources/static/assets/request-DDEURQ0f.js create mode 100644 src/main/resources/static/assets/softwareCatalogForm-CNq1F4pv.css create mode 100644 src/main/resources/static/assets/softwareCatalogForm-CxzPN3D1.js create mode 100644 src/main/resources/static/assets/softwareCatalogForm-oL-MgVLq.js diff --git a/applicationFE/src/api/softwareCatalog.ts b/applicationFE/src/api/softwareCatalog.ts index 28026f6..03bb337 100644 --- a/applicationFE/src/api/softwareCatalog.ts +++ b/applicationFE/src/api/softwareCatalog.ts @@ -22,15 +22,7 @@ export const searchArtifacthubhub = (keyword: string) => { return request.get(`/search/artifacthub/${keyword}`) } -// install API 변경됨 -// export const runVmInstall = (params: { -// namespace: string, -// mciName: string, -// vmName: string, -// applications: string[] -// }) => { -// return request.post(`/ape/vm/install`, params) -// } +// Application 설치 (VM) export const runVmInstall = (params: { namespace: string, mciId: string, @@ -38,42 +30,34 @@ export const runVmInstall = (params: { catalogId: number, servicePort: number }) => { - // 추후 POST 방식으로 변경 필요 - // return request.post(`/applications/vm/deploy`, params) return request.get(`/applications/vm/deploy?namespace=${params.namespace}&mciId=${params.mciId}&vmId=${params.vmId}&catalogId=${params.catalogId}&servicePort=${params.servicePort}`, ) } -export const runVmUninstall = (params: { - namespace: string, - mciName: string, - vmName: string, - applications: string[] +// Application Action (VM -> INSTALL, UNINSTALL, RUN, RESTART, STOP) +export const runVmAction = (params: { + operation: string, + applicationStatusId: number, + reason: string }) => { - return request.post(`/ape/vm/uninstall`, params) + return request.get(`/applications/vm/action?operation=${params.operation}&applicationStatusId=${params.applicationStatusId}&reason=${params.reason}`) } -// install API 변경됨 -// export const runK8SInstall = (params: { -// namespace: string, -// clusterName: string, -// helmCharts: string[] -// }) => { -// return request.post(`/ape/helm/install`, params) -// } +// Application 설치 (K8S) export const runK8SInstall = (params: { namespace: string, clusterName: string, - helmCharts: string[] + catalogId: number }) => { - return request.post(`/applications/k8s/deploy`, params) + return request.get(`/applications/k8s/deploy?namespace=${params.namespace}&clusterName=${params.clusterName}&catalogId=${params.catalogId}`) } -export const runK8SUninstall = (params: { - namespace: string, - clusterName: string, - helmCharts: string[] +// Application Action (K8S -> INSTALL, UNINSTALL, RUN, RESTART, STOP) +export const runK8SAction = (params: { + operation: string, + applicationStatusId: number, + reason: string }) => { - return request.post(`/ape/helm/uninstall`, params) + return request.get(`/applications/k8s/action?operation=${params.operation}&applicationStatusId=${params.applicationStatusId}&reason=${params.reason}`) } export const vmSpecCheck = (params: { @@ -105,12 +89,9 @@ export function updateSoftwareCatalog(params: any) { return request.put(`/catalog/software`, params) } -export function getVmApplicationsStatus() { - return request.get(`/applications/vm/groups`) -} - -export function getK8sApplicationsStatus() { - return request.get(`/applications/k8s/groups`) +export function getApplicationsStatus() { + // return request.get(`/applications/vm/groups`) + return request.get(`/applications/groups`) } export function applicationAction( diff --git a/applicationFE/src/common/request.ts b/applicationFE/src/common/request.ts index 77662cc..420afc7 100644 --- a/applicationFE/src/common/request.ts +++ b/applicationFE/src/common/request.ts @@ -3,6 +3,7 @@ import { useToast } from "vue-toastification"; const splitUrl = window.location.host.split(':'); const baseUrl = window.location.protocol + '//' + splitUrl[0] + ':18084' +// const baseUrl = 'http://10.10.20.193:18084' const toast = useToast(); const service = axios.create({ // baseURL: process.env.VUE_APP_API_URL, diff --git a/applicationFE/src/views/repository/RepositoryList.vue b/applicationFE/src/views/repository/RepositoryList.vue index eb6bcee..06ed835 100644 --- a/applicationFE/src/views/repository/RepositoryList.vue +++ b/applicationFE/src/views/repository/RepositoryList.vue @@ -81,7 +81,7 @@ const setColumns = () => { { title: "Name", field: "name", - width: 400, + width: '15%', cellClick: function (e, cell) { e.stopPropagation(); selectRepositoryName.value = cell.getRow().getData().name @@ -91,21 +91,21 @@ const setColumns = () => { { title: "Format", field: "format", - width: 300 + width: '10%' }, { title: "URL", field: "url", - width: 410 + width: '40%' }, { title: "Type(hosted)", field: "type", - width: 400 + width: '15%' }, { title: "Action", - width: 400, + width: '20%', formatter: editDeleteButtonFormatter, cellClick: function (e, cell) { const target = e.target as HTMLElement; diff --git a/applicationFE/src/views/softwareCatalog/SoftwareCatalog.vue b/applicationFE/src/views/softwareCatalog/SoftwareCatalog.vue index bb41b1e..5296964 100644 --- a/applicationFE/src/views/softwareCatalog/SoftwareCatalog.vue +++ b/applicationFE/src/views/softwareCatalog/SoftwareCatalog.vue @@ -77,6 +77,14 @@ Apps Status + + + @@ -97,6 +105,13 @@ + + +
+
+ +
+
@@ -113,10 +128,11 @@ \ No newline at end of file diff --git a/applicationFE/src/views/softwareCatalog/components/applicationInstallationForm.vue b/applicationFE/src/views/softwareCatalog/components/applicationInstallationForm.vue index 048127f..eee602e 100644 --- a/applicationFE/src/views/softwareCatalog/components/applicationInstallationForm.vue +++ b/applicationFE/src/views/softwareCatalog/components/applicationInstallationForm.vue @@ -327,7 +327,7 @@ import { onMounted, watch, computed } from 'vue'; // @ts-ignore import _, { slice } from 'lodash'; import { getNsInfo, getMciInfo, getVmInfo, getClusterInfo } from '@/api/tumblebug' -import { getSoftwareCatalogList, k8sSpecCheck, runK8SInstall, runK8SUninstall, runVmInstall, runVmUninstall, vmSpecCheck } from '@/api/softwareCatalog' +import { getSoftwareCatalogList, k8sSpecCheck, runK8SInstall, runK8SAction, runVmInstall, runVmAction, vmSpecCheck } from '@/api/softwareCatalog' import { type SoftwareCatalog } from '@/views/type/type' interface Props { @@ -511,7 +511,7 @@ const runInstall = async () => { if (modalTitle.value == 'Application Installation') { res = await runVmInstall(params) } else { - res = await runVmUninstall(params) + res = await runVmAction(params) } if(res.data) { @@ -525,15 +525,15 @@ const runInstall = async () => { // History : 처음 설계와 방향이 달라져 현재는 Application 1개만 보냄 (기존에는 여러개의 APP을 받을 수 있었음) appList = inputApplications.value.split(",").map(item => item.toLowerCase().trim()); params = { - "namespace": selectNsId.value, - "clusterName": selectCluster.value, - "helmCharts": appList + namespace: selectNsId.value, + clusterName: selectCluster.value, + catalogId: selectedCatalogIdx.value, } if(modalTitle.value == 'Application Installation') { res = await runK8SInstall(params) } else { - res = await runK8SUninstall(params) + res = await runK8SAction(params) } if(res.data) { diff --git a/applicationFE/src/views/softwareCatalog/components/applicationStatusList.vue b/applicationFE/src/views/softwareCatalog/components/applicationStatusList.vue index c8f153c..6fa7a7c 100644 --- a/applicationFE/src/views/softwareCatalog/components/applicationStatusList.vue +++ b/applicationFE/src/views/softwareCatalog/components/applicationStatusList.vue @@ -6,7 +6,7 @@ {{ refreshTime }} - +
@@ -16,16 +16,23 @@
+ +