cleanup
1339
web/static/css/bootstrap-grid.css
vendored
1
web/static/css/bootstrap-grid.min.css
vendored
459
web/static/css/bootstrap-reboot.css
vendored
@@ -1,459 +0,0 @@
|
||||
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
line-height: 1.15;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
hr {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
text-decoration: underline;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
line-height: 1.15;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
legend {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: inherit;
|
||||
display: table;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
progress {
|
||||
display: inline-block;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
details,
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
-webkit-box-sizing: inherit;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
|
||||
html {
|
||||
-ms-overflow-style: scrollbar;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
color: #292b2c;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0275d8;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:focus, a:hover {
|
||||
color: #014c8c;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a,
|
||||
area,
|
||||
button,
|
||||
[role="button"],
|
||||
input,
|
||||
label,
|
||||
select,
|
||||
summary,
|
||||
textarea {
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
color: #636c72;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea {
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
input[type="radio"]:disabled,
|
||||
input[type="checkbox"]:disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||
1
web/static/css/bootstrap-reboot.min.css
vendored
@@ -1 +0,0 @@
|
||||
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}html{-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}body{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{cursor:help}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}a{color:#0275d8;text-decoration:none}a:focus,a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle}[role=button]{cursor:pointer}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse;background-color:transparent}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,select,textarea{line-height:inherit}input[type=checkbox]:disabled,input[type=radio]:disabled{cursor:not-allowed}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit}input[type=search]{-webkit-appearance:none}output{display:inline-block}[hidden]{display:none!important}/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../../scss/_normalize.scss","bootstrap-reboot.css","../../scss/_reboot.scss","../../scss/_variables.scss","../../scss/mixins/_hover.scss"],"names":[],"mappings":"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"}
|
||||
9320
web/static/css/bootstrap.css
vendored
6
web/static/css/bootstrap.min.css
vendored
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* Base structure
|
||||
*/
|
||||
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Typography
|
||||
*/
|
||||
|
||||
h1 {
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 9px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
*/
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.sidebar {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.sidebar .nav {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.sidebar .nav-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sidebar .nav-item + .nav-item {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sidebar .nav-link {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dashboard
|
||||
*/
|
||||
|
||||
/* Placeholders */
|
||||
.placeholders {
|
||||
padding-bottom: 3rem;
|
||||
}
|
||||
|
||||
.placeholder img {
|
||||
padding-top: 1.5rem;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/*BODY{font-family:monospace; background-color: #fafafa; padding: 0px; margin:0px;}*/
|
||||
div.textbox{
|
||||
width: 50em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 2em;
|
||||
padding: 3em;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 2px solid #000;
|
||||
border-right: 2px solid #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
/*H1{font-size: 2em;}
|
||||
H2{font-size: 1em; color: #666;}
|
||||
h3{font-size: 0.8em; coloe: #eee;}
|
||||
TABLE{border:1px solid grey;}
|
||||
TD{padding: 2px;}
|
||||
TH{background-color: #eee;}*/
|
||||
IMG#profile{
|
||||
float: left;
|
||||
margin-right: 2em;
|
||||
margin-bottom: 4em;
|
||||
margin-top:4em;
|
||||
}
|
||||
#header{
|
||||
border-bottom: 2px solid #000;
|
||||
margin-bottom: 4em;
|
||||
padding: 8em;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 1em;
|
||||
background-color: #fff;
|
||||
}
|
||||
#footer{
|
||||
font-size: 0.5em;
|
||||
color: #777;
|
||||
margin: 0px;
|
||||
margin-top: 4em;
|
||||
padding: 10em;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 4em;
|
||||
border-top: 1px solid #ddd;
|
||||
background-color: #fefefe;
|
||||
}
|
||||
#menu{
|
||||
float: right;
|
||||
}
|
||||
.menuitem{
|
||||
float: left;
|
||||
font-size: 1.5em;
|
||||
color: #000;
|
||||
}
|
||||
.menuitem_current{
|
||||
float: left;
|
||||
font-size: 1.5em;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.menuitem a{
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
.menuitem a:hover{
|
||||
color: #600;
|
||||
}
|
||||
.cleaner{
|
||||
clear: both;
|
||||
display: inline;
|
||||
height: 0px;
|
||||
}
|
||||
#logo{
|
||||
|
||||
}
|
||||
.left{float: left;}
|
||||
.right{float: right;}
|
||||
@@ -1,117 +0,0 @@
|
||||
/**
|
||||
* Default styles for the dygraphs charting library.
|
||||
*/
|
||||
|
||||
.dygraph-legend {
|
||||
position: absolute;
|
||||
font-size: 14px;
|
||||
z-index: 10;
|
||||
width: 250px; /* labelsDivWidth */
|
||||
/*
|
||||
dygraphs determines these based on the presence of chart labels.
|
||||
It might make more sense to create a wrapper div around the chart proper.
|
||||
top: 0px;
|
||||
right: 2px;
|
||||
*/
|
||||
background: white;
|
||||
line-height: normal;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* styles for a solid line in the legend */
|
||||
.dygraph-legend-line {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
bottom: .5ex;
|
||||
padding-left: 1em;
|
||||
height: 1px;
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-style: solid;
|
||||
/* border-bottom-color is set based on the series color */
|
||||
}
|
||||
|
||||
/* styles for a dashed line in the legend, e.g. when strokePattern is set */
|
||||
.dygraph-legend-dash {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
bottom: .5ex;
|
||||
height: 1px;
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-style: solid;
|
||||
/* border-bottom-color is set based on the series color */
|
||||
/* margin-right is set based on the stroke pattern */
|
||||
/* padding-left is set based on the stroke pattern */
|
||||
}
|
||||
|
||||
.dygraph-roller {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* This class is shared by all annotations, including those with icons */
|
||||
.dygraph-annotation {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* This class only applies to annotations without icons */
|
||||
/* Old class name: .dygraphDefaultAnnotation */
|
||||
.dygraph-default-annotation {
|
||||
border: 1px solid black;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dygraph-axis-label {
|
||||
/* position: absolute; */
|
||||
/* font-size: 14px; */
|
||||
z-index: 10;
|
||||
line-height: normal;
|
||||
overflow: hidden;
|
||||
color: black; /* replaces old axisLabelColor option */
|
||||
}
|
||||
|
||||
.dygraph-axis-label-x {
|
||||
}
|
||||
|
||||
.dygraph-axis-label-y {
|
||||
}
|
||||
|
||||
.dygraph-axis-label-y2 {
|
||||
}
|
||||
|
||||
.dygraph-title {
|
||||
font-weight: bold;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
/* font-size: based on titleHeight option */
|
||||
}
|
||||
|
||||
.dygraph-xlabel {
|
||||
text-align: center;
|
||||
/* font-size: based on xLabelHeight option */
|
||||
}
|
||||
|
||||
/* For y-axis label */
|
||||
.dygraph-label-rotate-left {
|
||||
text-align: center;
|
||||
/* See http://caniuse.com/#feat=transforms2d */
|
||||
transform: rotate(90deg);
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
}
|
||||
|
||||
/* For y2-axis label */
|
||||
.dygraph-label-rotate-right {
|
||||
text-align: center;
|
||||
/* See http://caniuse.com/#feat=transforms2d */
|
||||
transform: rotate(-90deg);
|
||||
-webkit-transform: rotate(-90deg);
|
||||
-moz-transform: rotate(-90deg);
|
||||
-o-transform: rotate(-90deg);
|
||||
-ms-transform: rotate(-90deg);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
3535
web/static/js/bootstrap.js
vendored
7
web/static/js/bootstrap.min.js
vendored
6
web/static/js/dygraph.min.js
vendored
@@ -1,24 +0,0 @@
|
||||
/*!
|
||||
* IE10 viewport hack for Surface/desktop Windows 8 bug
|
||||
* Copyright 2014-2017 The Bootstrap Authors
|
||||
* Copyright 2014-2017 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
// See the Getting Started docs for more information:
|
||||
// https://getbootstrap.com/getting-started/#support-ie10-width
|
||||
|
||||
(function () {
|
||||
'use strict'
|
||||
|
||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||
var msViewportStyle = document.createElement('style')
|
||||
msViewportStyle.appendChild(
|
||||
document.createTextNode(
|
||||
'@-ms-viewport{width:auto!important}'
|
||||
)
|
||||
)
|
||||
document.head.appendChild(msViewportStyle)
|
||||
}
|
||||
|
||||
}())
|
||||
@@ -1,166 +0,0 @@
|
||||
var hours = 24;
|
||||
var granularity = '5m';
|
||||
var end = 0;
|
||||
var retention = 'monthly';
|
||||
var graphdata = "https://bastart.spoton.cz/data/solar_monitor?range=24h&granularity=5m&end=0h&retention=monthly";
|
||||
sol = new Dygraph(
|
||||
document.getElementById("solar"),
|
||||
graphdata
|
||||
,{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [44.5,55]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
independentTicks: true,
|
||||
customBars: true,
|
||||
valueRange: [0,1300]
|
||||
}
|
||||
},
|
||||
rollPeriod: 3,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'P_solar': {
|
||||
axis: 'y2',
|
||||
color: '#ff5500'
|
||||
},
|
||||
'V_array': {
|
||||
axis: 'y',
|
||||
color: '#666'
|
||||
}
|
||||
},
|
||||
ylabel: '<span style="color:#666;">Battery [V]</span>',
|
||||
y2label: '<span style="color:#ff2200;">Power [W]</span>',
|
||||
labelsDiv: 'solar_labels',
|
||||
legend: 'always',
|
||||
customBars: true
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
function refreshGraph(){
|
||||
graphdata = "https://bastart.spoton.cz/data/solar_monitor?range=" + hours + "h&granularity=" + granularity + "&end=" + end + "h&retention=" + retention;
|
||||
sol.updateOptions({'file': graphdata});
|
||||
}
|
||||
|
||||
function setHours(hours_to_set){
|
||||
hours = hours_to_set;
|
||||
switch(hours){
|
||||
case '1':
|
||||
granularity = '10s';
|
||||
retention = 'monthly';
|
||||
break;
|
||||
case '6':
|
||||
granularity = '10s';
|
||||
retention = 'monthly';
|
||||
break;
|
||||
case '12':
|
||||
granularity = '2m';
|
||||
retention = 'monthly';
|
||||
break;
|
||||
case '24':
|
||||
granularity = '5m';
|
||||
retention = 'monthly';
|
||||
break;
|
||||
case '168':
|
||||
granularity = '15m';
|
||||
retention = 'monthly';
|
||||
break;
|
||||
case '720':
|
||||
granularity = '3h';
|
||||
retention = 'yearly';
|
||||
break;
|
||||
case '8760':
|
||||
granularity = '6h';
|
||||
retention = 'yearly';
|
||||
break;
|
||||
case '87600':
|
||||
granularity = '24h';
|
||||
retention = 'yearly';
|
||||
break;
|
||||
default:
|
||||
granularity = '5m';
|
||||
retention = 'monthly';
|
||||
}
|
||||
end = 0;
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph();
|
||||
}
|
||||
|
||||
function setBack(){
|
||||
// range=1h -> range=2h&end=1h
|
||||
disp_range = hours*1 - end*1;
|
||||
hours = hours*1 + disp_range;
|
||||
end = end*1 + disp_range;
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph();
|
||||
}
|
||||
|
||||
function setForth(){
|
||||
disp_range = hours*1 - end*1;
|
||||
hours = hours*1 - disp_range;
|
||||
if(hours < disp_range){
|
||||
hours = disp_range;
|
||||
}
|
||||
end = end*1 - disp_range;
|
||||
if(end < 0){
|
||||
end = 0;
|
||||
}
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph();
|
||||
}
|
||||
|
||||
function getPageContents(callback,url,params) {
|
||||
if (window.XMLHttpRequest){
|
||||
// code for IE7+, Firefox, Chrome, Opera, Safari, SeaMonkey
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
}
|
||||
else{
|
||||
// code for IE6, IE5
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
if(params!=null) {
|
||||
xmlhttp.open("POST", url, true);
|
||||
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
} else {
|
||||
xmlhttp.open("GET", url, true);
|
||||
}
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||
callback(xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
xmlhttp.send(params);
|
||||
}
|
||||
|
||||
counter = 0;
|
||||
function refreshValues(){
|
||||
fresh_vals_url = '/data/solar_realtime_data?type=json'
|
||||
getPageContents(function(result){freshVals=JSON.parse(result);},
|
||||
fresh_vals_url)
|
||||
document.getElementById('timestamp').innerHTML = freshVals.time;
|
||||
document.getElementById('array_voltage').innerHTML = freshVals.V_array;
|
||||
document.getElementById('array_percent').innerHTML = freshVals.perc_array;
|
||||
document.getElementById('charge_current').innerHTML = freshVals.ChCurr;
|
||||
document.getElementById('solar_power').innerHTML = freshVals.Psol;
|
||||
document.getElementById('pmax_day').innerHTML = freshVals.Pmax_day;
|
||||
counter = counter + 5000;
|
||||
if(counter >= 360000){
|
||||
refreshGraph();
|
||||
document.getElementById('graph_timestamp').innerHTML = freshVals.time;
|
||||
counter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var intervalVal = setInterval(refreshValues, 5000);
|
||||
@@ -1,174 +0,0 @@
|
||||
var hours = 24;
|
||||
var granularity = '2m';
|
||||
var end = 0;
|
||||
var solcapdata = "https://bastart.spoton.cz/data/solcap_monitor?range=24h&granularity=2m&end=0h";
|
||||
var cpumemdata = "https://bastart.spoton.cz/data/cpumem_monitor?range=24h&granularity=2m&end=0h";
|
||||
|
||||
solcap = new Dygraph(
|
||||
// containing div
|
||||
document.getElementById("solcap"),
|
||||
// CSV or path to a CSV file.
|
||||
solcapdata
|
||||
,{
|
||||
//labels: ['time','Solar','Capacitor'],
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [0,4.6]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [0,8.6],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'Solar': {
|
||||
axis: 'y',
|
||||
color: '#888844',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.4
|
||||
},
|
||||
'Capacitor': {
|
||||
axis: 'y2',
|
||||
color: '#884444'
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#888844;">Solar Irradiance</span>',
|
||||
y2label: '<span style="color:#884444;">Capacitor [V]</span>',
|
||||
labelsDiv: 'solcap_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
cpumem = new Dygraph(
|
||||
// containing div
|
||||
document.getElementById("cpumem"),
|
||||
// CSV or path to a CSV file.
|
||||
cpumemdata
|
||||
,{
|
||||
//labels: ['time','cpu','mem','disk'],
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [0,100]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [0,100],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'Cpu': {
|
||||
axis: 'y',
|
||||
color: '#888844',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.4
|
||||
},
|
||||
'Mem': {
|
||||
axis: 'y2',
|
||||
color: '#884444'
|
||||
},
|
||||
'Disk': {
|
||||
axis: 'y2',
|
||||
color: '#448844'
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#888844;">CPU [%]</span>',
|
||||
y2label: '<span style="color:#884444;">MEM / DISK [%]</span>',
|
||||
labelsDiv: 'cpumem_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
function refreshGraph(source){
|
||||
graphdata = "https://bastart.spoton.cz/data/" + source + "?range=" + hours + "h&granularity=" + granularity + "&end=" + end + "h";
|
||||
if(source == 'solcap_monitor'){
|
||||
solcap.updateOptions({'file': graphdata});
|
||||
}
|
||||
if(source == 'cpumem_monitor'){
|
||||
cpumem.updateOptions({'file': graphdata});
|
||||
}
|
||||
//document.getElementById('xxx').innerHTML = source;
|
||||
//power.updateOptions({'file': graphdata});
|
||||
}
|
||||
|
||||
function setHours(hours_to_set, target){
|
||||
hours = hours_to_set;
|
||||
switch(hours){
|
||||
case '1':
|
||||
granularity = '10s';
|
||||
break;
|
||||
case '6':
|
||||
granularity = '2m';
|
||||
break;
|
||||
case '12':
|
||||
granularity = '2m';
|
||||
break;
|
||||
case '24':
|
||||
granularity = '5m';
|
||||
break;
|
||||
case '168':
|
||||
granularity = '10m';
|
||||
break;
|
||||
case '720':
|
||||
granularity = '1h';
|
||||
break;
|
||||
case '4320':
|
||||
granularity = '6h';
|
||||
break;
|
||||
case '8640':
|
||||
granularity = '1d';
|
||||
break;
|
||||
default:
|
||||
granularity = '10m';
|
||||
}
|
||||
end = 0;
|
||||
//document.getElementById('xxx').innerHTML = target;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function setBack(target){
|
||||
// range=1h -> range=2h&end=1h
|
||||
disp_range = hours*1 - end*1;
|
||||
hours = hours*1 + disp_range;
|
||||
end = end*1 + disp_range;
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function setForth(target){
|
||||
disp_range = hours*1 - end*1;
|
||||
hours = hours*1 - disp_range;
|
||||
if(hours < disp_range){
|
||||
hours = disp_range;
|
||||
}
|
||||
end = end*1 - disp_range;
|
||||
if(end < 0){
|
||||
end = 0;
|
||||
}
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph(target);
|
||||
}
|
||||
@@ -1,375 +0,0 @@
|
||||
//defaults
|
||||
var default_granularity = '5m'; // needs to be specified as string, changes
|
||||
var default_hours = 24; // int is OK, (h) hardcoded
|
||||
var default_end = 0; // detto
|
||||
var network_type='wlan0' // honestly, these two should be generated
|
||||
var iot_type='Tea' // dynamically
|
||||
var base_url = "https://bastart.spoton.cz/data/";
|
||||
var counter = 0;
|
||||
var tout = 5000; // fresh date refresh rate, in ms
|
||||
var g_tout = 30000; // graph update rate, in ms
|
||||
|
||||
//initialize the uninitialized
|
||||
var hours = new Object();
|
||||
var granularity = new Object();
|
||||
var end = new Object();
|
||||
var graphdata = new Object();
|
||||
var data = new Object();
|
||||
|
||||
// types match function names in python's Dynamic.py class
|
||||
var types = Array('solcap_monitor',
|
||||
'cpumem_monitor',
|
||||
'network_monitor',
|
||||
'esp_battery_monitor');
|
||||
|
||||
// Now let's set up the defaults and primary data sources, leter changed dynamically
|
||||
var types_size = types.length;
|
||||
for(var i=0; i<types_size; i++){
|
||||
var type = types[i];
|
||||
hours[type] = default_hours;
|
||||
granularity[type] = default_granularity;
|
||||
end[type] = default_end;
|
||||
if(type == 'cpumem_monitor'){
|
||||
hours[type] = 3;
|
||||
granularity[type] = '1m';
|
||||
}
|
||||
data[type] = base_url + type + "?range=" + hours[type] + "h&granularity=" + granularity[type] + "&end=" + default_end + "h";
|
||||
if(type == 'network_monitor'){
|
||||
hours[type] = 3;
|
||||
granularity[type] = '1m';
|
||||
data[type] = base_url + type + "?range=" + hours[type] + "h&granularity=" + granularity[type] + "&end=" + default_end + "h&type=" + network_type;
|
||||
}
|
||||
if(type == 'esp_battery_monitor'){
|
||||
hours[type] = 168;
|
||||
granularity[type] = '1h';
|
||||
data[type] = base_url + type + "?range=" + hours[type] + "h&granularity=" + granularity[type] + "&end=" + default_end + "h&type=" + iot_type;
|
||||
}
|
||||
}
|
||||
|
||||
solcap = new Dygraph(
|
||||
// containing div
|
||||
document.getElementById("solcap"),
|
||||
// CSV or path to a CSV file.
|
||||
data["solcap_monitor"]
|
||||
,{
|
||||
//labels: ['time','Solar','Capacitor'],
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [0,4.6]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [0,8.6],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'Solar': {
|
||||
axis: 'y',
|
||||
color: '#999',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.4
|
||||
},
|
||||
'Capacitor': {
|
||||
axis: 'y2',
|
||||
color: '#c11'
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#999;">Solar Irradiance</span>',
|
||||
y2label: '<span style="color:#c11;">Capacitor [V]</span>',
|
||||
labelsDiv: 'solcap_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
cpumem = new Dygraph(
|
||||
document.getElementById("cpumem"),
|
||||
data['cpumem_monitor']
|
||||
,{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [0,100]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [0,100],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'Cpu': {
|
||||
axis: 'y',
|
||||
color: '#999',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.4
|
||||
},
|
||||
'Mem': {
|
||||
axis: 'y2',
|
||||
color: '#c11'
|
||||
},
|
||||
'Disk': {
|
||||
axis: 'y2',
|
||||
color: '#111'
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#999;">CPU [%]</span>',
|
||||
y2label: '<span style="color:#c11;">MEM</span> / <span style="color:#111;">DISK [%]</span>',
|
||||
labelsDiv: 'cpumem_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
network = new Dygraph(
|
||||
document.getElementById("network"),
|
||||
data['network_monitor']
|
||||
,{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 2,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'Bin': {
|
||||
axis: 'y',
|
||||
color: '#000',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.1
|
||||
},
|
||||
'Bout': {
|
||||
axis: 'y',
|
||||
color: '#aaa',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.5
|
||||
},
|
||||
'Din': {
|
||||
axis: 'y2',
|
||||
color: '#ff5500'
|
||||
},
|
||||
'Dout': {
|
||||
axis: 'y2',
|
||||
color: '#ff5500'
|
||||
},
|
||||
'Ein': {
|
||||
axis: 'y2',
|
||||
color: '#ff2233',
|
||||
fillAlpha: 0.5
|
||||
},
|
||||
'Eout': {
|
||||
axis: 'y2',
|
||||
color: '#ff2233',
|
||||
fillAlpha: 0.5
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#000;">kB/s</span>',
|
||||
y2label: '<span style="color:#ff2233;">Drop / Error</span>',
|
||||
labelsDiv: 'network_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
esp_battery = new Dygraph(
|
||||
document.getElementById("esp_battery"),
|
||||
data['esp_battery_monitor']
|
||||
,{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [2.5,4.5]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [2.5,4.5],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'batt(Tea)': {
|
||||
axis: 'y',
|
||||
color: '#000',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.2
|
||||
},
|
||||
'batt_perc(Tea)': {
|
||||
axis: 'y2',
|
||||
color: '#000'
|
||||
},
|
||||
'batt_low(Tea)': {
|
||||
axis: 'y2',
|
||||
color: '#e00'
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#000;">Battery (Tea) [V]</span>',
|
||||
y2label: '<span style="color:#000;">Top [V]</span> / <span style="color:#e00;">Low [V]</span>',
|
||||
labelsDiv: 'esp_battery_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
// re-draw graphs
|
||||
function refreshGraph(source){
|
||||
graphdata[source] = "https://bastart.spoton.cz/data/" + source + "?range=" + hours[source] + "h&granularity=" + granularity[source] + "&end=" + end[source] + "h";
|
||||
if(source == 'solcap_monitor'){
|
||||
solcap.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
if(source == 'cpumem_monitor'){
|
||||
cpumem.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
if(source == 'esp_battery_monitor'){
|
||||
graphdata[source] += "&type=" + iot_type;
|
||||
esp_battery.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
if(source == 'network_monitor'){
|
||||
graphdata[source] += "&type=" + network_type;
|
||||
network.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
}
|
||||
|
||||
// here, target needs to match the python's dynamic class again
|
||||
function setHours(hours_to_set, target){
|
||||
hours[target] = hours_to_set;
|
||||
switch(hours[target]){
|
||||
case '1':
|
||||
granularity[target] = '20s';
|
||||
break;
|
||||
case '6':
|
||||
granularity[target] = '30s';
|
||||
break;
|
||||
case '12':
|
||||
granularity[target] = '1m';
|
||||
break;
|
||||
case '24':
|
||||
granularity[target] = '2m';
|
||||
break;
|
||||
case '168':
|
||||
granularity[target] = '10m';
|
||||
break;
|
||||
case '720':
|
||||
granularity[target] = '1h';
|
||||
break;
|
||||
case '4320':
|
||||
granularity[target] = '3h';
|
||||
break;
|
||||
case '8640':
|
||||
granularity[target] = '1d';
|
||||
break;
|
||||
default:
|
||||
granularity[target] = '10m';
|
||||
}
|
||||
end[target] = 0;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
// Functions for buttons to scale / move graphs
|
||||
function setBack(target){
|
||||
disp_range = hours[target]*1 - end[target]*1;
|
||||
hours[target] = hours[target]*1 + disp_range;
|
||||
end[target] = end[target]*1 + disp_range;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function setForth(target){
|
||||
disp_range = hours[target]*1 - end[target]*1;
|
||||
hours[target] = hours[target]*1 - disp_range;
|
||||
if(hours[target] < disp_range){
|
||||
hours[target] = disp_range;
|
||||
}
|
||||
end[target] = end[target]*1 - disp_range;
|
||||
if(end[target] < 0){
|
||||
end[target] = 0;
|
||||
}
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function getPageContents(callback,url,params) {
|
||||
if (window.XMLHttpRequest){
|
||||
// code for IE7+, Firefox, Chrome, Opera, Safari, SeaMonkey
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
}
|
||||
else{
|
||||
// code for IE6, IE5
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
if(params!=null) {
|
||||
xmlhttp.open("POST", url, true);
|
||||
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
} else {
|
||||
xmlhttp.open("GET", url, true);
|
||||
}
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||
callback(xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
xmlhttp.send(params);
|
||||
}
|
||||
|
||||
function refreshValues(){
|
||||
fresh_vals_url = '/data/status_realtime_data?type=json'
|
||||
getPageContents(function(result){freshVals=JSON.parse(result);},
|
||||
fresh_vals_url)
|
||||
document.getElementById('timestamp').innerHTML = freshVals.time;
|
||||
document.getElementById('sol_val').innerHTML = freshVals.iss_solar;
|
||||
document.getElementById('cap_val').innerHTML = freshVals.iss_capacitor;
|
||||
document.getElementById('cpu_val').innerHTML = freshVals.RasPI_cpu;
|
||||
document.getElementById('mem').innerHTML = freshVals.RasPI_mem;
|
||||
document.getElementById('disk').innerHTML = freshVals.RasPI_disk;
|
||||
document.getElementById('net_in').innerHTML = freshVals.net.b_in;
|
||||
document.getElementById('net_out').innerHTML = freshVals.net.b_out;
|
||||
counter = counter + tout;
|
||||
if(counter >= g_tout){
|
||||
for(var i=0; i<types_size; i++){
|
||||
var type = types[i];
|
||||
refreshGraph(type);
|
||||
}
|
||||
document.getElementById('graph_timestamp').innerHTML = freshVals.time;
|
||||
counter = 0;
|
||||
}
|
||||
}
|
||||
var intervalVal = setInterval(refreshValues, tout);
|
||||
@@ -1,118 +0,0 @@
|
||||
var hours = 168;
|
||||
var granularity = '30m';
|
||||
var end = 0;
|
||||
var tea_temphumidata = "https://bastart.spoton.cz/data/usense_temphumi_monitor?range=168h&granularity=30m&end=0h&type=Tea";
|
||||
|
||||
tea_temphum = new Dygraph(
|
||||
// containing div
|
||||
document.getElementById("tea_temphum"),
|
||||
// CSV or path to a CSV file.
|
||||
tea_temphumidata
|
||||
,{
|
||||
//labels: ['time','Temperature','Humidity'],
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [0,40]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [20,80],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 20,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'T(tea)': {
|
||||
axis: 'y',
|
||||
color: '#999',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.4
|
||||
},
|
||||
'Humi(tea)': {
|
||||
axis: 'y2',
|
||||
color: '#c11'
|
||||
}
|
||||
|
||||
},
|
||||
ylabel: '<span style="color:#999;">Temperature [°C]</span>',
|
||||
y2label: '<span style="color:#c11;">Humidity [%]</span>',
|
||||
labelsDiv: 'tea_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
function refreshGraph(source){
|
||||
//graphdata = "https://bastart.spoton.cz/data/" + source + "?range=" + hours + "h&granularity=" + granularity + "&end=" + end + "h&type=" + type;
|
||||
if(source == 'usense_temphumi_monitor'){
|
||||
type = "Tea"
|
||||
graphdata = "https://bastart.spoton.cz/data/" + source + "?range=" + hours + "h&granularity=" + granularity + "&end=" + end + "h&type=" + type;
|
||||
tea_temphum.updateOptions({'file': graphdata});
|
||||
}
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
}
|
||||
|
||||
function setHours(hours_to_set, target){
|
||||
hours = hours_to_set;
|
||||
switch(hours){
|
||||
case '6':
|
||||
granularity = '10m';
|
||||
break;
|
||||
case '12':
|
||||
granularity = '10m';
|
||||
break;
|
||||
case '24':
|
||||
granularity = '10m';
|
||||
break;
|
||||
case '168':
|
||||
granularity = '30m';
|
||||
break;
|
||||
case '720':
|
||||
granularity = '1h';
|
||||
break;
|
||||
case '4320':
|
||||
granularity = '3h';
|
||||
break;
|
||||
case '8640':
|
||||
granularity = '12h';
|
||||
break;
|
||||
default:
|
||||
granularity = '10m';
|
||||
}
|
||||
end = 0;
|
||||
//document.getElementById('xxx').innerHTML = target;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function setBack(target){
|
||||
// range=1h -> range=2h&end=1h
|
||||
disp_range = hours*1 - end*1;
|
||||
hours = hours*1 + disp_range;
|
||||
end = end*1 + disp_range;
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function setForth(target){
|
||||
disp_range = hours*1 - end*1;
|
||||
hours = hours*1 - disp_range;
|
||||
if(hours < disp_range){
|
||||
hours = disp_range;
|
||||
}
|
||||
end = end*1 - disp_range;
|
||||
if(end < 0){
|
||||
end = 0;
|
||||
}
|
||||
//document.getElementById('xxx').innerHTML = graphdata;
|
||||
refreshGraph(target);
|
||||
}
|
||||
@@ -1,414 +0,0 @@
|
||||
//defaults
|
||||
var default_granularity = '5m'; // needs to be specified as string, changes
|
||||
var default_hours = 24; // int is OK, (h) hardcoded
|
||||
var default_end = 0; // detto
|
||||
var base_url = "https://bastart.spoton.cz/data/";
|
||||
var counter = 0;
|
||||
var tout = 5000; // fresh date refresh rate, in ms
|
||||
var g_tout = 30000; // graph update rate, in ms
|
||||
|
||||
//initialize the uninitialized
|
||||
var hours = new Object();
|
||||
var granularity = new Object();
|
||||
var end = new Object();
|
||||
var graphdata = new Object();
|
||||
var data = new Object();
|
||||
|
||||
// types match function names in python's Dynamic.py class
|
||||
var types = Array('wind_monitor',
|
||||
'temphumi_monitor',
|
||||
'pressure_monitor',
|
||||
'rrate_monitor');
|
||||
|
||||
// Now let's set up the defaults and primary data sources, leter changed dynamically
|
||||
var types_size = types.length;
|
||||
for(var i=0; i<types_size; i++){
|
||||
var type = types[i];
|
||||
hours[type] = default_hours;
|
||||
granularity[type] = default_granularity;
|
||||
end[type] = default_end;
|
||||
if(type == 'wind_monitor'){
|
||||
hours[type] = 12;
|
||||
granularity[type] = '1m';
|
||||
}
|
||||
data[type] = base_url + type + "?range=" + hours[type] + "h&granularity=" + granularity[type] + "&end=" + default_end + "h";
|
||||
if(type == 'pressure_monitor'){
|
||||
hours[type] = 168;
|
||||
granularity[type] = '1h';
|
||||
data[type] = base_url + type + "?range=" + hours[type] + "h&granularity=" + granularity[type] + "&end=" + default_end + "h";
|
||||
}
|
||||
if(type == 'rrate_monitor'){
|
||||
hours[type] = 168;
|
||||
granularity[type] = '1h';
|
||||
data[type] = base_url + type + "?range=" + hours[type] + "h&granularity=" + granularity[type] + "&end=" + default_end + "h";
|
||||
}
|
||||
}
|
||||
|
||||
wind = new Dygraph(
|
||||
document.getElementById("wind"),
|
||||
data['wind_monitor'],
|
||||
{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [0,360],
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'Speed': {
|
||||
axis: 'y',
|
||||
color: '#444444',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.4
|
||||
},
|
||||
'Gusts': {
|
||||
axis: 'y',
|
||||
color: '#ff5555'
|
||||
},
|
||||
'Direction': {
|
||||
axis: 'y2',
|
||||
color: '#999999'
|
||||
}
|
||||
},
|
||||
ylabel: '<span style="color:#444444;">Speed<span style="color:#444444;"> / <span style="color:#ff5555;">Gusts</span> [km/h]',
|
||||
y2label: '<span style="color:#999999;">Direction [°]</span>',
|
||||
labelsDiv: 'wind_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
temphumi_out = new Dygraph(
|
||||
document.getElementById("temphumi"),
|
||||
data['temphumi_monitor'],
|
||||
{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : false
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
independentTicks: true
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
visibility: [false, true, false, true],
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'T(out)': {
|
||||
axis: 'y',
|
||||
color: '#705555',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.2
|
||||
},
|
||||
'T(ins)': {
|
||||
axis: 'y',
|
||||
color: '#705555',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.2
|
||||
},
|
||||
'Humi(out)': {
|
||||
axis: 'y2',
|
||||
color: '#222288'
|
||||
},
|
||||
'Humi(ins)': {
|
||||
axis: 'y2',
|
||||
color: '#222288'
|
||||
}
|
||||
},
|
||||
ylabel: '<span style="color:#555555;">Outside [°C]</span>',
|
||||
y2label: '<span style="color:#222288;">Humidity [%]</span>',
|
||||
labelsDiv: 'temphumi_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
temphumi_in = new Dygraph(
|
||||
document.getElementById("temphumi_in"),
|
||||
data['temphumi_monitor'],
|
||||
{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [10,35]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
independentTicks: true,
|
||||
valueRange: [0,100]
|
||||
}
|
||||
},
|
||||
rollPeriod: 5,
|
||||
visibility: [true, false, true, false],
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
series:{
|
||||
'T(out)': {
|
||||
axis: 'y',
|
||||
color: '#705555',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.2
|
||||
},
|
||||
'T(ins)': {
|
||||
axis: 'y',
|
||||
color: '#705555',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.2
|
||||
},
|
||||
'Humi(out)': {
|
||||
axis: 'y2',
|
||||
color: '#222288'
|
||||
},
|
||||
'Humi(ins)': {
|
||||
axis: 'y2',
|
||||
color: '#222288'
|
||||
}
|
||||
},
|
||||
ylabel: '<span style="color:#555555;">Inside [°C]</span>',
|
||||
y2label: '<span style="color:#222288;">Humidity [%]</span>',
|
||||
labelsDiv: 'temphumi_labels_in',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
pressure = new Dygraph(
|
||||
document.getElementById("pressure"),
|
||||
data['pressure_monitor'],
|
||||
{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [970,1055]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [970,1055]
|
||||
}
|
||||
},
|
||||
rollPeriod: 20,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
visibility: [true, false],
|
||||
series:{
|
||||
'Pressure': {
|
||||
axis: 'y',
|
||||
color: '#557070',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.5
|
||||
},
|
||||
'Pressure': {
|
||||
axis: 'y2',
|
||||
color: '#557070',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.5
|
||||
}
|
||||
},
|
||||
ylabel: '<span style="color:#555555;">Pressure [hPa]</span>',
|
||||
labelsDiv: 'pressure_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
rrate = new Dygraph(
|
||||
document.getElementById("rrate"),
|
||||
data['rrate_monitor'],
|
||||
{
|
||||
axes : {
|
||||
x : {
|
||||
drawGrid: true,
|
||||
drawAxis : true
|
||||
},
|
||||
y : {
|
||||
drawGrid: false,
|
||||
drawAxis : true,
|
||||
valueRange: [0,3]
|
||||
},
|
||||
y2 : {
|
||||
drawGrid: false,
|
||||
drawAxis: true,
|
||||
valueRange: [0,3]
|
||||
}
|
||||
},
|
||||
rollPeriod: 0,
|
||||
interactionModel: {},
|
||||
connectSeparatedPoints: true,
|
||||
visibility: [true, true],
|
||||
series:{
|
||||
'Rrate': {
|
||||
axis: 'y',
|
||||
color: '#0055ff',
|
||||
fillGraph: true,
|
||||
fillAlpha: 0.5
|
||||
},
|
||||
'Rrate_max': {
|
||||
axis: 'y2',
|
||||
color: '#0000aa',
|
||||
fillGraph: false
|
||||
}
|
||||
},
|
||||
ylabel: '<span style="color:#555555;">Rain rate [mm/h]</span>',
|
||||
labelsDiv: 'rrate_labels',
|
||||
legend: 'always'
|
||||
}
|
||||
);
|
||||
|
||||
// Functions for buttons to scale / move graphs
|
||||
function refreshGraph(source){
|
||||
graphdata[source] = "https://bastart.spoton.cz/data/" + source + "?range=" + hours[source] + "h&granularity=" + granularity[source] + "&end=" + end[source] + "h";
|
||||
if(source == 'wind_monitor'){
|
||||
wind.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
if(source == 'temphumi_monitor'){
|
||||
temphumi_out.updateOptions({'file': graphdata[source]});
|
||||
temphumi_in.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
if(source == 'pressure_monitor'){
|
||||
pressure.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
if(source == 'rrate_monitor'){
|
||||
rrate.updateOptions({'file': graphdata[source]});
|
||||
}
|
||||
// TODO: adjust to update graph timestamps per click on ranges
|
||||
// document.getElementById('g_tstamp_' + source).innerHTML = freshVals.time;
|
||||
}
|
||||
|
||||
// here, target needs to match the python's dynamic class again
|
||||
function setHours(hours_to_set, target){
|
||||
hours[target] = hours_to_set;
|
||||
switch(hours[target]){
|
||||
case '1':
|
||||
granularity[target] = '30s';
|
||||
if(target == 'temphumi_monitor'){ granularity[target] = '2m';}
|
||||
break;
|
||||
case '6':
|
||||
granularity[target] = '1m';
|
||||
if(target == 'temphumi_monitor'){ granularity[target] = '2m';}
|
||||
break;
|
||||
case '12':
|
||||
granularity[target] = '2m';
|
||||
if(target == 'temphumi_monitor'){ granularity[target] = '2m';}
|
||||
break;
|
||||
case '24':
|
||||
granularity[target] = '5m';
|
||||
if(target == 'temphumi_monitor'){ granularity[target] = '2m';}
|
||||
break;
|
||||
case '168':
|
||||
granularity[target] = '10m';
|
||||
break;
|
||||
case '720':
|
||||
granularity[target] = '1h';
|
||||
break;
|
||||
case '4320':
|
||||
granularity[target] = '12h';
|
||||
break;
|
||||
case '8640':
|
||||
granularity[target] = '24h';
|
||||
break;
|
||||
default:
|
||||
granularity[target] = default_granularity;
|
||||
}
|
||||
end[target] = 0;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
// Functions for buttons to scale / move graphs
|
||||
function setBack(target){
|
||||
disp_range = hours[target]*1 - end[target]*1;
|
||||
hours[target] = hours[target]*1 + disp_range;
|
||||
end[target] = end[target]*1 + disp_range;
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function setForth(target){
|
||||
disp_range = hours[target]*1 - end[target]*1;
|
||||
hours[target] = hours[target]*1 - disp_range;
|
||||
if(hours[target] < disp_range){
|
||||
hours[target] = disp_range;
|
||||
}
|
||||
end[target] = end[target]*1 - disp_range;
|
||||
if(end[target] < 0){
|
||||
end[target] = 0;
|
||||
}
|
||||
refreshGraph(target);
|
||||
}
|
||||
|
||||
function getPageContents(callback,url,params) {
|
||||
if (window.XMLHttpRequest){
|
||||
// code for IE7+, Firefox, Chrome, Opera, Safari, SeaMonkey
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
}
|
||||
else{
|
||||
// code for IE6, IE5
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
if(params!=null) {
|
||||
xmlhttp.open("POST", url, true);
|
||||
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
} else {
|
||||
xmlhttp.open("GET", url, true);
|
||||
}
|
||||
xmlhttp.onreadystatechange = function() {
|
||||
if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||
callback(xmlhttp.responseText);
|
||||
}
|
||||
}
|
||||
xmlhttp.send(params);
|
||||
}
|
||||
|
||||
function refreshValues(){
|
||||
fresh_vals_url = '/data/weather_realtime_data?type=json'
|
||||
getPageContents(function(result){freshVals=JSON.parse(result);},
|
||||
fresh_vals_url)
|
||||
document.getElementById('timestamp').innerHTML = freshVals.time;
|
||||
document.getElementById('w_speed_km').innerHTML = freshVals.wind.speed;
|
||||
document.getElementById('w_speed_ms').innerHTML = freshVals.wind.speed_ms;
|
||||
document.getElementById('w_dir').innerHTML = freshVals.wind.dir;
|
||||
document.getElementById('w_gust_km').innerHTML = freshVals.wind.gust;
|
||||
document.getElementById('w_gust_ms').innerHTML = freshVals.wind.gust_ms;
|
||||
document.getElementById('w_dir_name').innerHTML = freshVals.wind.dir_name;
|
||||
document.getElementById('out_temp').innerHTML = freshVals.temperature.out;
|
||||
document.getElementById('in_temp').innerHTML = freshVals.temperature.in;
|
||||
document.getElementById('current_pressure').innerHTML = freshVals.pressure;
|
||||
document.getElementById('current_rrate').innerHTML = freshVals.rainrate;
|
||||
counter = counter + tout;
|
||||
if(counter >= g_tout){
|
||||
for(var i=0; i<types_size; i++){
|
||||
var type = types[i];
|
||||
refreshGraph(type);
|
||||
document.getElementById('g_tstamp_' + type).innerHTML = freshVals.time;
|
||||
}
|
||||
counter = 0;
|
||||
}
|
||||
}
|
||||
var intervalVal = setInterval(refreshValues, tout);
|
||||