sub-assets/delete-assets-modal/delete-assets-modal.component.ts
selector | c8y-delete-assets-modal |
templateUrl | ./delete-assets-modal.component.html |
Properties |
Methods |
Inputs |
constructor(translateService: TranslateService, gainsightService: GainsightService)
|
|||||||||
Parameters :
|
asset |
Type : IManagedObject
|
showWithCascadeCheckbox |
Type : boolean
|
Default value : true
|
showWithDeviceUserCheckbox |
Type : boolean
|
Default value : false
|
Async ngAfterViewInit |
ngAfterViewInit()
|
Returns :
any
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
onClose |
onClose()
|
Returns :
void
|
onDismiss |
onDismiss()
|
Returns :
void
|
closeSubject |
Type : Subject<DeleteModalCheckboxes>
|
Default value : new Subject()
|
config |
Type : DeleteModalCheckboxes
|
Default value : {
cascade: false,
withDeviceUser: false
}
|
labels |
Type : ModalLabels
|
Default value : { ok: gettext('Delete'), cancel: gettext('Cancel') }
|
message |
Type : string
|
modalRef |
Type : ConfirmModalComponent
|
Decorators :
@ViewChild('modalRef', {static: false})
|
status |
Type : StatusType
|
Default value : Status.DANGER
|
title |
Default value : gettext('Delete asset')
|
<c8y-confirm-modal [title]="title" [status]="status" [labels]="labels" #modalRef>
<form #assetsForm="ngForm">
<p class="text-wrap m-b-16">
{{ message | translate }}
</p>
<c8y-form-group *ngIf="showWithCascadeCheckbox" class="m-b-0">
<label title="{{ 'Delete devices' | translate }}" class="c8y-checkbox">
<input
type="checkbox"
name="cascade" [(ngModel)]="config.cascade"
c8yProductExperience
[actionName]="'deleteAssetsModal:DeleteDevices'"
/>
<span></span>
<span>
{{ 'Also delete all devices inside selected asset and its subassets.' | translate }}
</span>
</label>
</c8y-form-group>
<c8y-form-group *ngIf="showWithDeviceUserCheckbox" class="m-b-0">
<label title="{{ 'Delete associated device owner' | translate }}" class="c8y-checkbox">
<input
type="checkbox"
name="withDeviceUser" [(ngModel)]="config.withDeviceUser"
c8yProductExperience
[actionName]="'deleteAssetsModal:DeleteDeviceOwner'"
/>
<span></span>
<span>
{{ 'Also delete associated device owner.' | translate }}
</span>
</label>
</c8y-form-group>
</form>
</c8y-confirm-modal>