File

repository/software-device-tab/software-device-tab.component.ts

Implements

OnInit

Metadata

selector c8y-software-device-tab
templateUrl software-device-tab.component.html

Index

Properties
Methods

Constructor

constructor(route: ActivatedRoute, repository: RepositoryService, inventory: InventoryService)
Parameters :
Name Type Optional
route ActivatedRoute No
repository RepositoryService No
inventory InventoryService No

Methods

addChanges
addChanges(requestedChanges: DeviceSoftwareChange[])
Parameters :
Name Type Optional
requestedChanges DeviceSoftwareChange[] No
Returns : void
Async applyChanges
applyChanges()
Returns : any
areSameChanges
areSameChanges(change1: DeviceSoftwareChange, change2: DeviceSoftwareChange)
Parameters :
Name Type Optional
change1 DeviceSoftwareChange No
change2 DeviceSoftwareChange No
Returns : boolean
clearChanges
clearChanges()
Returns : void
dropChange
dropChange(changeToBeDropped: DeviceSoftwareChange)
Parameters :
Name Type Optional
changeToBeDropped DeviceSoftwareChange No
Returns : void
Async loadDevice
loadDevice()
Returns : any
Async ngOnInit
ngOnInit()
Returns : any

Properties

changes$
changes$:
Default value : new BehaviorSubject<DeviceSoftwareChange[]>([])
changesInProgress$
changesInProgress$: Observable<boolean>
Type : Observable<boolean>
Default value : this.changesOperation$.pipe( map(operation => this.isInProgress(operation)) )
changesOperation$
changesOperation$:
Default value : new BehaviorSubject<IOperation>(null)
device$
device$:
Default value : new BehaviorSubject<IManagedObject>(this.route.snapshot.parent.data.contextData)
deviceId
deviceId: string | number
Type : string | number
Default value : this.route.snapshot.parent.data.contextData.id
deviceTypeQuery$
deviceTypeQuery$: Observable<object>
Type : Observable<object>
Default value : this.device$.pipe( map(device => this.repository.getDeviceTypeQuery(RepositoryType.SOFTWARE, device)) )
list$
list$: Observable<DeviceSoftware[]>
Type : Observable<DeviceSoftware[]>
Default value : this.device$.pipe( map(device => this.repository.getDeviceSoftwareList(device)) )
reloading
reloading: boolean
Type : boolean
Default value : false
<c8y-action-bar-item [placement]="'right'">
  <button class="btn btn-link" title="{{ 'Reload' | translate }}" (click)="loadDevice()">
    <i c8yIcon="refresh" [ngClass]="{ 'icon-spin': reloading }"></i>
    {{ 'Reload' | translate }}
  </button>
</c8y-action-bar-item>

<div class="card d-grid grid__col--8-4--md m-b-0">
  <c8y-installed-software
    class="card--fullpage bg-white"
    [device]="device$ | async"
    [deviceTypeQuery]="deviceTypeQuery$ | async"
    [softwareList]="list$ | async"
    [deviceSoftwareChanges]="changes$ | async"
    [deviceSoftwareChangesOperation]="changesOperation$ | async"
    [deviceSoftwareChangesInProgress]="changesInProgress$ | async"
    (changes)="addChanges($event)"
  ></c8y-installed-software>
  <c8y-device-software-changes
    class="card--fullpage bg-gray-white"
    [changes]="changes$ | async"
    [changesInProgress]="changesInProgress$ | async"
    (clear)="clearChanges()"
    (drop)="dropChange($event)"
    (apply)="applyChanges()"
  ></c8y-device-software-changes>
</div>

result-matching ""

    No results matching ""