From e2c5c7ee1b5c9818ad31360c86a6ce106c9ae311 Mon Sep 17 00:00:00 2001 From: rbokhorst <rbokhorst@astron.nl> Date: Thu, 18 Oct 2018 15:24:30 +0000 Subject: [PATCH] OSB-29: Improved summary table with abbreviations --- .../MDB_WebView/maintenancedb_view/package.json | 2 ++ .../src/components/StationTestSummary.css | 2 +- .../src/components/StationTestSummary.js | 12 +++++++++--- .../maintenancedb_view/src/pages/LandingPage.js | 2 +- .../src/themes/lofar-styles.css | 15 +++++++++------ .../src/themes/lofar-styles.scss | 16 ++++++++++------ .../maintenancedb_view/src/themes/lofar.css | 15 +++++++++------ 7 files changed, 41 insertions(+), 23 deletions(-) diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/package.json b/LCU/Maintenance/MDB_WebView/maintenancedb_view/package.json index 29b7e72adf6..d2225a6809f 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/package.json +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/package.json @@ -16,8 +16,10 @@ "deploy": "npm run build" }, "dependencies": { + "fsevents": "^1.2.4", "axios": "^0.18.0", "bootstrap": "^4.1.3", + "jquery": "^1.9.1", "moment": "^2.22.2", "node-sass-chokidar": "^1.3.3", "react": "^16.4.2", diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.css b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.css index db3ca35c20b..89cff5e0be1 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.css +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.css @@ -11,7 +11,7 @@ .sts-table th { word-break: break-all; - min-width: 4.5rem; } + min-width: 3em; } .sts-table td { text-align: center; } diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.js b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.js index 94c41a5f7e6..65ec9449629 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.js +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationTestSummary.js @@ -1,8 +1,10 @@ import React, { Component } from 'react'; import { Table, Popover, PopoverHeader, PopoverBody, Button, ButtonGroup } from 'reactstrap'; import { unique_id, capitalize } from '../utils/utils.js' +import { componentErrorTypes } from '../utils/constants.js' import AutoLoadWrapper from '../utils/autoLoader.js' import axios from 'axios'; + //import stdata from '../testdata/station_test_summary.js' import './StationTestSummary.css' @@ -56,7 +58,7 @@ class ToolBar extends Component { <div className="sts-toolbar"> { this.props.allErrorTypes ? <Button color="info" size="xs" onClick={() => this.onErrorsOnlyClick()} active>All types</Button> - : <Button color="info" size="xs" onClick={() => this.onErrorsOnlyClick()} outline>All types</Button> + : <Button color="info" size="xs" onClick={() => this.onErrorsOnlyClick()}>All types</Button> } </div> ); @@ -164,13 +166,17 @@ class StationTestSummaryC extends Component { } renderTableHeaders() { - return this.activeErrorTypes.map((err) => <th key={unique_id()}>{ capitalize(err).replace("_", " ") }</th>); + let th = [] + this.activeErrorTypes.forEach((err) => { + th.push( <th key={unique_id()} title={err}>{ componentErrorTypes[err] ? componentErrorTypes[err] : err }</th> ); + }); + return th; } render() { console.log("render stationTestSummary"); - this.setActiveErrorTypes(); + this.setActiveErrorTypes(); return ( <React.Fragment> diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/pages/LandingPage.js b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/pages/LandingPage.js index 573d9edd0b1..bfbe06f7635 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/pages/LandingPage.js +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/pages/LandingPage.js @@ -117,7 +117,7 @@ class LandingPage extends Component { state = { selectedStationGroup: 'A', errorsOnly: false, - period: 7 // days + period: 14 // days } /* Handle changes of selected filters in the ToolBar */ diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.css b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.css index 90f2b355f26..11f694951bd 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.css +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.css @@ -53,11 +53,6 @@ line-height: 1.0; border-radius: .2rem; } -.landing-page-toolbar .btn-info:hover { - color: white; - background-color: #8d8d8d; - border-color: #8d8d8d; } - .popover { max-width: 40em !important; /* Max Width of the popover (depending on the container!) */ } @@ -78,13 +73,21 @@ font-weight: 500; } .landing-page-toolbar .btn-info:not(:disabled):not(.disabled).active, +.sts-toolbar .btn-info:not(:disabled):not(.disabled).active, .landing-page-toolbar .btn-info:not(:disabled):not(.disabled):active, .landing-page-toolbar .show > .btn-info.dropdown-toggle { color: white; background-color: #8d8d8d; border-color: #8d8d8d; } -.landing-page-toolbar .btn-info { +.landing-page-toolbar .btn-info, +.sts-toolbar .btn-info { color: white; background-color: #bdbdbd; border-color: #bdbdbd; } + +.landing-page-toolbar .btn-info:hover, +.sts-toolbar .btn-info:hover { + color: white; + background-color: #8d8d8d; + border-color: #8d8d8d; } diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.scss b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.scss index 0e566ad6ac7..879601175c1 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.scss +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar-styles.scss @@ -59,11 +59,6 @@ $griditem-color: #333333; line-height: 1.0; border-radius: .2rem; } -.landing-page-toolbar .btn-info:hover { - color: $secondary-color; - background-color: $secondary-dark; - border-color: $secondary-dark; -} .popover { max-width: 40em!important; /* Max Width of the popover (depending on the container!) */ @@ -85,6 +80,7 @@ $griditem-color: #333333; font-weight: 500; } .landing-page-toolbar .btn-info:not(:disabled):not(.disabled).active, +.sts-toolbar .btn-info:not(:disabled):not(.disabled).active, .landing-page-toolbar .btn-info:not(:disabled):not(.disabled):active, .landing-page-toolbar .show>.btn-info.dropdown-toggle { color: $secondary-color; @@ -92,8 +88,16 @@ $griditem-color: #333333; border-color: $secondary-dark; } -.landing-page-toolbar .btn-info { +.landing-page-toolbar .btn-info, +.sts-toolbar .btn-info { color: $secondary-color; background-color: $secondary; border-color: $secondary; } + +.landing-page-toolbar .btn-info:hover, +.sts-toolbar .btn-info:hover { + color: $secondary-color; + background-color: $secondary-dark; + border-color: $secondary-dark; +} diff --git a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar.css b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar.css index f837f1578ee..7f9870222ee 100644 --- a/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar.css +++ b/LCU/Maintenance/MDB_WebView/maintenancedb_view/src/themes/lofar.css @@ -6372,11 +6372,6 @@ a.text-dark:hover, a.text-dark:focus { line-height: 1.0; border-radius: .2rem; } -.landing-page-toolbar .btn-info:hover { - color: white; - background-color: #8d8d8d; - border-color: #8d8d8d; } - .popover { max-width: 40em !important; /* Max Width of the popover (depending on the container!) */ } @@ -6397,13 +6392,21 @@ a.text-dark:hover, a.text-dark:focus { font-weight: 500; } .landing-page-toolbar .btn-info:not(:disabled):not(.disabled).active, +.sts-toolbar .btn-info:not(:disabled):not(.disabled).active, .landing-page-toolbar .btn-info:not(:disabled):not(.disabled):active, .landing-page-toolbar .show > .btn-info.dropdown-toggle { color: white; background-color: #8d8d8d; border-color: #8d8d8d; } -.landing-page-toolbar .btn-info { +.landing-page-toolbar .btn-info, +.sts-toolbar .btn-info { color: white; background-color: #bdbdbd; border-color: #bdbdbd; } + +.landing-page-toolbar .btn-info:hover, +.sts-toolbar .btn-info:hover { + color: white; + background-color: #8d8d8d; + border-color: #8d8d8d; } -- GitLab