mirror of
https://github.com/shouptech/tempgopher.git
synced 2026-02-03 08:39:43 +00:00
Always display by alias of sensor
This commit is contained in:
parent
195d167664
commit
a167da2230
1 changed files with 10 additions and 2 deletions
|
|
@ -180,8 +180,16 @@ function renderThermostats() {
|
|||
beforeSend: authHeaders
|
||||
}).then(function(data) {
|
||||
$("#thermostats").empty();
|
||||
for (var key in data) {
|
||||
appendData(data[key])
|
||||
|
||||
// Sort by sensor alias
|
||||
var sorted = [];
|
||||
for(var key in data) {
|
||||
sorted[sorted.length] = key;
|
||||
}
|
||||
sorted.sort();
|
||||
|
||||
for (var i in sorted) {
|
||||
appendData(data[sorted[i]])
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue