File
Implements
Methods
Async
ngOnInit
|
ngOnInit()
|
|
exportedPlugins$
|
Type : BehaviorSubject<ApplicationPlugin[]>
|
Default value : new BehaviorSubject([])
|
isAllowedToCreateSubtenants
|
Default value : false
|
isChangingAvailability
|
Default value : false
|
isOwnedByCurrentTenant
|
Default value : false
|
Readonly
PACKAGE_TYPE
|
Default value : PackageType
|
Readonly
packageProperties
|
Type : PropertiesListItem[]
|
Default value : packageProperties
|
Readonly
packageTypeLabels
|
Default value : PACKAGE_TYPE_LABELS
|
<c8y-title>{{ name | humanizeAppName | async }}</c8y-title>
<c8y-breadcrumb>
<c8y-breadcrumb-item
[icon]="'c8y-atom'"
[label]="'Ecosystem' | translate"
></c8y-breadcrumb-item>
<c8y-breadcrumb-item
[icon]="'big-parcel'"
[label]="'Extensions' | translate"
[path]="'ecosystem/extension/extensions'"
></c8y-breadcrumb-item>
<c8y-breadcrumb-item [label]="name | humanizeAppName | async"></c8y-breadcrumb-item>
<c8y-breadcrumb-item [label]="'Extension package' | translate"></c8y-breadcrumb-item>
</c8y-breadcrumb>
<c8y-action-bar-item
placement="right"
itemClass="navbar-form"
*ngIf="isOwnedByCurrentTenant && isAllowedToCreateSubtenants"
>
<div class="form-horizontal">
<div class="form-group">
<label
for="availability"
translate
>
Availability`of package based on app state`
</label>
<div class="c8y-select-wrapper">
<select
class="form-control"
id="availability"
[(ngModel)]="packageAvailability"
[disabled]="isChangingAvailability"
(ngModelChange)="togglePackageAvailability(package, $event)"
>
<option
*ngFor="let availability of packageAvailabilityService.availabilities"
[ngValue]="availability.value"
>
{{ availability.label | translate }}
</option>
</select>
<span></span>
</div>
</div>
</div>
</c8y-action-bar-item>
<div class="card content-fullpage d-grid grid__col--8-4--md grid__row--fit-auto">
<div class="bg-level-1 grid__col--fullspan separator-bottom">
<div class="card-block p-t-24 p-b-24 large-padding">
<button
class="card__ribbon btn-clean"
[attr.aria-label]="
(package.label || package.manifest.label | translatePackageLabel) +
': ' +
(packageTypeLabels[packageType].tooltip | translate)
"
tooltip="{{ packageTypeLabels[packageType].tooltip | translate }}"
placement="bottom"
type="button"
*ngIf="packageType !== PACKAGE_TYPE.CUSTOM"
[delay]="500"
>
<span
[ngClass]="{
'bg-info': packageType === PACKAGE_TYPE.COMMUNITY,
'bg-primary': packageType === PACKAGE_TYPE.OFFICIAL
}"
>
{{ package.label || package.manifest.label | translatePackageLabel }}
</span>
</button>
<div class="content-flex-70">
<div class="text-center">
<i
class="c8y-icon-duocolor icon-48"
c8yIcon="big-parcel"
></i>
<button
class="btn-clean"
[attr.aria-label]="
(appState?.label | translate) + ': ' + (appState?.tooltip | translate)
"
[tooltip]="appState?.tooltip | translate"
placement="top"
type="button"
[delay]="500"
>
<span
class="label"
[ngClass]="appState?.class"
>
{{ appState?.label | translate }}
</span>
</button>
<button
class="btn-clean"
[attr.aria-label]="
(packageContentState?.label | translate) +
': ' +
(packageContentState?.tooltip | translate)
"
[tooltip]="packageContentState?.tooltip | translate"
placement="bottom"
type="button"
[delay]="500"
>
<span
class="label"
[ngClass]="packageContentState?.class"
>
{{ packageContentState?.label | translate }}
</span>
</button>
</div>
<div class="flex-grow col-10">
<div class="content-flex-80">
<div class="col-5">
<div class="card-title text-bold m-b-8">{{ name | humanizeAppName | async }}</div>
<p *ngIf="description">{{ description }}</p>
<p
class="text-muted"
*ngIf="!description"
>
<em>{{ 'No description available.' | translate }}</em>
</p>
</div>
<div
class="col-3 text-right-md p-r-md-40"
*ngIf="isPackageBlueprint"
>
<button
class="btn btn-primary btn-sm"
(click)="deploy()"
data-cy="c8y-package-details--deploy-application-button"
>
<i
class="m-r-4"
c8yIcon="output"
></i>
{{ 'Deploy application' | translate }}
</button>
</div>
<div class="flex-grow">
<c8y-properties-list
[data]="package.manifest"
[properties]="packageProperties"
></c8y-properties-list>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="inner-scroll">
<div class="card-header separator sticky-top">
<div class="card-title">{{ 'Extension package overview' | translate }}</div>
</div>
<div class="card-block p-l-16 p-r-16">
<c8y-ui-empty-state
[icon]="'user-manual'"
[title]="'No README.md found' | translate"
[subtitle]="
'To view the contents of "README", add the file "README.md" to the package.'
| translate
"
*ngIf="!markdown"
[horizontal]="true"
></c8y-ui-empty-state>
<div
class="markdown-content"
[innerHTML]="markdown | markdownToHtml: { baseUrl } | async"
></div>
</div>
<div class="separator-bottom visible-sm visible-xs"></div>
</div>
<div class="inner-scroll d-flex d-col">
<div class="card-header separator sticky-top">
<div class="card-title">{{ 'Package plugins' | translate }}</div>
</div>
<div class="border-left flex-grow">
<!-- empty state -->
<div
class="p-16"
*ngIf="(exportedPlugins$ | async).length === 0"
>
<c8y-ui-empty-state
[icon]="'plugin'"
[title]="'No plugins to display.' | translate"
[subtitle]="'This package doesn\'t contain plugins.' | translate"
[horizontal]="true"
></c8y-ui-empty-state>
</div>
<c8y-plugin-list
[plugins$]="exportedPlugins$"
[selectable]="false"
[installable]="true"
[package]="package"
></c8y-plugin-list>
</div>
</div>
</div>