You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/09/22 06:08:15 UTC

[GitHub] [incubator-dolphinscheduler] gaojun2048 commented on a change in pull request #3734: [feature][ui]Alert plugin design

gaojun2048 commented on a change in pull request #3734:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3734#discussion_r492489445



##########
File path: dolphinscheduler-ui/src/js/conf/home/pages/security/pages/alarmPluginExample/_source/list.vue
##########
@@ -0,0 +1,224 @@
+/*
+ * 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.
+ */
+<template>
+  <div class="list-model">
+    <!-- <div class="table-box">
+      <table>
+        <tr>
+          <th>
+            <span>{{$t('#')}}</span>
+          </th>
+          <th>
+            <span>{{$t('Instance type')}}</span>
+          </th>
+          <th>
+            <span>{{$t('name')}}</span>
+          </th>
+          <th>
+            <span>{{$t('Create Time')}}</span>
+          </th>
+          <th>
+            <span>{{$t('Update Time')}}</span>
+          </th>
+          <th width="120">
+            <span>{{$t('Operation')}}</span>
+          </th>
+        </tr>
+        <tr v-for="(item, $index) in list" :key="$index">
+          <td>
+            <span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
+          </td>
+          <td>
+            <span>
+              {{item.groupName}}
+            </span>
+          </td>
+          <td><span>{{item.groupType === 'EMAIL' ? `${$t('Email')}` : `${$t('SMS')}`}}</span></td>

Review comment:
       groupType need be delete too.

##########
File path: dolphinscheduler-ui/src/js/conf/home/pages/security/pages/alarmPluginExample/_source/createWarning.vue
##########
@@ -0,0 +1,145 @@
+/*
+ * 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.
+ */
+<template>
+  <m-popup
+          ref="popup"
+          :ok-text="item ? $t('Edit') : $t('Submit')"
+          :nameText="item ? $t('Edit alarm group') : $t('Create alarm group')"
+          @ok="_ok">
+    <template slot="content">
+      <div class="create-warning-model">
+        <m-list-box-f>
+          <template slot="name"><strong>*</strong>{{$t('Group Name')}}</template>
+          <template slot="content">
+            <x-input
+                    type="input"
+                    v-model="groupName"
+                    maxlength="60"
+                    :placeholder="$t('Please enter group name')">
+            </x-input>
+          </template>
+        </m-list-box-f>
+        <m-list-box-f>
+          <template slot="name"><strong>*</strong>{{$t('Group Type')}}</template>

Review comment:
       In this feature GroupType need be delete.
   The previous options for groupType were email and SMS, but in this feature, AlertGroup no longer belongs to email or SMS. AlertGroup is just a collection of instances of alert plugins. So groupType should be deleted

##########
File path: dolphinscheduler-ui/src/js/conf/home/router/index.js
##########
@@ -397,6 +397,14 @@ const router = new Router({
           meta: {
             title: `${i18n.$t('Token manage')}`
           }
+        },
+        {
+          path: '/security/Alarm-plugin-example',
+          name: 'Alarm-plugin-example',
+          component: resolve => require(['../pages/security/pages/alarmPluginExample/index'], resolve),

Review comment:
       can you change `alarm` to `alert` ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org