repository/software-device-tab/software-device-tab.component.ts
selector | c8y-software-device-tab |
templateUrl | software-device-tab.component.html |
Properties |
Methods |
|
constructor(route: ActivatedRoute, repository: RepositoryService, inventory: InventoryService)
|
||||||||||||
Parameters :
|
addChanges | ||||||
addChanges(requestedChanges: DeviceSoftwareChange[])
|
||||||
Parameters :
Returns :
void
|
Async applyChanges |
applyChanges()
|
Returns :
any
|
areSameChanges | |||||||||
areSameChanges(change1: DeviceSoftwareChange, change2: DeviceSoftwareChange)
|
|||||||||
Parameters :
Returns :
boolean
|
clearChanges |
clearChanges()
|
Returns :
void
|
dropChange | ||||||
dropChange(changeToBeDropped: DeviceSoftwareChange)
|
||||||
Parameters :
Returns :
void
|
Async loadDevice |
loadDevice()
|
Returns :
any
|
Async ngOnInit |
ngOnInit()
|
Returns :
any
|
changes$ |
changes$:
|
Default value : new BehaviorSubject<DeviceSoftwareChange[]>([])
|
changesInProgress$ |
changesInProgress$:
|
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:
|
Type : string | number
|
Default value : this.route.snapshot.parent.data.contextData.id
|
deviceTypeQuery$ |
deviceTypeQuery$:
|
Type : Observable<object>
|
Default value : this.device$.pipe(
map(device => this.repository.getDeviceTypeQuery(RepositoryType.SOFTWARE, device))
)
|
list$ |
list$:
|
Type : Observable<DeviceSoftware[]>
|
Default value : this.device$.pipe(
map(device => this.repository.getDeviceSoftwareList(device))
)
|
reloading |
reloading:
|
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>