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,41 +3,44 @@
<h3>Requests stats</h3>
<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-heading">{{ statsTitles[requestSchedulerName] }}</div>
<ng-template [ngIf]="stats">
<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-heading">{{ statsTitles[requestSchedulerName] }}</div>
<div class="panel-body">
<div class="requests-general">
<div>
<span class="label-description">Remaining requests:</span>
{{ stats[requestSchedulerName].totalRequests }}
<div class="panel-body">
<div class="requests-general">
<div>
<span class="label-description">Remaining requests:</span>
{{ stats[requestSchedulerName].totalRequests }}
</div>
<div>
<span class="label-description">Interval seconds between requests:</span>
{{ stats[requestSchedulerName].secondsInterval }}
</div>
<div>
<span class="label-description">Remaining time before the scheduled request:</span>
{{ stats[requestSchedulerName].remainingSeconds }}
</div>
</div>
<div>
<span class="label-description">Interval seconds between requests:</span>
{{ stats[requestSchedulerName].secondsInterval }}
</div>
<div class="requests-limit">
<div>
<span class="label-description">Maximum number of different pods for a scheduled request:</span>
{{ stats[requestSchedulerName].requestsLimitPods }}
</div>
<div>
<span class="label-description">Remaining time before the scheduled request:</span>
{{ stats[requestSchedulerName].remainingSeconds }}
</div>
</div>
<div class="requests-limit">
<div>
<span class="label-description">Maximum number of different pods for a scheduled request:</span>
{{ stats[requestSchedulerName].requestsLimitPods }}
</div>
<div>
<span class="label-description">Maximum number of requests per pod for a scheduled request:</span>
{{ stats[requestSchedulerName].requestsLimitPerPod }}
<div>
<span class="label-description">Maximum number of requests per pod for a scheduled request:</span>
{{ stats[requestSchedulerName].requestsLimitPerPod }}
</div>
</div>
</div>
</div>
</div>
</div>
</ng-template>
</div>
</div>

View File

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

View File

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