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