ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.ts
selector | c8y-update-plugin-of-app |
templateUrl | ./update-plugin-of-app.component.html |
Properties |
Methods |
constructor(bsModalRef: BsModalRef, pluginsService: PluginsService, alert: AlertService, ecosystemService: EcosystemService, gainsightService: GainsightService)
|
||||||||||||||||||
Parameters :
|
cancel |
cancel()
|
Returns :
void
|
Async update |
update()
|
Returns :
any
|
app |
Type : IApplication
|
applicationVersion |
Type : IApplicationVersion
|
CURRENT_LOCATION |
Default value : location.href
|
downgrade |
Type : boolean
|
plugin |
Type : ApplicationPlugin
|
result |
Type : Promise<void>
|
Default value : new Promise((resolve, reject) => {
this._install = resolve;
this._cancel = reject;
})
|
updateAll |
Default value : true
|
<div class="viewport-modal">
<div class="modal-header dialog-header">
<i [c8yIcon]="'installing-updates'"></i>
<h4
id="modal-title"
*ngIf="!downgrade"
translate
>
Update plugin
</h4>
<h4
id="modal-title"
*ngIf="downgrade"
translate
>
Downgrade plugin
</h4>
</div>
<div
class="inner-scroll"
id="modal-body"
>
<div class="card-block p-r-24 p-l-24 sticky-top bg-component separator-bottom">
<c8y-package-version-select
[packageContextPath]="plugin?.contextPath"
[(ngModel)]="applicationVersion"
></c8y-package-version-select>
<div
class="alert alert-info"
role="alert"
*ngIf="plugin?.version && plugin.version === applicationVersion?.version"
>
<span
translate
ngNonBindable
[translateParams]="applicationVersion"
>
Select another version, as {{ version }} is currently used.
</span>
</div>
<div class="form-group">
<label class="c8y-checkbox">
<input
type="checkbox"
[(ngModel)]="updateAll"
/>
<span></span>
<span
translate
ngNonBindable
[translateParams]="plugin"
>
Set version for all plugins using the same context path "{{ contextPath }}".
</span>
</label>
</div>
<p class="legend form-block">
{{ 'Change log' | translate }}
</p>
</div>
<div class="card-block p-l-24 p-r-24">
<div
class="markdown-content markdown-content--to-h3"
>
<c8y-contents-changelog
[package]="plugin.originApp"
[selectedVersion]="applicationVersion?.version"
[previousVersion]="plugin?.version"
></c8y-contents-changelog>
</div>
</div>
</div>
<div class="modal-footer">
<button
class="btn btn-default"
title="{{ 'Cancel' | translate }}"
type="button"
(click)="cancel()"
>
{{ 'Cancel' | translate }}
</button>
<button
class="btn btn-primary"
title="{{ 'Set version' | translate }}"
[disabled]="!applicationVersion || plugin?.version === applicationVersion?.version"
(click)="update()"
>
{{ 'Set version' | translate }}
</button>
</div>
</div>