File

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

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(activatedRoute: ActivatedRoute, ecosystemService: EcosystemService, bsModalService: BsModalService, modal: ModalService, translateService: TranslateService, pluginsService: PluginsService, alertService: AlertService)
Parameters :
Name Type Optional
activatedRoute ActivatedRoute No
ecosystemService EcosystemService No
bsModalService BsModalService No
modal ModalService No
translateService TranslateService No
pluginsService PluginsService No
alertService AlertService No

Methods

Async installPlugins
installPlugins()
Returns : any
Async ngOnInit
ngOnInit()
Returns : any
Async removePlugins
removePlugins()
Returns : any

Properties

allAvailablePlugins$
Type : BehaviorSubject<ApplicationPlugin[]>
Default value : new BehaviorSubject([])
app
Type : IApplication
archives
Type : IApplicationBinary[]
Default value : []
exportedPlugins$
Type : BehaviorSubject<ApplicationPlugin[]>
Default value : new BehaviorSubject([])
installedPlugins$
Type : Observable<ApplicationPlugin[]>
Default value : combineLatest([ this.remotePlugins$.pipe(map((remotes) => this.getRemotePluginsList(remotes))), this.allAvailablePlugins$ ]).pipe( map(([remotePlugins, allPlugins]) => allPlugins.filter((p) => remotePlugins.includes(p.id))), shareReplay(1) )
isLoading
Type : boolean
pluginsToDelete
Type : string[]
Default value : []
remotePlugins$
Type : BehaviorSubject<ApplicationRemotePlugins>
Default value : new BehaviorSubject({})
<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>

<c8y-breadcrumb>
  <c8y-breadcrumb-item [icon]="'c8y-atom'" [label]="'Ecosystem' | translate"></c8y-breadcrumb-item>
  <c8y-breadcrumb-item
    [icon]="'c8y-modules'"
    [label]="'Applications' | translate"
    [path]="'ecosystem/applications'"
  ></c8y-breadcrumb-item>
  <c8y-breadcrumb-item
    [icon]="'c8y-modules'"
    [label]="'All applications' | translate"
    [path]="'ecosystem/applications'"
  ></c8y-breadcrumb-item>
  <c8y-breadcrumb-item [label]="app | humanizeAppName | async"></c8y-breadcrumb-item>
  <c8y-breadcrumb-item [label]="'Plugins' | translate"></c8y-breadcrumb-item>
</c8y-breadcrumb>

<div class="card content-fullpage d-grid grid__col--6-6--md">
  <div class="inner-scroll bg-gray-white">
    <div class="card-header large-padding separator sticky-top">
      <h4 class="card-title" translate>Included plugins</h4>
    </div>
    <div class="card-block large-padding">
      <p class="d-flex a-i-start p-b-16">
        <i c8yIcon="info-circle" class="text-info m-r-8 icon-20"></i>
        <span translate>
          Plugins included with the application. These plugins are required for running the
          application and cannot be removed.
        </span>
      </p>
      <c8y-plugin-list
        [emptyListText]="'This application doesn\'t contain plugins.' | translate"
        [plugins$]="exportedPlugins$"
        class="separator-top d-block"
      ></c8y-plugin-list>
    </div>
  </div>

  <div class="content-fullpage d-flex d-col">
    <div class="card-header large-padding separator">
      <h4 class="card-title" translate>Installed plugins</h4>
    </div>
    <div class="inner-scroll flex-grow">
      <div class="card-block large-padding">
        <p class="d-flex a-i-start p-b-16">
          <i c8yIcon="info-circle" class="text-info m-r-8 icon-20"></i>
          <span translate>
            Plugins currently installed for this application. Upgrading the application won't change
            any of these plugins.
          </span>
        </p>
        <c8y-plugin-list
          (selectedItems)="pluginsToDelete = $event"
          [emptyListText]="'No plugins installed' | translate"
          [plugins$]="installedPlugins$"
          [selectable]="true"
          class="separator-top d-block"
        ></c8y-plugin-list>
      </div>
    </div>

    <div class="card-footer large-padding separator" *c8yIfAllowed="['ROLE_APPLICATION_MANAGEMENT_ADMIN']">
      <button
        (click)="removePlugins()"
        [disabled]="pluginsToDelete.length === 0 || isLoading"
        class="btn btn-default"
        title="{{ 'Remove plugins' | translate }}"
        translate
      >
        Remove plugins
      </button>
      <button
        (click)="installPlugins()"
        [ngClass]="{ 'btn-pending': isLoading }"
        class="btn btn-default"
        title="{{ 'Install plugins' | translate }}"
        translate
      >
        Install plugins
      </button>
    </div>
  </div>
</div>

results matching ""

    No results matching ""