device-list/add-smart-group.component.ts
selector | c8y-add-smart-group |
templateUrl | ./add-smart-group.component.html |
Properties |
Methods |
constructor(modal: BsModalRef, smartGroupsService: SmartGroupsService, deviceGridService: DeviceGridService, alert: AlertService, translateService: TranslateService)
|
||||||||||||||||||
Parameters :
|
close |
close()
|
Returns :
void
|
create |
create()
|
Returns :
any
|
configKey |
Type : string
|
deviceQuery |
Type : string
|
filterConfig |
smartGroup |
Type : object
|
Default value : {
name: '',
type: 'c8y_DynamicGroup',
c8y_IsDynamicGroup: {}
}
|
<div class="viewport-modal">
<div class="modal-header dialog-header">
<i [c8yIcon]="'c8y-group-smart'"></i>
<h4 translate>Create smart group</h4>
</div>
<div class="modal-inner-scroll">
<div class="modal-body">
<form #createSmartGroup="ngForm">
<c8y-form-group>
<label translate for="name">Group name</label>
<input
id="name"
type="text"
class="form-control"
autocomplete="off"
name="name"
[(ngModel)]="smartGroup.name"
placeholder="{{ 'e.g. My smart group' | translate }}"
required
/>
</c8y-form-group>
</form>
</div>
</div>
<div class="modal-footer">
<button title="{{ 'Cancel' | translate }}" class="btn btn-default" (click)="close()" translate>
Cancel
</button>
<button
title="{{ 'Create' | translate }}"
class="btn btn-primary"
(click)="create()"
[disabled]="createSmartGroup.form.invalid"
translate
>
Create
</button>
</div>
</div>