File

ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.ts

Metadata

Index

Properties
Methods

Constructor

constructor(bsModalRef: BsModalRef, pluginsService: PluginsService, alert: AlertService, ecosystemService: EcosystemService, gainsightService: GainsightService)
Parameters :
Name Type Optional
bsModalRef BsModalRef No
pluginsService PluginsService No
alert AlertService No
ecosystemService EcosystemService No
gainsightService GainsightService No

Methods

cancel
cancel()
Returns : void
Async update
update()
Returns : any

Properties

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]="'c8y-modules'"></i>
    <h4 *ngIf="!downgrade" id="modal-title" translate>Update plugin</h4>
    <h4 *ngIf="downgrade" id="modal-title" translate>Downgrade plugin</h4>
  </div>
  <div class="inner-scroll" id="modal-body">
    <div class="p-16">
      <div class="d-block fit-w bg-gray-white">
        <c8y-package-version-select
          [packageContextPath]="plugin?.contextPath"
          [(ngModel)]="applicationVersion"
        ></c8y-package-version-select>
        <div
          *ngIf="plugin?.version && plugin.version === applicationVersion?.version"
          class="alert alert-info"
          role="alert"
        >
          <span translate ngNonBindable [translateParams]="applicationVersion">
            Select another version, as {{ version }} is currently used.
          </span>
        </div>
      </div>

      <div class="form-group">
        <label class="c8y-checkbox">
          <input [(ngModel)]="updateAll" type="checkbox" />
          <span></span>
          <span translate ngNonBindable [translateParams]="plugin">
            Set version for all plugins using the same context path "{{ contextPath }}".
          </span>
        </label>
      </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>

results matching ""

    No results matching ""