Skip to content

Commit

Permalink
feat: 增加降冷任务配置页面 #2564
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 committed Nov 6, 2024
1 parent 5f365c4 commit a29f2cf
Show file tree
Hide file tree
Showing 6 changed files with 1,161 additions and 0 deletions.
85 changes: 85 additions & 0 deletions src/frontend/devops-op/src/api/separate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import request from '@/utils/request'

const PREFIX_SERVICES = '/job/api/job/separation'

export function querySeparateTask(data) {
return request({
url: `${PREFIX_SERVICES}/tasks`,
method: 'get',
params: data
})
}

export function createSeparateTask(data) {
return request({
url: `${PREFIX_SERVICES}/`,
method: 'post',
data: data
})
}

export function updateSeparateTask(taskId) {
return request({
url: `${PREFIX_SERVICES}/update/${taskId}/state`,
method: 'post'
})
}

// 查询冷表中节点信息
export function queryColdNodeData(body) {
return request({
url: `${PREFIX_SERVICES}/node/${body.projectId}/${body.repoName}`,
method: 'get',
params: {
fullPath: body.fullPath
}
})
}

// 查询冷表中版本信息
export function queryColdVersionData(body) {
return request({
url: `${PREFIX_SERVICES}/version/${body.projectId}/${body.repoName}`,
method: 'get',
params: {
packageKey: body.packageKey,
version: body.version
}
})
}

// 分页查询包
export function queryPackageData(body) {
return request({
url: `${PREFIX_SERVICES}/package/page/${body.projectId}/${body.repoName}`,
method: 'get',
params: body.packageOption
})
}

// 分页查询版本
export function queryVersionData(body) {
return request({
url: `${PREFIX_SERVICES}/version/page/${body.projectId}/${body.repoName}`,
method: 'get',
params: {
packageKey: body.packageKey,
separationDate: body.separationDate,
option: body.versionOption
}
})
}

// 分页查询节点
export function queryNodeData(body) {
return request({
url: `${PREFIX_SERVICES}/node/page/${body.projectId}/${body.repoName}`,
method: 'get',
params: {
fullPath: body.fullPath,
separationDate: body.separationDate,
option: body.nodeOption
}
})
}

1 change: 1 addition & 0 deletions src/frontend/devops-op/src/icons/svg/separate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/frontend/devops-op/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ 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_SEPARATION_CONFIG = 'SeparationConfig'
export const ROUTER_NAME_SEPARATION_RECORD = 'SeparationRecord'

Vue.use(Router)

Expand Down Expand Up @@ -339,6 +341,26 @@ export const asyncRoutes = [
}
]
},
{
path: '/separation-config',
component: Layout,
meta: { title: '降冷任务配置', icon: 'separate' },
redirect: '/separation-config/task',
children: [
{
path: 'task',
name: ROUTER_NAME_SEPARATION_CONFIG,
meta: { title: '降冷任务', icon: 'separate' },
component: () => import('@/views/separation/index')
},
{
path: 'infos',
name: ROUTER_NAME_SEPARATION_RECORD,
meta: { title: '数据查询', icon: 'separate' },
component: () => import('@/views/separation/ShowData')
}
]
},
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }
]
Expand Down
Loading

0 comments on commit a29f2cf

Please sign in to comment.