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
Default value : false
pendingStatus
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>

<c8y-sub-assets-grid
  [title]="''"
  [emptyStateText]="'All child devices are already assigned' | translate"
  [refresh]="refresh"
  [actionControls]="[]"
  [columnsConfigKey]="'assign-child-devices'"
  [selectable]="true"
  [parent-group]="parentDevice"
  [baseQuery]="baseQuery"
  (itemsSelect)="onSelected($event)"
  class="d-contents"
></c8y-sub-assets-grid>

<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 ""