mirror of
https://github.com/beestat/app.git
synced 2025-06-23 15:30:43 -04:00
Fixed #272 - Thermostat Detail stuck in the past
This commit is contained in:
parent
663787f046
commit
53272ec5b0
@ -251,54 +251,53 @@ beestat.component.card.runtime_sensor_detail.prototype.decorate_top_right_ = fun
|
|||||||
|
|
||||||
var menu = (new beestat.component.menu()).render(parent);
|
var menu = (new beestat.component.menu()).render(parent);
|
||||||
|
|
||||||
if (this.has_data_() === true) {
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
.set_text('Past 1 Day')
|
||||||
.set_text('Past 1 Day')
|
.set_icon('numeric_1_box')
|
||||||
.set_icon('numeric_1_box')
|
.set_callback(function() {
|
||||||
.set_callback(function() {
|
if (
|
||||||
if (
|
beestat.setting('runtime_sensor_detail_range_dynamic') !== 1 ||
|
||||||
beestat.setting('runtime_sensor_detail_range_dynamic') !== 1 ||
|
beestat.setting('runtime_sensor_detail_range_type') !== 'dynamic'
|
||||||
beestat.setting('runtime_sensor_detail_range_type') !== 'dynamic'
|
) {
|
||||||
) {
|
beestat.cache.delete('runtime_sensor');
|
||||||
beestat.cache.delete('runtime_sensor');
|
beestat.setting({
|
||||||
beestat.setting({
|
'runtime_sensor_detail_range_dynamic': 1,
|
||||||
'runtime_sensor_detail_range_dynamic': 1,
|
'runtime_sensor_detail_range_type': 'dynamic'
|
||||||
'runtime_sensor_detail_range_type': 'dynamic'
|
});
|
||||||
});
|
}
|
||||||
}
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
.set_text('Past 3 Days')
|
.set_text('Past 3 Days')
|
||||||
.set_icon('numeric_3_box')
|
.set_icon('numeric_3_box')
|
||||||
.set_callback(function() {
|
.set_callback(function() {
|
||||||
if (
|
if (
|
||||||
beestat.setting('runtime_sensor_detail_range_dynamic') !== 3 ||
|
beestat.setting('runtime_sensor_detail_range_dynamic') !== 3 ||
|
||||||
beestat.setting('runtime_sensor_detail_range_type') !== 'dynamic'
|
beestat.setting('runtime_sensor_detail_range_type') !== 'dynamic'
|
||||||
) {
|
) {
|
||||||
beestat.cache.delete('runtime_sensor');
|
beestat.cache.delete('runtime_sensor');
|
||||||
beestat.setting({
|
beestat.setting({
|
||||||
'runtime_sensor_detail_range_dynamic': 3,
|
'runtime_sensor_detail_range_dynamic': 3,
|
||||||
'runtime_sensor_detail_range_type': 'dynamic'
|
'runtime_sensor_detail_range_type': 'dynamic'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
.set_text('Past 7 Days')
|
.set_text('Past 7 Days')
|
||||||
.set_icon('numeric_7_box')
|
.set_icon('numeric_7_box')
|
||||||
.set_callback(function() {
|
.set_callback(function() {
|
||||||
if (
|
if (
|
||||||
beestat.setting('runtime_sensor_detail_range_dynamic') !== 7 ||
|
beestat.setting('runtime_sensor_detail_range_dynamic') !== 7 ||
|
||||||
beestat.setting('runtime_sensor_detail_range_type') !== 'dynamic'
|
beestat.setting('runtime_sensor_detail_range_type') !== 'dynamic'
|
||||||
) {
|
) {
|
||||||
beestat.cache.delete('runtime_sensor');
|
beestat.cache.delete('runtime_sensor');
|
||||||
beestat.setting({
|
beestat.setting({
|
||||||
'runtime_sensor_detail_range_dynamic': 7,
|
'runtime_sensor_detail_range_dynamic': 7,
|
||||||
'runtime_sensor_detail_range_type': 'dynamic'
|
'runtime_sensor_detail_range_type': 'dynamic'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
.set_text('Custom')
|
.set_text('Custom')
|
||||||
@ -307,6 +306,7 @@ beestat.component.card.runtime_sensor_detail.prototype.decorate_top_right_ = fun
|
|||||||
(new beestat.component.modal.runtime_sensor_detail_custom()).render();
|
(new beestat.component.modal.runtime_sensor_detail_custom()).render();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
if (this.has_data_() === true) {
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
.set_text('Download Chart')
|
.set_text('Download Chart')
|
||||||
.set_icon('download')
|
.set_icon('download')
|
||||||
|
@ -237,62 +237,62 @@ beestat.component.card.runtime_thermostat_detail.prototype.decorate_top_right_ =
|
|||||||
|
|
||||||
var menu = (new beestat.component.menu()).render(parent);
|
var menu = (new beestat.component.menu()).render(parent);
|
||||||
|
|
||||||
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
|
.set_text('Past 1 Day')
|
||||||
|
.set_icon('numeric_1_box')
|
||||||
|
.set_callback(function() {
|
||||||
|
if (
|
||||||
|
beestat.setting('runtime_thermostat_detail_range_dynamic') !== 1 ||
|
||||||
|
beestat.setting('runtime_thermostat_detail_range_type') !== 'dynamic'
|
||||||
|
) {
|
||||||
|
beestat.cache.delete('runtime_thermostat');
|
||||||
|
beestat.setting({
|
||||||
|
'runtime_thermostat_detail_range_dynamic': 1,
|
||||||
|
'runtime_thermostat_detail_range_type': 'dynamic'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
|
.set_text('Past 3 Days')
|
||||||
|
.set_icon('numeric_3_box')
|
||||||
|
.set_callback(function() {
|
||||||
|
if (
|
||||||
|
beestat.setting('runtime_thermostat_detail_range_dynamic') !== 3 ||
|
||||||
|
beestat.setting('runtime_thermostat_detail_range_type') !== 'dynamic'
|
||||||
|
) {
|
||||||
|
beestat.cache.delete('runtime_thermostat');
|
||||||
|
beestat.setting({
|
||||||
|
'runtime_thermostat_detail_range_dynamic': 3,
|
||||||
|
'runtime_thermostat_detail_range_type': 'dynamic'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
|
.set_text('Past 7 Days')
|
||||||
|
.set_icon('numeric_7_box')
|
||||||
|
.set_callback(function() {
|
||||||
|
if (
|
||||||
|
beestat.setting('runtime_thermostat_detail_range_dynamic') !== 7 ||
|
||||||
|
beestat.setting('runtime_thermostat_detail_range_type') !== 'dynamic'
|
||||||
|
) {
|
||||||
|
beestat.cache.delete('runtime_thermostat');
|
||||||
|
beestat.setting({
|
||||||
|
'runtime_thermostat_detail_range_dynamic': 7,
|
||||||
|
'runtime_thermostat_detail_range_type': 'dynamic'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
|
.set_text('Custom')
|
||||||
|
.set_icon('calendar_edit')
|
||||||
|
.set_callback(function() {
|
||||||
|
(new beestat.component.modal.runtime_thermostat_detail_custom()).render();
|
||||||
|
}));
|
||||||
|
|
||||||
if (this.has_data_() === true) {
|
if (this.has_data_() === true) {
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
|
||||||
.set_text('Past 1 Day')
|
|
||||||
.set_icon('numeric_1_box')
|
|
||||||
.set_callback(function() {
|
|
||||||
if (
|
|
||||||
beestat.setting('runtime_thermostat_detail_range_dynamic') !== 1 ||
|
|
||||||
beestat.setting('runtime_thermostat_detail_range_type') !== 'dynamic'
|
|
||||||
) {
|
|
||||||
beestat.cache.delete('runtime_thermostat');
|
|
||||||
beestat.setting({
|
|
||||||
'runtime_thermostat_detail_range_dynamic': 1,
|
|
||||||
'runtime_thermostat_detail_range_type': 'dynamic'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
|
||||||
.set_text('Past 3 Days')
|
|
||||||
.set_icon('numeric_3_box')
|
|
||||||
.set_callback(function() {
|
|
||||||
if (
|
|
||||||
beestat.setting('runtime_thermostat_detail_range_dynamic') !== 3 ||
|
|
||||||
beestat.setting('runtime_thermostat_detail_range_type') !== 'dynamic'
|
|
||||||
) {
|
|
||||||
beestat.cache.delete('runtime_thermostat');
|
|
||||||
beestat.setting({
|
|
||||||
'runtime_thermostat_detail_range_dynamic': 3,
|
|
||||||
'runtime_thermostat_detail_range_type': 'dynamic'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
|
||||||
.set_text('Past 7 Days')
|
|
||||||
.set_icon('numeric_7_box')
|
|
||||||
.set_callback(function() {
|
|
||||||
if (
|
|
||||||
beestat.setting('runtime_thermostat_detail_range_dynamic') !== 7 ||
|
|
||||||
beestat.setting('runtime_thermostat_detail_range_type') !== 'dynamic'
|
|
||||||
) {
|
|
||||||
beestat.cache.delete('runtime_thermostat');
|
|
||||||
beestat.setting({
|
|
||||||
'runtime_thermostat_detail_range_dynamic': 7,
|
|
||||||
'runtime_thermostat_detail_range_type': 'dynamic'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
|
||||||
.set_text('Custom')
|
|
||||||
.set_icon('calendar_edit')
|
|
||||||
.set_callback(function() {
|
|
||||||
(new beestat.component.modal.runtime_thermostat_detail_custom()).render();
|
|
||||||
}));
|
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
.set_text('Download Chart')
|
.set_text('Download Chart')
|
||||||
.set_icon('download')
|
.set_icon('download')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user