mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
migrated admin files to ts (#9975)
This commit is contained in:
parent
b94839574c
commit
3acf106303
@ -1,7 +1,7 @@
|
|||||||
import AdminListUsersCtrl from './admin_list_users_ctrl';
|
import AdminListUsersCtrl from './admin_list_users_ctrl';
|
||||||
import './adminListOrgsCtrl';
|
import './admin_list_orgs_ctrl';
|
||||||
import './adminEditOrgCtrl';
|
import './admin_edit_org_ctrl';
|
||||||
import './adminEditUserCtrl';
|
import './admin_edit_user_ctrl';
|
||||||
|
|
||||||
import coreModule from 'app/core/core_module';
|
import coreModule from 'app/core/core_module';
|
||||||
|
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
|
||||||
],
|
|
||||||
function (angular) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
export class AdminEditOrgCtrl {
|
||||||
|
|
||||||
module.controller('AdminEditOrgCtrl', function($scope, $routeParams, backendSrv, $location, navModelSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject */
|
||||||
|
constructor($scope, $routeParams, backendSrv, $location, navModelSrv) {
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.navModel = navModelSrv.getAdminNav();
|
$scope.navModel = navModelSrv.getAdminNav();
|
||||||
|
|
||||||
@ -48,7 +44,7 @@ function (angular) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('AdminEditOrgCtrl', AdminEditOrgCtrl);
|
||||||
|
|
||||||
});
|
|
@ -1,13 +1,10 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
import _ from 'lodash';
|
||||||
'lodash',
|
|
||||||
],
|
|
||||||
function (angular, _) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
export class AdminEditUserCtrl {
|
||||||
|
|
||||||
module.controller('AdminEditUserCtrl', function($scope, $routeParams, backendSrv, $location, navModelSrv) {
|
/** @ngInject */
|
||||||
|
constructor($scope, $routeParams, backendSrv, $location, navModelSrv) {
|
||||||
$scope.user = {};
|
$scope.user = {};
|
||||||
$scope.newOrg = { name: '', role: 'Editor' };
|
$scope.newOrg = { name: '', role: 'Editor' };
|
||||||
$scope.permissions = {};
|
$scope.permissions = {};
|
||||||
@ -106,6 +103,7 @@ function (angular, _) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('AdminEditUserCtrl', AdminEditUserCtrl);
|
||||||
});
|
|
@ -1,13 +1,9 @@
|
|||||||
define([
|
import angular from 'angular';
|
||||||
'angular',
|
|
||||||
],
|
|
||||||
function (angular) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var module = angular.module('grafana.controllers');
|
export class AdminListOrgsCtrl {
|
||||||
|
|
||||||
module.controller('AdminListOrgsCtrl', function($scope, backendSrv, navModelSrv) {
|
|
||||||
|
|
||||||
|
/** @ngInject */
|
||||||
|
constructor($scope, backendSrv, navModelSrv) {
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.navModel = navModelSrv.getAdminNav();
|
$scope.navModel = navModelSrv.getAdminNav();
|
||||||
$scope.getOrgs();
|
$scope.getOrgs();
|
||||||
@ -35,7 +31,7 @@ function (angular) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.init();
|
$scope.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
angular.module('grafana.controllers').controller('AdminListOrgsCtrl', AdminListOrgsCtrl);
|
||||||
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user