This is an automated email from the ASF dual-hosted git repository.
likeguo 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 ab71bf91 add "enabled" param in plugin's reload action#4172 (#250)
ab71bf91 is described below
commit ab71bf918673f70644722e462da92354c0b7e6d2
Author: gentlehao <[email protected]>
AuthorDate: Wed Nov 16 10:28:21 2022 +0800
add "enabled" param in plugin's reload action#4172 (#250)
* add "enabled" param in plugin's reload action#4172
* Edit to comply with eslint specification#251
---
src/models/plugin.js | 4 ++--
src/routes/System/Plugin/index.js | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/models/plugin.js b/src/models/plugin.js
index 6ba9d291..4841c4a7 100644
--- a/src/models/plugin.js
+++ b/src/models/plugin.js
@@ -123,8 +123,8 @@ export default {
*reload(params, { put }) {
const { fetchValue } = params;
- const { name, currentPage, pageSize } = fetchValue;
- const payload = { name, currentPage, pageSize };
+ const { name, currentPage, enabled, pageSize } = fetchValue;
+ const payload = { name, enabled, currentPage, pageSize };
yield put({ type: "fetch", payload });
},
diff --git a/src/routes/System/Plugin/index.js
b/src/routes/System/Plugin/index.js
index 7fb65c1d..6e3c6ae7 100644
--- a/src/routes/System/Plugin/index.js
+++ b/src/routes/System/Plugin/index.js
@@ -150,6 +150,7 @@ export default class Plugin extends Component {
{...pluginConfigList}
handleOk={values => {
const { name, enabled, id, role, config, sort } = values;
+ const enabledStr = enabled?'1':'0';
dispatch({
type: "plugin/update",
payload: {
@@ -162,6 +163,7 @@ export default class Plugin extends Component {
},
fetchValue: {
name: pluginName,
+ enabled: enabledStr,
currentPage,
pageSize
},