diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
index 176f852e83..34a23e8d2c 100755
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/plugIn/util.js
@@ -37,7 +37,7 @@ const saveTargetarr = (valId, domId) => {
}
const rtBantpl = () => {
- return `
`
+ return `
`
}
/**
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
index 9520386b8d..5d28ebce5b 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
@@ -18,7 +18,7 @@
-
{{$t('Startup parameter')}}
+
{{$t('Startup parameter')}}
- {{$t('Startup type')}}:{{_rtRunningType(startupParam.commandType)}}
- {{$t('Complement range')}}:{{startupParam.commandParam.complementStartDate}}-{{startupParam.commandParam.complementEndDate}}-
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/variablesView.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/variablesView.vue
index 23e4bdca05..3d52ccdb80 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/variablesView.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/variable/variablesView.vue
@@ -18,7 +18,7 @@
-
{{$t('Global parameters')}}
+
{{$t('Global parameters')}}
-
{{$t('Local parameters')}}
+
{{$t('Local parameters')}}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue
index 99455f8f8f..033e37e64a 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/tree/index.vue
@@ -57,7 +57,7 @@
{{$t('Task Status')}}
-
+
{{item.desc}}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue
index 553d981c00..252fedc971 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/index.vue
@@ -24,7 +24,7 @@
{{$t('Task Status')}}
-
+
{{item.desc}}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue
index e6e21f71e6..72d230bf92 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/kinship/index.vue
@@ -34,7 +34,7 @@
{{$t('Drag the file into the current upload window')}}
-
-
-
- {{$t('Recipient')}}
-
-
-
-
-
-
-
- {{$t('Cc')}}
-
-
-
-
-
{{$t('Complement Data')}}
@@ -164,7 +148,6 @@
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue
index 51c2787704..526abfb16e 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/timing.vue
@@ -136,22 +136,6 @@
-
-
- {{$t('Recipient')}}
-
-
-
-
-
-
-
- {{$t('Cc')}}
-
-
-
-
-
{{$t('Cancel')}}
{{spinnerLoading ? 'Loading...' : (timingData.item.crontab ? $t('Edit') : $t('Create'))}}
@@ -159,9 +143,7 @@
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
index b566976c3e..7081e3055d 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
@@ -124,16 +124,14 @@
list: [],
timingDialog: false,
timingData: {
- item: {},
- receiversD: [],
- receiversCcD: []
+ item: {}
}
}
},
props: {
},
methods: {
- ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver', 'deleteTiming']),
+ ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'deleteTiming']),
/**
* delete
*/
@@ -228,29 +226,12 @@
this.$message.error(e.msg || '')
})
},
- /**
- * get email
- */
- _getReceiver (id) {
- return new Promise((resolve, reject) => {
- this.getReceiver({ processDefinitionId: id }).then(res => {
- resolve({
- receivers: res.receivers && res.receivers.split(',') || [],
- receiversCc: res.receiversCc && res.receiversCc.split(',') || []
- })
- })
- })
- },
/**
* timing
*/
_editTiming (item) {
- this._getReceiver(item.processDefinitionId).then(res => {
- this.timingData.item = item
- this.timingData.receiversD = res.receivers
- this.timingData.receiversCcD = res.receiversCc
- this.timingDialog = true
- })
+ this.timingData.item = item
+ this.timingDialog = true
},
onUpdateTiming () {
this.pageNo = 1
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
index a4fd982a26..a06e868e15 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
@@ -38,9 +38,6 @@
-
-
-
@@ -60,18 +57,10 @@
-
-
-
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
index 7f895db2b4..95913023ae 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -806,18 +806,6 @@ export default {
})
})
},
- /**
- * Get the mailbox list interface
- */
- getReceiver ({ state }, payload) {
- return new Promise((resolve, reject) => {
- io.get(`projects/${state.projectName}/executors/get-receiver-cc`, payload, res => {
- resolve(res.data)
- }).catch(e => {
- reject(e)
- })
- })
- },
getTaskListDefIdAll ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`projects/${state.projectName}/process/get-task-list`, payload, res => {
From e977f16f0dfd7c08b734e2413a0971384201d104 Mon Sep 17 00:00:00 2001
From: break60 <790061044@qq.com>
Date: Tue, 12 Jan 2021 20:28:26 +0800
Subject: [PATCH 09/31] fix
---
dolphinscheduler-ui/src/js/conf/home/index.js | 4 +-
.../warningGroups/_source/createWarning.vue | 5 +-
.../security/pages/warningGroups/index.vue | 12 +-
.../warningInstance/_source/createWarning.vue | 192 ++++++++++++++++++
.../pages/warningInstance/_source/list.vue | 131 ++++++++++++
.../security/pages/warningInstance/index.vue | 169 +++++++++++++++
.../src/js/conf/home/router/index.js | 8 +
.../js/conf/home/store/security/actions.js | 36 ++++
.../components/secondaryMenu/_source/menu.js | 9 +
.../src/js/module/i18n/locale/en_US.js | 4 +
.../src/js/module/i18n/locale/zh_CN.js | 4 +
11 files changed, 568 insertions(+), 6 deletions(-)
create mode 100644 dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue
create mode 100644 dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue
create mode 100644 dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue
diff --git a/dolphinscheduler-ui/src/js/conf/home/index.js b/dolphinscheduler-ui/src/js/conf/home/index.js
index 37515ad497..c1bcdff63d 100644
--- a/dolphinscheduler-ui/src/js/conf/home/index.js
+++ b/dolphinscheduler-ui/src/js/conf/home/index.js
@@ -46,7 +46,9 @@ const useOpt = i18n.globalScope.LOCALE === 'en_US' ? { locale: locale } : {}
i18n.globalScope.LOCALE === 'en_US' ? Vue.use(ElementUI, { locale }) : Vue.use(ElementUI)
// Vue.use(ans)
-Vue.use(useOpt, formCreate)
+Vue.use(useOpt)
+Vue.use(formCreate)
+
sync(store, router)
Vue.config.devtools = true
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
index 184fe8ab5f..b317096e18 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
@@ -36,7 +36,7 @@
- *{{$t('Group Type')}}
+ *{{$t('Alarm plugin instance')}}
-
+
@@ -83,13 +83,14 @@
isLeft: true,
isADMIN: store.state.user.userInfo.userType === 'ADMIN_USER',
createWarningDialog: false,
- item: {}
+ item: {},
+ allAlertPluginInstance: []
}
},
mixins: [listUrlParamHandle],
props: {},
methods: {
- ...mapActions('security', ['getAlertgroupP']),
+ ...mapActions('security', ['getAlertgroupP', 'queryAllAlertPluginInstance']),
/**
* Inquire
*/
@@ -110,6 +111,11 @@
this._create(item)
},
_create (item) {
+ this.queryAllAlertPluginInstance().then(res => {
+ this.allAlertPluginInstance = res.data
+ }).catch(e => {
+ this.$message.error(e.msg)
+ })
this.item = item
this.createWarningDialog = true
},
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue
new file mode 100644
index 0000000000..9bdea2543e
--- /dev/null
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue
@@ -0,0 +1,192 @@
+/*
+ * 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.
+ */
+
+
+
+
+
+ *{{$t('Alarm instance name')}}
+
+
+
+
+
+
+ *{{$t('Select plugin')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue
new file mode 100644
index 0000000000..a06e868e15
--- /dev/null
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ */
+
+
+
+
+
+
+
+
+ {{scope.row.groupType === 'EMAIL' ? `${$t('Email')}` : `${$t('SMS')}`}}
+
+
+
+
+
+ {{scope.row.createTime | formatDate}}
+
+
+
+
+ {{scope.row.updateTime | formatDate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue
new file mode 100644
index 0000000000..72f0b7d629
--- /dev/null
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue
@@ -0,0 +1,169 @@
+/*
+ * 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.
+ */
+
+
+
+
+
+ {{$t('Create alarm group')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/router/index.js b/dolphinscheduler-ui/src/js/conf/home/router/index.js
index cf9b8b51d4..9b81b66783 100644
--- a/dolphinscheduler-ui/src/js/conf/home/router/index.js
+++ b/dolphinscheduler-ui/src/js/conf/home/router/index.js
@@ -398,6 +398,14 @@ const router = new Router({
title: `${i18n.$t('Warning group manage')}`
}
},
+ {
+ path: '/security/warning-Instance',
+ name: 'warning-instance-manage',
+ component: resolve => require(['../pages/security/pages/warningInstance/index'], resolve),
+ meta: {
+ title: `${i18n.$t('Warning instance manage')}`
+ }
+ },
{
path: '/security/queue',
name: 'queue-manage',
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js b/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js
index 363dee7e39..f92608396c 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js
@@ -351,6 +351,42 @@ export default {
})
})
},
+ /**
+ * queryUiPlugins
+ */
+ getPlugins ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('ui-plugins/queryUiPluginsByType', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ /**
+ * queryUiPluginsByID
+ */
+ getUiPluginsByID ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('ui-plugins/queryUiPluginsByID', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ /**
+ * queryAll alert-plugin-instance
+ */
+ queryAllAlertPluginInstance ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('alert-plugin-instance/queryAll', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
/**
* Alarm group list
*/
diff --git a/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js b/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
index 2ce1a3c690..daaf918665 100644
--- a/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
+++ b/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
@@ -109,6 +109,15 @@ const menu = {
icon: 'el-icon-warning',
children: []
},
+ {
+ name: `${i18n.$t('Warning instance manage')}`,
+ id: 2,
+ path: 'warning-instance-manage',
+ isOpen: true,
+ enabled: true,
+ icon: 'ri-spam-fill',
+ children: []
+ },
{
name: `${i18n.$t('Worker group manage')}`,
id: 4,
diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
index bfe27fda61..39d30eecdf 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
@@ -210,8 +210,11 @@ export default {
'Edit alarm group': 'Edit alarm group',
'Create alarm group': 'Create alarm group',
'Group Name': 'Group Name',
+ 'Alarm instance name': 'Alarm instance name',
+ 'Select plugin': 'Select plugin',
'Please enter group name': 'Please enter group name',
'Group Type': 'Group Type',
+ 'Alarm plugin instance': 'Alarm plugin instance',
Remarks: 'Remarks',
SMS: 'SMS',
'Managing Users': 'Managing Users',
@@ -369,6 +372,7 @@ export default {
'Process definition': 'Process definition',
'Task record': 'Task record',
'Warning group manage': 'Warning group manage',
+ 'Warning instance manage': 'Warning instance manage',
'Servers manage': 'Servers manage',
'UDF manage': 'UDF manage',
'Resource manage': 'Resource manage',
diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
index dc68d826e4..b6dccdb3bc 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
@@ -209,8 +209,11 @@ export default {
'Edit alarm group': '编辑告警组',
'Create alarm group': '创建告警组',
'Group Name': '组名称',
+ 'Alarm instance name': '告警实例名称',
+ 'Select plugin': '选择插件',
'Please enter group name': '请输入组名称',
'Group Type': '组类型',
+ 'Alarm plugin instance': '告警插件实例',
Remarks: '备注',
SMS: '短信',
'Managing Users': '管理用户',
@@ -368,6 +371,7 @@ export default {
'Process definition': '工作流定义',
'Task record': '任务记录',
'Warning group manage': '告警组管理',
+ 'Warning instance manage': '告警实例管理',
'Servers manage': '服务管理',
'UDF manage': 'UDF管理',
'Resource manage': '资源管理',
From b3dd9f7b63f41a5eacf6831f5e190c8c17fcc412 Mon Sep 17 00:00:00 2001
From: break60 <790061044@qq.com>
Date: Wed, 13 Jan 2021 19:45:24 +0800
Subject: [PATCH 10/31] add
---
.../warningGroups/_source/createWarning.vue | 16 +--
.../pages/warningGroups/_source/list.vue | 7 +-
.../security/pages/warningGroups/index.vue | 6 +-
...eWarning.vue => createWarningInstance.vue} | 99 +++++++++++--------
.../pages/warningInstance/_source/list.vue | 36 ++-----
.../security/pages/warningInstance/index.vue | 22 ++---
.../src/js/conf/home/router/index.js | 2 +-
.../js/conf/home/store/security/actions.js | 58 ++++++++++-
.../src/js/module/i18n/locale/en_US.js | 2 +
.../src/js/module/i18n/locale/zh_CN.js | 2 +
10 files changed, 146 insertions(+), 104 deletions(-)
rename dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/{createWarning.vue => createWarningInstance.vue} (67%)
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
index b317096e18..0d3a335d8a 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/createWarning.vue
@@ -38,12 +38,12 @@
*{{$t('Alarm plugin instance')}}
-
+
+ v-for="items in allAlertPluginInstance"
+ :key="items.id"
+ :value="items.id"
+ :label="items.instanceName">
@@ -75,7 +75,7 @@
return {
store,
groupName: '',
- groupType: 'EMAIL',
+ alertInstanceIds: null,
description: '',
options: [{ code: `${i18n.$t('Email')}`, id: 'EMAIL' }, { code: `${i18n.$t('SMS')}`, id: 'SMS' }]
}
@@ -115,7 +115,7 @@
_submit () {
let param = {
groupName: this.groupName,
- groupType: this.groupType,
+ alertInstanceIds: this.alertInstanceIds,
description: this.description
}
if (this.item) {
@@ -141,7 +141,7 @@
created () {
if (this.item) {
this.groupName = this.item.groupName
- this.groupType = this.item.groupType
+ this.alertInstanceIds = Number(this.item.alertInstanceIds)
this.description = this.item.description
}
},
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
index a06e868e15..c3c0a9e343 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
@@ -20,11 +20,6 @@
-
-
- {{scope.row.groupType === 'EMAIL' ? `${$t('Email')}` : `${$t('SMS')}`}}
-
-
@@ -50,7 +45,7 @@
:title="$t('Delete?')"
@onConfirm="_delete(scope.row,scope.row.id)"
>
-
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
index 88b16ef7a9..53b4783a53 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
@@ -90,7 +90,7 @@
mixins: [listUrlParamHandle],
props: {},
methods: {
- ...mapActions('security', ['getAlertgroupP', 'queryAllAlertPluginInstance']),
+ ...mapActions('security', ['queryAlertGroupListPaging', 'queryAllAlertPluginInstance']),
/**
* Inquire
*/
@@ -112,7 +112,7 @@
},
_create (item) {
this.queryAllAlertPluginInstance().then(res => {
- this.allAlertPluginInstance = res.data
+ this.allAlertPluginInstance = res
}).catch(e => {
this.$message.error(e.msg)
})
@@ -136,7 +136,7 @@
this.isLeft = true
}
this.isLoading = !flag
- this.getAlertgroupP(this.searchParams).then(res => {
+ this.queryAlertGroupListPaging(this.searchParams).then(res => {
if (this.searchParams.pageNo > 1 && res.totalList.length === 0) {
this.searchParams.pageNo = this.searchParams.pageNo - 1
} else {
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
similarity index 67%
rename from dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue
rename to dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
index 9bdea2543e..7ce296e272 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarning.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
@@ -18,7 +18,7 @@
@@ -28,7 +28,7 @@
@@ -38,7 +38,15 @@
*{{$t('Select plugin')}}
-
+
+
+
+
+
{
this._submit()
}).catch(e => {
@@ -124,34 +109,56 @@
},
_verification () {
// group name
- if (!this.groupName.replace(/\s*/g, '')) {
+ if (!this.instanceName.replace(/\s*/g, '')) {
this.$message.warning(`${i18n.$t('Please enter group name')}`)
return false
}
return true
},
changePlugin () {
- console.log(this.rule)
- console.log(this.pluginDefineId)
+ // this.rule = [
+ // {
+ // type: 'input',
+ // field: 'dingTalkWebHook',
+ // className: 'user-name-dom',
+ // title: $t('Alarm instance name'),
+ // value: null,
+ // props: {
+ // placeholder: '请输入用户名称!',
+ // size: 'small',
+ // disabled: false,
+ // readonly: false,
+ // clearable: true
+ // },
+ // validate: [
+ // {
+ // trigger: 'blur',
+ // required: true,
+ // message: '用户名称不能为空!'
+ // }
+ // ]
+ // }
+ // ]
this.store.dispatch('security/getUiPluginsByID', {
pluginId: this.pluginDefineId
}).then(res => {
- console.log(res)
+ this.rule = JSON.parse(res.pluginParams)
}).catch(e => {
this.$message.error(e.msg || '')
})
},
_submit () {
let param = {
- groupName: this.groupName,
- groupType: this.groupType,
- description: this.description
+ instanceName: this.instanceName,
+ pluginDefineId: this.pluginDefineId,
+ pluginInstanceParams: JSON.stringify(this.$f.rule)
}
if (this.item) {
- param.id = this.item.id
+ param.alertPluginInstanceId = this.item.id
+ param.pluginDefineId = null
}
this.$refs.popup.spinnerLoading = true
- this.store.dispatch(`security/${this.item ? 'updateAlertgrou' : 'createAlertgrou'}`, param).then(res => {
+ this.store.dispatch(`security/${this.item ? 'updateAlertPluginInstance' : 'createAlertPluginInstance'}`, param).then(res => {
this.$emit('onUpdate')
this.$message.success(res.msg)
setTimeout(() => {
@@ -169,9 +176,9 @@
watch: {},
created () {
if (this.item) {
- this.groupName = this.item.groupName
- this.groupType = this.item.groupType
- this.description = this.item.description
+ this.instanceName = this.item.instanceName
+ this.pluginDefineId = this.item.pluginDefineId
+ this.rule = JSON.parse(this.item.pluginInstanceParams)
}
},
mounted () {
@@ -181,8 +188,14 @@
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue
new file mode 100644
index 0000000000..5a8cf2ad1b
--- /dev/null
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/list.vue
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+
+
+
+
+
+
+
+
+ {{scope.row.createTime | formatDate}}
+
+
+
+
+ {{scope.row.updateTime | formatDate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue
new file mode 100644
index 0000000000..54a8177e9e
--- /dev/null
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue
@@ -0,0 +1,169 @@
+/*
+ * 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.
+ */
+
+
+
+
+
+ {{$t('Create Alarm Instance')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/router/index.js b/dolphinscheduler-ui/src/js/conf/home/router/index.js
index 6b815260c9..8d205b81c8 100644
--- a/dolphinscheduler-ui/src/js/conf/home/router/index.js
+++ b/dolphinscheduler-ui/src/js/conf/home/router/index.js
@@ -387,7 +387,8 @@ const router = new Router({
name: 'users-manage',
component: resolve => require(['../pages/security/pages/users/index'], resolve),
meta: {
- title: `${i18n.$t('User Manage')}`
+ title: `${i18n.$t('User Manage')}`,
+ refresh_in_switched_tab: false
}
},
{
@@ -398,6 +399,14 @@ const router = new Router({
title: `${i18n.$t('Warning group manage')}`
}
},
+ {
+ path: '/security/warning-instance',
+ name: 'warning-instance-manage',
+ component: resolve => require(['../pages/security/pages/warningInstance/index'], resolve),
+ meta: {
+ title: `${i18n.$t('Warning instance manage')}`
+ }
+ },
{
path: '/security/queue',
name: 'queue-manage',
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js b/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js
index 363dee7e39..9405d264a4 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/security/actions.js
@@ -43,6 +43,12 @@ export default {
groupName: payload.groupName
},
api: 'alert-group/verify-group-name'
+ },
+ alarmInstance: {
+ param: {
+ alertInstanceName: payload.instanceName
+ },
+ api: 'alert-plugin-instance/verify-alert-instance-name'
}
}
@@ -340,9 +346,9 @@ export default {
})
},
/**
- * Paging query alarm group list
+ * queryAlertGroupListPaging
*/
- getAlertgroupP ({ state }, payload) {
+ queryAlertGroupListPaging ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get('alert-group/list-paging', payload, res => {
resolve(res.data)
@@ -351,6 +357,54 @@ export default {
})
})
},
+ /**
+ * queryAlertPluginInstanceListPaging
+ */
+ queryAlertPluginInstanceListPaging ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.get('alert-plugin-instance/list-paging', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ /**
+ * queryUiPlugins
+ */
+ getPlugins ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('ui-plugins/queryUiPluginsByType', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ /**
+ * queryUiPluginById
+ */
+ getUiPluginById ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('ui-plugins/queryUiPluginDetailById', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ /**
+ * queryAll alert-plugin-instance
+ */
+ queryAllAlertPluginInstance ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('alert-plugin-instance/queryAll', payload, res => {
+ resolve(res.data)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
/**
* Alarm group list
*/
@@ -375,6 +429,30 @@ export default {
})
})
},
+ /**
+ * create alert plugin instance operation
+ */
+ createAlertPluginInstance ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.post('alert-plugin-instance/create', payload, res => {
+ resolve(res)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ /**
+ * update alert plugin instance operation
+ */
+ updateAlertPluginInstance ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.get('alert-plugin-instance/update', payload, res => {
+ resolve(res)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
/**
* update an alarm group.
*/
@@ -399,6 +477,18 @@ export default {
})
})
},
+ /**
+ * delete alert plugin instance operation
+ */
+ deletAelertPluginInstance ({ state }, payload) {
+ return new Promise((resolve, reject) => {
+ io.get('alert-plugin-instance/delete', payload, res => {
+ resolve(res)
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
/**
* Master list
*/
diff --git a/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js b/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
index 2ce1a3c690..daaf918665 100644
--- a/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
+++ b/dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
@@ -109,6 +109,15 @@ const menu = {
icon: 'el-icon-warning',
children: []
},
+ {
+ name: `${i18n.$t('Warning instance manage')}`,
+ id: 2,
+ path: 'warning-instance-manage',
+ isOpen: true,
+ enabled: true,
+ icon: 'ri-spam-fill',
+ children: []
+ },
{
name: `${i18n.$t('Worker group manage')}`,
id: 4,
diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
index c8216d41a5..168258a9f6 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
@@ -184,15 +184,14 @@ export default {
'Last heartbeat time': 'Last heartbeat time',
'Edit Tenant': 'Edit Tenant',
'OS Tenant Code': 'OS Tenant Code',
- Queue: 'Yarn Queue',
'Tenant Name': 'Tenant Name',
+ Queue: 'Yarn Queue',
'Please select a queue': 'default is tenant association queue',
'Please enter the os tenant code in English': 'Please enter the os tenant code in English',
'Please enter os tenant code in English': 'Please enter os tenant code in English',
'Please enter os tenant code': 'Please enter os tenant code',
'Please enter tenant Name': 'Please enter tenant Name',
'The os tenant code. Only letters or a combination of letters and numbers are allowed': 'The os tenant code. Only letters or a combination of letters and numbers are allowed',
- 'The os tenant code cannot be all numbers': 'The os tenant code cannot be all numbers',
'Edit User': 'Edit User',
Tenant: 'Tenant',
Email: 'Email',
@@ -210,9 +209,14 @@ export default {
'Please select UDF resources directory': 'Please select UDF resources directory',
'Edit alarm group': 'Edit alarm group',
'Create alarm group': 'Create alarm group',
+ 'Create Alarm Instance': 'Create Alarm Instance',
+ 'Edit Alarm Instance': 'Edit Alarm Instance',
'Group Name': 'Group Name',
+ 'Alarm instance name': 'Alarm instance name',
+ 'Select plugin': 'Select plugin',
'Please enter group name': 'Please enter group name',
'Group Type': 'Group Type',
+ 'Alarm plugin instance': 'Alarm plugin instance',
Remarks: 'Remarks',
SMS: 'SMS',
'Managing Users': 'Managing Users',
@@ -370,6 +374,7 @@ export default {
'Process definition': 'Process definition',
'Task record': 'Task record',
'Warning group manage': 'Warning group manage',
+ 'Warning instance manage': 'Warning instance manage',
'Servers manage': 'Servers manage',
'UDF manage': 'UDF manage',
'Resource manage': 'Resource manage',
diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
index 2aa94cc4d1..fb3bd3fb5b 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
@@ -209,9 +209,14 @@ export default {
'Please select UDF resources directory': '请选择UDF资源目录',
'Edit alarm group': '编辑告警组',
'Create alarm group': '创建告警组',
+ 'Create Alarm Instance': '创建告警实例',
+ 'Edit Alarm Instance': '编辑告警实例',
'Group Name': '组名称',
+ 'Alarm instance name': '告警实例名称',
+ 'Select plugin': '选择插件',
'Please enter group name': '请输入组名称',
'Group Type': '组类型',
+ 'Alarm plugin instance': '告警插件实例',
Remarks: '备注',
SMS: '短信',
'Managing Users': '管理用户',
@@ -369,6 +374,7 @@ export default {
'Process definition': '工作流定义',
'Task record': '任务记录',
'Warning group manage': '告警组管理',
+ 'Warning instance manage': '告警实例管理',
'Servers manage': '服务管理',
'UDF manage': 'UDF管理',
'Resource manage': '资源管理',
From f85d41e7b062879dcf14078baa409a600e370eee Mon Sep 17 00:00:00 2001
From: break60 <790061044@qq.com>
Date: Fri, 22 Jan 2021 22:09:28 +0800
Subject: [PATCH 19/31] [Improvement]Optimize the popover box title, create and
edit instances are not cleared
---
.../conditions/instance/processInstance.vue | 2 +-
.../instance/pages/list/_source/list.vue | 1 -
.../pages/list/_source/createProject.vue | 16 ++-
.../home/pages/projects/pages/list/index.vue | 2 +
.../pages/queue/_source/createQueue.vue | 19 ++--
.../home/pages/security/pages/queue/index.vue | 2 +
.../pages/tenement/_source/createTenement.vue | 17 ++--
.../pages/security/pages/tenement/index.vue | 2 +
.../pages/users/_source/createUser.vue | 21 ++--
.../security/pages/users/_source/list.vue | 1 +
.../home/pages/security/pages/users/index.vue | 2 +
.../warningGroups/_source/createWarning.vue | 17 ++--
.../security/pages/warningGroups/index.vue | 2 +
.../_source/createWarningInstance.vue | 26 ++---
.../security/pages/warningInstance/index.vue | 4 +-
.../pages/user/pages/account/_source/info.vue | 4 +-
.../user/pages/token/_source/createToken.vue | 11 +--
.../home/pages/user/pages/token/index.vue | 2 +
.../src/js/conf/home/router/index.js | 2 +-
.../js/module/components/popup/popover.vue | 97 +++++++++++++++++++
.../src/js/module/components/popup/popup.vue | 2 +-
.../module/components/transfer/resource.vue | 5 +-
.../src/sass/common/index.scss | 4 +-
23 files changed, 185 insertions(+), 76 deletions(-)
create mode 100644 dolphinscheduler-ui/src/js/module/components/popup/popover.vue
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue
index 37566e517e..2cfc5afcbe 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/processInstance.vue
@@ -18,7 +18,7 @@
-
+
-
@@ -44,13 +44,13 @@
-
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
index 0fa6893c3a..57a9e7d9b4 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/list/index.vue
@@ -21,6 +21,8 @@
{{ $t('Create Project') }}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue
index 6ddf25af8a..4fa8e5cf7c 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/createQueue.vue
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-
@@ -50,13 +49,13 @@
-
+
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
index 9e622eec44..2f7bea6ec8 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/queue/index.vue
@@ -21,6 +21,8 @@
{{$t('Create queue')}}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
index 59e0390dfc..551baca1db 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/tenement/_source/createTenement.vue
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-
@@ -62,13 +61,13 @@