aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/maintenanceApp
diff options
context:
space:
mode:
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>2022-02-01 13:18:42 +0100
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>2022-02-01 13:18:42 +0100
commit1a868116614dd9996c78e69941b537e9da19460b (patch)
tree352e8e4226f6ce798610d75ceef08ad9056df6d9 /sdnr/wt/odlux/apps/maintenanceApp
parent9912e1626d93afeb4f7148dd5d826ae1caa1ef8a (diff)
Update ODLUX
Updated to Material-ui 5, updated dashboard view, removed NetworkMap, LinkCalculator and LineOfSightApp, small bugfixes Issue-ID: CCSDK-3580 Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com> Change-Id: Id0fc148673e23a755cafc2be1c489248c38ff47c
Diffstat (limited to 'sdnr/wt/odlux/apps/maintenanceApp')
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/package.json23
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/components/editMaintenenceEntryDialog.tsx28
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/components/refreshMaintenanceEntries.tsx16
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx24
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js4
5 files changed, 49 insertions, 46 deletions
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/package.json b/sdnr/wt/odlux/apps/maintenanceApp/package.json
index 939044e20..dd678d693 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/package.json
+++ b/sdnr/wt/odlux/apps/maintenanceApp/package.json
@@ -21,21 +21,24 @@
"author": "Matthias Fischer",
"license": "Apache-2.0",
"dependencies": {
- "@odlux/framework": "*",
- "@odlux/connect-app": "*"
+ "@emotion/react": "^11.7.0",
+ "@emotion/styled": "^11.6.0",
+ "@mui/icons-material": "^5.2.0",
+ "@mui/material": "^5.2.2",
+ "@mui/styles": "^5.2.2",
+ "@odlux/connect-app": "*",
+ "@odlux/framework": "*"
},
"peerDependencies": {
- "@types/react": "17.0.3",
- "@types/react-dom": "17.0.2",
- "@types/react-router-dom": "5.1.7",
- "@material-ui/core": "4.11.4",
- "@material-ui/icons": "4.11.2",
"@types/classnames": "2.2.6",
"@types/flux": "3.1.8",
"@types/jquery": "3.3.10",
+ "@types/react": "17.0.37",
+ "@types/react-dom": "17.0.11",
+ "@types/react-router-dom": "5.1.7",
"jquery": "3.3.1",
- "react": "17.0.1",
- "react-dom": "17.0.1",
+ "react": "17.0.2",
+ "react-dom": "17.0.2",
"react-router-dom": "5.2.0"
}
-} \ No newline at end of file
+}
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/components/editMaintenenceEntryDialog.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/components/editMaintenenceEntryDialog.tsx
index 5ffd98799..829289224 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/components/editMaintenenceEntryDialog.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/components/editMaintenenceEntryDialog.tsx
@@ -17,13 +17,13 @@
*/
import * as React from 'react';
-import Button from '@material-ui/core/Button';
-import TextField from '@material-ui/core/TextField';
-import Dialog from '@material-ui/core/Dialog';
-import DialogActions from '@material-ui/core/DialogActions';
-import DialogContent from '@material-ui/core/DialogContent';
-import DialogContentText from '@material-ui/core/DialogContentText';
-import DialogTitle from '@material-ui/core/DialogTitle';
+import Button from '@mui/material/Button';
+import TextField from '@mui/material/TextField';
+import Dialog from '@mui/material/Dialog';
+import DialogActions from '@mui/material/DialogActions';
+import DialogContent from '@mui/material/DialogContent';
+import DialogContentText from '@mui/material/DialogContentText';
+import DialogTitle from '@mui/material/DialogTitle';
import { IDispatcher, connect, Connect } from '../../../../framework/src/flux/connect';
@@ -33,7 +33,7 @@ import {
} from '../actions/maintenenceActions';
import { MaintenenceEntry } from '../models/maintenenceEntryType';
-import { FormControl, InputLabel, Select, MenuItem, Typography } from '@material-ui/core';
+import { FormControl, InputLabel, Select, MenuItem, Typography } from '@mui/material';
export enum EditMaintenenceEntryDialogMode {
None = "none",
@@ -122,13 +122,13 @@ class EditMaintenenceEntryDIalogComponent extends React.Component<EditMaintenenc
<DialogContentText>
{setting.dialogDescription}
</DialogContentText>
- <TextField disabled={!setting.enableMountIdEditor} spellCheck={false} autoFocus margin="dense" id="name" label="Name" type="text" fullWidth value={this.state.nodeId} onChange={(event) => { this.setState({ nodeId: event.target.value }); }} />
+ <TextField variant="standard" disabled={!setting.enableMountIdEditor} spellCheck={false} autoFocus margin="dense" id="name" label="Name" type="text" fullWidth value={this.state.nodeId} onChange={(event) => { this.setState({ nodeId: event.target.value }); }} />
{this.state.isErrorVisible && <Typography variant="body1" color="error" >Name must not be empty.</Typography>}
- <TextField disabled={!setting.enableTimeEditor} spellCheck={false} autoFocus margin="dense" id="start" label="Start (Local DateTime)" type="datetime-local" fullWidth value={this.state.start} onChange={(event) => { this.setState({ start: event.target.value }); }} />
- <TextField disabled={!setting.enableTimeEditor} spellCheck={false} autoFocus margin="dense" id="end" label="End (Local DateTime)" type="datetime-local" fullWidth value={this.state.end} onChange={(event) => { this.setState({ end: event.target.value }); }} />
- <FormControl fullWidth disabled={!setting.enableTimeEditor}>
+ <TextField variant="standard" disabled={!setting.enableTimeEditor} spellCheck={false} autoFocus margin="dense" id="start" label="Start (Local DateTime)" type="datetime-local" fullWidth value={this.state.start} onChange={(event) => { this.setState({ start: event.target.value }); }} />
+ <TextField variant="standard" disabled={!setting.enableTimeEditor} spellCheck={false} autoFocus margin="dense" id="end" label="End (Local DateTime)" type="datetime-local" fullWidth value={this.state.end} onChange={(event) => { this.setState({ end: event.target.value }); }} />
+ <FormControl variant="standard" fullWidth disabled={!setting.enableTimeEditor}>
<InputLabel htmlFor="active">Active</InputLabel>
- <Select value={this.state.active || false} onChange={(event) => {
+ <Select variant="standard" value={this.state.active || false} onChange={(event) => {
this.setState({ active: event.target.value as any as boolean });
}} inputProps={{ name: 'active', id: 'active' }} fullWidth >
<MenuItem value={true as any as string}>active</MenuItem>
@@ -155,7 +155,7 @@ class EditMaintenenceEntryDIalogComponent extends React.Component<EditMaintenenc
event.preventDefault();
event.stopPropagation();
- }} > {setting.applyButtonText} </Button>
+ }} color="inherit" > {setting.applyButtonText} </Button>
<Button onClick={(event) => {
this.onCancel();
event.preventDefault();
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/components/refreshMaintenanceEntries.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/components/refreshMaintenanceEntries.tsx
index 1a00c70c4..c66b6f460 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/components/refreshMaintenanceEntries.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/components/refreshMaintenanceEntries.tsx
@@ -17,12 +17,12 @@
*/
import * as React from 'react';
-import Button from '@material-ui/core/Button';
-import Dialog from '@material-ui/core/Dialog';
-import DialogActions from '@material-ui/core/DialogActions';
-import DialogContent from '@material-ui/core/DialogContent';
-import DialogContentText from '@material-ui/core/DialogContentText';
-import DialogTitle from '@material-ui/core/DialogTitle';
+import Button from '@mui/material/Button';
+import Dialog from '@mui/material/Dialog';
+import DialogActions from '@mui/material/DialogActions';
+import DialogContent from '@mui/material/DialogContent';
+import DialogContentText from '@mui/material/DialogContentText';
+import DialogTitle from '@mui/material/DialogTitle';
import { IDispatcher, connect, Connect } from '../../../../framework/src/flux/connect';
@@ -94,13 +94,13 @@ class RefreshMaintenanceEntriesDialogComponent extends React.Component<RefreshMa
<DialogActions>
<Button aria-label="dialog-confirm-button" onClick={(event) => {
this.onRefresh();
- }} > {setting.applyButtonText} </Button>
+ }} color="inherit" > {setting.applyButtonText} </Button>
<Button aria-label="dialog-cancel-button" onClick={(event) => {
this.onCancel();
}} color="secondary"> {setting.cancelButtonText} </Button>
</DialogActions>
</Dialog>
- )
+ );
}
private onRefresh = () => {
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
index 0be28b748..d040e3dda 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
@@ -17,16 +17,20 @@
*/
import * as React from 'react';
-import { Theme, createStyles, WithStyles, withStyles, Tooltip } from '@material-ui/core';
+import { Theme, Tooltip } from '@mui/material';
+
+import { WithStyles } from '@mui/styles';
+import createStyles from '@mui/styles/createStyles';
+import withStyles from '@mui/styles/withStyles';
import { faBan } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import AddIcon from '@material-ui/icons/Add';
-import EditIcon from '@material-ui/icons/Edit';
-import RemoveIcon from '@material-ui/icons/RemoveCircleOutline';
-import Refresh from '@material-ui/icons/Refresh';
-import { MenuItem, Divider, Typography } from '@material-ui/core';
+import AddIcon from '@mui/icons-material/Add';
+import EditIcon from '@mui/icons-material/Edit';
+import RemoveIcon from '@mui/icons-material/RemoveCircleOutline';
+import Refresh from '@mui/icons-material/Refresh';
+import { MenuItem, Divider, Typography } from '@mui/material';
import connect, { IDispatcher, Connect } from '../../../../framework/src/flux/connect';
import MaterialTable, { MaterialTableCtorType, ColumnType } from '../../../../framework/src/components/material-table';
@@ -212,9 +216,7 @@ class MaintenenceViewComponent extends React.Component<MaintenenceViewComponentP
this.setState({
maintenenceEntryToEdit: {
...entry,
- ...(entry.start && endTime)
- ? { start: convertToLocaleString(entry.start), end: convertToLocaleString(entry.end) }
- : { start: convertToLocaleString(startTime), end: convertToLocaleString(endTime) }
+ ...(entry.start && endTime ? { start: convertToLocaleString(entry.start), end: convertToLocaleString(entry.end) } : { start: convertToLocaleString(startTime), end: convertToLocaleString(endTime) })
},
maintenenceEntryEditorMode: EditMaintenenceEntryDialogMode.EditMaintenenceEntry
});
@@ -228,9 +230,7 @@ class MaintenenceViewComponent extends React.Component<MaintenenceViewComponentP
this.setState({
maintenenceEntryToEdit: {
...entry,
- ...(entry.start && endTime)
- ? { start: convertToLocaleString(entry.start), end: convertToLocaleString(entry.end) }
- : { start: convertToLocaleString(startTime), end: convertToLocaleString(endTime) }
+ ...(entry.start && endTime ? { start: convertToLocaleString(entry.start), end: convertToLocaleString(entry.end) } : { start: convertToLocaleString(startTime), end: convertToLocaleString(endTime) })
},
maintenenceEntryEditorMode: EditMaintenenceEntryDialogMode.RemoveMaintenenceEntry
});
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js b/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js
index eb6f785f3..da5cf5880 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js
+++ b/sdnr/wt/odlux/apps/maintenanceApp/webpack.config.js
@@ -86,7 +86,7 @@ module.exports = (env) => {
manifest: require(path.resolve(frameworkPath, "app-manifest.json")),
sourceType: "umd2"
}),
- ...(env === "release") ? [
+ ...(env === "release" ? [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: "'production'",
@@ -104,7 +104,7 @@ module.exports = (env) => {
from: 'index.html',
to: distPath
}]),
- ]
+ ])
],
devServer: {