File

sub-assets/assign-devices/assign-child-devices.component.ts

Metadata

Index

Properties
Methods
Inputs
Outputs
HostListeners

Constructor

constructor(alert: AlertService, subAssetsService: SubAssetsService, inventoryService: InventoryService)
Parameters :
Name Type Optional
alert AlertService No
subAssetsService SubAssetsService No
inventoryService InventoryService No

Inputs

currentGroupId
Type : string
parentDevice
Type : IManagedObject
refresh
Type : any
Default value : new EventEmitter<any>()

Outputs

onCancel
Type : EventEmitter

HostListeners

document:keydown.enter
Arguments : '$event'
document:keydown.enter(event: KeyboardEvent)
document:keydown.escape
Arguments : '$event'
document:keydown.escape(event: KeyboardEvent)

Methods

Async assignDevices
assignDevices()
Returns : any
Async ngOnInit
ngOnInit()
Returns : any
onEnterKeyDown
onEnterKeyDown(event: KeyboardEvent)
Decorators :
@HostListener('document:keydown.enter', ['$event'])
Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
onEscapeKeyDown
onEscapeKeyDown(event: KeyboardEvent)
Decorators :
@HostListener('document:keydown.escape', ['$event'])
Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
onSelected
onSelected(selectedDevicesIDs: string[])
Parameters :
Name Type Optional
selectedDevicesIDs string[] No
Returns : void
setNotIncludedInGroupQuery
setNotIncludedInGroupQuery()
Returns : void

Properties

baseQuery
Type : any
canAssignDevice
Type : boolean
Default value : false
pendingStatus
Type : boolean
Default value : false
selected
Type : string[]
Default value : []
<div class="card-block flex-no-shrink separator-bottom col-xs-12 large-padding p-t-24 p-b-24">
  <div class="row">
    <div class="col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4">
      <h4 class="text-center text-medium">
        {{ 'Assign child devices' | translate }}
      </h4>
    </div>
  </div>
</div>

<div class="d-flex d-col no-align-items fit-h">
  <c8y-sub-assets-grid
    [title]="'Select child devices' | translate"
    [emptyStateText]="'All child devices are already assigned to the group' | translate"
    [refresh]="refresh"
    [actionControls]="[]"
    [selectable]="true"
    [parent-group]="parentDevice"
    [baseQuery]="baseQuery"
    (itemsSelect)="onSelected($event)"
  >
  </c8y-sub-assets-grid>
</div>

<div class="text-center card-footer p-24 separator">
  <button
    (click)="onCancel.emit()"
    type="button"
    class="btn btn-default"
    title="{{ 'Cancel' | translate }}"
  >
    <span>{{ 'Cancel' | translate }}</span>
  </button>
  <button
    (click)="assignDevices()"
    type="button"
    class="btn btn-primary"
    [ngClass]="{ 'btn-pending': pendingStatus }"
    title="{{ 'Assign' | translate }}"
    [disabled]="selected.length === 0 || !canAssignDevice"
  >
    <span>{{ 'Assign' | translate }}</span>
  </button>
</div>

results matching ""

    No results matching ""