From 1cd1e5874bc98333c895cd561d4c22ecb4e36031 Mon Sep 17 00:00:00 2001 From: heyanlong Date: Thu, 16 Dec 2021 14:22:18 +0800 Subject: [PATCH 1/5] alert: add view and router --- src/locales/lang/zh.ts | 3 ++ src/router/alert.ts | 6 +-- src/views/Alert.vue | 102 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 src/views/Alert.vue diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 6e5912fb..91ef3646 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -27,7 +27,10 @@ const msg = { dashboardList: "仪表盘列表", log: "日志", events: "事件", + // 警告 alerts: "警告", + alertName: "警告名称", + startedTime: "开始时间", settings: "设置", dashboards: "仪表盘", profiles: "性能剖析", diff --git a/src/router/alert.ts b/src/router/alert.ts index c0e27fb2..1e3f4f3a 100644 --- a/src/router/alert.ts +++ b/src/router/alert.ts @@ -24,8 +24,8 @@ export const routesAlert: Array = [ meta: { title: "alerts", icon: "notification_important", - hasGroup: false, - exact: false, + hasGroup: true, + exact: true, }, component: Layout, children: [ @@ -38,7 +38,7 @@ export const routesAlert: Array = [ hasGroup: false, exact: false, }, - component: () => import("@/views/Log.vue"), + component: () => import("@/views/Alert.vue"), }, ], }, diff --git a/src/views/Alert.vue b/src/views/Alert.vue new file mode 100644 index 00000000..821afa74 --- /dev/null +++ b/src/views/Alert.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file From e17049b7bdce9ce834b1047f1cabf2b53ac3cb19 Mon Sep 17 00:00:00 2001 From: heyanlong Date: Thu, 30 Dec 2021 11:44:31 +0800 Subject: [PATCH 2/5] Feature: Alert Settings --- src/locales/lang/en.ts | 4 ++ src/locales/lang/zh.ts | 4 ++ src/router/alert.ts | 6 +-- src/views/Alert.vue | 102 ----------------------------------- src/views/alert/Settings.vue | 87 ++++++++++++++++++++++++++++++ src/views/alert/data.ts | 19 +++++++ 6 files changed, 117 insertions(+), 105 deletions(-) delete mode 100644 src/views/Alert.vue create mode 100644 src/views/alert/Settings.vue create mode 100644 src/views/alert/data.ts diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index ca98a81a..0c739f9d 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -29,6 +29,10 @@ const msg = { logs: "Logs", events: "Events", alerts: "Alerts", + description: "Description", + operate: "Action", + createAAlert: "Create a alert", + alertSettings: "Alert setting", settings: "Settings", dashboards: "Dashboards", profiles: "Profiles", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 2b625bdc..7204a86b 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -29,6 +29,10 @@ const msg = { events: "事件", // 警告 alerts: "警告", + description: "描述", + operate: "操作", + createAAlert: "创建告警", + alertSettings: "告警设置", alertName: "警告名称", startedTime: "开始时间", settings: "设置", diff --git a/src/router/alert.ts b/src/router/alert.ts index 1e3f4f3a..a972e7ef 100644 --- a/src/router/alert.ts +++ b/src/router/alert.ts @@ -31,14 +31,14 @@ export const routesAlert: Array = [ children: [ { path: "/alerts", - name: "Alerts", + name: "alertSettings", meta: { - title: "alerts", + title: "Alert Settings", icon: "notification_important", hasGroup: false, exact: false, }, - component: () => import("@/views/Alert.vue"), + component: () => import("@/views/alert/Settings.vue"), }, ], }, diff --git a/src/views/Alert.vue b/src/views/Alert.vue deleted file mode 100644 index 821afa74..00000000 --- a/src/views/Alert.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/alert/Settings.vue b/src/views/alert/Settings.vue new file mode 100644 index 00000000..90c60bd3 --- /dev/null +++ b/src/views/alert/Settings.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/src/views/alert/data.ts b/src/views/alert/data.ts new file mode 100644 index 00000000..5416cf4d --- /dev/null +++ b/src/views/alert/data.ts @@ -0,0 +1,19 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export const TabsConfig: { [key: string]: any } = { + Settings: {}, +}; From 89ff4ac19fe8a2dad0cf807de61382785810d201 Mon Sep 17 00:00:00 2001 From: heyanlong Date: Thu, 30 Dec 2021 13:51:28 +0800 Subject: [PATCH 3/5] Feature: Alert Settings --- src/locales/lang/en.ts | 2 +- src/locales/lang/zh.ts | 2 +- src/views/alert/Settings.vue | 13 ------------- src/views/alert/data.ts | 3 --- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 0c739f9d..6c597814 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -30,7 +30,7 @@ const msg = { events: "Events", alerts: "Alerts", description: "Description", - operate: "Action", + action: "Action", createAAlert: "Create a alert", alertSettings: "Alert setting", settings: "Settings", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 7204a86b..5938cda9 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -30,7 +30,7 @@ const msg = { // 警告 alerts: "警告", description: "描述", - operate: "操作", + action: "操作", createAAlert: "创建告警", alertSettings: "告警设置", alertName: "警告名称", diff --git a/src/views/alert/Settings.vue b/src/views/alert/Settings.vue index 90c60bd3..313f232e 100644 --- a/src/views/alert/Settings.vue +++ b/src/views/alert/Settings.vue @@ -35,7 +35,6 @@ limitations under the License. -->