Skip to content

Commit 936266a

Browse files
author
奇淼(piexlmax
authored
Merge pull request #132 from HXSecurity/issue4+
Feature:HXSecurity/DongTai#348
2 parents d5ce7f0 + ef50524 commit 936266a

File tree

5 files changed

+38
-40
lines changed

5 files changed

+38
-40
lines changed

src/config/lang/en.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,18 +636,14 @@ export default {
636636
fixR: 'Please enter a matching rule',
637637
t: 'Sensitive data configuration',
638638
p1:
639-
'Sensitive information detection function officially opened public testing, in order to detect the security risk of sensitive information leakage, it is necessary to configure the matching rules of sensitive information and related policies and custom rules. ',
639+
'Sensitive information detection function officially opened public testing, in order to detect the security risk of sensitive information leakage, it is necessary to configure the matching rules of sensitive information and related policies.',
640640
p2: 'Process (to increase mobile phone number leakage for example): ',
641641
p3:
642-
'1. Go to the Rules Management page, go to the "Dangerous Method Rules" tab',
642+
'1. Go to the "Policy Management" page, add a new policy "Mobile Phone Number Leak", fill in the policy description, repair suggestions and choose to enable;',
643643
p4:
644-
'2. Click the "Add Rule Type" button to add a rule with the type name: "PhoneNumber" and the type is referred to simply as "Mobile Phone Number"',
645-
p5:
646-
"3. Go to the 'Policy Management' page, search for the policy 'mobile phone number', edit the policy, and modify the policy name to 'mobile phone number leak'",
647-
p6:
648-
'4. Click on the "New Match Rules" button on the current page to add matching rules, select the type "Mobile Phone Number Leak", match the way is "Regular Match", fill in the "Match Rules" and click Save. ',
644+
'2. Go back to the current page, click on the "New Matching Rules" button, select the policy name is "Mobile Phone Number Leak", match the way is "Regular Match", fill in "Match Rules" and click Save.',
649645
tip:
650-
'The data for the policy name comes from policy information in policy management',
646+
'The policy name comes from the policy name in Policy Management, and if it does not exist, you can contact the administrator to go to Policy Management New policy',
651647
search: 'Search',
652648
},
653649
upgradeOnline: {

src/config/lang/zh_cn.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -625,16 +625,14 @@ export default {
625625
fixR: '请输入匹配规则',
626626
t: '敏感数据配置',
627627
p1:
628-
'敏感信息检测功能正式开启公测,为了检测敏感信息泄漏的安全风险,需要配置敏感信息的匹配规则及相关的策略与自定义规则。',
629-
p2: '流程(以增加 手机号码泄漏 为例):',
630-
p3: '1. 进入 规则管理 页面,进入 “危险方法规则” 页签',
628+
'敏感信息检测功能正式开启公测,为了检测敏感信息泄漏的安全风险,需要配置敏感信息的匹配规则及相关的策略。',
629+
p2: 'Process (to increase mobile phone number leakage, for example):',
630+
p3:
631+
'1. 进入 “策略管理” 页面,新增策略 “手机号码泄漏”,填写策略描述、修复建议并选择启用;',
631632
p4:
632-
'2. 点击 “添加规则类型” 按钮添加规则,类型名称为:”PhoneNumber”,类型简称为:“手机号码”',
633-
p5:
634-
'3. 进入 “策略管理” 页面,搜索策略 “手机号码“,编辑策略,并修改策略名称 为 “手机号码泄漏”',
635-
p6:
636-
'4. 在当前页面点击 “新增匹配规则” 按钮,增加匹配规则,选中类型为“手机号码泄漏”,匹配方式为 “正则匹配”,填写“匹配规则”,然后点击保存即可。',
637-
tip: '策略名称的数据来自策略管理中的策略信息',
633+
'2. 返回 当前页面,点击 “新增匹配规则” 按钮,选择 策略名称为 “手机号码泄漏”,匹配方式为 “正则匹配”,填写 “匹配规则”,然后点击保存即可。',
634+
tip:
635+
'策略名称的来自 策略管理 中的策略名称,如不存在,可联系管理员前往策略管理 新增策略',
638636
fixP: '输入正则表达式的规则,用于匹配当前策略',
639637
testP: '输入完内容后,点击运行按钮进行测试',
640638
search: '搜索',

src/views/setting/StrategyManage.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@
8787
<el-pagination
8888
:current-page="page"
8989
background
90-
page-size="20"
91-
layout=" prev, pager, next, jumper,total"
90+
:page-sizes="[10, 20, 50, 100]"
91+
:page-size="page_size"
92+
layout=" prev, pager, next, jumper, sizes, total"
9293
:total="total"
94+
@size-change="handleSizeChange"
9395
@current-change="handleCurrentChange"
9496
>
9597
</el-pagination>
@@ -110,6 +112,7 @@ export default class StrategyManage extends VueBase {
110112
private vul_levels = []
111113
private vul_levels_map = {}
112114
private page = 1
115+
private page_size = 20
113116
private total = 0
114117
private dialogForm: any = {
115118
vul_name: '',
@@ -280,6 +283,11 @@ export default class StrategyManage extends VueBase {
280283
await this.getTableData()
281284
}
282285
286+
private handleSizeChange(val: number) {
287+
this.page_size = val
288+
this.getTableData()
289+
}
290+
283291
private async getTableData() {
284292
this.loadingStart()
285293
const {
@@ -289,7 +297,7 @@ export default class StrategyManage extends VueBase {
289297
page,
290298
} = await this.services.setting.strategyList(false, {
291299
page: this.page,
292-
page_size: 20,
300+
page_size: this.page_size,
293301
name: this.searchValue,
294302
})
295303
this.loadingDone()

src/views/setting/sensitive.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
<p>
1919
{{ $t('views.sensitiveManage.p4') }}
2020
</p>
21-
<p>
22-
{{ $t('views.sensitiveManage.p5') }}
23-
</p>
24-
<p>
25-
{{ $t('views.sensitiveManage.p6') }}
26-
</p>
2721
</div>
2822
</el-card>
2923
</div>

src/views/setting/sensitiveManage.vue

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
<p>
1818
{{ $t('views.sensitiveManage.p4') }}
1919
</p>
20-
<p>
21-
{{ $t('views.sensitiveManage.p5') }}
22-
</p>
23-
<p>
24-
{{ $t('views.sensitiveManage.p6') }}
25-
</p>
2620
</div>
2721
</el-card>
2822
</div>
@@ -134,9 +128,11 @@
134128
<el-pagination
135129
:current-page="page"
136130
background
137-
page-size="20"
138-
layout=" prev, pager, next, jumper,total"
131+
:page-sizes="[10, 20, 50, 100]"
132+
:page-size="page_size"
133+
layout=" prev, pager, next, jumper, sizes, total"
139134
:total="total"
135+
@size-change="handleSizeChange"
140136
@current-change="handleCurrentChange"
141137
>
142138
</el-pagination>
@@ -156,6 +152,7 @@ export default class sensitiveManage extends VueBase {
156152
private pattern_type = []
157153
private pattern_type_map = {}
158154
private page = 1
155+
private page_size = 20
159156
private total = 0
160157
private name = ''
161158
private async stateChange(row: any) {
@@ -173,7 +170,12 @@ export default class sensitiveManage extends VueBase {
173170
}
174171
}
175172
176-
private handleCurrentChange(val: number) {
173+
private handleSizeChange(val: number) {
174+
this.page_size = val
175+
this.getTableData()
176+
}
177+
178+
private handles(val: number) {
177179
this.page = val
178180
this.getTableData()
179181
}
@@ -211,7 +213,7 @@ export default class sensitiveManage extends VueBase {
211213
page,
212214
} = await this.services.setting.get_sensitive_info_rule({
213215
page: this.page,
214-
page_size: 20,
216+
page_size: this.page_size,
215217
name: this.name,
216218
})
217219
this.loadingDone()
@@ -239,11 +241,11 @@ export default class sensitiveManage extends VueBase {
239241
}
240242
private async sensitiveDialogDelete(row: any) {
241243
this.$confirm(
242-
this.$t('views.projectEdit.deleteWarning') as string,
243-
this.$t('views.projectEdit.deletePop') as string,
244+
this.$t('views.sensitiveManage.deleteWarning') as string,
245+
this.$t('views.sensitiveManage.deletePop') as string,
244246
{
245-
confirmButtonText: this.$t('views.projectEdit.enter') as string,
246-
cancelButtonText: this.$t('views.projectEdit.clear') as string,
247+
confirmButtonText: this.$t('views.sensitiveManage.enter') as string,
248+
cancelButtonText: this.$t('views.sensitiveManage.clear') as string,
247249
type: 'warning',
248250
}
249251
).then(async () => {

0 commit comments

Comments
 (0)