mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 23:59:02 +00:00
fix: 修复页面url跳转 任务日志页面跳转失败问题
This commit is contained in:
@@ -17,14 +17,15 @@
|
||||
</noscript>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const baseUrl = "/ui/"
|
||||
if (location.pathname === '/') {
|
||||
location.pathname = baseUrl
|
||||
location.pathname = '/ui/'
|
||||
}
|
||||
const origin = window.location.origin
|
||||
const pathname = window.location.pathname
|
||||
if (pathname.startsWith('/core')) {
|
||||
return
|
||||
}
|
||||
if(pathname.indexOf('/ui') === -1) {
|
||||
window.location.href = origin + '/ui/#' + pathname
|
||||
window.location.href = window.location.origin + '/ui/#' + pathname
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -5,7 +5,7 @@ import { openWindow } from './common'
|
||||
export function openTaskPage(taskId, taskType, taskUrl) {
|
||||
taskType = taskType || 'celery'
|
||||
if (!taskUrl) {
|
||||
taskUrl = `/#/ops/${taskType}/task/${taskId}/log/?type=${taskType}`
|
||||
taskUrl = `/core/ops/${taskType}/task/${taskId}/log/?type=${taskType}`
|
||||
}
|
||||
openWindow(taskUrl)
|
||||
}
|
||||
|
Reference in New Issue
Block a user