File

ecosystem/application-plugins/install-plugin.component.ts

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(bsModalRef: BsModalRef, ecosystemService: EcosystemService)
Parameters :
Name Type Optional
bsModalRef BsModalRef No
ecosystemService EcosystemService No

Inputs

plugins$
Type : Observable<FilterableAppOrPlugin[]>

Methods

cancel
cancel()
Returns : void
install
install()
Returns : void
setFilterPipe
setFilterPipe(filterPipe: FilterPipe)
Parameters :
Name Type Optional
filterPipe FilterPipe No
Returns : void

Properties

filteredPlugins$
Type : Observable<FilterableAppOrPlugin[]>
Default value : new BehaviorSubject([])
onlyLatestPluginVersion
Default value : true
packageTypes
Default value : defaultPackageTypes
result
Type : Promise<ApplicationPlugin[]>
Default value : new Promise((resolve, reject) => { this._install = resolve; this._cancel = reject; })
selectedPlugins
Type : ApplicationPlugin[]
Default value : []
<div class="viewport-modal">
  <div class="modal-header dialog-header">
    <i [c8yIcon]="'plugin'"></i>
    <div
      class="modal-title h4"
      id="modal-title"
      translate
    >
      Available plugins
    </div>
  </div>
  <div class="p-t-8 p-16 text-center separator-bottom flex-no-shrink">
    <p
      class="text-medium m-b-8"
      translate
    >
      Select the compatible plugins to install
    </p>
    <c8y-list-filters
      (filterPipeChange)="setFilterPipe($event)"
      [packageTypes]="packageTypes"
    >
      <c8y-archived-filter></c8y-archived-filter>
      <c8y-only-latest-filter></c8y-only-latest-filter>
    </c8y-list-filters>
  </div>
  <div
    class="modal-inner-scroll"
    id="modal-body"
  >
    <c8y-plugin-list
      class="m-t-16"
      (selectedItems)="selectedPlugins = $event"
      [emptyListText]="'No plugins available' | translate"
      [plugins$]="filteredPlugins$"
      [selectable]="true"
    ></c8y-plugin-list>
  </div>

  <div class="modal-footer">
    <button
      class="btn btn-default"
      title="{{ 'Cancel' | translate }}"
      type="button"
      (click)="cancel()"
      data-cy="install-plugin--cancel-button"
    >
      {{ 'Cancel' | translate }}
    </button>
    <button
      class="btn btn-primary"
      title="{{ 'Install' | translate }}"
      type="button"
      (click)="install()"
      [disabled]="selectedPlugins.length === 0"
      data-cy="install-plugin--install-button"
    >
      {{ 'Install' | translate }}
      <span
        class="badge"
        *ngIf="selectedPlugins.length as length"
      >
        {{ length }}
      </span>
    </button>
  </div>
</div>

results matching ""

    No results matching ""