Merge pull request #2093 from jumpserver/pr@dev@task_log

fix: 修复任务列表无法查看日志信息bug
This commit is contained in:
feng626
2022-10-13 10:54:48 +08:00
committed by GitHub
3 changed files with 14 additions and 3 deletions

View File

@@ -15,6 +15,16 @@ export default [
permissions: []
}
},
{
path: '/ops/ansible/task/:id/log/',
component: () => import('@/views/ops/CeleryTaskLog'),
name: 'AnsibleTaskLog',
hidden: true,
meta: {
title: i18n.t('route.CeleryTaskLog'),
permissions: []
}
},
{
path: '/ops/task/task/:id/log/',
component: () => import('@/views/ops/CeleryTaskLog'),

View File

@@ -2,8 +2,9 @@ import store from '@/store'
import { constantRoutes } from '@/router'
import { openWindow } from './common'
export function openTaskPage(taskId) {
openWindow(`/#/ops/celery/task/${taskId}/log/`)
export function openTaskPage(taskId, taskType) {
taskType = taskType || 'celery'
openWindow(`/#/ops/${taskType}/task/${taskId}/log/?type=${taskType}`)
}
export function checkPermission(permsRequired, permsAll) {

View File

@@ -108,7 +108,7 @@ export default {
openTaskPage(value, 'ansible')
}
const title = this.$t('common.View')
return <a onClick={onClick} >{ title }</a>
return <a class='text-link' onClick={onClick} >{ title }</a>
}
}
]