diff --git a/jsx/build/admin-react.js.LICENSE.txt b/jsx/build/admin-react.js.LICENSE.txt index 493c5041..9e7087bc 100644 --- a/jsx/build/admin-react.js.LICENSE.txt +++ b/jsx/build/admin-react.js.LICENSE.txt @@ -37,6 +37,15 @@ object-assign * LICENSE file in the root directory of this source tree. */ +/** @license React v17.0.2 + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + /** @license React v17.0.2 * react.production.min.js * diff --git a/jsx/package.json b/jsx/package.json index 2488dbe8..4442d169 100644 --- a/jsx/package.json +++ b/jsx/package.json @@ -43,10 +43,11 @@ "lodash.debounce": "^4.0.8", "prop-types": "^15.7.2", "react": "^17.0.1", - "react-bootstrap": "^1.4.0", + "react-bootstrap": "^2.1.1", "react-dom": "^17.0.1", "react-icons": "^4.1.0", "react-multi-select-component": "^3.0.7", + "react-object-table-viewer": "^1.0.7", "react-redux": "^7.2.2", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", @@ -60,7 +61,6 @@ }, "devDependencies": { "@wojtekmaj/enzyme-adapter-react-17": "^0.6.5", - "sinon": "^13.0.1", "babel-jest": "^26.6.3", "enzyme": "^3.11.0", "eslint": "^7.18.0", @@ -68,6 +68,7 @@ "eslint-plugin-react": "^7.22.0", "identity-obj-proxy": "^3.0.0", "jest": "^26.6.3", - "prettier": "^2.2.1" + "prettier": "^2.2.1", + "sinon": "^13.0.1" } } diff --git a/jsx/src/Store.js b/jsx/src/Store.js index 0dadda20..d5194df1 100644 --- a/jsx/src/Store.js +++ b/jsx/src/Store.js @@ -14,7 +14,7 @@ export const reducers = (state = initialState, action) => { return Object.assign({}, state, { user_page: action.value.page, user_data: action.value.data, - name_filter: action.value.name_filter, + name_filter: action.value.name_filter || "", }); // Updates the client group model data and stores the page diff --git a/jsx/src/components/ServerDashboard/ServerDashboard.jsx b/jsx/src/components/ServerDashboard/ServerDashboard.jsx index 9087ee2b..9ba4720f 100644 --- a/jsx/src/components/ServerDashboard/ServerDashboard.jsx +++ b/jsx/src/components/ServerDashboard/ServerDashboard.jsx @@ -3,7 +3,17 @@ import regeneratorRuntime from "regenerator-runtime"; import { useSelector, useDispatch } from "react-redux"; import PropTypes from "prop-types"; -import { Button, Col, Row, FormControl } from "react-bootstrap"; +import { + Button, + Col, + Row, + FormControl, + Card, + CardGroup, + Collapse, +} from "react-bootstrap"; +import ReactObjectTableViewer from "react-object-table-viewer"; + import { Link } from "react-router-dom"; import { FaSort, FaSortUp, FaSortDown } from "react-icons/fa"; @@ -40,6 +50,7 @@ const ServerDashboard = (props) => { var [errorAlert, setErrorAlert] = useState(null); var [sortMethod, setSortMethod] = useState(null); var [disabledButtons, setDisabledButtons] = useState({}); + const [collapseStates, setCollapseStates] = useState({}); var user_data = useSelector((state) => state.user_data), user_page = useSelector((state) => state.user_page), @@ -189,6 +200,131 @@ const ServerDashboard = (props) => { ); }; + const serverRow = (user, server) => { + const { servers, ...userNoServers } = user; + const serverNameDash = server.name ? `-${server.name}` : ""; + const userServerName = user.name + serverNameDash; + const open = collapseStates[userServerName] || false; + return [ +
{server.name}
+ ) : ( +[MAIN]
+ )} +