File

ecosystem/features/feature-list.component.ts

Metadata

Index

Properties
Methods

Constructor

constructor(ecosystemService: EcosystemService)
Parameters :
Name Type Optional
ecosystemService EcosystemService No

Methods

loadFeatures
loadFeatures()
Returns : void
ngOnInit
ngOnInit()
Returns : void
resetFilters
resetFilters()
Returns : void
setFilterPipe
setFilterPipe(pipe: FilterPipe)
Parameters :
Name Type Optional
pipe FilterPipe No
Returns : void

Properties

features$
Type : Observable<IApplication[]>
Default value : this.reload$.pipe( tap(() => (this.reloading = true)), switchMap(() => this.ecosystemService.getFeatureApplications()), tap(() => (this.reloading = false)), shareReplay() )
filteredFeatures$
Type : Observable<IApplication[]>
filtersComponent
Type : ListFiltersComponent
Decorators :
@ViewChild(ListFiltersComponent)
listClass
Type : string
reload$
Type : BehaviorSubject<void>
Default value : new BehaviorSubject(null)
reloading
Default value : false
<c8y-title>{{ 'Features' | translate }}</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/application/applications'"
  ></c8y-breadcrumb-item>
  <c8y-breadcrumb-item [icon]="'tab'" [label]="'Features' | translate"></c8y-breadcrumb-item>
</c8y-breadcrumb>

<c8y-action-bar-item [placement]="'right'">
  <button (click)="reload$.next()" class="btn btn-link" title="{{ 'Reload' | translate }}">
    <i [ngClass]="{ 'icon-spin': reloading }" c8yIcon="refresh"></i>
    {{ 'Reload' | translate }}
  </button>
</c8y-action-bar-item>

<c8y-action-bar-item [placement]="'left'">
  <c8y-list-filters
    *ngIf="features$ | async"
    (filterPipeChange)="setFilterPipe($event)"
  ></c8y-list-filters>
</c8y-action-bar-item>

<c8y-action-bar-item [placement]="'left'" itemClass="navbar-form hidden-xs">
  <c8y-list-display-switch
    (onListClassChange)="listClass = $event"
    [listLength]="(features$ | async)?.length"
  ></c8y-list-display-switch>
</c8y-action-bar-item>

<div *ngIf="(features$ | async)?.length === 0" class="c8y-empty-state text-center">
  <h1 class="c8y-icon c8y-icon-modules c8y-icon-duocolor"></h1>
  <h3 translate>No features to display.</h3>
  <p translate>No additional features are subscribed to the tenant.</p>
</div>

<div [ngClass]="listClass" class="card-group">
  <div class="page-sticky-header hidden-xs d-flex" *ngIf="(features$ | async)?.length > 0">
    <div class="card-block card-column-40">
      <div class="card-appicon p-l-32 p-r-16 m-r-0 m-l-4"></div>
      {{ 'Feature' | translate }}
    </div>
    <div class="card-block p-0 card-column-80">
      <div class="card-block card-column-80">{{ 'Description' | translate }}</div>
      <div class="card-block card-column-20">{{ 'Type' | translate }}</div>
    </div>
  </div>
  <div *ngFor="let feature of filteredFeatures$ | async" class="col-xs-12 col-sm-4 col-md-3">
    <c8y-application-card
      [app]="feature"
      [canEdit]="false"
      class="d-contents"
    ></c8y-application-card>
  </div>
</div>

<c8y-ui-empty-state
  *ngIf="(features$ | async)?.length > 0 && (filteredFeatures$ | async)?.length === 0"
  [icon]="'search'"
  [title]="'No matching features.' | translate"
  [subtitle]="'Refine your search terms and/or the filters' | translate"
>
  <button
    class="btn btn-primary"
    type="button"
    title="{{ 'Reset filters' | translate }}"
    (click)="resetFilters()"
  >
    {{ 'Reset filters' | translate }}
  </button>
</c8y-ui-empty-state>

results matching ""

    No results matching ""