From f93215f4ece9637199689e1614e697bf13c447ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 18 Sep 2015 10:36:47 +0200 Subject: [PATCH] feat(timepicker2): more progress --- public/app/core/utils/rangeutil.ts | 2 +- public/app/features/dashboard/timeSrv.js | 8 +- .../dashboard/timepicker/dropdown.html | 57 +- .../dashboard/timepicker/timepicker.html | 4 +- .../dashboard/timepicker/timepicker.ts | 76 +- public/less/timepicker.less | 49 +- public/vendor/angular-ui/dateparser.js | 212 --- public/vendor/angular-ui/datepicker.js | 823 --------- public/vendor/angular-ui/position.js | 150 -- public/vendor/angular-ui/tabs.js | 293 ---- public/vendor/angular-ui/ui-bootstrap.js | 1476 ----------------- 11 files changed, 38 insertions(+), 3112 deletions(-) delete mode 100644 public/vendor/angular-ui/dateparser.js delete mode 100644 public/vendor/angular-ui/datepicker.js delete mode 100644 public/vendor/angular-ui/position.js delete mode 100644 public/vendor/angular-ui/tabs.js delete mode 100644 public/vendor/angular-ui/ui-bootstrap.js diff --git a/public/app/core/utils/rangeutil.ts b/public/app/core/utils/rangeutil.ts index e4e14b7e606..db34e294628 100644 --- a/public/app/core/utils/rangeutil.ts +++ b/public/app/core/utils/rangeutil.ts @@ -16,8 +16,8 @@ var spans = { var rangeOptions = [ { from: 'now/d', to: 'now/d', display: 'Today', section: 2 }, - { from: 'now/w', to: 'now/w', display: 'This week', section: 2 }, { from: 'now/d', to: 'now', display: 'The day so far', section: 2 }, + { from: 'now/w', to: 'now/w', display: 'This week', section: 2 }, { from: 'now/w', to: 'now', display: 'Week to date', section: 2 }, { from: 'now/M', to: 'now/M', display: 'This month', section: 2 }, { from: 'now/y', to: 'now/y', display: 'This year', section: 2 }, diff --git a/public/app/features/dashboard/timeSrv.js b/public/app/features/dashboard/timeSrv.js index d88b8fd41a4..c956d73e2ab 100644 --- a/public/app/features/dashboard/timeSrv.js +++ b/public/app/features/dashboard/timeSrv.js @@ -23,7 +23,7 @@ define([ this._parseTime(); if(this.dashboard.refresh) { - this.set_interval(this.dashboard.refresh); + this.setAutoRefresh(this.dashboard.refresh); } }; @@ -64,7 +64,7 @@ define([ } }; - this.set_interval = function (interval) { + this.setAutoRefresh = function (interval) { this.dashboard.refresh = interval; if (interval) { var _i = kbn.interval_to_ms(interval); @@ -96,10 +96,10 @@ define([ // disable refresh if we have an absolute time if (_.isString(time.to) && time.to.indexOf('now') === -1) { this.old_refresh = this.dashboard.refresh || this.old_refresh; - this.set_interval(false); + this.setAutoRefresh(false); } else if (this.old_refresh && this.old_refresh !== this.dashboard.refresh) { - this.set_interval(this.old_refresh); + this.setAutoRefresh(this.old_refresh); this.old_refresh = null; } diff --git a/public/app/features/dashboard/timepicker/dropdown.html b/public/app/features/dashboard/timepicker/dropdown.html index 142f256c41c..95cbe3d4c9f 100644 --- a/public/app/features/dashboard/timepicker/dropdown.html +++ b/public/app/features/dashboard/timepicker/dropdown.html @@ -22,9 +22,10 @@ - + - @@ -41,55 +42,3 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/app/features/dashboard/timepicker/timepicker.html b/public/app/features/dashboard/timepicker/timepicker.html index d80066848dc..5f10ab22835 100644 --- a/public/app/features/dashboard/timepicker/timepicker.html +++ b/public/app/features/dashboard/timepicker/timepicker.html @@ -1,4 +1,4 @@ -