move elements from system namespace to server namespace
parent
3800c35e5a
commit
6a7f600fd3
|
@ -1,10 +1,10 @@
|
|||
import React from "react";
|
||||
import SystemContainer from "../../features/system/components/SystemContainer";
|
||||
import ServerContainer from "../../features/server/components/ServerContainer";
|
||||
|
||||
const HomePage = () => {
|
||||
return (
|
||||
<>
|
||||
<SystemContainer />
|
||||
<ServerContainer />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
|
|||
}
|
||||
}));
|
||||
|
||||
const SystemComponent = () => {
|
||||
const ServerComponent = () => {
|
||||
const classes = useStyles();
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
|
||||
|
@ -115,4 +115,4 @@ const SystemComponent = () => {
|
|||
);
|
||||
};
|
||||
|
||||
export default SystemComponent;
|
||||
export default ServerComponent;
|
|
@ -3,10 +3,10 @@ import { connect } from "react-redux";
|
|||
import { bindActionCreators } from "redux";
|
||||
import PropTypes from "prop-types";
|
||||
import { loadSystemDateTime, loadSystemVersion } from "../actionCreators";
|
||||
import SystemComponent from "./SystemComponent";
|
||||
import ServerComponent from "./ServerComponent";
|
||||
import ActiveSessionComponent from "./ActiveSessionComponent";
|
||||
|
||||
const SystemContainer = ({ actions }) => {
|
||||
const ServerContainer = ({ actions }) => {
|
||||
useEffect(() => {
|
||||
actions.loadSystemDateTime();
|
||||
actions.loadSystemVersion();
|
||||
|
@ -14,7 +14,7 @@ const SystemContainer = ({ actions }) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<SystemComponent />
|
||||
<ServerComponent />
|
||||
<br />
|
||||
<br />
|
||||
<ActiveSessionComponent />
|
||||
|
@ -22,14 +22,14 @@ const SystemContainer = ({ actions }) => {
|
|||
);
|
||||
};
|
||||
|
||||
SystemContainer.propTypes = {
|
||||
ServerContainer.propTypes = {
|
||||
actions: PropTypes.object.isRequired,
|
||||
system: PropTypes.object.isRequired
|
||||
server: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {
|
||||
system: state.system
|
||||
server: state.server
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -42,4 +42,4 @@ function mapDispatchToProps(dispatch) {
|
|||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(SystemContainer);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ServerContainer);
|
|
@ -1,7 +1,7 @@
|
|||
import * as types from "./actionTypes";
|
||||
import initialState from "../../redux/reducers/initialState";
|
||||
|
||||
export default function systemReducer(state = initialState.system, action) {
|
||||
export default function serverReducer(state = initialState.server, action) {
|
||||
switch (action.type) {
|
||||
case types.LOAD_SYSTEM_DATETIME_SUCCESS:
|
||||
return {
|
|
@ -1,6 +1,6 @@
|
|||
import { combineReducers } from "redux";
|
||||
import ajaxStatusReducer from "./ajaxStatusReducer";
|
||||
import systemReducer from "../../features/system/reducer";
|
||||
import serverReducer from "../../features/server/reducer";
|
||||
import {
|
||||
sessionsReducer,
|
||||
forwardsReducer
|
||||
|
@ -8,7 +8,7 @@ import {
|
|||
import releaseNotesReducer from "../../features/releaseNotes/reducer";
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
system: systemReducer,
|
||||
server: serverReducer,
|
||||
sessions: sessionsReducer,
|
||||
forwards: forwardsReducer,
|
||||
releaseNotes: releaseNotesReducer,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
system: {},
|
||||
server: {},
|
||||
sessions: Object.assign([], { loading: false, loaded: false }),
|
||||
forwards: {},
|
||||
releaseNotes: Object.assign([], { loading: false, loaded: false }),
|
||||
|
|
Loading…
Reference in New Issue