admin.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import AdminListUsersCtrl from './admin_list_users_ctrl';
  2. import './adminListOrgsCtrl';
  3. import './adminEditOrgCtrl';
  4. import './adminEditUserCtrl';
  5. import coreModule from 'app/core/core_module';
  6. class AdminSettingsCtrl {
  7. navModel: any;
  8. /** @ngInject **/
  9. constructor($scope, backendSrv, navModelSrv) {
  10. this.navModel = navModelSrv.getAdminNav();
  11. backendSrv.get('/api/admin/settings').then(function(settings) {
  12. $scope.settings = settings;
  13. });
  14. }
  15. }
  16. class AdminHomeCtrl {
  17. navModel: any;
  18. /** @ngInject **/
  19. constructor(navModelSrv) {
  20. this.navModel = navModelSrv.getAdminNav();
  21. }
  22. }
  23. export class AdminStatsCtrl {
  24. stats: any;
  25. navModel: any;
  26. /** @ngInject */
  27. constructor(backendSrv: any, navModelSrv) {
  28. this.navModel = navModelSrv.getAdminNav();
  29. backendSrv.get('/api/admin/stats').then(stats => {
  30. this.stats = stats;
  31. });
  32. }
  33. }
  34. export class ConfigurationHomeCtrl {
  35. navModel: any;
  36. /** @ngInject */
  37. constructor(private $scope, private backendSrv, private navModelSrv) {
  38. this.navModel = navModelSrv.getAdminNav();
  39. }
  40. }
  41. coreModule.controller('ConfigurationHomeCtrl', ConfigurationHomeCtrl);
  42. coreModule.controller('AdminSettingsCtrl', AdminSettingsCtrl);
  43. coreModule.controller('AdminHomeCtrl', AdminHomeCtrl);
  44. coreModule.controller('AdminStatsCtrl', AdminStatsCtrl);
  45. coreModule.controller('AdminListUsersCtrl', AdminListUsersCtrl);