2019-07-10 11:28:05 +02:00
< clr-modal [ ( clrModalOpen ) ] = " openEditQuota " class = "quota-modal" [ clrModalStaticBackdrop ] = " staticBackdrop " [ clrModalClosable ] = " closable " >
< h3 class = "modal-title" > {{ defaultTextsObj.editQuota }}< / h3 >
2021-02-18 02:12:23 +01:00
< inline-alert class = "modal-title p-0" > < / inline-alert >
2019-07-10 11:28:05 +02:00
< div class = "modal-body" >
2019-10-31 07:12:36 +01:00
< label class = "body-label" > {{defaultTextsObj.setQuota}}< / label >
2019-07-10 11:28:05 +02:00
2019-09-05 09:13:13 +02:00
< form # quotaForm = "ngForm" class = " clr-form clr-form-horizontal"
2019-07-10 11:28:05 +02:00
[class.clr-form-compact-common]="!defaultTextsObj.isSystemDefaultQuota">
2019-09-05 09:13:13 +02:00
< clr-input-container >
2019-10-30 11:08:19 +01:00
< label for = "count" class = "left-label required" > {{ defaultTextsObj.storageQuota | translate}}
2019-09-05 09:13:13 +02:00
< clr-tooltip >
< clr-icon clrTooltipTrigger shape = "info-circle" size = "24" > < / clr-icon >
< clr-tooltip-content clrPosition = "top-right" clrSize = "lg" * clrIfOpen >
< span > {{'PROJECT.QUOTA_UNLIMIT_TIP' | translate }}< / span >
< / clr-tooltip-content >
< / clr-tooltip >
< div class = "clr-select-wrapper" >
< select id = "select-error" class = "clr-select" name = "storageUnit" [ ( ngModel ) ] = " quotaHardLimitValue . storageUnit " >
< ng-template ngFor let-quotaUnit [ ngForOf ] = " quotaUnits " let-i = "index" >
< option * ngIf = "i>1" [ value ] = " quotaUnit . UNIT " > {{ quotaUnit?.UNIT }}< / option >
< / ng-template >
< / select >
< / div >
< div class = "progress-block progress-min-width progress-div" * ngIf = "!defaultTextsObj.isSystemDefaultQuota" >
< div class = "progress success" [ class . danger ] = " isDangerColor ( + quotaHardLimitValue . storageLimit , quotaHardLimitValue . storageUsed , quotaHardLimitValue . storageUnit ) "
[class.warning]="isWarningColor(+quotaHardLimitValue.storageLimit,quotaHardLimitValue.storageUsed, quotaHardLimitValue.storageUnit)" >
< progress value = "{{storageInput.invalid || +quotaHardLimitValue.storageLimit === -1 ?0:quotaHardLimitValue.storageUsed}}"
max="{{storageInput.invalid?0:getByte(+quotaHardLimitValue.storageLimit, quotaHardLimitValue.storageUnit)}}"
data-displayval="100%">< / progress >
< / div >
< label class = "progress-label" >
2021-02-18 03:54:32 +01:00
<!-- the comments of progress , when storageLimit != - 1 get integer and unit in hard storage and used storage;and the unit of used storage <= the unit of hard storage
2019-09-05 09:13:13 +02:00
the other : get suitable number and unit-->
{{ +quotaHardLimitValue.storageLimit !== -1 ?(getIntegerAndUnit(getByte(quotaHardLimitValue.storageLimit,quotaHardLimitValue.storageUnit), quotaHardLimitValue.storageUsed).partNumberUsed
+ getIntegerAndUnit(getByte(quotaHardLimitValue.storageLimit,quotaHardLimitValue.storageUnit), quotaHardLimitValue.storageUsed).partCharacterUsed) : getSuitableUnit(quotaHardLimitValue.storageUsed)}}
{{ 'QUOTA.OF' | translate }}
{{ storageInput?.valid? +quotaHardLimitValue?.storageLimit ===-1? ('QUOTA.UNLIMITED' | translate): quotaHardLimitValue?.storageLimit :('QUOTA.INVALID_INPUT' | translate)}}
{{+quotaHardLimitValue?.storageLimit ===-1?'':quotaHardLimitValue?.storageUnit }}
< / label >
< / div >
2019-07-10 11:28:05 +02:00
< / label >
2019-09-05 09:13:13 +02:00
< input clrInput name = "storage" type = "text" # storageInput = "ngModel" class = "quota-input"
[(ngModel)]="quotaHardLimitValue.storageLimit"
id="storage" size="40"/>
< clr-control-error > {{ 'PROJECT.STORAGE_QUOTA_TIP' | translate }}< / clr-control-error >
< / clr-input-container >
2019-07-10 11:28:05 +02:00
< / form >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-outline" ( click ) = " onCancel ( ) " > {{'BUTTON.CANCEL' | translate}}< / button >
2019-12-30 07:59:17 +01:00
< button id = "edit-quota-save" type = "button" class = "btn btn-primary" [ disabled ] = " ! isValid "
2019-07-10 11:28:05 +02:00
(click)="onSubmit()">{{'BUTTON.OK' | translate}}< / button >
< / div >
2019-12-30 07:59:17 +01:00
< / clr-modal >