Browse Source

UI: Refactoring

pull/12616/head
Artem Dzhereleiko 2 years ago
parent
commit
f3a0d346bc
  1. 20
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html

20
ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html

@ -480,17 +480,18 @@
ignoreAuthorityFilter ignoreAuthorityFilter
[allowedEntityTypes]="allowEntityTypeForEntitiesLimit"> [allowedEntityTypes]="allowEntityTypeForEntitiesLimit">
</tb-entity-type-list> </tb-entity-type-list>
<div class="limit-slider-container flex flex-row items-center justify-start xs:flex-col xs:items-stretch"> <div class="limit-slider-container mb-4 flex flex-row items-center justify-start xs:flex-col xs:items-stretch">
<span translate>notification.threshold</span> <span translate>notification.threshold</span>
<div class="flex flex-1 flex-row items-center justify-start"> <div class="flex flex-1 flex-row items-center justify-start">
<mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel"> <mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel">
<input matSliderThumb formControlName="threshold"> <input matSliderThumb formControlName="threshold">
</mat-slider> </mat-slider>
<mat-form-field class="limit-slider-value"> <mat-form-field class="limit-slider-value" subscriptSizing="dynamic">
<input matInput formControlName="threshold" type="number" step="1" <input matInput formControlName="threshold" type="number" step="1"
[value]="entitiesLimitTemplateForm.get('triggerConfig.threshold').value" [value]="entitiesLimitTemplateForm.get('triggerConfig.threshold').value"
min="0" min="0"
max="100"/> max="100"/>
<span class="mr-2" matSuffix>%</span>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
@ -598,45 +599,48 @@
<form [formGroup]="resourceUsageShortageTemplateForm"> <form [formGroup]="resourceUsageShortageTemplateForm">
<fieldset class="fields-group tb-margin" formGroupName="triggerConfig"> <fieldset class="fields-group tb-margin" formGroupName="triggerConfig">
<legend translate>notification.filter</legend> <legend translate>notification.filter</legend>
<div class="limit-slider-container flex flex-row items-center justify-start xs:flex-col xs:items-stretch"> <div class="limit-slider-container mb-4 flex flex-row items-center justify-start xs:flex-col xs:items-stretch">
<span translate>notification.cpu-threshold</span> <span translate>notification.cpu-threshold</span>
<div class="flex flex-1 flex-row items-center justify-start"> <div class="flex flex-1 flex-row items-center justify-start">
<mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel"> <mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel">
<input matSliderThumb formControlName="cpuThreshold"> <input matSliderThumb formControlName="cpuThreshold">
</mat-slider> </mat-slider>
<mat-form-field class="limit-slider-value"> <mat-form-field class="limit-slider-value" subscriptSizing="dynamic">
<input matInput formControlName="cpuThreshold" type="number" step="1" <input matInput formControlName="cpuThreshold" type="number" step="1"
[value]="resourceUsageShortageTemplateForm.get('triggerConfig.cpuThreshold').value" [value]="resourceUsageShortageTemplateForm.get('triggerConfig.cpuThreshold').value"
min="0" min="0"
max="100"/> max="100"/>
<span class="mr-2" matSuffix>%</span>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<div class="limit-slider-container flex flex-row items-center justify-start xs:flex-col xs:items-stretch"> <div class="limit-slider-container mb-4 flex flex-row items-center justify-start xs:flex-col xs:items-stretch">
<span translate>notification.ram-threshold</span> <span translate>notification.ram-threshold</span>
<div class="flex flex-1 flex-row items-center justify-start"> <div class="flex flex-1 flex-row items-center justify-start">
<mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel"> <mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel">
<input matSliderThumb formControlName="ramThreshold"> <input matSliderThumb formControlName="ramThreshold">
</mat-slider> </mat-slider>
<mat-form-field class="limit-slider-value"> <mat-form-field class="limit-slider-value" subscriptSizing="dynamic">
<input matInput formControlName="ramThreshold" type="number" step="1" <input matInput formControlName="ramThreshold" type="number" step="1"
[value]="resourceUsageShortageTemplateForm.get('triggerConfig.ramThreshold').value" [value]="resourceUsageShortageTemplateForm.get('triggerConfig.ramThreshold').value"
min="0" min="0"
max="100"/> max="100"/>
<span class="mr-2" matSuffix>%</span>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
<div class="limit-slider-container flex flex-row items-center justify-start xs:flex-col xs:items-stretch"> <div class="limit-slider-container mb-4 flex flex-row items-center justify-start xs:flex-col xs:items-stretch">
<span translate>notification.storage-threshold</span> <span translate>notification.storage-threshold</span>
<div class="flex flex-1 flex-row items-center justify-start"> <div class="flex flex-1 flex-row items-center justify-start">
<mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel"> <mat-slider class="flex-1" min="0" max="100" step="1" discrete [displayWith]="formatLabel">
<input matSliderThumb formControlName="storageThreshold"> <input matSliderThumb formControlName="storageThreshold">
</mat-slider> </mat-slider>
<mat-form-field class="limit-slider-value"> <mat-form-field class="limit-slider-value" subscriptSizing="dynamic">
<input matInput formControlName="storageThreshold" type="number" step="1" <input matInput formControlName="storageThreshold" type="number" step="1"
[value]="resourceUsageShortageTemplateForm.get('triggerConfig.storageThreshold').value" [value]="resourceUsageShortageTemplateForm.get('triggerConfig.storageThreshold').value"
min="0" min="0"
max="100"/> max="100"/>
<span class="mr-2" matSuffix>%</span>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>

Loading…
Cancel
Save