mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 18:03:54 +00:00
27 lines
571 B
JavaScript
27 lines
571 B
JavaScript
import { Paginator } from '../../utils';
|
|
import template from './list.html';
|
|
|
|
function UsersCtrl(currentUser, Events, User) {
|
|
Events.record('view', 'page', 'users');
|
|
|
|
this.currentUser = currentUser;
|
|
this.users = new Paginator([], { itemsPerPage: 20 });
|
|
User.query((users) => {
|
|
this.users.updateRows(users);
|
|
});
|
|
}
|
|
|
|
export default function (ngModule) {
|
|
ngModule.component('usersListPage', {
|
|
controller: UsersCtrl,
|
|
template,
|
|
});
|
|
|
|
return {
|
|
'/users': {
|
|
template: '<users-list-page></users-list-page>',
|
|
title: 'Users',
|
|
},
|
|
};
|
|
}
|