Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
三久
DolphinScheduler
提交
435d3789
DolphinScheduler
项目概览
三久
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
435d3789
编写于
1月 24, 2022
作者:
L
labbomb
提交者:
GitHub
1月 24, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve the routing (#8176)
上级
0057cf3f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
31 deletion
+30
-31
dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts
...t/src/layouts/content/components/sidebar/use-menuClick.ts
+3
-3
dolphinscheduler-ui-next/src/layouts/content/index.tsx
dolphinscheduler-ui-next/src/layouts/content/index.tsx
+5
-6
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
+22
-22
未找到文件。
dolphinscheduler-ui-next/src/layouts/content/components/sidebar/use-menuClick.ts
浏览文件 @
435d3789
...
@@ -25,9 +25,9 @@ export function useMenuClick() {
...
@@ -25,9 +25,9 @@ export function useMenuClick() {
const
menuStore
=
useMenuStore
()
const
menuStore
=
useMenuStore
()
const
handleMenuClick
=
(
key
:
string
,
item
:
MenuOption
)
=>
{
const
handleMenuClick
=
(
key
:
string
,
item
:
MenuOption
)
=>
{
//
console.log(key, item)
console
.
log
(
key
,
item
)
menuStore
.
setSideMenuKey
(
key
)
menuStore
.
setSideMenuKey
(
`
${
key
}
`
)
router
.
push
({
path
:
`
/
${
menuStore
.
getMenuKey
}
/
${
key
}
`
})
router
.
push
({
path
:
`
${
key
}
`
})
}
}
return
{
return
{
...
...
dolphinscheduler-ui-next/src/layouts/content/index.tsx
浏览文件 @
435d3789
...
@@ -46,14 +46,14 @@ const Content = defineComponent({
...
@@ -46,14 +46,14 @@ const Content = defineComponent({
onMounted
(()
=>
{
onMounted
(()
=>
{
changeMenuOption
(
state
)
changeMenuOption
(
state
)
changeHeaderMenuOptions
(
state
)
changeHeaderMenuOptions
(
state
)
ge
n
SideMenu
(
state
)
ge
t
SideMenu
(
state
)
changeUserDropdown
(
state
)
changeUserDropdown
(
state
)
})
})
watch
(
useI18n
().
locale
,
()
=>
{
watch
(
useI18n
().
locale
,
()
=>
{
changeMenuOption
(
state
)
changeMenuOption
(
state
)
changeHeaderMenuOptions
(
state
)
changeHeaderMenuOptions
(
state
)
ge
n
SideMenu
(
state
)
ge
t
SideMenu
(
state
)
changeUserDropdown
(
state
)
changeUserDropdown
(
state
)
})
})
...
@@ -61,12 +61,11 @@ const Content = defineComponent({
...
@@ -61,12 +61,11 @@ const Content = defineComponent({
()
=>
route
.
path
,
()
=>
route
.
path
,
(
path
)
=>
{
(
path
)
=>
{
state
.
isShowSide
=
menuStore
.
getShowSideStatus
state
.
isShowSide
=
menuStore
.
getShowSideStatus
const
regex
=
new
RegExp
(
'
[^/]+$
'
,
'
g
'
)
menuStore
.
setSideMenuKey
(
path
)
menuStore
.
setSideMenuKey
((
path
.
match
(
regex
)
as
RegExpMatchArray
)[
0
])
}
}
)
)
const
ge
n
SideMenu
=
(
state
:
any
)
=>
{
const
ge
t
SideMenu
=
(
state
:
any
)
=>
{
const
key
=
menuStore
.
getMenuKey
const
key
=
menuStore
.
getMenuKey
state
.
sideMenuOptions
=
state
.
sideMenuOptions
=
state
.
menuOptions
.
filter
((
menu
:
{
key
:
string
})
=>
menu
.
key
===
key
)[
0
]
state
.
menuOptions
.
filter
((
menu
:
{
key
:
string
})
=>
menu
.
key
===
key
)[
0
]
...
@@ -76,7 +75,7 @@ const Content = defineComponent({
...
@@ -76,7 +75,7 @@ const Content = defineComponent({
const
getSideMenuOptions
=
(
item
:
any
)
=>
{
const
getSideMenuOptions
=
(
item
:
any
)
=>
{
menuStore
.
setMenuKey
(
item
.
key
)
menuStore
.
setMenuKey
(
item
.
key
)
ge
n
SideMenu
(
state
)
ge
t
SideMenu
(
state
)
}
}
return
{
return
{
...
...
dolphinscheduler-ui-next/src/layouts/content/use-dataList.ts
浏览文件 @
435d3789
...
@@ -90,7 +90,7 @@ export function useDataList() {
...
@@ -90,7 +90,7 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.project_overview
'
),
label
:
t
(
'
menu.project_overview
'
),
key
:
'
projects-overview
'
,
key
:
`/projects/
${
menuStore
.
getProjectCode
}
`
,
icon
:
renderIcon
(
FundProjectionScreenOutlined
)
icon
:
renderIcon
(
FundProjectionScreenOutlined
)
},
},
{
{
...
@@ -100,15 +100,15 @@ export function useDataList() {
...
@@ -100,15 +100,15 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.workflow_relation
'
),
label
:
t
(
'
menu.workflow_relation
'
),
key
:
'
workflow-relation
'
key
:
`/projects/workflow-relation`
},
},
{
{
label
:
t
(
'
menu.workflow_definition
'
),
label
:
t
(
'
menu.workflow_definition
'
),
key
:
'
workflow-definition
'
key
:
`/projects/workflow-definition`
},
},
{
{
label
:
t
(
'
menu.workflow_instance
'
),
label
:
t
(
'
menu.workflow_instance
'
),
key
:
'
workflow-instance
'
key
:
`/projects/workflow-instance`
}
}
]
]
},
},
...
@@ -119,11 +119,11 @@ export function useDataList() {
...
@@ -119,11 +119,11 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.task_definition
'
),
label
:
t
(
'
menu.task_definition
'
),
key
:
'
task-definition
'
key
:
`/projects/task-definition`
},
},
{
{
label
:
t
(
'
menu.task_instance
'
),
label
:
t
(
'
menu.task_instance
'
),
key
:
'
task-instance
'
key
:
`/projects/task-instance`
}
}
]
]
}
}
...
@@ -137,7 +137,7 @@ export function useDataList() {
...
@@ -137,7 +137,7 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.file_manage
'
),
label
:
t
(
'
menu.file_manage
'
),
key
:
'
file-manage
'
,
key
:
`/resource/file-manage`
,
icon
:
renderIcon
(
FileSearchOutlined
)
icon
:
renderIcon
(
FileSearchOutlined
)
},
},
{
{
...
@@ -147,11 +147,11 @@ export function useDataList() {
...
@@ -147,11 +147,11 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.resource_manage
'
),
label
:
t
(
'
menu.resource_manage
'
),
key
:
'
resource-manage
'
key
:
`/resource/resource-manage`
},
},
{
{
label
:
t
(
'
menu.function_manage
'
),
label
:
t
(
'
menu.function_manage
'
),
key
:
'
function-manage
'
key
:
`/resource/function-manage`
}
}
]
]
},
},
...
@@ -162,7 +162,7 @@ export function useDataList() {
...
@@ -162,7 +162,7 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.task_group_option
'
),
label
:
t
(
'
menu.task_group_option
'
),
key
:
'
task-group-option
'
key
:
`/resource/task-group-option`
}
}
]
]
}
}
...
@@ -188,15 +188,15 @@ export function useDataList() {
...
@@ -188,15 +188,15 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.master
'
),
label
:
t
(
'
menu.master
'
),
key
:
'
master
'
key
:
`/monitor/master`
},
},
{
{
label
:
t
(
'
menu.worker
'
),
label
:
t
(
'
menu.worker
'
),
key
:
'
worker
'
key
:
`/monitor/worker`
},
},
{
{
label
:
t
(
'
menu.db
'
),
label
:
t
(
'
menu.db
'
),
key
:
'
db
'
key
:
`/monitor/db`
}
}
]
]
},
},
...
@@ -207,7 +207,7 @@ export function useDataList() {
...
@@ -207,7 +207,7 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.statistics
'
),
label
:
t
(
'
menu.statistics
'
),
key
:
'
statistics
'
key
:
`/monitor/statistics`
}
}
]
]
}
}
...
@@ -221,42 +221,42 @@ export function useDataList() {
...
@@ -221,42 +221,42 @@ export function useDataList() {
children
:
[
children
:
[
{
{
label
:
t
(
'
menu.tenant_manage
'
),
label
:
t
(
'
menu.tenant_manage
'
),
key
:
'
tenant-manage
'
,
key
:
`/security/tenant-manage`
,
icon
:
renderIcon
(
UsergroupAddOutlined
)
icon
:
renderIcon
(
UsergroupAddOutlined
)
},
},
{
{
label
:
t
(
'
menu.user_manage
'
),
label
:
t
(
'
menu.user_manage
'
),
key
:
'
user-manage
'
,
key
:
`/security/user-manage`
,
icon
:
renderIcon
(
UserAddOutlined
)
icon
:
renderIcon
(
UserAddOutlined
)
},
},
{
{
label
:
t
(
'
menu.alarm_group_manage
'
),
label
:
t
(
'
menu.alarm_group_manage
'
),
key
:
'
alarm-group-manage
'
,
key
:
`/security/alarm-group-manage`
,
icon
:
renderIcon
(
WarningOutlined
)
icon
:
renderIcon
(
WarningOutlined
)
},
},
{
{
label
:
t
(
'
menu.alarm_instance_manage
'
),
label
:
t
(
'
menu.alarm_instance_manage
'
),
key
:
'
alarm-instance-manage
'
,
key
:
`/security/alarm-instance-manage`
,
icon
:
renderIcon
(
InfoCircleOutlined
)
icon
:
renderIcon
(
InfoCircleOutlined
)
},
},
{
{
label
:
t
(
'
menu.worker_group_manage
'
),
label
:
t
(
'
menu.worker_group_manage
'
),
key
:
'
worker-group-manage
'
,
key
:
`/security/worker-group-manage`
,
icon
:
renderIcon
(
ControlOutlined
)
icon
:
renderIcon
(
ControlOutlined
)
},
},
{
{
label
:
t
(
'
menu.yarn_queue_manage
'
),
label
:
t
(
'
menu.yarn_queue_manage
'
),
key
:
'
yarn-queue-manage
'
,
key
:
`/security/yarn-queue-manage`
,
icon
:
renderIcon
(
SlackOutlined
)
icon
:
renderIcon
(
SlackOutlined
)
},
},
{
{
label
:
t
(
'
menu.environment_manage
'
),
label
:
t
(
'
menu.environment_manage
'
),
key
:
'
environment-manage
'
,
key
:
`/security/environment-manage`
,
icon
:
renderIcon
(
EnvironmentOutlined
)
icon
:
renderIcon
(
EnvironmentOutlined
)
},
},
{
{
label
:
t
(
'
menu.token_manage
'
),
label
:
t
(
'
menu.token_manage
'
),
key
:
'
token-manage
'
,
key
:
`/security/token-manage`
,
icon
:
renderIcon
(
SafetyOutlined
)
icon
:
renderIcon
(
SafetyOutlined
)
}
}
]
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录