prettier: ran on all files again, sorry. now settings are defined in package.json

This commit is contained in:
Torkel Ödegaard
2017-12-21 08:39:31 +01:00
parent af34f9977e
commit 3a1f52d8a2
262 changed files with 3996 additions and 7431 deletions

View File

@@ -14,13 +14,7 @@ export class SettingsCtrl {
sections: any[];
/** @ngInject */
constructor(
private $scope,
private $location,
private $rootScope,
private backendSrv,
private dashboardSrv
) {
constructor(private $scope, private $location, private $rootScope, private backendSrv, private dashboardSrv) {
// temp hack for annotations and variables editors
// that rely on inherited scope
$scope.dashboard = this.dashboard;
@@ -36,11 +30,7 @@ export class SettingsCtrl {
this.buildSectionList();
this.onRouteUpdated();
$rootScope.onAppEvent(
'$routeUpdate',
this.onRouteUpdated.bind(this),
$scope
);
$rootScope.onAppEvent('$routeUpdate', this.onRouteUpdated.bind(this), $scope);
}
buildSectionList() {
@@ -139,12 +129,10 @@ export class SettingsCtrl {
makeEditable() {
this.dashboard.editable = true;
return this.dashboardSrv
.saveDashboard({ makeEditable: true, overwrite: false })
.then(() => {
// force refresh whole page
window.location.href = window.location.href;
});
return this.dashboardSrv.saveDashboard({ makeEditable: true, overwrite: false }).then(() => {
// force refresh whole page
window.location.href = window.location.href;
});
}
deleteDashboard() {
@@ -176,10 +164,7 @@ export class SettingsCtrl {
deleteDashboardConfirmed() {
this.backendSrv.deleteDashboard(this.dashboard.meta.slug).then(() => {
appEvents.emit('alert-success', [
'Dashboard Deleted',
this.dashboard.title + ' has been deleted',
]);
appEvents.emit('alert-success', ['Dashboard Deleted', this.dashboard.title + ' has been deleted']);
this.$location.url('/');
});
}