mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-02 07:27:01 +00:00
fix: 修复页面url跳转 任务日志页面跳转失败问题
This commit is contained in:
parent
08faad0f41
commit
d6208eabd3
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user