mirror of https://github.com/grafana/grafana
Began work on improving structure and organization of components under features/dashboard, #14062
parent
2264c27504
commit
26385dea8f
@ -1,6 +1,6 @@ |
||||
import config from 'app/core/config'; |
||||
import _ from 'lodash'; |
||||
import { DashboardModel } from '../dashboard_model'; |
||||
import { DashboardModel } from '../../dashboard_model'; |
||||
|
||||
export class DashboardExporter { |
||||
constructor(private datasourceSrv) {} |
@ -0,0 +1,2 @@ |
||||
export { DashboardExporter } from './DashboardExporter'; |
||||
export { DashExportCtrl } from './DashExportCtrl'; |
@ -1,6 +1,6 @@ |
||||
import angular from 'angular'; |
||||
import _ from 'lodash'; |
||||
import { iconMap } from './editor'; |
||||
import { iconMap } from './DashLinksEditorCtrl'; |
||||
|
||||
function dashLinksContainer() { |
||||
return { |
@ -0,0 +1,2 @@ |
||||
export { DashLinksContainerCtrl } from './DashLinksContainerCtrl'; |
||||
export { DashLinksEditorCtrl } from './DashLinksEditorCtrl'; |
@ -0,0 +1 @@ |
||||
export { DashNavCtrl } from './DashNavCtrl'; |
@ -0,0 +1 @@ |
||||
export { ExportDataModalCtrl } from './ExportDataModalCtrl'; |
@ -0,0 +1 @@ |
||||
export { FolderPickerCtrl } from './FolderPickerCtrl'; |
@ -1,25 +0,0 @@ |
||||
import { FolderPageLoader } from './folder_page_loader'; |
||||
|
||||
export class FolderPermissionsCtrl { |
||||
navModel: any; |
||||
folderId: number; |
||||
uid: string; |
||||
dashboard: any; |
||||
meta: any; |
||||
|
||||
/** @ngInject */ |
||||
constructor(private backendSrv, navModelSrv, private $routeParams, $location) { |
||||
if (this.$routeParams.uid) { |
||||
this.uid = $routeParams.uid; |
||||
|
||||
new FolderPageLoader(this.backendSrv).load(this, this.uid, 'manage-folder-permissions').then(folder => { |
||||
if ($location.path() !== folder.meta.url) { |
||||
$location.path(`${folder.meta.url}/permissions`).replace(); |
||||
} |
||||
|
||||
this.dashboard = folder.dashboard; |
||||
this.meta = folder.meta; |
||||
}); |
||||
} |
||||
} |
||||
} |
@ -1,5 +1,5 @@ |
||||
import { DashboardImportCtrl } from '../dashboard_import_ctrl'; |
||||
import config from '../../../core/config'; |
||||
import { DashboardImportCtrl } from './DashboardImportCtrl'; |
||||
import config from 'app/core/config'; |
||||
|
||||
describe('DashboardImportCtrl', () => { |
||||
const ctx: any = {}; |
@ -1,4 +1,4 @@ |
||||
import { FolderPageLoader } from './folder_page_loader'; |
||||
import { FolderPageLoader } from './services/FolderPageLoader'; |
||||
import locationUtil from 'app/core/utils/location_util'; |
||||
|
||||
export class FolderDashboardsCtrl { |
@ -0,0 +1 @@ |
||||
export { MoveToFolderCtrl } from './MoveToFolderCtrl'; |
@ -1,7 +1,15 @@ |
||||
import coreModule from 'app/core/core_module'; |
||||
export * from './components/MoveToFolderModal'; |
||||
|
||||
import { DashboardListCtrl } from './DashboardListCtrl'; |
||||
import { SnapshotListCtrl } from './SnapshotListCtrl'; |
||||
import { FolderDashboardsCtrl } from './FolderDashboardsCtrl'; |
||||
import { DashboardImportCtrl } from './DashboardImportCtrl'; |
||||
import { CreateFolderCtrl } from './CreateFolderCtrl'; |
||||
|
||||
import coreModule from 'app/core/core_module'; |
||||
|
||||
coreModule.controller('DashboardListCtrl', DashboardListCtrl); |
||||
coreModule.controller('SnapshotListCtrl', SnapshotListCtrl); |
||||
coreModule.controller('FolderDashboardsCtrl', FolderDashboardsCtrl); |
||||
coreModule.controller('DashboardImportCtrl', DashboardImportCtrl); |
||||
coreModule.controller('CreateFolderCtrl', CreateFolderCtrl); |
||||
|
Loading…
Reference in new issue