Skip to content

Commit 6e4f590

Browse files
author
蒋吉兆
committed
1 parent 2ae46f2 commit 6e4f590

File tree

7 files changed

+451
-117
lines changed

7 files changed

+451
-117
lines changed

src/config/lang/en.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default {
6464
setting: 'Settings',
6565
agentManage: 'Agent',
6666
strategyManage: 'Strategy',
67+
strategy: 'Strategy',
6768
hookRule: 'Custom Rule',
6869
upgradeOnline: 'System upgrade',
6970
sysInfo: 'Agent Config',
@@ -606,6 +607,9 @@ export default {
606607
level: 'Level',
607608
editTitle: 'Edit Policy',
608609
addTitle: 'Add Policy',
610+
viewTitle: 'Policy Detail',
611+
notnull: 'The value cannot be empty',
612+
view: 'Preview',
609613
},
610614
sensitiveManage: {
611615
no: 'No',

src/config/lang/zh_cn.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default {
6464
agentManage: 'Agent 管理',
6565
sensitive: '敏感信息',
6666
strategyManage: '策略管理',
67+
strategy: '策略',
6768
hookRule: '自定义规则',
6869
upgradeOnline: '系统升级',
6970
sysInfo: 'Agent 配置',
@@ -596,6 +597,9 @@ export default {
596597
level: '风险等级',
597598
editTitle: '编辑策略',
598599
addTitle: '新增策略',
600+
viewTitle: '策略详情',
601+
notnull: '该值不能为空',
602+
view: '预览',
599603
},
600604
sensitiveManage: {
601605
no: '无',

src/router/routes.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,15 @@ const routes: Array<RouteConfig> = [
254254
},
255255
component: () => import('@/views/setting/StrategyManage.vue'),
256256
},
257+
{
258+
path: 'strategy',
259+
name: 'strategy',
260+
meta: {
261+
i18n: 'menu.strategy',
262+
name: i18n.t('menu.strategy'),
263+
},
264+
component: () => import('@/views/setting/Strategy.vue'),
265+
},
257266
{
258267
path: 'sensitiveManage',
259268
name: 'sensitiveManage',
@@ -592,7 +601,15 @@ const adminRoutes: Array<RouteConfig> = [
592601
},
593602
component: () => import('@/views/setting/StrategyManage.vue'),
594603
},
595-
604+
{
605+
path: 'strategy',
606+
name: 'strategy',
607+
meta: {
608+
i18n: 'menu.strategy',
609+
name: i18n.t('menu.strategy'),
610+
},
611+
component: () => import('@/views/setting/Strategy.vue'),
612+
},
596613
{
597614
path: 'sensitiveManage',
598615
name: 'sensitiveManage',
@@ -902,6 +919,15 @@ const userRoutes: Array<RouteConfig> = [
902919
},
903920
component: () => import('@/views/setting/StrategyManage.vue'),
904921
},
922+
{
923+
path: 'strategy',
924+
name: 'strategy',
925+
meta: {
926+
i18n: 'menu.strategy',
927+
name: i18n.t('menu.strategy'),
928+
},
929+
component: () => import('@/views/setting/Strategy.vue'),
930+
},
905931
{
906932
path: 'sensitiveManage',
907933
name: 'sensitiveManage',

src/services/setting.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export default () =>
5050
}
5151
}
5252

53+
getStrategy(id: any): Promise<iResponse> {
54+
return request.get(`/strategy/${id}`)
55+
}
56+
5357
strategyEnable(id: number): Promise<iResponse> {
5458
return request.get(`/strategy/${id}/enable`)
5559
}

src/views/setting/Index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="menu-warp">
88
<template v-for="i in Routers">
99
<div
10-
v-if="i.name !== 'sensitive'"
10+
v-if="i.name !== 'sensitive' && i.name !== 'strategy'"
1111
:key="i.path"
1212
class="menu-item"
1313
:class="curModule(i.path) ? 'currentModule' : ''"

0 commit comments

Comments
 (0)