feat(plugins): added disable button to app config tab

This commit is contained in:
Torkel Ödegaard 2016-03-25 13:43:13 +01:00
parent 963e202745
commit 05cc370c55
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,7 @@
<div class="gf-form-button-row">
<button type="submit" class="btn btn-success" ng-click="ctrl.enable()" ng-show="!ctrl.model.enabled">Enable</button>
<button type="submit" class="btn btn-success" ng-click="ctrl.update()" ng-show="ctrl.model.enabled">Update</button>
<button type="submit" class="btn btn-danger" ng-click="ctrl.disable()" ng-show="ctrl.model.enabled">Disable</button>
</div>
</div>
</div>

View File

@ -122,6 +122,11 @@ export class PluginEditCtrl {
this.update();
}
disable() {
this.model.enabled = false;
this.model.pinned = false;
this.update();
}
}
angular.module('grafana.controllers').controller('PluginEditCtrl', PluginEditCtrl);