File

device-list/add-smart-group.component.ts

Metadata

Index

Properties
Methods

Constructor

constructor(modal: BsModalRef, smartGroupsService: SmartGroupsService, deviceGridService: DeviceGridService, alert: AlertService, translateService: TranslateService)
Parameters :
Name Type Optional
modal BsModalRef No
smartGroupsService SmartGroupsService No
deviceGridService DeviceGridService No
alert AlertService No
translateService TranslateService No

Methods

close
close()
Returns : void
create
create()
Returns : any

Properties

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>

results matching ""

    No results matching ""