mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
Currently there is a limit of 1000 users in the global user list. This change introduces paging so that an admin can see all users and not just the first 1000. Adds a new route to the api - /api/users/search that returns a list of users and a total count. It takes two parameters perpage and page that enable paging. Fixes #7469
41 lines
902 B
TypeScript
41 lines
902 B
TypeScript
import AdminListUsersCtrl from './admin_list_users_ctrl';
|
|
import './adminListOrgsCtrl';
|
|
import './adminEditOrgCtrl';
|
|
import './adminEditUserCtrl';
|
|
|
|
import coreModule from 'app/core/core_module';
|
|
|
|
class AdminSettingsCtrl {
|
|
|
|
/** @ngInject **/
|
|
constructor($scope, backendSrv) {
|
|
|
|
backendSrv.get('/api/admin/settings').then(function(settings) {
|
|
$scope.settings = settings;
|
|
});
|
|
|
|
}
|
|
}
|
|
|
|
class AdminHomeCtrl {
|
|
/** @ngInject **/
|
|
constructor() {
|
|
}
|
|
}
|
|
|
|
export class AdminStatsCtrl {
|
|
stats: any;
|
|
|
|
/** @ngInject */
|
|
constructor(backendSrv: any) {
|
|
backendSrv.get('/api/admin/stats').then(stats => {
|
|
this.stats = stats;
|
|
});
|
|
}
|
|
}
|
|
|
|
coreModule.controller('AdminSettingsCtrl', AdminSettingsCtrl);
|
|
coreModule.controller('AdminHomeCtrl', AdminHomeCtrl);
|
|
coreModule.controller('AdminStatsCtrl', AdminStatsCtrl);
|
|
coreModule.controller('AdminListUsersCtrl', AdminListUsersCtrl);
|