You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2022/12/21 13:31:17 UTC

[shenyu-dashboard] branch master updated: Revert "Add link from plugin to pluginList (#255)" (#260)

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 ea76c4c4 Revert "Add link from plugin to pluginList (#255)" (#260)
ea76c4c4 is described below

commit ea76c4c470605e6f48613228452053303d6b99d0
Author: Liming Deng <li...@gmail.com>
AuthorDate: Wed Dec 21 21:31:12 2022 +0800

    Revert "Add link from plugin to pluginList (#255)" (#260)
    
    This reverts commit e31422448ba85440aa51583f5783279d47ab5647.
---
 src/components/SiderMenu/SiderMenu.js | 18 ++----------------
 src/routes/System/Plugin/index.js     |  5 ++---
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SiderMenu.js
index 675a80d1..7880c1be 100644
--- a/src/components/SiderMenu/SiderMenu.js
+++ b/src/components/SiderMenu/SiderMenu.js
@@ -18,7 +18,7 @@
 import React, { PureComponent } from "react";
 import { Layout, Menu, Icon, Switch } from "antd";
 import pathToRegexp from "path-to-regexp";
-import { withRouter, Link } from "dva/router";
+import { Link } from "dva/router";
 import styles from "./index.less";
 import { urlToList } from "../_utils/pathTools";
 import { getCurrentLocale, getIntlContent } from "../../utils/IntlUtils";
@@ -77,7 +77,7 @@ export const getMenuMatchKeys = (flatMenuKeys, paths) =>
     []
   );
 
-class SiderMenu extends PureComponent {
+export default class SiderMenu extends PureComponent {
   constructor(props) {
     super(props);
     this.flatMenuKeys = getFlatMenuKeys(props.menuData);
@@ -89,16 +89,6 @@ class SiderMenu extends PureComponent {
     };
   }
 
-  componentDidMount() {
-    this.props.history.listen(location => {
-      if (this.props.location.pathname !== location.pathname) {
-        this.setState({
-          openKeys: this.getDefaultCollapsedSubMenus(this.props)
-        });
-      }
-    });
-  }
-
   componentWillReceiveProps(nextProps) {
     const { location, menuData } = this.props;
     this.flatMenuKeys = getFlatMenuKeys(menuData);
@@ -349,8 +339,6 @@ class SiderMenu extends PureComponent {
           theme={this.state.theme}
           mode={this.state.mode}
           style={{ padding: "16px 0", width: "100%" }}
-          selectedKeys={selectedKeys}
-          openKeys={openKeys}
         >
           {this.getNavMenuItems(menuData)}
         </Menu>
@@ -358,5 +346,3 @@ class SiderMenu extends PureComponent {
     );
   }
 }
-
-export default withRouter(SiderMenu);
diff --git a/src/routes/System/Plugin/index.js b/src/routes/System/Plugin/index.js
index c6234477..da2b68cf 100644
--- a/src/routes/System/Plugin/index.js
+++ b/src/routes/System/Plugin/index.js
@@ -16,7 +16,6 @@
  */
 
 import React, { Component } from "react";
-import { Link } from "dva/router";
 import { Table, Input, Button, message, Popconfirm, Select, Popover, Tag, Typography } from "antd";
 import { connect } from "dva";
 import { resizableComponents } from "../../../utils/resizable";
@@ -370,8 +369,8 @@ export default class Plugin extends Component {
           key: "name",
           ellipsis: true,
           width: 120,
-          render: (text, record) => {
-            return <Link to={`/plug/${record.role}/${text}`} style={{color: "#260033","fontWeight":"bold"}}>{text || "----"}</Link>;
+          render: text => {
+            return <div style={{color: "#260033","fontWeight":"bold"}}>{text || "----"}</div>;
           }
         },
         {