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 + + +