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