Compiled new version of frontend

This commit is contained in:
Paulus Schoutsen 2015-04-24 08:52:37 -07:00
parent 424f05a4da
commit 24bb89df23
4 changed files with 21 additions and 25 deletions

View file

@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by build_frontend script """ """ DO NOT MODIFY. Auto-generated by build_frontend script """
VERSION = "e7801905cc2ea1ee349ec199604fb984" VERSION = "93774c7a1643c7e3f9cbbb1554b36683"

File diff suppressed because one or more lines are too long

View file

@ -17,17 +17,13 @@
margin-top: 10px; margin-top: 10px;
} }
.hiddencharts {
visibility:hidden;
}
.singlelinechart { .singlelinechart {
min-height:140px; min-height:140px;
} }
</style> </style>
<div style='width: 100%; height: auto;' class="{{ {hiddencharts: !isLoading} | tokenList}}" > <div style='width: 100%; height: auto;' hidden?="{{!isLoading}}" >
<div layout horizontal center fit id="splash"> <div layout horizontal center id="splash">
<div layout vertical center flex> <div layout vertical center flex>
<div id="loadingbox"> <div id="loadingbox">
<paper-spinner active="true"></paper-spinner><br /> <paper-spinner active="true"></paper-spinner><br />
@ -37,8 +33,8 @@
</div> </div>
</div> </div>
<google-jsapi on-api-load="{{googleApiLoaded}}"></google-jsapi> <google-jsapi on-api-load="{{googleApiLoaded}}"></google-jsapi>
<div id="timeline" style='width: 100%; height: auto;' class="{{ {hiddencharts: isLoadingData, singlelinechart: isSingleDevice && hasLineChart } | tokenList}}"></div> <div id="timeline" style='width: 100%; height: auto;' class="{{ {singlelinechart: isSingleDevice && hasLineChart } | tokenList}}" hidden?="{{isLoadingData}}"></div>
<div id="line_graphs" style='width: 100%; height: auto;' class="{{ {hiddencharts: isLoadingData} | tokenList}}"></div> <div id="line_graphs" style='width: 100%; height: auto;' hidden?="{{isLoadingData}}"></div>
</template> </template>
<script> <script>
@ -47,7 +43,7 @@
stateHistory: null, stateHistory: null,
isLoading: true, isLoading: true,
isLoadingData: false, isLoadingData: false,
spinnerMessage: "Loading data...", spinnerMessage: "Loading history data...",
isSingleDevice: false, isSingleDevice: false,
hasLineChart: false, hasLineChart: false,
@ -87,6 +83,7 @@
dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addColumn({ type: 'date', id: 'End' });
var addRow = function(entityDisplay, stateStr, start, end) { var addRow = function(entityDisplay, stateStr, start, end) {
stateStr = stateStr.replace(/_/g, ' ');
dataTable.addRow([entityDisplay, stateStr, start, end]); dataTable.addRow([entityDisplay, stateStr, start, end]);
}; };
@ -119,12 +116,12 @@
var attributes = stateInfo[stateInfo.length - 1].attributes; var attributes = stateInfo[stateInfo.length - 1].attributes;
//if the device has a unit of meaurment it will be added as a line graph further down //if the device has a unit of meaurment it will be added as a line graph further down
if(attributes['unit_of_measurement']) { if(attributes.unit_of_measurement) {
if(!lineChartDevices[attributes['unit_of_measurement']]){ if(!lineChartDevices[attributes.unit_of_measurement]){
lineChartDevices[attributes['unit_of_measurement']] = []; lineChartDevices[attributes.unit_of_measurement] = [];
} }
lineChartDevices[attributes['unit_of_measurement']].push(stateInfo); lineChartDevices[attributes.unit_of_measurement].push(stateInfo);
this.hasLineChart = true this.hasLineChart = true;
return; return;
} }
@ -191,7 +188,7 @@
var deviceStates = lineChartDevices[key]; var deviceStates = lineChartDevices[key];
if(this.isSingleDevice) { if(this.isSingleDevice) {
container = this.$.timeline container = this.$.timeline;
} }
else { else {
container = document.createElement("DIV"); container = document.createElement("DIV");
@ -223,7 +220,6 @@
axis: 'horizontal', axis: 'horizontal',
maxZoomIn: 0.1 maxZoomIn: 0.1
} }
}; };
if(this.isSingleDevice) { if(this.isSingleDevice) {
@ -272,7 +268,7 @@
var deviceCount = 0; var deviceCount = 0;
deviceStates.forEach(function(device) { deviceStates.forEach(function(device) {
var attributes = device[device.length - 1].attributes; var attributes = device[device.length - 1].attributes;
dataTable.addColumn('number', attributes['friendly_name']); dataTable.addColumn('number', attributes.friendly_name);
var currentState = 0; var currentState = 0;
var previousState = 0; var previousState = 0;

@ -1 +1 @@
Subproject commit 282004e3e27134a3de1b9c0e6c264ce811f3e510 Subproject commit 56f896efa573aaa9554812a3c41b78278bce2064