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

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 68f4dc81 fix ns sync bug (#515)
68f4dc81 is described below

commit 68f4dc81b9dd6e11bec81cdf1574add068bee3c0
Author: aias00 <rok...@163.com>
AuthorDate: Mon Dec 16 10:00:46 2024 +0800

    fix ns sync bug (#515)
---
 src/models/global.js              | 4 ++--
 src/routes/Plugin/Common/index.js | 7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/models/global.js b/src/models/global.js
index 0d2357d7..421f93bd 100644
--- a/src/models/global.js
+++ b/src/models/global.js
@@ -21,7 +21,7 @@ import {
   queryPlatform,
   getPluginsByNamespace,
   getNamespaceList,
-  asyncByPluginAndNamespace,
+  asyncOnePlugin,
   getUserPermissionByNamespace,
 } from "../services/api";
 import { getIntlContent } from "../utils/IntlUtils";
@@ -110,7 +110,7 @@ export default {
     },
     *asyncPlugin(params, { call }) {
       const { payload } = params;
-      const json = yield call(asyncByPluginAndNamespace, payload);
+      const json = yield call(asyncOnePlugin, payload);
       if (json.code === 200) {
         message.success(getIntlContent("SHENYU.COMMON.RESPONSE.SYNC.SUCCESS"));
       } else {
diff --git a/src/routes/Plugin/Common/index.js 
b/src/routes/Plugin/Common/index.js
index a7d351e0..d841a7a8 100755
--- a/src/routes/Plugin/Common/index.js
+++ b/src/routes/Plugin/Common/index.js
@@ -894,14 +894,13 @@ export default class Common extends Component {
   };
 
   asyncClick = () => {
-    const { dispatch, plugins, currentNamespaceId } = this.props;
+    const { dispatch, plugins } = this.props;
     let name = this.props.match.params ? this.props.match.params.id : "";
-    const pluginId = this.getPluginId(plugins, name);
+    const plugin = this.getPlugin(plugins, name);
     dispatch({
       type: "global/asyncPlugin",
       payload: {
-        pluginId,
-        namespaceId: currentNamespaceId,
+        id: plugin.id,
       },
     });
   };

Reply via email to