Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • develop
  • master
2 results

Target

Select target project
  • metobs/MetObsSite
  • wroberts/MetObsSite
  • davidh/MetObsSite
3 results
Select Git revision
  • develop
  • master
2 results
Show changes
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<div id="content"> <div id="content">
<div class="container"> <div class="container">
<h2 class="row">Meteorogram</h2> <h2 class="row">Meteorogram</h2>
<h3>Status: <span id="instrument_status" class="instrument_status_nominal" data-status-stem="aoss/tower">Loading...</span></h3>
<div class="row" style="padding:0 1em"> <div class="row" style="padding:0 1em">
<h4 class="col-sm-12">Timeframe</h4> <h4 class="col-sm-12">Timeframe</h4>
<div class="col-sm-12"> <div class="col-sm-12">
......
# SSEC Lobby Display
The scripts and other files in this directory are used to configure the
displays in the lobby of the AOSS building.
## Mini-dashboard
In the lobby there is a small monitor to the left after entering that displays
a real-time display of data from the AOSS Tower instrument. This display shows
a fullscreen Firefox window showing:
https://metobs.ssec.wisc.edu/aoss/tower/lobby
This page is designed after the legacy Java application by Tom Whittaker. To
burn-in on the monitor the display will go black at certain times of the day.
A version that does not go black is at https://metobs.ssec.wisc.edu/aoss/tower/lobby24-7.
The display is also configured to not start any screensavers or other
power-saving techniques to keep it showing the dashboard.
The system driving the monitor is called `lobby-rig`. It is currently a CentOS
system with Gnome desktop environment. The machine is configured to auto-login
to the `tomw` user account (this may be changed in the future). Various scripts
are placed in `/home/tomw/.config/autostart` and `/home/tomw` in order to get
the Firefox window displayed and other configurations set on startup. These
files are in the `https://gitlab.ssec.wisc.edu/metobs/MetObs` Git repository
in the `lobby_scripts` directory and are described below:
* `lobby.desktop`: Placed in the autostart directory, this initializes the
dashboard by calling the `startup.sh` script.
* `startup.sh`: Placed in the home directory, this starts Firefox pointed to
the lobby web page. It also uses the `xdotool` to make Firefox fullscreen
and refresh the page after it is fullscreen. This refresh is a workaround
for font sizing issue and can be removed in the future. Currently the
version of `xdotool` that comes with CentOS6 has bugs which cause these
`xdotool` commands to not do anything. As a workaround the "Auto Fullscreen"
Firefox extension was installed. After the machine is upgraded to a newer
CentOS this shouldn't be needed anymore (hopefully).
* `noscreensaver.desktop`: This runs `xset.sh` at startup.
* `xset.sh`: This script sets various settings to make sure a screensaver is
is never started.
## Weather Underground Data Upload
In the past the `lobby-rig` machine was also responsible for uploading
realtime data to the Weather Underground service (https://wunderground.com).
This was done by Java code and used the legacy RAIN API. This is now handled
by the AOSS Tower InfluxDB ingest scripts.
# Copy this file to `/home/tomw/.config/autostart/`
[Desktop Entry]
Type=Application
Exec=/home/tomw/startup.sh
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=lobby rig
Name=lobby rig
Comment[en_US]=
Comment=
\ No newline at end of file
# Copy this file to `/home/tomw/.config/autostart/`
[Desktop Entry]
Type=Application
Exec=sh /home/tomw/xset.sh
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=screensaver disable
Name=screensaver disable
Comment[en_US]=disables dpms and xscreensaver
Comment=disables dpms and xscreensaver
\ No newline at end of file
#!/usr/bin/env bash
# Source: https://gitlab.ssec.wisc.edu/metobs/MetObsSite
#xset -dpms s off
firefox -url https://metobs.ssec.wisc.edu/aoss/tower/lobby &
firefox_pid=$!
sleep 45
# These should be used on CentOS 7+ but the version of xdotool that comes
# with CentOS 6 is too old and buggy it seems.
# Resorted to "Auto Fullscreen" Firefox extension:
# https://addons.mozilla.org/en-US/firefox/addon/autofullscreen/
xdotool search --onlyvisible --desktop 0 --class "Firefox" windowactivate key F11
# force refresh until webpage text auto-updates when window size changes
xdotool search --onlyvisible --desktop 0 --class "Firefox" windowactivate key F5
# wait on firefox
wait $!
\ No newline at end of file
#!/usr/bin/env bash
xset -dpms
xset s off
\ No newline at end of file
...@@ -11,7 +11,7 @@ JS_CONF_VARS = { ...@@ -11,7 +11,7 @@ JS_CONF_VARS = {
PATH = 'content' PATH = 'content'
THEME = 'themes/rain-theme' THEME = 'themes/rain-theme'
STATIC_PATHS = ['images', 'css', 'js', 'camera_feeds', 'cgi-bin~'] STATIC_PATHS = ['images', 'css', 'js', 'camera_feeds']
TIMEZONE = 'America/Chicago' TIMEZONE = 'America/Chicago'
DEFAULT_LANG = 'en' DEFAULT_LANG = 'en'
......
/* Instrument Status classes */
span.instrument_status_nominal {
color: green;
}
span.instrument_status_warning {
color: yellow;
}
span.instrument_status_error {
color: red;
}
...@@ -167,7 +167,7 @@ nav{ ...@@ -167,7 +167,7 @@ nav{
position: relative; position: relative;
width: 100%; width: 100%;
height: 55%; height: 55%;
background: url(http://metobs.ssec.wisc.edu/pub/cache/aoss/cameras/north/latest_orig.jpg) no-repeat center 75% scroll; background: url(/pub/cache/aoss/cameras/north/latest_orig.jpg) no-repeat center 75% scroll;
-webkit-background-size: cover; -webkit-background-size: cover;
-moz-background-size: cover; -moz-background-size: cover;
background-size: cover; background-size: cover;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">--> <!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">-->
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" type="text/css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-timepicker/1.8.10/jquery.timepicker.min.css" type="text/css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.3/jquery-ui-timepicker-addon.min.css">
<link rel="stylesheet" href="{{ SITE_URL }}/theme/css/meteorogram_style.css"> <link rel="stylesheet" href="{{ SITE_URL }}/theme/css/meteorogram_style.css">
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
{% block title %}{{ page.title }}{% endblock %} {% block title %}{{ page.title }}{% endblock %}
{% block header %} {% block header %}
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.3/jquery-ui-timepicker-addon.min.css">
<!--<script src="https://code.jquery.com/jquery-1.12.4.js"></script>--> <!--<script src="https://code.jquery.com/jquery-1.12.4.js"></script>-->
<script <script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ui-timepicker-addon/1.6.3/jquery-ui-timepicker-addon.min.js"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock %} {% block title %}{{ page.title }}{% endblock %}
{% block header %} {% block header %}
<script language="javascript" type="text/javascript">
var updateFreq = (60*2 + 15) * 1000
setInterval(function() {
var cameraElement = document.getElementById("cameraImage");
cameraElement.src = "http://metobs.ssec.wisc.edu/aoss/cameras/images/west/small/latest.jpg?" + new Date().getTime;
var aossMeteorogramElement = document.getElementById("aossMeteorogram");
aossMeteorogramElement.src = "http://metobs.ssec.wisc.edu/pub/cache/aoss/tower/latest_quicklook_met.png?" + new Date().getTime;
var buoyMeteorogramElement = document.getElementById("buoyMeteorogram");
buoyMeteorogramElement.src = "http://metobs.ssec.wisc.edu/pub/cache/mendota/buoy/latest_quicklook_met.png?" + new Date().getTime;
}, updateFreq);
</script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{{ page.content }} {{ page.content }}
......
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock %} {% block title %}{{ page.title }}{% endblock %}
{% block header %}
{{ super() }}
<!--Instrument Page Header-->
<link href="/theme/css/instrument.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function(){
var statusElem = $("#instrument_status");
if (statusElem.length == 0) {
return;
}
$.ajax({
type: 'GET',
url: METOBS_API_URL + "/api/status/" + statusElem.attr("data-status-stem") + ".json",
jsonp: "callback",
dataType: "json",
success: function(dataObj){
statusElem.text(dataObj.status_message);
if ((dataObj.status_code & 16) > 0) {
statusElem.removeClass("instrument_status_nominal");
statusElem.addClass("instrument_status_error");
} else if ((dataObj.status_code & 8) > 0) {
statusElem.removeClass("instrument_status_nominal");
statusElem.addClass("instrument_status_warning");
}
}
});
});
</script>
{% endblock %}
{% block content %} {% block content %}
{% include page.url[:-1] + "_header.html" ignore missing %} {% include page.url[:-1] + "_header.html" ignore missing %}
{{page.content}} {{page.content}}
......