summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/maintenanceApp
diff options
context:
space:
mode:
authorHerbert Eiselt <herbert.eiselt@highstreet-technologies.com>2019-04-03 17:12:30 +0200
committerHerbert Eiselt <herbert.eiselt@highstreet-technologies.com>2019-04-03 17:13:01 +0200
commit97fa6d943c57a784a52462aaacb329ce93cf42d6 (patch)
treeb5f0f2484c0a886fcade7b9bcf1d230e6f9e9501 /sdnr/wt/odlux/apps/maintenanceApp
parent3d6dd098db8ec243ca716a09fc55decbdd23b726 (diff)
SDN-R odlux configuration
Add odlux configuration app Change-Id: Ifecd3f6e1e3060a1fd1008f1f625a70cb2475a8a Issue-ID: SDNC-584 Signed-off-by: Herbert Eiselt <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/maintenanceApp')
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
index 0a8ad4a59..b9ea8ffa1 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
+++ b/sdnr/wt/odlux/apps/maintenanceApp/src/views/maintenenceView.tsx
@@ -2,6 +2,9 @@ import * as React from 'react';
import { Theme, createStyles, WithStyles, withStyles, Tooltip } from '@material-ui/core';
+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';
@@ -94,12 +97,18 @@ class MaintenenceViewComponent extends React.Component<MaintenenceViewComponentP
});
}
};
+ const now = new Date().valueOf();
return (
<>
<MaintenenceEntriesTable asynchronus rows={this.props.maintenenceEntries} customActionButtons={[ addMaintenenceEntryAction ]} columns={
[
- { property: "mountId", title: "Mount Id", type: ColumnType.text },
- { property: "active", title: "Active", type: ColumnType.boolean, labels: { "true": "active", "false": "not active" }, },
+ { property: "mountId", title: "Mount Id", type: ColumnType.text },
+ {
+ property: "notifications", title: "Notification", width: 50, align: "center", type: ColumnType.custom, customControl: ({ rowData }) => (
+ rowData.active && (Date.parse(rowData.start).valueOf() <= now) && (Date.parse(rowData.end).valueOf() >= now) && <FontAwesomeIcon icon={faBan} /> || null
+ )
+ },
+ { property: "active", title: "Activation State", type: ColumnType.boolean, labels: { "true": "active", "false": "not active" }, },
{ property: "start", title: "Start Date", type: ColumnType.text },
{ property: "end", title: "End Date", type: ColumnType.text },
{ property: "actions", title: "Actions", type: ColumnType.custom, customControl : ({ rowData })=>(