Skip to content

Commit

Permalink
Merge pull request #816 from oceanzus/redesign_statusnav
Browse files Browse the repository at this point in the history
Sprint 5 Release
  • Loading branch information
oceanzus authored Mar 3, 2017
2 parents feb1d81 + e39703d commit 4377a3a
Show file tree
Hide file tree
Showing 63 changed files with 3,861 additions and 1,440 deletions.
4 changes: 3 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function(grunt) {
],
"ooiui/static/js/partials/compiled/home.js": [
"ooiui/static/js/partials/home/array_content/ArrayContentSummaryItem.html",
"ooiui/static/js/partials/home/array_content/ArrayStatusSummaryItem.html",
//"ooiui/static/js/partials/home/array_content/ArrayStatusSummaryItem.html",
"ooiui/static/js/partials/home/array_content/PlatformTable.html",
"ooiui/static/js/partials/home/array_content/PlatformTableItem.html"
],
Expand Down Expand Up @@ -966,6 +966,7 @@ module.exports = function(grunt) {
'ooiui/static/js/models/asset_management/PlatformDeploymentModel.js',
'ooiui/static/js/models/science/ArrayModel.js',
'ooiui/static/js/models/science/ArrayStatusModel.js',
'ooiui/static/js/models/asset_management/SiteStatusModel.js',
'ooiui/static/js/models/science/StreamModel.js',
'ooiui/static/js/models/common/MessageModel.js',
'ooiui/static/js/models/common/LoginModel.js',
Expand Down Expand Up @@ -1914,6 +1915,7 @@ module.exports = function(grunt) {
],
"ooiui/static/js/compiled/genericPlatFormsStatus.js": [
'ooiui/static/js/models/asset_management/PlatformStatusModel.js',
'ooiui/static/js/models/asset_management/PlatformsStatusModel.js',
'ooiui/static/js/models/science/StreamStatusModel.js',
'ooiui/static/js/views/platforms/GenericPlatFormStatusView.js',
'ooiui/static/js/views/platforms/GenericPlatFormTableView.js'
Expand Down
13 changes: 9 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"jquery": "~2.1.1",
"d3": "~3.4.13",
"bootstrap": "~3.3.1",
"leaflet": "~0.7.3",
"leaflet": "~1.0.3",
"Leaflet.awesome-markers": "~2.0.2",
"holderjs": "~2.4.1",
"leaflet.markercluster": "~0.4.0",
Expand Down Expand Up @@ -47,7 +47,7 @@
"bootstrap-table": "1.6.0",
"jquery.browser": "~0.0.7",
"bootstrap-editable-table": "~1.0.1",
"jqtree": "~1.0.0",
"jqtree": "~1.3.7",
"x-editable": "~1.5.1",
"showdown": "~0.5.0",
"leaflet.wms": "https://github.com/cgalvarino/leaflet.wms.git#62b489f0f9b83f375f330f0ed60adbc0ce40918c",
Expand All @@ -56,7 +56,6 @@
"nuxeo": "~0.5.1",
"highcharts": "4.1.6",
"highchart-export-csv": "*",
"Leaflet.EasyButton": "~1.1.0",
"bootstrap-validator": "~0.9.0",
"jquery-sticky-table-headers": "https://github.com/jmosbech/StickyTableHeaders.git",
"slick-carousel": "~1.5.9",
Expand All @@ -66,7 +65,13 @@
"requirejs": "~2.2.0",
"moment-range": "^2.2.0",
"jQRangeSlider": "https://github.com/maka-io/jQRangeSlider.git#master",
"visavail": "https://github.com/flrs/visavail.git#master"
"visavail": "https://github.com/flrs/visavail.git#master",
"mapbox-gl-js": "https://github.com/mapbox/mapbox-gl-js.git#0.17.0",
"mapbox.js": "~3.0.1",
"leaflet-plugins": "~3.0.0",
"Leaflet.Coordinates" : "https://github.com/MrMufflon/Leaflet.Coordinates.git#v0.1.5",
"Leaflet.Rrose" : "https://github.com/erictheise/rrose.git#v0.2.0",
"leaflet-omnivore" : "~v0.3.4"
},
"resolutions": {
"jquery": "~2.1.1",
Expand Down
24 changes: 15 additions & 9 deletions ooiui/core/routes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def statusUI():
def statusN():
return render_template('common/statusN.html', tracking=app.config['GOOGLE_ANALYTICS'])

@app.route('/statustree')
def statusTree():
return render_template('common/statusTree.html', tracking=app.config['GOOGLE_ANALYTICS'])


@app.route('/api/organization', methods=['GET'])
def get_organization():
Expand Down Expand Up @@ -651,13 +655,15 @@ def send_ses(fromaddr, subject, body, recipient):
return ex.message


@app.route('/api/data_availability', methods=['GET'])
def get_data_availability():
@app.route('/api/data_availability/<string:ref_des>', methods=['GET'])
def get_data_availability(ref_des):
# Mocked services response based on https://ooi.visualocean.net/instruments/view/RS01SBPD-DP01A-01-CTDPFL104#stats
stats_data = {"operational_status":[["2014-11-01",1,"2014-12-01"],["2014-12-01",1,"2015-01-01"],["2015-01-01",1,"2015-02-01"],["2015-02-01",0,"2015-03-01"],["2015-03-01",0,"2015-04-01"],["2015-04-01",0,"2015-05-01"],["2015-05-01",0,"2015-06-01"],["2015-06-01",0,"2015-07-01"],["2015-07-01",0,"2015-08-01"],["2015-08-01",1,"2015-09-01"],["2015-09-01",1,"2015-10-01"],["2015-10-01",1,"2015-11-01"],["2015-11-01",1,"2015-12-01"],["2015-12-01",1,"2016-01-01"],["2016-01-01",1,"2016-02-01"],["2016-02-01",0,"2016-03-01"],["2016-03-01",0,"2016-04-01"],["2016-04-01",0,"2016-05-01"],["2016-05-01",0,"2016-06-01"],["2016-06-01",0,"2016-07-01"],["2016-07-01",0,"2016-08-01"],["2016-08-01",0,"2016-09-01"],["2016-09-01",0,"2016-10-01"],["2016-10-01",0,"2016-11-01"]],
"cassandra_ts":[["2014-11-01",0,"2014-12-01"],["2014-12-01",0,"2015-01-01"],["2015-01-01",0,"2015-02-01"],["2015-02-01",0,"2015-03-01"],["2015-03-01",0,"2015-04-01"],["2015-04-01",0,"2015-05-01"],["2015-05-01",0,"2015-06-01"],["2015-06-01",0,"2015-07-01"],["2015-07-01",0,"2015-08-01"],["2015-08-01",0,"2015-09-01"],["2015-09-01",0,"2015-10-01"],["2015-10-01",0,"2015-11-01"],["2015-11-01",0,"2015-12-01"],["2015-12-01",0,"2016-01-01"],["2016-01-01",0,"2016-02-01"],["2016-02-01",0,"2016-03-01"],["2016-03-01",0,"2016-04-01"],["2016-04-01",0,"2016-05-01"],["2016-05-01",0,"2016-06-01"],["2016-06-01",0,"2016-07-01"],["2016-07-01",0,"2016-08-01"],["2016-08-01",0,"2016-09-01"],["2016-09-01",0,"2016-10-01"],["2016-10-01",0,"2016-11-01"]],
"cassandra_rec":[["2014-11-01",0,"2014-12-01"],["2014-12-01",0,"2015-01-01"],["2015-01-01",0,"2015-02-01"],["2015-02-01",0,"2015-03-01"],["2015-03-01",0,"2015-04-01"],["2015-04-01",0,"2015-05-01"],["2015-05-01",0,"2015-06-01"],["2015-06-01",0,"2015-07-01"],["2015-07-01",1,"2015-08-01"],["2015-08-01",1,"2015-09-01"],["2015-09-01",1,"2015-10-01"],["2015-10-01",1,"2015-11-01"],["2015-11-01",0,"2015-12-01"],["2015-12-01",0,"2016-01-01"],["2016-01-01",0,"2016-02-01"],["2016-02-01",0,"2016-03-01"],["2016-03-01",0,"2016-04-01"],["2016-04-01",0,"2016-05-01"],["2016-05-01",0,"2016-06-01"],["2016-06-01",0,"2016-07-01"],["2016-07-01",0,"2016-08-01"],["2016-08-01",0,"2016-09-01"],["2016-09-01",0,"2016-10-01"],["2016-10-01",0,"2016-11-01"]]
}
status_code = 200
response = jsonify({'ref_des': "RS01SBPD-DP01A-01-CTDPFL104", 'stats_data': stats_data})
return response, status_code
# stats_data = {"operational_status":[["2014-11-01",1,"2014-12-01"],["2014-12-01",1,"2015-01-01"],["2015-01-01",1,"2015-02-01"],["2015-02-01",0,"2015-03-01"],["2015-03-01",0,"2015-04-01"],["2015-04-01",0,"2015-05-01"],["2015-05-01",0,"2015-06-01"],["2015-06-01",0,"2015-07-01"],["2015-07-01",0,"2015-08-01"],["2015-08-01",1,"2015-09-01"],["2015-09-01",1,"2015-10-01"],["2015-10-01",1,"2015-11-01"],["2015-11-01",1,"2015-12-01"],["2015-12-01",1,"2016-01-01"],["2016-01-01",1,"2016-02-01"],["2016-02-01",0,"2016-03-01"],["2016-03-01",0,"2016-04-01"],["2016-04-01",0,"2016-05-01"],["2016-05-01",0,"2016-06-01"],["2016-06-01",0,"2016-07-01"],["2016-07-01",0,"2016-08-01"],["2016-08-01",0,"2016-09-01"],["2016-09-01",0,"2016-10-01"],["2016-10-01",0,"2016-11-01"]],
# "cassandra_ts":[["2014-11-01",0,"2014-12-01"],["2014-12-01",0,"2015-01-01"],["2015-01-01",0,"2015-02-01"],["2015-02-01",0,"2015-03-01"],["2015-03-01",0,"2015-04-01"],["2015-04-01",0,"2015-05-01"],["2015-05-01",0,"2015-06-01"],["2015-06-01",0,"2015-07-01"],["2015-07-01",0,"2015-08-01"],["2015-08-01",0,"2015-09-01"],["2015-09-01",0,"2015-10-01"],["2015-10-01",0,"2015-11-01"],["2015-11-01",0,"2015-12-01"],["2015-12-01",0,"2016-01-01"],["2016-01-01",0,"2016-02-01"],["2016-02-01",0,"2016-03-01"],["2016-03-01",0,"2016-04-01"],["2016-04-01",0,"2016-05-01"],["2016-05-01",0,"2016-06-01"],["2016-06-01",0,"2016-07-01"],["2016-07-01",0,"2016-08-01"],["2016-08-01",0,"2016-09-01"],["2016-09-01",0,"2016-10-01"],["2016-10-01",0,"2016-11-01"]],
# "cassandra_rec":[["2014-11-01",0,"2014-12-01"],["2014-12-01",0,"2015-01-01"],["2015-01-01",0,"2015-02-01"],["2015-02-01",0,"2015-03-01"],["2015-03-01",0,"2015-04-01"],["2015-04-01",0,"2015-05-01"],["2015-05-01",0,"2015-06-01"],["2015-06-01",0,"2015-07-01"],["2015-07-01",1,"2015-08-01"],["2015-08-01",1,"2015-09-01"],["2015-09-01",1,"2015-10-01"],["2015-10-01",1,"2015-11-01"],["2015-11-01",0,"2015-12-01"],["2015-12-01",0,"2016-01-01"],["2016-01-01",0,"2016-02-01"],["2016-02-01",0,"2016-03-01"],["2016-03-01",0,"2016-04-01"],["2016-04-01",0,"2016-05-01"],["2016-05-01",0,"2016-06-01"],["2016-06-01",0,"2016-07-01"],["2016-07-01",0,"2016-08-01"],["2016-08-01",0,"2016-09-01"],["2016-09-01",0,"2016-10-01"],["2016-10-01",0,"2016-11-01"]]
# }
# status_code = 200
# response = jsonify({'ref_des': "RS01SBPD-DP01A-01-CTDPFL104", 'stats_data': stats_data})
# return response, status_code
resp = requests.get('http://uframe-test.intra.oceanobservatories.org:9000/available/'+ref_des, params=request.args)
return resp.text, resp.status_code
41 changes: 32 additions & 9 deletions ooiui/core/routes/science.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,22 @@ def getUframeMultiStreamInterp():
'''
try:
# Parse the parameters
stream1 = request.args['stream1']
stream2 = request.args['stream2']
instr1 = request.args['instrument1']
instr2 = request.args['instrument2']
ref_des1 = request.args['ref_des1']
ref_des2 = request.args['ref_des2']
instr1 = request.args['instr1']
instr2 = request.args['instr2']
var1 = request.args['var1']
var2 = request.args['var2']
startdate = request.args['startdate']
enddate = request.args['enddate']

# Build the URL
params = '?startdate=%s&enddate=%s' % (startdate, enddate)
data_url = "/".join([app.config['SERVICES_URL'], 'uframe/get_multistream', stream1, stream2, instr1, instr2, var1, var2 + params])
# http://localhost:4000/uframe/get_multistream/CP05MOAS-GL340-03-CTDGVM000/CP05MOAS-GL340-02-FLORTM000/telemetered_ctdgv_m_glider_instrument/
# telemetered_flort_m_glider_instrument/sci_water_pressure/sci_flbbcd_chlor_units?startdate=2015-05-07T02:49:22.745Z&enddate=2015-06-28T04:00:41.282Z
data_url = "/".join([app.config['SERVICES_URL'], 'uframe/get_multistream', ref_des1, ref_des2, instr1, instr2, var1, var2 + params])

print data_url

# Get the response
response = requests.get(data_url, params=request.args)
Expand Down Expand Up @@ -239,20 +243,39 @@ def array_proxy():

@app.route('/api/uframe/status/arrays')
def status_arrays():
response = requests.get(app.config['SERVICES_URL'] + '/uframe/status/arrays', params=request.args)
return response.text, response.status_code
try:
response = requests.get(app.config['SERVICES_URL'] + '/uframe/status/arrays', params=request.args)
return response.text, response.status_code
except Exception, e:
print "error" + e.message
return "Error getting array status from services", 400


@app.route('/api/uframe/status/sites/<string:array_code>')
def status_sites(array_code):
if request.args:
array_code = request.args['node']
response = requests.get(app.config['SERVICES_URL'] + '/uframe/status/sites/%s' % array_code, params=request.args)
return response.text, response.status_code


@app.route('/api/uframe/status/sites')
def status_sites_tree():
if request.args:
array_code = request.args['node']
else:
return "Bad node parameter", 400
response = requests.get(app.config['SERVICES_URL'] + '/uframe/status/sites/%s' % array_code, params=request.args)
return response.text, response.status_code


@app.route('/api/uframe/status/platforms/<string:array_code>')
def status_platforms(array_code):
response = requests.get(app.config['SERVICES_URL'] + '/uframe/status/platforms/%s' % array_code, params=request.args)
return response.text, response.status_code
if array_code:
response = requests.get(app.config['SERVICES_URL'] + '/uframe/status/platforms/%s' % array_code, params=request.args)
return response.text, response.status_code
else:
return "No platform status response.", 500


@app.route('/api/uframe/status/instrument/<string:ref_des>')
Expand Down
1 change: 1 addition & 0 deletions ooiui/static/css/common/assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tr.highlight-row {
}

div.panel {
width: 100%;
}

div.panel-heading {
Expand Down
2 changes: 1 addition & 1 deletion ooiui/static/css/common/newEvent.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
text-decoration: none;
}
div.image {
content: url(/img/modal/OOI_Banner.png);
content: url("/img/modal/OOI_Banner.svg");
margin-left: auto;
margin-right: auto;
margin-top: -20px;
Expand Down
74 changes: 69 additions & 5 deletions ooiui/static/css/common/platform.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.platform-page {}

.platform-page #platform-view-content h2 {
padding-top: 20px;
padding-top: 25px;
}

.platform-page #platform-view-content .panel {
padding: 0 20px 0 20px;
padding: 0 25px 0 25px;
}

div#wrapper.platform-page {
Expand Down Expand Up @@ -79,17 +79,25 @@ div#wrapper.platform-page {
}

.mooringIcon{
border-radius: 38px;
border-radius: 48px;
background: orange;
border: 2px solid #000;
opacity: 1;
}

.otherMooringIcon{
border-radius: 48px;
background: teal;
border: 2px solid #000;
opacity: 0.85;
}

.otherMooringIcon{
.otherSitesIcon{
border-radius: 48px;
background: yellow;
background: green;
border: 2px solid #000;
opacity: 0.85;
z-index: -100000;
}

.centered {
Expand All @@ -99,3 +107,59 @@ div#wrapper.platform-page {
/* bring your own prefixes */
transform: translate(-50%, -50%);
}
/*dark gray Not Operational 96 96 96 606060
gray Unavailable 160 160 160 A0A0A0
light gray Pending 224 224 224 E0E0E0
blue Not Evaluated 0 76 153 004C00
orange Suspect 204 102 0 CC6600
red Fail 204 0 0 CC0000
green Pass 0 204 0 00CC00
dark green Good 0 102 0 006600*/

.fa.fa-circle.failed {
color: #CC0000;
font-size: 16px;
float: left;
}

.fa.fa-circle.degraded {
color: #CC6600;
font-size: 16px;
float: left;
}

.fa.fa-circle.removedFromService {
color: #606060;
font-size: 16px;
float: left;
}

.fa.fa-circle.notTracked {
color: blue;
font-size: 16px;
float: left;
}

.fa.fa-circle.fetchingStatusFailed {
color: #A0A0A0;
font-size: 16px;
float: left;
}

.fa.fa-circle.noStatusReturned {
color: #A0A0A0;
font-size: 16px;
float: left;
}

.fa.fa-circle.operational {
color: #00CC00;
font-size: 16px;
float: left;
}

.fa.fa-circle.unknownStatusResult {
color: #A0A0A0;
font-size: 16px;
float: left;
}
6 changes: 3 additions & 3 deletions ooiui/static/css/common/plotting.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
/*******************/

div#plottingBody {
margin-left: 20px;
padding-right: 50px;
margin-left: 5px;
padding-right: 5px;
max-height: 700px;
max-width: 1560px;
max-width: 100%;
min-width: 881px;
}
/* ~vertical buttons on sidebar~ */
Expand Down
2 changes: 1 addition & 1 deletion ooiui/static/css/common/scienceLayout.css
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ body {
}

.navbar-top-links li:last-child {
margin-right: 15px;
/*margin-right: 15px;*/
}

.navbar-top-links li a {
Expand Down
5 changes: 4 additions & 1 deletion ooiui/static/css/common/toc_menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ label.platform > font, label.assembly > font, label.instrument > font {
padding-left: 0px;
margin-right: 0px;
margin-left: 0px;
width: 1520px;
/*width: 1520px;*/
max-width: 100% !important;
width: auto !important;
border-color: transparent;
background-color: transparent;
min-height: 600px;
}
label.instrument > span {
display: block;
Expand Down
Loading

0 comments on commit 4377a3a

Please sign in to comment.