Browse Source

remove align option

Mitsuhiro Tanda 10 years ago
parent
commit
ef22a87fcf

+ 2 - 5
public/app/features/dashboard/timeSrv.js

@@ -65,14 +65,11 @@ define([
       }
       }
     };
     };
 
 
-    this.setAutoRefresh = function (interval, align) {
+    this.setAutoRefresh = function (interval) {
       this.dashboard.refresh = interval;
       this.dashboard.refresh = interval;
       if (interval) {
       if (interval) {
         var _i = kbn.interval_to_ms(interval);
         var _i = kbn.interval_to_ms(interval);
-        var wait_ms = 0;
-        if (align) {
-          wait_ms = _i - (Date.now() % _i);
-        }
+        var wait_ms = _i - (Date.now() % _i);
         $timeout(function () {
         $timeout(function () {
           self.start_scheduled_refresh(_i);
           self.start_scheduled_refresh(_i);
         }, wait_ms);
         }, wait_ms);

+ 0 - 1
public/app/features/dashboard/timepicker/dropdown.html

@@ -40,7 +40,6 @@
 			<div class="gf-form max-width-28">
 			<div class="gf-form max-width-28">
 				<select ng-model="ctrl.refresh.value" class="gf-form-input input-medium" ng-options="f.value as f.text for f in ctrl.refresh.options"></select>
 				<select ng-model="ctrl.refresh.value" class="gf-form-input input-medium" ng-options="f.value as f.text for f in ctrl.refresh.options"></select>
 			</div>
 			</div>
-			<editor-checkbox text="Align" model="ctrl.refresh.align"></editor-checkbox>
 			<div class="gf-form">
 			<div class="gf-form">
 				<button type="submit" class="btn gf-form-btn btn-secondary" ng-click="ctrl.applyCustom();" ng-disabled="!timeForm.$valid">Apply</button>
 				<button type="submit" class="btn gf-form-btn btn-secondary" ng-click="ctrl.applyCustom();" ng-disabled="!timeForm.$valid">Apply</button>
 			</div>
 			</div>

+ 1 - 1
public/app/features/dashboard/timepicker/timepicker.ts

@@ -109,7 +109,7 @@ export class TimePickerCtrl {
 
 
   applyCustom() {
   applyCustom() {
     if (this.refresh.value !== this.dashboard.refresh) {
     if (this.refresh.value !== this.dashboard.refresh) {
-      this.timeSrv.setAutoRefresh(this.refresh.value, this.refresh.align);
+      this.timeSrv.setAutoRefresh(this.refresh.value);
     }
     }
 
 
     this.timeSrv.setTime(this.timeRaw, true);
     this.timeSrv.setTime(this.timeRaw, true);