From 56972013fbb43a7bd622a3ed71b6bd722bbc5967 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Thu, 4 Mar 2021 21:45:22 -0500 Subject: [PATCH] Added a couple more presets to the data download --- js/component/modal/download_data.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/js/component/modal/download_data.js b/js/component/modal/download_data.js index d2f17db..13e38b5 100644 --- a/js/component/modal/download_data.js +++ b/js/component/modal/download_data.js @@ -147,12 +147,32 @@ beestat.component.modal.download_data.prototype.decorate_presets_ = function(par 'range_end': now.clone(), 'button': new beestat.component.button() }, + { + 'label': 'Last Week', + 'range_begin': now.clone() + .subtract(1, 'week') + .startOf('week'), + 'range_end': now.clone() + .subtract(1, 'week') + .endOf('week'), + 'button': new beestat.component.button() + }, { 'label': 'This Month', 'range_begin': now.clone().startOf('month'), 'range_end': now.clone(), 'button': new beestat.component.button() }, + { + 'label': 'Last Month', + 'range_begin': now.clone() + .subtract(1, 'month') + .startOf('month'), + 'range_end': now.clone() + .subtract(1, 'month') + .endOf('month'), + 'button': new beestat.component.button() + }, { 'label': 'All Time', 'range_begin': moment.max(moment(thermostat.first_connected), now.clone().subtract(1, 'year')),