Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
f380b1ea
Commit
f380b1ea
authored
6 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
OSB-29
: fixed padding of the station statistics
parent
03f5a2d9
No related branches found
No related tags found
2 merge requests
!89
Monitoring maintenance Epic branch merge
,
!1
Resolve OSB-13 "Monitoringmaintenance "
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationStatistics.js
+60
-27
60 additions, 27 deletions
...ew/maintenancedb_view/src/components/StationStatistics.js
with
60 additions
and
27 deletions
LCU/Maintenance/MDB_WebView/maintenancedb_view/src/components/StationStatistics.js
+
60
−
27
View file @
f380b1ea
import
React
,
{
Component
}
from
'
react
'
;
import
AutoLoadWrapper
from
'
../utils/autoLoader.js
'
import
ReactVegaLite
from
'
react-vega-lite
'
import
{
Form
,
Input
}
from
'
reactstrap
'
;
import
{
Navbar
,
Nav
,
NavItem
,
Input
,
NavbarBrand
}
from
'
reactstrap
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
setStationStatisticsTestType
,
setStationStatisticsAveragingWindow
}
from
'
../redux/actions/landingPageActions
'
class
ToolBarC
extends
Component
{
constructor
(
props
){
super
(
props
);
this
.
state
=
{
isNavbarCollapsed
:
true
};
}
setAveragingWindow
(
e
)
{
this
.
props
.
setStationStatisticsAveragingWindow
(
e
.
target
.
value
);
}
...
...
@@ -14,29 +24,41 @@ class ToolBarC extends Component {
setTestType
(
e
)
{
this
.
props
.
setStationStatisticsTestType
(
e
.
target
.
value
);
}
toggle
(){
this
.
setState
({
isNavbarCollapsed
:
!
this
.
state
.
isNavbarCollapsed
});
}
render
()
{
return
(
<
div
className
=
"
sts-toolbar
"
>
<
Form
inline
>
<
select
className
=
"
form-control custom-select custom-select-sm
"
id
=
"
selected-group
"
value
=
{
this
.
props
.
test_type
}
onChange
=
{(
e
)
=>
this
.
setTestType
(
e
)}
style
=
{{
width
:
'
auto
'
}}
>
<
option
value
=
"
B
"
>
Both
test
types
<
/option
>
<
option
value
=
"
R
"
>
RTSM
only
<
/option
>
<
option
value
=
"
S
"
>
StationTest
only
<
/option
>
<
/select
>
<
Input
type
=
"
select
"
className
=
"
form-control custom-select custom-select-sm
"
style
=
{{
top
:
"
0rem !important
"
}}
onChange
=
{(
e
)
=>
this
.
setAveragingWindow
(
e
)}
value
=
{
this
.
props
.
averaging_window
}
>
<
option
value
=
{
1
}
>
day
<
/option
>
<
option
value
=
{
7
}
>
week
<
/option
>
<
option
value
=
{
30
}
>
month
<
/option
>
<
/Input
>
<
Input
type
=
"
select
"
className
=
"
form-control custom-select custom-select-sm
"
onChange
=
{(
e
)
=>
this
.
props
.
switchHistogramEvent
(
e
)}
value
=
{
this
.
props
.
histogramType
}
>
<
option
value
=
"
per_error_type
"
>
per
error
type
<
/option
>
<
option
value
=
"
per_station
"
>
per
station
<
/option
>
<
/Input
>
<
/Form
>
<
/div>
)
;
return
(
<
Nav
className
=
"
ml-auto
"
auto
>
<
NavItem
>
<
select
className
=
"
form-control custom-select custom-select-sm
"
id
=
"
selected-group
"
value
=
{
this
.
props
.
test_type
}
onChange
=
{(
e
)
=>
this
.
setTestType
(
e
)}
style
=
{{
width
:
'
auto
'
}}
>
<
option
value
=
"
B
"
>
Both
test
types
<
/option
>
<
option
value
=
"
R
"
>
RTSM
only
<
/option
>
<
option
value
=
"
S
"
>
StationTest
only
<
/option
>
<
/select
>
<
/NavItem
>
<
NavItem
>
<
Input
type
=
"
select
"
className
=
"
form-control custom-select custom-select-sm
"
style
=
{{
top
:
"
0rem !important
"
}}
onChange
=
{(
e
)
=>
this
.
setAveragingWindow
(
e
)}
value
=
{
this
.
props
.
averaging_window
}
>
<
option
value
=
{
1
}
>
day
<
/option
>
<
option
value
=
{
7
}
>
week
<
/option
>
<
option
value
=
{
30
}
>
month
<
/option
>
<
/Input
>
<
/NavItem
>
<
NavItem
>
<
Input
type
=
"
select
"
className
=
"
form-control custom-select custom-select-sm
"
onChange
=
{(
e
)
=>
this
.
props
.
switchHistogramEvent
(
e
)}
value
=
{
this
.
props
.
histogramType
}
>
<
option
value
=
"
per_error_type
"
>
per
error
type
<
/option
>
<
option
value
=
"
per_station
"
>
per
station
<
/option
>
<
/Input
>
<
/NavItem
>
<
/Nav>
)
;
}
}
...
...
@@ -166,10 +188,21 @@ class StationStatisticsC extends Component {
}
return
(
<
React
.
Fragment
>
<
h5
className
=
"
react-grid-item-header
"
>
Station
statistics
<
ToolBar
histogramType
=
{
this
.
state
.
histogramType
}
switchHistogramEvent
=
{
e
=>
this
.
setState
({
histogramType
:
e
.
target
.
value
})}
/
>
<
/h5
>
<
Navbar
className
=
"
react-grid-item-header justify-content-between
"
style
=
{{
padding
:
"
0
"
}}
>
<
NavbarBrand
style
=
{{
padding
:
"
0
"
}}
>
<
h5
className
=
"
react-grid-item-header
"
>
Station
statistics
<
/h5
>
<
/NavbarBrand
>
<
ToolBar
style
=
{{
padding
:
"
0
"
}}
histogramType
=
{
this
.
state
.
histogramType
}
switchHistogramEvent
=
{
e
=>
this
.
setState
({
histogramType
:
e
.
target
.
value
})}
/
>
<
/Navbar
>
<
div
className
=
"
react-grid-item-body
"
id
=
"
plot
"
ref
=
{
this
.
ref
}
>
<
ReactVegaLite
spec
=
{
spec
}
data
=
{
data
}
enableHover
=
{
true
}
/
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment