Skip to content

Commit c769e72

Browse files
committed
feat: Add alert settings
1 parent b8d8867 commit c769e72

File tree

17 files changed

+92
-9
lines changed

17 files changed

+92
-9
lines changed

frontend/src/assets/iconfont/iconfont.css

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@font-face {
22
font-family: "panel"; /* Project id 3575356 */
3-
src: url('iconfont.woff2?t=1724290117056') format('woff2'),
4-
url('iconfont.woff?t=1724290117056') format('woff'),
5-
url('iconfont.ttf?t=1724290117056') format('truetype'),
6-
url('iconfont.svg?t=1724290117056#panel') format('svg');
3+
src: url('iconfont.woff2?t=1732681110788') format('woff2'),
4+
url('iconfont.woff?t=1732681110788') format('woff'),
5+
url('iconfont.ttf?t=1732681110788') format('truetype'),
6+
url('iconfont.svg?t=1732681110788#panel') format('svg');
77
}
88

99
.panel {
@@ -14,6 +14,22 @@
1414
-moz-osx-font-smoothing: grayscale;
1515
}
1616

17+
.p-alert-3:before {
18+
content: "\e728";
19+
}
20+
21+
.p-tongyijiancha:before {
22+
content: "\e619";
23+
}
24+
25+
.p-minglinghang:before {
26+
content: "\e61e";
27+
}
28+
29+
.p-17:before {
30+
content: "\e618";
31+
}
32+
1733
.p-alert-1:before {
1834
content: "\e611";
1935
}

frontend/src/assets/iconfont/iconfont.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/assets/iconfont/iconfont.json

+28
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@
55
"css_prefix_text": "p-",
66
"description": "",
77
"glyphs": [
8+
{
9+
"icon_id": "4472516",
10+
"name": "告警设置",
11+
"font_class": "alert-3",
12+
"unicode": "e728",
13+
"unicode_decimal": 59176
14+
},
15+
{
16+
"icon_id": "3977832",
17+
"name": "统一检查",
18+
"font_class": "tongyijiancha",
19+
"unicode": "e619",
20+
"unicode_decimal": 58905
21+
},
22+
{
23+
"icon_id": "11052436",
24+
"name": "命令行",
25+
"font_class": "minglinghang",
26+
"unicode": "e61e",
27+
"unicode_decimal": 58910
28+
},
29+
{
30+
"icon_id": "11124973",
31+
"name": "表单",
32+
"font_class": "17",
33+
"unicode": "e618",
34+
"unicode_decimal": 58904
35+
},
836
{
937
"icon_id": "29851742",
1038
"name": "短信告警",

frontend/src/assets/iconfont/iconfont.svg

+8
Loading
992 Bytes
Binary file not shown.
584 Bytes
Binary file not shown.
528 Bytes
Binary file not shown.
-8.09 KB
Loading

frontend/src/components/router-button/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ onMounted(() => {
9696
.el-radio-button__original-radio:checked + .el-radio-button__inner {
9797
color: var(--panel-button-text-color) !important;
9898
background-color: var(--panel-button-bg-color) !important;
99-
border-color: var(--panel-button-active) !important;
99+
border-color: var(--panel-color-primary) !important;
100100
border-radius: 4px;
101101
}
102102
}

frontend/src/global/form-rules.ts

+19
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,19 @@ const checkHttpOrHttps = (rule, value, callback) => {
540540
}
541541
};
542542

543+
const checkPhone = (rule: any, value: any, callback: any) => {
544+
if (value === '' || typeof value === 'undefined' || value == null) {
545+
callback();
546+
} else {
547+
const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
548+
if (!reg.test(value) && value !== '') {
549+
callback(new Error(i18n.global.t('commons.rule.phone')));
550+
} else {
551+
callback();
552+
}
553+
}
554+
};
555+
543556
interface CommonRule {
544557
requiredInput: FormItemRule;
545558
requiredSelect: FormItemRule;
@@ -584,6 +597,7 @@ interface CommonRule {
584597
paramExtUrl: FormItemRule;
585598
paramSimple: FormItemRule;
586599
paramHttp: FormItemRule;
600+
phone: FormItemRule;
587601
}
588602

589603
export const Rules: CommonRule = {
@@ -806,4 +820,9 @@ export const Rules: CommonRule = {
806820
validator: checkIpv4,
807821
trigger: 'blur',
808822
},
823+
phone: {
824+
validator: checkPhone,
825+
required: true,
826+
trigger: 'blur',
827+
},
809828
};

frontend/src/lang/modules/en.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ const message = {
226226
formatErr: 'Format error, please check and retry',
227227
phpExtension: 'Only supports , _ lowercase English and numbers',
228228
paramHttp: 'Must start with http:// or https://',
229-
diffHelper:
230-
'The left side is the old version, the right side is the new version, after editing, click Save using custom version',
229+
phone: 'The format of the phone number is incorrect',
231230
},
232231
res: {
233232
paramError: 'The request failed, please try again later!',

frontend/src/lang/modules/tw.ts

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ const message = {
223223
formatErr: '格式錯誤,檢查後重試',
224224
phpExtension: '僅支持 , _ 小寫英文和數字',
225225
paramHttp: '必須以 http:// 或 https:// 開頭',
226+
phone: '手機號碼格式不正確',
226227
},
227228
res: {
228229
paramError: '請求失敗,請稍後重試!',

frontend/src/lang/modules/zh.ts

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ const message = {
223223
formatErr: '格式错误,检查后重试',
224224
phpExtension: '仅支持 , _ 小写英文和数字',
225225
paramHttp: '必须以 http:// 或 https:// 开头',
226+
phone: '手机号码格式不正确',
226227
},
227228
res: {
228229
paramError: '请求失败,请稍后重试!',

frontend/src/styles/element-dark.scss

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ html.dark {
9797
--panel-terminal-tag-active-bg-color: var(--panel-main-bg-color-10);
9898
--panel-terminal-bg-color: var(--panel-main-bg-color-10);
9999
--panel-terminal-tag-active-text-color: var(--panel-color-primary);
100+
--panel-terminal-tag-hover-text-color: var(--panel-color-primary);
100101
--panel-logs-bg-color: var(--panel-main-bg-color-9);
101102

102103
--el-menu-item-bg-color: var(--panel-main-bg-color-10);
@@ -362,6 +363,9 @@ html.dark {
362363
.cm-gutters {
363364
background-color: var(--panel-main-bg-color-10);
364365
}
366+
.log-container {
367+
background-color: var(--panel-main-bg-color-10);
368+
}
365369
}
366370

367371
.cm-editor {

frontend/src/styles/element.scss

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ html {
4646
--panel-terminal-tag-bg-color: #efefef;
4747
--panel-terminal-tag-active-bg-color: #575758;
4848
--panel-terminal-tag-active-text-color: #ebeef5;
49+
--panel-terminal-tag-hover-text-color: #575758;
4950
--panel-terminal-bg-color: #1e1e1e;
5051
--panel-logs-bg-color: #1e1e1e;
5152

frontend/src/views/host/terminal/terminal/index.vue

+6
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,12 @@ onMounted(() => {
436436
color: var(--panel-terminal-tag-active-text-color);
437437
background-color: var(--panel-terminal-tag-active-bg-color);
438438
}
439+
:deep(.el-tabs__item:hover) {
440+
color: var(--panel-terminal-tag-hover-text-color);
441+
}
442+
:deep(.el-tabs__item.is-active:hover) {
443+
color: var(--panel-terminal-tag-active-text-color);
444+
}
439445
}
440446
441447
.tagButton {

frontend/src/views/setting/panel/api-interface/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ const handleClose = () => {
180180
defineExpose({
181181
acceptParams,
182182
});
183-
</script>
183+
</script>

0 commit comments

Comments
 (0)