grafana/public/app/features/admin/index.ts

40 lines
1.3 KiB
TypeScript
Raw Normal View History

2018-09-07 10:55:38 -05:00
import AdminListUsersCtrl from './AdminListUsersCtrl';
import AdminEditUserCtrl from './AdminEditUserCtrl';
import AdminListOrgsCtrl from './AdminListOrgsCtrl';
import AdminEditOrgCtrl from './AdminEditOrgCtrl';
2018-09-10 06:38:45 -05:00
import StyleGuideCtrl from './StyleGuideCtrl';
2016-02-14 10:37:05 -06:00
2017-12-20 05:33:33 -06:00
import coreModule from 'app/core/core_module';
2019-05-13 02:38:19 -05:00
import { BackendSrv } from 'app/core/services/backend_srv';
import { NavModelSrv } from 'app/core/core';
2016-02-14 10:37:05 -06:00
class AdminSettingsCtrl {
navModel: any;
2016-02-14 10:37:05 -06:00
/** @ngInject */
2019-05-13 02:38:19 -05:00
constructor($scope: any, backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
this.navModel = navModelSrv.getNav('admin', 'server-settings', 0);
2016-02-14 10:37:05 -06:00
2019-05-13 02:38:19 -05:00
backendSrv.get('/api/admin/settings').then((settings: any) => {
2016-02-14 10:37:05 -06:00
$scope.settings = settings;
});
}
}
class AdminHomeCtrl {
navModel: any;
/** @ngInject */
2019-05-13 02:38:19 -05:00
constructor(navModelSrv: NavModelSrv) {
this.navModel = navModelSrv.getNav('admin');
2016-03-03 16:05:08 -06:00
}
2016-02-14 10:37:05 -06:00
}
2018-09-07 10:55:38 -05:00
coreModule.controller('AdminListUsersCtrl', AdminListUsersCtrl);
coreModule.controller('AdminEditUserCtrl', AdminEditUserCtrl);
coreModule.controller('AdminListOrgsCtrl', AdminListOrgsCtrl);
coreModule.controller('AdminEditOrgCtrl', AdminEditOrgCtrl);
2017-12-20 05:33:33 -06:00
coreModule.controller('AdminSettingsCtrl', AdminSettingsCtrl);
coreModule.controller('AdminHomeCtrl', AdminHomeCtrl);
2018-09-10 06:38:45 -05:00
coreModule.controller('StyleGuideCtrl', StyleGuideCtrl);