refactor: moved stuff into new features dir manage-dashboards

This commit is contained in:
Torkel Ödegaard 2018-09-10 13:59:31 +02:00
parent e4d9620fc0
commit 6c90a53654
9 changed files with 12 additions and 11 deletions

View File

@ -3,9 +3,9 @@ import './templating/all';
import './plugins/all';
import './dashboard/all';
import './playlist/all';
import './snapshot/all';
import './panel/all';
import './org/all';
import './admin';
import './alerting/NotificationsEditCtrl';
import './alerting/NotificationsListCtrl';
import './manage-dashboards';

View File

@ -31,13 +31,11 @@ import './panellinks/module';
import './dashlinks/module';
import coreModule from 'app/core/core_module';
import { DashboardListCtrl } from './dashboard_list_ctrl';
import { FolderDashboardsCtrl } from './folder_dashboards_ctrl';
import { FolderSettingsCtrl } from './folder_settings_ctrl';
import { DashboardImportCtrl } from './dashboard_import_ctrl';
import { CreateFolderCtrl } from './create_folder_ctrl';
coreModule.controller('DashboardListCtrl', DashboardListCtrl);
coreModule.controller('FolderDashboardsCtrl', FolderDashboardsCtrl);
coreModule.controller('FolderSettingsCtrl', FolderSettingsCtrl);
coreModule.controller('DashboardImportCtrl', DashboardImportCtrl);

View File

@ -1,7 +1,6 @@
import angular from 'angular';
import _ from 'lodash';
export class SnapshotsCtrl {
export class SnapshotListCtrl {
navModel: any;
snapshots: any;
@ -35,5 +34,3 @@ export class SnapshotsCtrl {
});
}
}
angular.module('grafana.controllers').controller('SnapshotsCtrl', SnapshotsCtrl);

View File

@ -0,0 +1,7 @@
import coreModule from 'app/core/core_module';
import { DashboardListCtrl } from './DashboardListCtrl';
import { SnapshotListCtrl } from './SnapshotListCtrl';
coreModule.controller('DashboardListCtrl', DashboardListCtrl);
coreModule.controller('SnapshotListCtrl', SnapshotListCtrl);

View File

@ -1 +0,0 @@
import './snapshot_ctrl';

View File

@ -81,7 +81,7 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
controllerAs: 'ctrl',
})
.when('/dashboards', {
templateUrl: 'public/app/features/dashboard/partials/dashboard_list.html',
templateUrl: 'public/app/features/manage-dashboards/partials/dashboard_list.html',
controller: 'DashboardListCtrl',
controllerAs: 'ctrl',
})
@ -240,8 +240,8 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
pageClass: 'sidemenu-hidden',
})
.when('/dashboard/snapshots', {
templateUrl: 'public/app/features/snapshot/partials/snapshots.html',
controller: 'SnapshotsCtrl',
templateUrl: 'public/app/features/manage-dashboards/partials/snapshot_list.html',
controller: 'SnapshotListCtrl',
controllerAs: 'ctrl',
})
.when('/plugins', {