diff --git a/src/frontend/devops-op/src/api/executionClusters.js b/src/frontend/devops-op/src/api/executionClusters.js new file mode 100644 index 0000000000..a5edd0b4b8 --- /dev/null +++ b/src/frontend/devops-op/src/api/executionClusters.js @@ -0,0 +1,33 @@ +import request from '@/utils/request' + +const PREFIX_SERVICES = 'analyst/api/execution/clusters' + +export function clusters() { + return request({ + url: `${PREFIX_SERVICES}`, + method: 'get' + }) +} + +export function update(body) { + return request({ + url: `${PREFIX_SERVICES}/${body.name}`, + method: 'put', + data: body + }) +} + +export function create(body) { + return request({ + url: `${PREFIX_SERVICES}`, + method: 'post', + data: body + }) +} + +export function remove(name) { + return request({ + url: `${PREFIX_SERVICES}/${name}`, + method: 'delete' + }) +} diff --git a/src/frontend/devops-op/src/router/index.js b/src/frontend/devops-op/src/router/index.js index e5e859f09c..fab87ed73c 100644 --- a/src/frontend/devops-op/src/router/index.js +++ b/src/frontend/devops-op/src/router/index.js @@ -26,6 +26,7 @@ export const ROUTER_NAME_FILE_SYSTEM_RECORD = 'FileSystemRecord' export const ROUTER_NAME_REPO_CONFIG = 'RepoConfig' export const ROUTER_NAME_RATE_LIMITER_CONFIG = 'RateLimiterConfig' export const ROUTER_NAME_PRELOAD_CONFIG = 'PreloadConfig' +export const ROUTER_NAME_EXECUTION_CLUSTERS_CONFIG = 'ExecutionClustersConfig' Vue.use(Router) @@ -174,6 +175,12 @@ export const asyncRoutes = [ name: ROUTER_NAME_PROJECT_METRICS, meta: { title: '仓库大小统计', icon: 'file' }, component: () => import('@/views/node/ProjectMetrics') + }, + { + path: 'preloadConfig', + name: ROUTER_NAME_PRELOAD_CONFIG, + meta: { title: '制品预加载配置', icon: 'service-config' }, + component: () => import('@/views/preload/index') } ] }, @@ -261,6 +268,12 @@ export const asyncRoutes = [ name: ROUTER_NAME_PROJECT_SCAN_CONFIGURATIONS, component: () => import('@/views/scan/ProjectScanConfiguration'), meta: { title: '项目配置', icon: 'setting' } + }, + { + path: 'executionClustersConfig', + name: ROUTER_NAME_EXECUTION_CLUSTERS_CONFIG, + meta: { title: '扫描执行集群配置', icon: 'service-config' }, + component: () => import('@/views/execution-clusters/index') } ] }, @@ -327,18 +340,6 @@ export const asyncRoutes = [ } ] }, - { - path: '/preload-config', - component: Layout, - children: [ - { - path: '/', - name: ROUTER_NAME_PRELOAD_CONFIG, - meta: { title: '制品预加载配置', icon: 'service-config' }, - component: () => import('@/views/preload/index') - } - ] - }, // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/frontend/devops-op/src/views/execution-clusters/components/EditClusterConfigDialog.vue b/src/frontend/devops-op/src/views/execution-clusters/components/EditClusterConfigDialog.vue new file mode 100644 index 0000000000..1c5e1b2983 --- /dev/null +++ b/src/frontend/devops-op/src/views/execution-clusters/components/EditClusterConfigDialog.vue @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + diff --git a/src/frontend/devops-op/src/views/execution-clusters/index.vue b/src/frontend/devops-op/src/views/execution-clusters/index.vue new file mode 100644 index 0000000000..142f2d8457 --- /dev/null +++ b/src/frontend/devops-op/src/views/execution-clusters/index.vue @@ -0,0 +1,119 @@ + + + + + + + + + 创建 + + + + 详情 + + + 编辑 + + + 删除 + + + + + + + + + + +