File

ecosystem/applications/application-plugins/plugin-list.component.ts

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(ecosystemService: EcosystemService, bsModalService: BsModalService, pluginsService: PluginsService, alertService: AlertService, translateService: TranslateService, gainsightService: GainsightService)
Parameters :
Name Type Optional
ecosystemService EcosystemService No
bsModalService BsModalService No
pluginsService PluginsService No
alertService AlertService No
translateService TranslateService No
gainsightService GainsightService No

Inputs

emptyListText
Type : string
Default value : ''
installable
Type : boolean
Default value : false

Shows the install button for each plugin separately. Currently used in package-details view.

package
Type : IApplication
plugins$
Type : BehaviorSubject<ApplicationPlugin[]>
selectable
Type : boolean

Outputs

selectedItems
Type : EventEmitter<string[]>

Methods

Async installPlugin
installPlugin(plugin: ApplicationPlugin)
Parameters :
Name Type Optional
plugin ApplicationPlugin No
Returns : any
updateSelectedItems
updateSelectedItems(value: boolean, pluginId: string)
Parameters :
Name Type Optional
value boolean No
pluginId string No
Returns : void

Properties

CURRENT_LOCATION
Default value : location.href
installingPluginId
Type : string
remotePlugins$
Type : BehaviorSubject<ApplicationRemotePlugins>
Default value : new BehaviorSubject({})
selectedPlugins
Type : object
Default value : {}
<c8y-list-group class="bg-inherit">
  <ng-container *ngIf="(plugins$ | async)?.length !== 0; else emptyList">
    <ng-container *ngFor="let plugin of plugins$ | async">
      <c8y-li [ngClass]="{ disabled: plugin.installed }" class="bg-inherit">
        <c8y-plugin-list-item
          (isItemSelected)="updateSelectedItems($event, plugin?.id)"
          [plugin]="plugin"
          [selectable]="selectable"
          class="d-flex"
        ></c8y-plugin-list-item>
        <div class="p-l-40 m-t-4">
          <button
            *ngIf="installable"
            (click)="installPlugin(plugin)"
            [ngClass]="{ 'btn-pending': plugin.id === installingPluginId }"
            [disabled]="installingPluginId && plugin.id !== installingPluginId"
            class="btn btn-default btn-sm m-l-4"
            title="{{ 'Install plugin' | translate }}"
            translate
          >
            Install plugin
          </button>
        </div>
      </c8y-li>
    </ng-container>
  </ng-container>
</c8y-list-group>
<ng-template #emptyList>
  <div class="c8y-empty-state text-left" *ngIf="emptyListText">
    <h1 c8yIcon="plugin"></h1>
    <p>
      {{ emptyListText | translate }}
    </p>
  </div>
</ng-template>

results matching ""

    No results matching ""