From e4d9620fc0ca9a25fd673abf68427f822871a662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 10 Sep 2018 13:38:45 +0200 Subject: [PATCH] move: moved styleguide to admin --- .../{styleguide/styleguide.ts => admin/StyleGuideCtrl.ts} | 4 +--- public/app/features/admin/index.ts | 4 ++-- .../features/{styleguide => admin/partials}/styleguide.html | 0 public/app/features/all.ts | 1 - public/app/routes/routes.ts | 4 ++-- 5 files changed, 5 insertions(+), 8 deletions(-) rename public/app/features/{styleguide/styleguide.ts => admin/StyleGuideCtrl.ts} (85%) rename public/app/features/{styleguide => admin/partials}/styleguide.html (100%) diff --git a/public/app/features/styleguide/styleguide.ts b/public/app/features/admin/StyleGuideCtrl.ts similarity index 85% rename from public/app/features/styleguide/styleguide.ts rename to public/app/features/admin/StyleGuideCtrl.ts index 4aac194d950..7be3009634d 100644 --- a/public/app/features/styleguide/styleguide.ts +++ b/public/app/features/admin/StyleGuideCtrl.ts @@ -1,7 +1,6 @@ -import coreModule from 'app/core/core_module'; import config from 'app/core/config'; -class StyleGuideCtrl { +export default class StyleGuideCtrl { theme: string; buttonNames = ['primary', 'secondary', 'inverse', 'success', 'warning', 'danger']; buttonSizes = ['btn-small', '', 'btn-large']; @@ -27,4 +26,3 @@ class StyleGuideCtrl { } } -coreModule.controller('StyleGuideCtrl', StyleGuideCtrl); diff --git a/public/app/features/admin/index.ts b/public/app/features/admin/index.ts index 7fc14791ea7..7d06155b6f8 100644 --- a/public/app/features/admin/index.ts +++ b/public/app/features/admin/index.ts @@ -2,6 +2,7 @@ import AdminListUsersCtrl from './AdminListUsersCtrl'; import AdminEditUserCtrl from './AdminEditUserCtrl'; import AdminListOrgsCtrl from './AdminListOrgsCtrl'; import AdminEditOrgCtrl from './AdminEditOrgCtrl'; +import StyleGuideCtrl from './StyleGuideCtrl'; import coreModule from 'app/core/core_module'; @@ -29,9 +30,8 @@ class AdminHomeCtrl { coreModule.controller('AdminListUsersCtrl', AdminListUsersCtrl); coreModule.controller('AdminEditUserCtrl', AdminEditUserCtrl); - coreModule.controller('AdminListOrgsCtrl', AdminListOrgsCtrl); coreModule.controller('AdminEditOrgCtrl', AdminEditOrgCtrl); - coreModule.controller('AdminSettingsCtrl', AdminSettingsCtrl); coreModule.controller('AdminHomeCtrl', AdminHomeCtrl); +coreModule.controller('StyleGuideCtrl', StyleGuideCtrl); diff --git a/public/app/features/styleguide/styleguide.html b/public/app/features/admin/partials/styleguide.html similarity index 100% rename from public/app/features/styleguide/styleguide.html rename to public/app/features/admin/partials/styleguide.html diff --git a/public/app/features/all.ts b/public/app/features/all.ts index 2d1e6d2cf9f..963f79e97ef 100644 --- a/public/app/features/all.ts +++ b/public/app/features/all.ts @@ -9,4 +9,3 @@ import './org/all'; import './admin'; import './alerting/NotificationsEditCtrl'; import './alerting/NotificationsListCtrl'; -import './styleguide/styleguide'; diff --git a/public/app/routes/routes.ts b/public/app/routes/routes.ts index 0fd76a8c8eb..bc590cfa553 100644 --- a/public/app/routes/routes.ts +++ b/public/app/routes/routes.ts @@ -3,8 +3,8 @@ import './ReactContainer'; import ServerStats from 'app/features/admin/ServerStats'; import AlertRuleList from 'app/features/alerting/AlertRuleList'; -import FolderSettings from 'app/containers/ManageDashboards/FolderSettings'; import FolderPermissions from 'app/containers/ManageDashboards/FolderPermissions'; +import FolderSettings from 'app/containers/ManageDashboards/FolderSettings'; import TeamPages from 'app/containers/Teams/TeamPages'; import TeamList from 'app/containers/Teams/TeamList'; @@ -262,7 +262,7 @@ export function setupAngularRoutes($routeProvider, $locationProvider) { .when('/styleguide/:page?', { controller: 'StyleGuideCtrl', controllerAs: 'ctrl', - templateUrl: 'public/app/features/styleguide/styleguide.html', + templateUrl: 'public/app/features/admin/partials/styleguide.html', }) .when('/alerting', { redirectTo: '/alerting/list',