Browse Source

Moving files to better locations

Torkel Ödegaard 7 years ago
parent
commit
9d5560afe2

+ 0 - 7
public/app/features/dashboard/partials/folder_permissions.html

@@ -1,7 +0,0 @@
-<page-header model="ctrl.navModel"></page-header>
-
-<div class="page-container page-body">
-  <dashboard-permissions ng-if="ctrl.dashboard && ctrl.meta"
-    dashboardId="ctrl.dashboard.id"
-  />
-</div>

+ 0 - 23
public/app/features/dashboard/partials/folder_settings.html

@@ -1,23 +0,0 @@
-<page-header model="ctrl.navModel"></page-header>
-
-<div class="page-container page-body">
-	<h2 class="page-sub-heading">Folder Settings</h2>
-
-	<div class="section gf-form-group">
-		<form name="folderSettingsForm" ng-submit="ctrl.save()">
-			<div class="gf-form">
-				<label class="gf-form-label width-7">Name</label>
-				<input type="text" class="gf-form-input width-30" ng-model='ctrl.title' ng-change="ctrl.titleChanged()"></input>
-			</div>
-			<div class="gf-form-button-row">
-				<button type="submit" class="btn btn-success" ng-disabled="!ctrl.canSave || !ctrl.hasChanged">
-					<i class="fa fa-save"></i>Save
-				</button>
-				<button class="btn btn-danger" ng-click="ctrl.delete($event)" ng-disabled="!ctrl.canSave">
-					<i class="fa fa-trash"></i>
-					Delete
-				</button>
-			</div>
-		</form>
-	</div>
-</div>

+ 2 - 1
public/app/features/manage-dashboards/CreateFolderCtrl.ts → public/app/features/folders/CreateFolderCtrl.ts

@@ -1,7 +1,7 @@
 import appEvents from 'app/core/app_events';
 import locationUtil from 'app/core/utils/location_util';
 
-export class CreateFolderCtrl {
+export default class CreateFolderCtrl {
   title = '';
   navModel: any;
   titleTouched = false;
@@ -38,3 +38,4 @@ export class CreateFolderCtrl {
       });
   }
 }
+

+ 2 - 1
public/app/features/manage-dashboards/FolderDashboardsCtrl.ts → public/app/features/folders/FolderDashboardsCtrl.ts

@@ -1,7 +1,7 @@
 import { FolderPageLoader } from './services/FolderPageLoader';
 import locationUtil from 'app/core/utils/location_util';
 
-export class FolderDashboardsCtrl {
+export default class FolderDashboardsCtrl {
   navModel: any;
   folderId: number;
   uid: string;
@@ -23,3 +23,4 @@ export class FolderDashboardsCtrl {
     }
   }
 }
+

+ 0 - 0
public/app/features/dashboard/partials/create_folder.html → public/app/features/folders/partials/create_folder.html


+ 0 - 0
public/app/features/dashboard/partials/folder_dashboards.html → public/app/features/folders/partials/folder_dashboards.html


+ 0 - 0
public/app/features/manage-dashboards/services/FolderPageLoader.ts → public/app/features/folders/services/FolderPageLoader.ts


+ 0 - 4
public/app/features/manage-dashboards/index.ts

@@ -8,14 +8,10 @@ export * from './components/UploadDashboard';
 // Controllers
 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);

+ 0 - 0
public/app/features/dashboard/partials/dashboard_import.html → public/app/features/manage-dashboards/partials/dashboard_import.html


+ 6 - 4
public/app/routes/routes.ts

@@ -10,6 +10,8 @@ import ApiKeys from 'app/features/api-keys/ApiKeysPage';
 import PluginListPage from 'app/features/plugins/PluginListPage';
 import FolderSettingsPage from 'app/features/folders/FolderSettingsPage';
 import FolderPermissions from 'app/features/folders/FolderPermissions';
+import CreateFolderCtrl from 'app/features/folders/CreateFolderCtrl';
+import FolderDashboardsCtrl from 'app/features/folders/FolderDashboardsCtrl';
 import DataSourcesListPage from 'app/features/datasources/DataSourcesListPage';
 import NewDataSourcePage from '../features/datasources/NewDataSourcePage';
 import UsersListPage from 'app/features/users/UsersListPage';
@@ -100,8 +102,8 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
       controllerAs: 'ctrl',
     })
     .when('/dashboards/folder/new', {
-      templateUrl: 'public/app/features/dashboard/partials/create_folder.html',
-      controller: 'CreateFolderCtrl',
+      templateUrl: 'public/app/features/folders/partials/create_folder.html',
+      controller: CreateFolderCtrl,
       controllerAs: 'ctrl',
     })
     .when('/dashboards/f/:uid/:slug/permissions', {
@@ -117,8 +119,8 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
       },
     })
     .when('/dashboards/f/:uid/:slug', {
-      templateUrl: 'public/app/features/dashboard/partials/folder_dashboards.html',
-      controller: 'FolderDashboardsCtrl',
+      templateUrl: 'public/app/features/folders/partials/folder_dashboards.html',
+      controller: FolderDashboardsCtrl,
       controllerAs: 'ctrl',
     })
     .when('/dashboards/f/:uid', {