You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2022/05/25 10:13:49 UTC

[dolphinscheduler] branch dev updated: [Fix#9923] The alarm instance management interface is always in the loading state (#9924)

This is an automated email from the ASF dual-hosted git repository.

liudongkai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new c5c68a8893 [Fix#9923] The alarm instance management interface is always in the loading state (#9924)
c5c68a8893 is described below

commit c5c68a88935095ce277ecd3cfbdacea49e1b50cb
Author: Mr.An <42...@users.noreply.github.com>
AuthorDate: Wed May 25 18:13:42 2022 +0800

    [Fix#9923] The alarm instance management interface is always in the loading state (#9924)
    
    * fix alert plugin loading bug
    
    * update use-form.ts
    
    * remove unused package
    
    * Update use-form.ts
    
    * Update use-form.ts
---
 .../src/views/security/alarm-instance-manage/use-form.ts | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts b/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
index 1e5fc3db0e..389973b3a0 100644
--- a/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
+++ b/dolphinscheduler-ui/src/views/security/alarm-instance-manage/use-form.ts
@@ -72,12 +72,16 @@ export function useForm() {
   const getUiPluginsByType = async () => {
     if (state.pluginsLoading) return
     state.pluginsLoading = true
-    const plugins = await queryUiPluginsByType({ pluginType: 'ALERT' })
-    state.uiPlugins = plugins.map((plugin: IPlugin) => ({
-      label: plugin.pluginName,
-      value: plugin.id
-    }))
-    state.pluginsLoading = false
+    try {
+      const plugins = await queryUiPluginsByType({ pluginType: 'ALERT' })
+      state.uiPlugins = plugins.map((plugin: IPlugin) => ({
+        label: plugin.pluginName,
+        value: plugin.id
+      }))
+      state.pluginsLoading = false
+    } catch (e) {
+      state.pluginsLoading = false
+    }
   }
 
   const changePlugin = async (pluginId: IPluginId) => {