fix: another set of fixes for refresh

This commit is contained in:
Torkel Ödegaard 2018-10-19 10:05:48 +02:00
parent 11f66bb909
commit 936fe56080
5 changed files with 5 additions and 10 deletions

View File

@ -148,7 +148,7 @@ export class KeybindingSrv {
this.bind('mod+o', () => { this.bind('mod+o', () => {
dashboard.graphTooltip = (dashboard.graphTooltip + 1) % 3; dashboard.graphTooltip = (dashboard.graphTooltip + 1) % 3;
appEvents.emit('graph-hover-clear'); appEvents.emit('graph-hover-clear');
this.$rootScope.$broadcast('refresh'); dashboard.startRefresh();
}); });
this.bind('mod+s', e => { this.bind('mod+s', e => {
@ -257,7 +257,7 @@ export class KeybindingSrv {
}); });
this.bind('d r', () => { this.bind('d r', () => {
this.$rootScope.$broadcast('refresh'); dashboard.startRefresh();
}); });
this.bind('d s', () => { this.bind('d s', () => {

View File

@ -117,10 +117,6 @@ export class DashboardCtrl {
return this.dashboard; return this.dashboard;
} }
timezoneChanged() {
this.$rootScope.$broadcast('refresh');
}
getPanelContainer() { getPanelContainer() {
return this; return this;
} }

View File

@ -32,7 +32,7 @@ export class SettingsCtrl {
this.$scope.$on('$destroy', () => { this.$scope.$on('$destroy', () => {
this.dashboard.updateSubmenuVisibility(); this.dashboard.updateSubmenuVisibility();
this.$rootScope.$broadcast('refresh'); this.dashboard.startRefresh();
setTimeout(() => { setTimeout(() => {
this.$rootScope.appEvent('dash-scroll', { restore: true }); this.$rootScope.appEvent('dash-scroll', { restore: true });
}); });

View File

@ -46,8 +46,7 @@ export class ShareSnapshotCtrl {
$scope.loading = true; $scope.loading = true;
$scope.snapshot.external = external; $scope.snapshot.external = external;
$scope.dashboard.startRefresh();
$rootScope.$broadcast('refresh');
$timeout(() => { $timeout(() => {
$scope.saveSnapshot(external); $scope.saveSnapshot(external);

View File

@ -5,7 +5,7 @@
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label width-10">Timezone</label> <label class="gf-form-label width-10">Timezone</label>
<div class="gf-form-select-wrapper"> <div class="gf-form-select-wrapper">
<select ng-model="ctrl.dashboard.timezone" class='gf-form-input' ng-options="f.value as f.text for f in [{value: '', text: 'Default'}, {value: 'browser', text: 'Local browser time'},{value: 'utc', text: 'UTC'}]" ng-change="timezoneChanged()"></select> <select ng-model="ctrl.dashboard.timezone" class='gf-form-input' ng-options="f.value as f.text for f in [{value: '', text: 'Default'}, {value: 'browser', text: 'Local browser time'},{value: 'utc', text: 'UTC'}]"></select>
</div> </div>
</div> </div>