Fix client admin

This commit is contained in:
Chocobozzz 2017-06-25 11:35:09 +02:00
parent f627b712c9
commit 42374cf5d4
3 changed files with 35 additions and 32 deletions

View File

@ -3,6 +3,7 @@
<h3>Requests stats</h3> <h3>Requests stats</h3>
<ng-template [ngIf]="stats">
<div *ngFor="let requestSchedulerName of statsTitles | keys" class="col-lg-4 col-md-12"> <div *ngFor="let requestSchedulerName of statsTitles | keys" class="col-lg-4 col-md-12">
<div class="panel panel-default" *ngIf="stats[requestSchedulerName] !== null"> <div class="panel panel-default" *ngIf="stats[requestSchedulerName] !== null">
<div class="panel-heading">{{ statsTitles[requestSchedulerName] }}</div> <div class="panel-heading">{{ statsTitles[requestSchedulerName] }}</div>
@ -39,5 +40,7 @@
</div> </div>
</div> </div>
</div> </div>
</ng-template>
</div> </div>
</div> </div>

View File

@ -3,7 +3,7 @@ import { Component } from '@angular/core'
import { NotificationsService } from 'angular2-notifications' import { NotificationsService } from 'angular2-notifications'
import { ConfirmService } from '../../../core' import { ConfirmService } from '../../../core'
import { User, Utils } from '../../../shared' import { RestDataSource, User, Utils } from '../../../shared'
import { UserService } from '../shared' import { UserService } from '../shared'
@Component({ @Component({
@ -12,7 +12,7 @@ import { UserService } from '../shared'
styleUrls: [ './user-list.component.scss' ] styleUrls: [ './user-list.component.scss' ]
}) })
export class UserListComponent { export class UserListComponent {
usersSource = null usersSource: RestDataSource = null
tableSettings = { tableSettings = {
mode: 'external', mode: 'external',
attr: { attr: {

View File

@ -19,7 +19,7 @@ export class RestDataSource extends ServerDataSource {
} }
protected addSortRequestOptions (requestOptions: RequestOptionsArgs) { protected addSortRequestOptions (requestOptions: RequestOptionsArgs) {
const searchParams = requestOptions.search as URLSearchParams const searchParams = requestOptions.params as URLSearchParams
if (this.sortConf) { if (this.sortConf) {
this.sortConf.forEach((fieldConf) => { this.sortConf.forEach((fieldConf) => {
@ -33,7 +33,7 @@ export class RestDataSource extends ServerDataSource {
} }
protected addPagerRequestOptions (requestOptions: RequestOptionsArgs) { protected addPagerRequestOptions (requestOptions: RequestOptionsArgs) {
const searchParams = requestOptions.search as URLSearchParams const searchParams = requestOptions.params as URLSearchParams
if (this.pagingConf && this.pagingConf['page'] && this.pagingConf['perPage']) { if (this.pagingConf && this.pagingConf['page'] && this.pagingConf['perPage']) {
const perPage = this.pagingConf['perPage'] const perPage = this.pagingConf['perPage']