You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/07/22 14:58:22 UTC
[incubator-dlab] 01/03: [DLAB-814]: updated quota controls
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-814
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 44fcee0d952c636839896af2fbde1672663072f5
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon Jul 22 17:07:49 2019 +0300
[DLAB-814]: updated quota controls
---
.../manage-environment-dilog.component.html | 41 ++++++++++++++--------
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/manage-environment/manage-environment-dilog.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/management/manage-environment/manage-environment-dilog.component.html
index 3f183bd..77d84f1 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/manage-environment/manage-environment-dilog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/manage-environment/manage-environment-dilog.component.html
@@ -24,32 +24,42 @@
</header>
<div class="dialog-content">
<div class="content-box">
- <div *ngIf="data.usersList?.length">
+ <div *ngIf="data.projectsList?.length">
<form [formGroup]="manageUsersForm" (submit)="setBudgetLimits(manageUsersForm.value)" novalidate>
<mat-list>
<mat-list-item class="list-header">
- <div class="username">User</div>
+ <div class="username">Project</div>
<div class="quotes" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">Limit</div>
<div class="action">Actions</div>
</mat-list-item>
- <div class="scrolling-content" id="scrolling" formArrayName="users">
- <mat-list-item *ngFor="let item of usersEnvironments.controls; let i=index" [formGroupName]="i" class="list-item">
- <div class="username ellipsis">{{ manageUsersForm.controls['users'].controls[i].value['name'] }}</div>
+ <div class="scrolling-content" id="scrolling" formArrayName="projects">
+ <mat-list-item *ngFor="let item of usersEnvironments.controls; let i=index" [formGroupName]="i"
+ class="list-item">
+ <div class="username ellipsis">{{ manageUsersForm.controls['projects'].controls[i].value['name'] }}
+ </div>
<div class="quotes" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">
- <input type="number" min="0" placeholder="Enter limit, in USD" formControlName="budget">
- <span class="danger_color" *ngIf="!manageUsersForm?.controls['users'].controls[i].controls['budget'].valid && !manageUsersForm?.controls['users'].controls[i].controls['budget'].hasError('overrun')">Only positive integers are allowed</span>
- <span class="danger_color" *ngIf="manageUsersForm?.controls['users'].controls[i].controls['budget'].hasError('overrun')">Per-user quotes cannot be greater than total budget</span>
+ <input type="number" min="0" placeholder="Enter limit, in USD" formControlName="budget">
+ <span class="danger_color"
+ *ngIf="!manageUsersForm?.controls['usprojectsers'].controls[i].controls['budget'].valid && !manageUsersForm?.controls['projects'].controls[i].controls['budget'].hasError('overrun')">Only
+ positive integers are allowed</span>
+ <span class="danger_color"
+ *ngIf="manageUsersForm?.controls['projects'].controls[i].controls['budget'].hasError('overrun')">Per-user
+ quotes cannot be greater than total budget</span>
</div>
<div class="action">
- <span *ngIf=" manageUsersForm.controls['users'].controls[i].value['status'] === 'ACTIVE'; else not_active" matTooltip="Stop" matTooltipPosition="above" (click)="applyAction('stop', item)"><i class="material-icons">pause_circle_outline</i></span>
+ <span
+ *ngIf=" manageUsersForm.controls['projects'].controls[i].value['status'] === 'ACTIVE'; else not_active"
+ matTooltip="Stop" matTooltipPosition="above" (click)="applyAction('stop', item)"><i
+ class="material-icons">pause_circle_outline</i></span>
<ng-template #not_active>
- <span class="disabled" matTooltip="User's environment is not active" matTooltipPosition="above">
+ <span class="disabled" matTooltip="Project is not active" matTooltipPosition="above">
<i class="material-icons">pause_circle_outline</i>
</span>
</ng-template>
- <span matTooltip="Terminate" matTooltipPosition="above" (click)="applyAction('terminate', item)"><i class="material-icons">phonelink_off</i></span>
+ <span matTooltip="Terminate" matTooltipPosition="above" (click)="applyAction('terminate', item)"><i
+ class="material-icons">phonelink_off</i></span>
</div>
</mat-list-item>
</div>
@@ -57,18 +67,19 @@
<label class="label">Total budget</label>
<div class="control">
<input type="number" formControlName="total" placeholder="Enter total budget, in USD">
- <span class="danger_color" *ngIf="manageUsersForm?.controls['total'].hasError('overrun')">Total budget cannot be lower than a sum of users quotes</span>
+ <span class="danger_color" *ngIf="manageUsersForm?.controls['total'].hasError('overrun')">Total budget
+ cannot be lower than a sum of users quotes</span>
</div>
</div>
<div class="text-center m-top-30" *ngIf="DICTIONARY.cloud_provider !== 'gcp'">
<button mat-raised-button type="button" (click)="dialogRef.close()" class="butt action">Cancel</button>
- <button mat-raised-button type="submit" [disabled]="!manageUsersForm.valid"
- class="butt butt-success" [ngClass]="{'not-allowed': !manageUsersForm.valid}">Apply</button>
+ <button mat-raised-button type="submit" [disabled]="!manageUsersForm.valid" class="butt butt-success"
+ [ngClass]="{'not-allowed': !manageUsersForm.valid}">Apply</button>
</div>
</mat-list>
</form>
</div>
- <div class="info message" *ngIf="!data?.usersList.length">No active users environments</div>
+ <div class="info message" *ngIf="!data?.projectsList.length">No active projects</div>
</div>
</div>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org