@c8y/ngx-components 1017.0.31 → 1017.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/ecosystem/application-plugins/application-plugins.component.d.ts +54 -3
  2. package/ecosystem/application-plugins/plugin-list.component.d.ts +5 -3
  3. package/ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.d.ts +4 -2
  4. package/ecosystem/application-properties/application-properties.component.d.ts +5 -3
  5. package/ecosystem/packages/deploy-application/deploy-application.component.d.ts +5 -4
  6. package/ecosystem/packages/package-availability.service.d.ts +4 -2
  7. package/ecosystem/packages/package-versions/package-versions-list/package-versions-list.component.d.ts +4 -2
  8. package/ecosystem/shared/application-card.component.d.ts +5 -3
  9. package/ecosystem/shared/duplicate-application/duplicate-application-properties/duplicate-application-properties.component.d.ts +4 -2
  10. package/ecosystem/shared/ecosystem.model.d.ts +49 -0
  11. package/esm2020/core/help/help.component.mjs +3 -3
  12. package/esm2020/ecosystem/application-plugins/application-plugins.component.mjs +32 -9
  13. package/esm2020/ecosystem/application-plugins/plugin-list.component.mjs +18 -6
  14. package/esm2020/ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.mjs +20 -5
  15. package/esm2020/ecosystem/application-properties/application-properties.component.mjs +13 -6
  16. package/esm2020/ecosystem/packages/deploy-application/deploy-application.component.mjs +20 -7
  17. package/esm2020/ecosystem/packages/package-availability.service.mjs +18 -5
  18. package/esm2020/ecosystem/packages/package-versions/package-versions-list/package-versions-list.component.mjs +43 -6
  19. package/esm2020/ecosystem/shared/application-card.component.mjs +28 -5
  20. package/esm2020/ecosystem/shared/duplicate-application/duplicate-application-properties/duplicate-application-properties.component.mjs +21 -8
  21. package/esm2020/ecosystem/shared/ecosystem.model.mjs +50 -1
  22. package/esm2020/operations/operations-list/operations-list-item.component.mjs +3 -3
  23. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs +61 -12
  24. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  25. package/fesm2015/c8y-ngx-components-ecosystem-shared.mjs +90 -7
  26. package/fesm2015/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  27. package/fesm2015/c8y-ngx-components-ecosystem.mjs +143 -24
  28. package/fesm2015/c8y-ngx-components-ecosystem.mjs.map +1 -1
  29. package/fesm2015/c8y-ngx-components-operations-operations-list.mjs +2 -2
  30. package/fesm2015/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
  31. package/fesm2015/c8y-ngx-components.mjs +2 -2
  32. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  33. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs +61 -12
  34. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  35. package/fesm2020/c8y-ngx-components-ecosystem-shared.mjs +90 -7
  36. package/fesm2020/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  37. package/fesm2020/c8y-ngx-components-ecosystem.mjs +143 -24
  38. package/fesm2020/c8y-ngx-components-ecosystem.mjs.map +1 -1
  39. package/fesm2020/c8y-ngx-components-operations-operations-list.mjs +2 -2
  40. package/fesm2020/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
  41. package/fesm2020/c8y-ngx-components.mjs +2 -2
  42. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  43. package/package.json +2 -2
@@ -2,7 +2,7 @@ import { __awaiter } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Component, Input, Injectable, ViewChild, Pipe, EventEmitter, Output, NgModule } from '@angular/core';
4
4
  import * as i1 from '@c8y/ngx-components/ecosystem/shared';
5
- import { packageProperties, ApplicationPropertiesFormComponent, ERROR_TYPE, SharedEcosystemModule } from '@c8y/ngx-components/ecosystem/shared';
5
+ import { packageProperties, PRODUCT_EXPERIENCE, ApplicationPropertiesFormComponent, ERROR_TYPE, SharedEcosystemModule } from '@c8y/ngx-components/ecosystem/shared';
6
6
  import * as i2 from '@c8y/ngx-components';
7
7
  import { gettext, Status, ViewContext, ApplicationPluginStatus, DataGridComponent, CoreModule, hookRoute, FormsModule, hookTab, hookNavigator, hookWizard } from '@c8y/ngx-components';
8
8
  import * as i3 from '@angular/common';
@@ -214,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
214
214
  const MICROSERVICES_BASE_PATH = '/microservices';
215
215
  const APPLICATIONS_BASE_PATH = '/ecosystem';
216
216
  class ApplicationPropertiesComponent {
217
- constructor(activatedRoute, ecosystemService, router, formBuilder, applicationService, alertService, inventoryService, permissions, modalService, translate, bsModalService) {
217
+ constructor(activatedRoute, ecosystemService, router, formBuilder, applicationService, alertService, inventoryService, permissions, modalService, translate, bsModalService, gainsightService) {
218
218
  this.activatedRoute = activatedRoute;
219
219
  this.ecosystemService = ecosystemService;
220
220
  this.router = router;
@@ -226,6 +226,8 @@ class ApplicationPropertiesComponent {
226
226
  this.modalService = modalService;
227
227
  this.translate = translate;
228
228
  this.bsModalService = bsModalService;
229
+ this.gainsightService = gainsightService;
230
+ this.CURRENT_LOCATION = location.href;
229
231
  this.singleTenant = false;
230
232
  this.subscription = false;
231
233
  this.iconMap = {
@@ -363,6 +365,11 @@ class ApplicationPropertiesComponent {
363
365
  updateToLatestVersion() {
364
366
  var _a, _b;
365
367
  return __awaiter(this, void 0, void 0, function* () {
368
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.APPLICATION_PROPERTIES, {
369
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PROPERTIES,
370
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.UPDATE_AVAILABLE,
371
+ url: this.CURRENT_LOCATION
372
+ });
366
373
  try {
367
374
  const translatedBody = this.translate.instant(gettext(`You're using the version {{ currentVersion }} of the {{ packageName }} package, the latest version available is {{ latestVersion }}, do you want to update? You can always revert to a previous version in the Activity log panel.`), {
368
375
  currentVersion: (_a = this.application.manifest) === null || _a === void 0 ? void 0 : _a.version,
@@ -514,12 +521,12 @@ class ApplicationPropertiesComponent {
514
521
  });
515
522
  }
516
523
  }
517
- ApplicationPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationPropertiesComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1.EcosystemService }, { token: i1$2.Router }, { token: i3$1.FormBuilder }, { token: i2$1.ApplicationService }, { token: i2.AlertService }, { token: i2$1.InventoryService }, { token: i2.Permissions }, { token: i2.ModalService }, { token: i4.TranslateService }, { token: i1$1.BsModalService }], target: i0.ɵɵFactoryTarget.Component });
524
+ ApplicationPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationPropertiesComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1.EcosystemService }, { token: i1$2.Router }, { token: i3$1.FormBuilder }, { token: i2$1.ApplicationService }, { token: i2.AlertService }, { token: i2$1.InventoryService }, { token: i2.Permissions }, { token: i2.ModalService }, { token: i4.TranslateService }, { token: i1$1.BsModalService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
518
525
  ApplicationPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ApplicationPropertiesComponent, selector: "c8y-application-properties", ngImport: i0, template: "<c8y-title>{{ application | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb *ngIf=\"!isMicroservice\">\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"breadcrumbConfig?.icon\"\n [label]=\"breadcrumbConfig?.label\"\n [path]=\"breadcrumbConfig?.path\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"application | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Properties' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-breadcrumb *ngIf=\"isMicroservice\">\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"breadcrumbConfig?.icon\"\n [label]=\"breadcrumbConfig?.label\"\n [path]=\"breadcrumbConfig?.path\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"application | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Properties' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"row\">\n <div [ngClass]=\"{ 'col-md-8': !isActivityLogSupported, 'col-md-12': isActivityLogSupported }\">\n <div\n *ngIf=\"application\"\n [ngClass]=\"{ 'd-grid grid__col--7-5--md': isActivityLogSupported }\"\n class=\"card content-fullpage\"\n >\n <form\n (ngSubmit)=\"formGroup.valid && save(formGroup.value)\"\n [formGroup]=\"formGroup\"\n class=\"d-flex d-col content-fullpage\"\n novalidate\n >\n <div *ngIf=\"!isLoading\" class=\"d-contents\">\n <div class=\"card-block separator-bottom large-padding flex-no-shrink\">\n <div class=\"d-flex-md a-i-start text-center text-left-md\">\n <c8y-app-icon\n *ngIf=\"!isPackage && !isFeature && !isMicroservice && !isExternal\"\n [app]=\"application\"\n [contextPath]=\"application.contextPath\"\n [name]=\"application.name\"\n class=\"icon-48\"\n ></c8y-app-icon>\n <i *ngIf=\"isPackage\" c8yIcon=\"big-parcel\" class=\"icon-48\"></i>\n <i *ngIf=\"isFeature\" c8yIcon=\"tab\" class=\"icon-48\"></i>\n <i *ngIf=\"isMicroservice\" c8yIcon=\"microchip\" class=\"icon-48\"></i>\n <i *ngIf=\"isExternal\" c8yIcon=\"globe1\" class=\"icon-48\"></i>\n\n <div class=\"p-t-md-16 p-l-md-16 p-r-md-32 flex-grow\">\n <p class=\"h4 text-medium m-b-8\">{{ application | humanizeAppName | async }}</p>\n <p *ngIf=\"!isOwner\">\n <em class=\"text-muted\">\n {{ application.description || ('No description available.' | translate) }}\n </em>\n </p>\n <div *ngIf=\"isOwner\" class=\"form-group m-b-0\">\n <label\n [ngClass]=\"{ updated: formGroup?.controls?.description?.dirty }\"\n class=\"editable\"\n >\n <textarea\n c8y-textarea-autoresize\n class=\"form-control no-resize\"\n formControlName=\"description\"\n name=\"description\"\n placeholder=\"{{ 'No description available.' | translate }}\"\n ></textarea>\n </label>\n </div>\n </div>\n <div class=\"text-right-md m-t-4\">\n <span [ngClass]=\"appState?.class\" class=\"label\">\n {{ appState?.label | translate }}\n </span>\n <div class=\"fit-w m-t-2\" *ngIf=\"isPackage || isMicroservice\">\n <label class=\"text-label-small\" translate>Version:</label>\n <small class=\"p-l-4 text-bold\">{{ application.manifest?.version }}</small>\n </div>\n <div class=\"fit-w m-t-2\">\n <label class=\"text-label-small\" translate>Creation time:</label>\n <small class=\"p-l-4 text-bold\">{{ (binaryMo?.creationTime | c8yDate) || '---' }}</small>\n </div>\n <div class=\"m-t-8\">\n <button\n type=\"button\"\n *ngIf=\"isUpdateAvailable\"\n (click)=\"updateToLatestVersion()\"\n [ngClass]=\"{ 'btn-pending': isUpdateOngoing }\"\n class=\"btn btn-warning btn-sm\"\n >\n {{ 'Update available' | translate }}\n </button>\n <button\n (click)=\"openApp(application)\"\n [disabled]=\"disableOpenInBrowser\"\n *ngIf=\"canOpenInBrowser\"\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Open' | translate }}\"\n type=\"button\"\n >\n <i [c8yIcon]=\"'external-link'\"></i>\n {{ 'Open' | translate }}\n </button>\n <div *ngIf=\"canOpenInBrowser && disableOpenInBrowser\">\n <small class=\"text-muted\" translate>\n The application is overwritten by a custom application sharing the same path\n </small>\n </div>\n <span *ngIf=\"isCustomMicroservice\">\n <button\n (click)=\"subscribe()\"\n *ngIf=\"!isSubscribed\"\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Subscribe' | translate }}\"\n >\n <i [c8yIcon]=\"'check-circle-o'\"></i>\n {{ 'Subscribe' | translate }}\n </button>\n <button\n (click)=\"unsubscribe()\"\n *ngIf=\"isSubscribed\"\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Unsubscribe' | translate }}\"\n >\n <i [c8yIcon]=\"'minus-circle'\"></i>\n {{ 'Unsubscribe' | translate }}\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll bg-level-0 flex-grow\">\n <div class=\"card-block large-padding\">\n <div *ngIf=\"isPackage\" class=\"row p-16\">\n <c8y-properties-list\n [data]=\"application.manifest\"\n [properties]=\"packageProperties\"\n [title]=\"'Package details' | translate\"\n [emptyLabel]=\"'---'\"\n icon=\"info\"\n ></c8y-properties-list>\n </div>\n <div *ngIf=\"sourcePackage\" class=\"row p-16\">\n <c8y-properties-list\n [data]=\"sourcePackage.manifest\"\n [properties]=\"packageProperties\"\n [title]=\"'Source package information' | translate\"\n [emptyLabel]=\"'---'\"\n icon=\"info\"\n ></c8y-properties-list>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-5\">\n <c8y-form-group>\n <label for=\"appId\">ID</label>\n <input\n [readonly]=\"true\"\n autocomplete=\"off\"\n class=\"form-control\"\n formControlName=\"id\"\n name=\"id\"\n id=\"appId\"\n type=\"text\"\n />\n </c8y-form-group>\n </div>\n <div class=\"col-sm-7\">\n <c8y-form-group>\n <label>{{ 'Name' | translate }}</label>\n <input\n [readonly]=\"!isOwner\"\n class=\"form-control\"\n formControlName=\"name\"\n name=\"name\"\n placeholder=\"{{ 'e.g. My application' | translate }}\"\n required\n type=\"text\"\n />\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-sm-5\">\n <c8y-form-group>\n <label>{{ 'Application key' | translate }}</label>\n <input\n [readonly]=\"application.id || !isOwner\"\n class=\"form-control\"\n name=\"key\"\n formControlName=\"key\"\n placeholder=\"{{ 'e.g. my-application-key' | translate }}\"\n required\n type=\"text\"\n />\n </c8y-form-group>\n </div>\n\n <div class=\"col-sm-7\">\n <c8y-form-group>\n <label>{{ 'Type' | translate }}</label>\n <div>\n <div *ngIf=\"application.id\">\n <p class=\"form-control-static\">\n <i [c8yIcon]=\"iconMap[application.type]\"></i>\n <span>\n {{ application.type | translate }}\n </span>\n </p>\n </div>\n </div>\n </c8y-form-group>\n </div>\n </div>\n\n <div [ngSwitch]=\"application.type\">\n <div *ngSwitchCase=\"'HOSTED'\">\n <c8y-form-group>\n <label>{{ 'Path' | translate }}</label>\n <div class=\"input-group\">\n <span class=\"input-group-addon\">/apps/</span>\n <input\n [readOnly]=\"application.id || !isOwner\"\n class=\"form-control\"\n name=\"contextPath\"\n placeholder=\"{{ 'e.g. my-application`used in URL`' | translate }}\"\n required\n type=\"text\"\n formControlName=\"contextPath\"\n />\n </div>\n </c8y-form-group>\n </div>\n\n <div *ngSwitchCase=\"'MICROSERVICE'\">\n <c8y-form-group>\n <label>{{ 'Path' | translate }}</label>\n <div class=\"input-group\">\n <span class=\"input-group-addon\">/service/</span>\n <input\n [readOnly]=\"application.id || !isOwner\"\n class=\"form-control\"\n name=\"contextPath\"\n placeholder=\"{{ 'e.g. my-microservice`used in URL`' | translate }}\"\n required\n type=\"text\"\n formControlName=\"contextPath\"\n />\n </div>\n </c8y-form-group>\n <div class=\"row\">\n <div *ngIf=\"application.manifest.version\" class=\"col-sm-4 m-b-16 flex-auto\">\n <label>{{ 'Version' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.version }}\n </p>\n </div>\n <div *ngIf=\"application.manifest.isolation\" class=\"col-sm-4 m-b-16 flex-auto\">\n <label>{{ 'Isolation' | translate }}</label>\n <p class=\"form-control-static\">\n <span *ngIf=\"singleTenant\">\n <i [c8yIcon]=\"'c8y-enterprise'\" class=\"c8y-icon-duocolor h4\"></i>\n {{ 'Single tenant' | translate }}\n </span>\n <span *ngIf=\"!singleTenant\">\n <i [c8yIcon]=\"'c8y-sub-tenants'\" class=\"c8y-icon-duocolor icon-32\"></i>\n {{ 'Multi tenant' | translate }}\n </span>\n </p>\n </div>\n <div *ngIf=\"application.manifest.isolation\" class=\"col-sm-4 m-b-16 flex-auto\">\n <label>{{ 'Billing mode' | translate }}</label>\n <p class=\"form-control-static\">\n <span\n *ngIf=\"subscription\"\n [tooltip]=\"'Resources usage assigned to: Owner' | translate\"\n >\n {{ 'Subscription' | translate }}\n </span>\n <span\n *ngIf=\"!subscription && singleTenant\"\n [tooltip]=\"'Resources usage assigned to: Subscriber | translate'\"\n >\n {{ 'Resources' | translate }}\n </span>\n <span\n *ngIf=\"!subscription && !singleTenant\"\n [tooltip]=\"'Resources usage assigned to: Owner' | translate\"\n >\n {{ 'Resources' | translate }}\n </span>\n </p>\n </div>\n </div>\n\n <div *ngIf=\"application.manifest.provider\" class=\"legend form-block m-t-40\">\n {{ 'Provider' | translate }}\n </div>\n <div class=\"list-inline\" *ngIf=\"application.manifest.provider\">\n <div *ngIf=\"application.manifest.provider.name\">\n <div class=\"col-sm-4 m-b-16\">\n <label>{{ 'Name' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.provider.name }}\n </p>\n </div>\n </div>\n <div *ngIf=\"application.manifest.provider.domain\">\n <div class=\"col-sm-4 m-b-16\">\n <label>{{ 'Domain' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.provider.domain }}\n </p>\n </div>\n </div>\n <div *ngIf=\"application.manifest.provider.support\">\n <div class=\"col-sm-4 m-b-16\">\n <label>{{ 'Support' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.provider.support }}\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'REPOSITORY'\">\n <c8y-form-group>\n <label>{{ 'Path' | translate }}</label>\n <div class=\"input-group\">\n <span class=\"input-group-addon\">/apps/</span>\n <input\n [readOnly]=\"application.id || !isOwner\"\n class=\"form-control\"\n formControlName=\"contextPath\"\n name=\"contextPath\"\n placeholder=\"{{ 'e.g. my-application`used in URL`' | translate }}\"\n required\n type=\"text\"\n />\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label>{{ 'Server URL' | translate }}</label>\n <input\n class=\"form-control\"\n name=\"resourcesUrl\"\n formControlName=\"resourcesUrl\"\n placeholder=\"{{ 'e.g. my-application`used in URL`' | translate }}\"\n required\n type=\"url\"\n />\n </c8y-form-group>\n\n <div class=\"form-group\">\n <label>{{ 'Username' | translate }}</label>\n <input\n class=\"form-control\"\n formControlName=\"username\"\n name=\"username\"\n type=\"text\"\n />\n </div>\n\n <div class=\"form-group\">\n <label>{{ 'Password' | translate }}</label>\n <input\n class=\"form-control\"\n formControlName=\"password\"\n name=\"password\"\n type=\"text\"\n />\n </div>\n </div>\n\n <div *ngSwitchCase=\"'EXTERNAL'\">\n <c8y-form-group>\n <label>{{ 'External URL' | translate }}</label>\n <input\n [pattern]=\"'^(?!javascript:).+'\"\n [readOnly]=\"!isOwner\"\n class=\"form-control\"\n formControlName=\"externalUrl\"\n name=\"externalUrl\"\n placeholder=\"{{ 'e.g.' | translate }} http://www.example.com/\"\n required\n type=\"url\"\n />\n <c8y-messages>\n <c8y-message\n [name]=\"'pattern'\"\n [text]=\"'Valid URL required.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"isCustomMicroservice\">\n <div *ngIf=\"!isLoading\" class=\"d-contents\">\n <c8y-upload-archive\n [(application)]=\"application\"\n (refresh)=\"onNewArchive()\"\n ></c8y-upload-archive>\n </div>\n </ng-container>\n <div\n *ngIf=\"application && !!isOwner && hasAdminPermissions\"\n class=\"card-footer separator\"\n >\n <button\n (click)=\"cancel()\"\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n (click)=\"delete()\"\n *ngIf=\"canDelete\"\n class=\"btn btn-danger\"\n title=\"{{ 'Delete' | translate }}\"\n type=\"button\"\n >\n {{ 'Delete' | translate }}\n </button>\n <button\n [disabled]=\"!application.type || formGroup.invalid || formGroup.pristine\"\n class=\"btn btn-primary btn-form\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </form>\n\n <div *ngIf=\"isActivityLogSupported\" class=\"content-fullpage d-flex d-col bg-level-1\">\n <div class=\"card-header separator\">\n <div class=\"card-title\" translate>Activity log</div>\n <div class=\"m-l-auto\">\n <button\n (click)=\"load()\"\n class=\"btn btn-link btn-sm\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n >\n <i [ngClass]=\"{ 'icon-spin': isLoading }\" c8yIcon=\"refresh\"></i>\n {{ 'Reload' | translate }}\n </button>\n </div>\n </div>\n <div *ngIf=\"isLoading\" class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n <c8y-activity-log\n *ngIf=\"!isLoading\"\n [hasAdminPermissions]=\"hasAdminPermissions\"\n [application]=\"application\"\n class=\"d-contents\"\n ></c8y-activity-log>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.LoadingComponent, selector: "c8y-loading" }, { kind: "directive", type: i2.TextareaAutoresizeDirective, selector: "[c8y-textarea-autoresize]" }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: i2.AppIconComponent, selector: "c8y-app-icon", inputs: ["contextPath", "name", "app"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.PropertiesListComponent, selector: "c8y-properties-list", inputs: ["properties", "title", "icon", "data", "groups", "noParse", "emptyLabel"] }, { kind: "directive", type: i9.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: i1.UploadArchiveComponent, selector: "c8y-upload-archive", inputs: ["application", "uploadNewVersion", "preUploadCallback"], outputs: ["applicationChange", "refresh"] }, { kind: "component", type: ActivityLogComponent, selector: "c8y-activity-log", inputs: ["application", "hasAdminPermissions"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }, { kind: "pipe", type: i2.DatePipe, name: "c8yDate" }] });
519
526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationPropertiesComponent, decorators: [{
520
527
  type: Component,
521
528
  args: [{ selector: 'c8y-application-properties', template: "<c8y-title>{{ application | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb *ngIf=\"!isMicroservice\">\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"breadcrumbConfig?.icon\"\n [label]=\"breadcrumbConfig?.label\"\n [path]=\"breadcrumbConfig?.path\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"application | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Properties' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-breadcrumb *ngIf=\"isMicroservice\">\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"breadcrumbConfig?.icon\"\n [label]=\"breadcrumbConfig?.label\"\n [path]=\"breadcrumbConfig?.path\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"application | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Properties' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"row\">\n <div [ngClass]=\"{ 'col-md-8': !isActivityLogSupported, 'col-md-12': isActivityLogSupported }\">\n <div\n *ngIf=\"application\"\n [ngClass]=\"{ 'd-grid grid__col--7-5--md': isActivityLogSupported }\"\n class=\"card content-fullpage\"\n >\n <form\n (ngSubmit)=\"formGroup.valid && save(formGroup.value)\"\n [formGroup]=\"formGroup\"\n class=\"d-flex d-col content-fullpage\"\n novalidate\n >\n <div *ngIf=\"!isLoading\" class=\"d-contents\">\n <div class=\"card-block separator-bottom large-padding flex-no-shrink\">\n <div class=\"d-flex-md a-i-start text-center text-left-md\">\n <c8y-app-icon\n *ngIf=\"!isPackage && !isFeature && !isMicroservice && !isExternal\"\n [app]=\"application\"\n [contextPath]=\"application.contextPath\"\n [name]=\"application.name\"\n class=\"icon-48\"\n ></c8y-app-icon>\n <i *ngIf=\"isPackage\" c8yIcon=\"big-parcel\" class=\"icon-48\"></i>\n <i *ngIf=\"isFeature\" c8yIcon=\"tab\" class=\"icon-48\"></i>\n <i *ngIf=\"isMicroservice\" c8yIcon=\"microchip\" class=\"icon-48\"></i>\n <i *ngIf=\"isExternal\" c8yIcon=\"globe1\" class=\"icon-48\"></i>\n\n <div class=\"p-t-md-16 p-l-md-16 p-r-md-32 flex-grow\">\n <p class=\"h4 text-medium m-b-8\">{{ application | humanizeAppName | async }}</p>\n <p *ngIf=\"!isOwner\">\n <em class=\"text-muted\">\n {{ application.description || ('No description available.' | translate) }}\n </em>\n </p>\n <div *ngIf=\"isOwner\" class=\"form-group m-b-0\">\n <label\n [ngClass]=\"{ updated: formGroup?.controls?.description?.dirty }\"\n class=\"editable\"\n >\n <textarea\n c8y-textarea-autoresize\n class=\"form-control no-resize\"\n formControlName=\"description\"\n name=\"description\"\n placeholder=\"{{ 'No description available.' | translate }}\"\n ></textarea>\n </label>\n </div>\n </div>\n <div class=\"text-right-md m-t-4\">\n <span [ngClass]=\"appState?.class\" class=\"label\">\n {{ appState?.label | translate }}\n </span>\n <div class=\"fit-w m-t-2\" *ngIf=\"isPackage || isMicroservice\">\n <label class=\"text-label-small\" translate>Version:</label>\n <small class=\"p-l-4 text-bold\">{{ application.manifest?.version }}</small>\n </div>\n <div class=\"fit-w m-t-2\">\n <label class=\"text-label-small\" translate>Creation time:</label>\n <small class=\"p-l-4 text-bold\">{{ (binaryMo?.creationTime | c8yDate) || '---' }}</small>\n </div>\n <div class=\"m-t-8\">\n <button\n type=\"button\"\n *ngIf=\"isUpdateAvailable\"\n (click)=\"updateToLatestVersion()\"\n [ngClass]=\"{ 'btn-pending': isUpdateOngoing }\"\n class=\"btn btn-warning btn-sm\"\n >\n {{ 'Update available' | translate }}\n </button>\n <button\n (click)=\"openApp(application)\"\n [disabled]=\"disableOpenInBrowser\"\n *ngIf=\"canOpenInBrowser\"\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Open' | translate }}\"\n type=\"button\"\n >\n <i [c8yIcon]=\"'external-link'\"></i>\n {{ 'Open' | translate }}\n </button>\n <div *ngIf=\"canOpenInBrowser && disableOpenInBrowser\">\n <small class=\"text-muted\" translate>\n The application is overwritten by a custom application sharing the same path\n </small>\n </div>\n <span *ngIf=\"isCustomMicroservice\">\n <button\n (click)=\"subscribe()\"\n *ngIf=\"!isSubscribed\"\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Subscribe' | translate }}\"\n >\n <i [c8yIcon]=\"'check-circle-o'\"></i>\n {{ 'Subscribe' | translate }}\n </button>\n <button\n (click)=\"unsubscribe()\"\n *ngIf=\"isSubscribed\"\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Unsubscribe' | translate }}\"\n >\n <i [c8yIcon]=\"'minus-circle'\"></i>\n {{ 'Unsubscribe' | translate }}\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll bg-level-0 flex-grow\">\n <div class=\"card-block large-padding\">\n <div *ngIf=\"isPackage\" class=\"row p-16\">\n <c8y-properties-list\n [data]=\"application.manifest\"\n [properties]=\"packageProperties\"\n [title]=\"'Package details' | translate\"\n [emptyLabel]=\"'---'\"\n icon=\"info\"\n ></c8y-properties-list>\n </div>\n <div *ngIf=\"sourcePackage\" class=\"row p-16\">\n <c8y-properties-list\n [data]=\"sourcePackage.manifest\"\n [properties]=\"packageProperties\"\n [title]=\"'Source package information' | translate\"\n [emptyLabel]=\"'---'\"\n icon=\"info\"\n ></c8y-properties-list>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-5\">\n <c8y-form-group>\n <label for=\"appId\">ID</label>\n <input\n [readonly]=\"true\"\n autocomplete=\"off\"\n class=\"form-control\"\n formControlName=\"id\"\n name=\"id\"\n id=\"appId\"\n type=\"text\"\n />\n </c8y-form-group>\n </div>\n <div class=\"col-sm-7\">\n <c8y-form-group>\n <label>{{ 'Name' | translate }}</label>\n <input\n [readonly]=\"!isOwner\"\n class=\"form-control\"\n formControlName=\"name\"\n name=\"name\"\n placeholder=\"{{ 'e.g. My application' | translate }}\"\n required\n type=\"text\"\n />\n </c8y-form-group>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-sm-5\">\n <c8y-form-group>\n <label>{{ 'Application key' | translate }}</label>\n <input\n [readonly]=\"application.id || !isOwner\"\n class=\"form-control\"\n name=\"key\"\n formControlName=\"key\"\n placeholder=\"{{ 'e.g. my-application-key' | translate }}\"\n required\n type=\"text\"\n />\n </c8y-form-group>\n </div>\n\n <div class=\"col-sm-7\">\n <c8y-form-group>\n <label>{{ 'Type' | translate }}</label>\n <div>\n <div *ngIf=\"application.id\">\n <p class=\"form-control-static\">\n <i [c8yIcon]=\"iconMap[application.type]\"></i>\n <span>\n {{ application.type | translate }}\n </span>\n </p>\n </div>\n </div>\n </c8y-form-group>\n </div>\n </div>\n\n <div [ngSwitch]=\"application.type\">\n <div *ngSwitchCase=\"'HOSTED'\">\n <c8y-form-group>\n <label>{{ 'Path' | translate }}</label>\n <div class=\"input-group\">\n <span class=\"input-group-addon\">/apps/</span>\n <input\n [readOnly]=\"application.id || !isOwner\"\n class=\"form-control\"\n name=\"contextPath\"\n placeholder=\"{{ 'e.g. my-application`used in URL`' | translate }}\"\n required\n type=\"text\"\n formControlName=\"contextPath\"\n />\n </div>\n </c8y-form-group>\n </div>\n\n <div *ngSwitchCase=\"'MICROSERVICE'\">\n <c8y-form-group>\n <label>{{ 'Path' | translate }}</label>\n <div class=\"input-group\">\n <span class=\"input-group-addon\">/service/</span>\n <input\n [readOnly]=\"application.id || !isOwner\"\n class=\"form-control\"\n name=\"contextPath\"\n placeholder=\"{{ 'e.g. my-microservice`used in URL`' | translate }}\"\n required\n type=\"text\"\n formControlName=\"contextPath\"\n />\n </div>\n </c8y-form-group>\n <div class=\"row\">\n <div *ngIf=\"application.manifest.version\" class=\"col-sm-4 m-b-16 flex-auto\">\n <label>{{ 'Version' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.version }}\n </p>\n </div>\n <div *ngIf=\"application.manifest.isolation\" class=\"col-sm-4 m-b-16 flex-auto\">\n <label>{{ 'Isolation' | translate }}</label>\n <p class=\"form-control-static\">\n <span *ngIf=\"singleTenant\">\n <i [c8yIcon]=\"'c8y-enterprise'\" class=\"c8y-icon-duocolor h4\"></i>\n {{ 'Single tenant' | translate }}\n </span>\n <span *ngIf=\"!singleTenant\">\n <i [c8yIcon]=\"'c8y-sub-tenants'\" class=\"c8y-icon-duocolor icon-32\"></i>\n {{ 'Multi tenant' | translate }}\n </span>\n </p>\n </div>\n <div *ngIf=\"application.manifest.isolation\" class=\"col-sm-4 m-b-16 flex-auto\">\n <label>{{ 'Billing mode' | translate }}</label>\n <p class=\"form-control-static\">\n <span\n *ngIf=\"subscription\"\n [tooltip]=\"'Resources usage assigned to: Owner' | translate\"\n >\n {{ 'Subscription' | translate }}\n </span>\n <span\n *ngIf=\"!subscription && singleTenant\"\n [tooltip]=\"'Resources usage assigned to: Subscriber | translate'\"\n >\n {{ 'Resources' | translate }}\n </span>\n <span\n *ngIf=\"!subscription && !singleTenant\"\n [tooltip]=\"'Resources usage assigned to: Owner' | translate\"\n >\n {{ 'Resources' | translate }}\n </span>\n </p>\n </div>\n </div>\n\n <div *ngIf=\"application.manifest.provider\" class=\"legend form-block m-t-40\">\n {{ 'Provider' | translate }}\n </div>\n <div class=\"list-inline\" *ngIf=\"application.manifest.provider\">\n <div *ngIf=\"application.manifest.provider.name\">\n <div class=\"col-sm-4 m-b-16\">\n <label>{{ 'Name' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.provider.name }}\n </p>\n </div>\n </div>\n <div *ngIf=\"application.manifest.provider.domain\">\n <div class=\"col-sm-4 m-b-16\">\n <label>{{ 'Domain' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.provider.domain }}\n </p>\n </div>\n </div>\n <div *ngIf=\"application.manifest.provider.support\">\n <div class=\"col-sm-4 m-b-16\">\n <label>{{ 'Support' | translate }}</label>\n <p class=\"form-control-static\">\n {{ application.manifest.provider.support }}\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'REPOSITORY'\">\n <c8y-form-group>\n <label>{{ 'Path' | translate }}</label>\n <div class=\"input-group\">\n <span class=\"input-group-addon\">/apps/</span>\n <input\n [readOnly]=\"application.id || !isOwner\"\n class=\"form-control\"\n formControlName=\"contextPath\"\n name=\"contextPath\"\n placeholder=\"{{ 'e.g. my-application`used in URL`' | translate }}\"\n required\n type=\"text\"\n />\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label>{{ 'Server URL' | translate }}</label>\n <input\n class=\"form-control\"\n name=\"resourcesUrl\"\n formControlName=\"resourcesUrl\"\n placeholder=\"{{ 'e.g. my-application`used in URL`' | translate }}\"\n required\n type=\"url\"\n />\n </c8y-form-group>\n\n <div class=\"form-group\">\n <label>{{ 'Username' | translate }}</label>\n <input\n class=\"form-control\"\n formControlName=\"username\"\n name=\"username\"\n type=\"text\"\n />\n </div>\n\n <div class=\"form-group\">\n <label>{{ 'Password' | translate }}</label>\n <input\n class=\"form-control\"\n formControlName=\"password\"\n name=\"password\"\n type=\"text\"\n />\n </div>\n </div>\n\n <div *ngSwitchCase=\"'EXTERNAL'\">\n <c8y-form-group>\n <label>{{ 'External URL' | translate }}</label>\n <input\n [pattern]=\"'^(?!javascript:).+'\"\n [readOnly]=\"!isOwner\"\n class=\"form-control\"\n formControlName=\"externalUrl\"\n name=\"externalUrl\"\n placeholder=\"{{ 'e.g.' | translate }} http://www.example.com/\"\n required\n type=\"url\"\n />\n <c8y-messages>\n <c8y-message\n [name]=\"'pattern'\"\n [text]=\"'Valid URL required.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"isCustomMicroservice\">\n <div *ngIf=\"!isLoading\" class=\"d-contents\">\n <c8y-upload-archive\n [(application)]=\"application\"\n (refresh)=\"onNewArchive()\"\n ></c8y-upload-archive>\n </div>\n </ng-container>\n <div\n *ngIf=\"application && !!isOwner && hasAdminPermissions\"\n class=\"card-footer separator\"\n >\n <button\n (click)=\"cancel()\"\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n (click)=\"delete()\"\n *ngIf=\"canDelete\"\n class=\"btn btn-danger\"\n title=\"{{ 'Delete' | translate }}\"\n type=\"button\"\n >\n {{ 'Delete' | translate }}\n </button>\n <button\n [disabled]=\"!application.type || formGroup.invalid || formGroup.pristine\"\n class=\"btn btn-primary btn-form\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </form>\n\n <div *ngIf=\"isActivityLogSupported\" class=\"content-fullpage d-flex d-col bg-level-1\">\n <div class=\"card-header separator\">\n <div class=\"card-title\" translate>Activity log</div>\n <div class=\"m-l-auto\">\n <button\n (click)=\"load()\"\n class=\"btn btn-link btn-sm\"\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n >\n <i [ngClass]=\"{ 'icon-spin': isLoading }\" c8yIcon=\"refresh\"></i>\n {{ 'Reload' | translate }}\n </button>\n </div>\n </div>\n <div *ngIf=\"isLoading\" class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n <c8y-activity-log\n *ngIf=\"!isLoading\"\n [hasAdminPermissions]=\"hasAdminPermissions\"\n [application]=\"application\"\n class=\"d-contents\"\n ></c8y-activity-log>\n </div>\n </div>\n </div>\n</div>\n" }]
522
- }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i1.EcosystemService }, { type: i1$2.Router }, { type: i3$1.FormBuilder }, { type: i2$1.ApplicationService }, { type: i2.AlertService }, { type: i2$1.InventoryService }, { type: i2.Permissions }, { type: i2.ModalService }, { type: i4.TranslateService }, { type: i1$1.BsModalService }]; } });
529
+ }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i1.EcosystemService }, { type: i1$2.Router }, { type: i3$1.FormBuilder }, { type: i2$1.ApplicationService }, { type: i2.AlertService }, { type: i2$1.InventoryService }, { type: i2.Permissions }, { type: i2.ModalService }, { type: i4.TranslateService }, { type: i1$1.BsModalService }, { type: i2.GainsightService }]; } });
523
530
 
524
531
  class ApplicationPropertiesGuard {
525
532
  constructor(ecosystemService) {
@@ -1079,11 +1086,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
1079
1086
  }], ctorParameters: function () { return [{ type: i1.EcosystemService }, { type: i2.WizardModalService }]; } });
1080
1087
 
1081
1088
  class PackageAvailabilityService {
1082
- constructor(appState, alert, modal, application) {
1089
+ constructor(appState, alert, modal, application, gainsightService) {
1083
1090
  this.appState = appState;
1084
1091
  this.alert = alert;
1085
1092
  this.modal = modal;
1086
1093
  this.application = application;
1094
+ this.gainsightService = gainsightService;
1095
+ this.CURRENT_LOCATION = location.href;
1087
1096
  }
1088
1097
  askIfAvailabilityShouldBeSetTo(applicationPackage, availability) {
1089
1098
  var _a;
@@ -1102,11 +1111,21 @@ class PackageAvailabilityService {
1102
1111
  try {
1103
1112
  const { data: app } = yield this.application.updateApplicationAvailability(applicationPackage, availability);
1104
1113
  this.alert.success(gettext('Updated package availability.'));
1114
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.AVAILABILITY, {
1115
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.AVAILABILITY_CHANGE,
1116
+ result: availability.toString().toLocaleLowerCase(),
1117
+ url: this.CURRENT_LOCATION
1118
+ });
1105
1119
  return app;
1106
1120
  }
1107
1121
  catch (e) {
1108
1122
  this.alert.warning(gettext('Failed to set package availability.'));
1109
1123
  this.alert.addServerFailure(e);
1124
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.AVAILABILITY, {
1125
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.AVAILABILITY_CHANGE,
1126
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1127
+ url: this.CURRENT_LOCATION
1128
+ });
1110
1129
  return applicationPackage;
1111
1130
  }
1112
1131
  });
@@ -1133,12 +1152,12 @@ class PackageAvailabilityService {
1133
1152
  }
1134
1153
  }
1135
1154
  }
1136
- PackageAvailabilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageAvailabilityService, deps: [{ token: i2.AppStateService }, { token: i2.AlertService }, { token: i2.ModalService }, { token: i2$1.ApplicationService }], target: i0.ɵɵFactoryTarget.Injectable });
1155
+ PackageAvailabilityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageAvailabilityService, deps: [{ token: i2.AppStateService }, { token: i2.AlertService }, { token: i2.ModalService }, { token: i2$1.ApplicationService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Injectable });
1137
1156
  PackageAvailabilityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageAvailabilityService, providedIn: 'root' });
1138
1157
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageAvailabilityService, decorators: [{
1139
1158
  type: Injectable,
1140
1159
  args: [{ providedIn: 'root' }]
1141
- }], ctorParameters: function () { return [{ type: i2.AppStateService }, { type: i2.AlertService }, { type: i2.ModalService }, { type: i2$1.ApplicationService }]; } });
1160
+ }], ctorParameters: function () { return [{ type: i2.AppStateService }, { type: i2.AlertService }, { type: i2.ModalService }, { type: i2$1.ApplicationService }, { type: i2.GainsightService }]; } });
1142
1161
 
1143
1162
  class AddPackageComponent {
1144
1163
  constructor(ecosystemService, appState, packageAvailability) {
@@ -1184,12 +1203,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
1184
1203
  }], ctorParameters: function () { return [{ type: i1.EcosystemService }, { type: i2.AppStateService }, { type: PackageAvailabilityService }]; } });
1185
1204
 
1186
1205
  class DeployApplicationComponent {
1187
- constructor(ecosystemService, applicationService, wizardComponent, translate, inventoryService) {
1206
+ constructor(ecosystemService, applicationService, wizardComponent, translate, inventoryService, gainsightService) {
1188
1207
  this.ecosystemService = ecosystemService;
1189
1208
  this.applicationService = applicationService;
1190
1209
  this.wizardComponent = wizardComponent;
1191
1210
  this.translate = translate;
1192
1211
  this.inventoryService = inventoryService;
1212
+ this.gainsightService = gainsightService;
1213
+ this.CURRENT_LOCATION = location.href;
1193
1214
  this.inProgress = true;
1194
1215
  this.isDeployed = false;
1195
1216
  this.deployedWithSuccess = false;
@@ -1250,11 +1271,23 @@ class DeployApplicationComponent {
1250
1271
  // Update manifest
1251
1272
  yield this.ecosystemService.updateAppManifest(newApp, this.package);
1252
1273
  this.deployedWithSuccess = true;
1274
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DEPLOY_APPLICATION, {
1275
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION,
1276
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION,
1277
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.DEPLOYED,
1278
+ url: this.CURRENT_LOCATION
1279
+ });
1253
1280
  }
1254
1281
  catch (error) {
1255
1282
  if (((_a = error === null || error === void 0 ? void 0 : error.res) === null || _a === void 0 ? void 0 : _a.status) === 404) {
1256
1283
  yield this.applicationService.delete(newApp.id);
1257
1284
  yield this.fallbackToCloneLatest(config);
1285
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DEPLOY_APPLICATION, {
1286
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION,
1287
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION,
1288
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1289
+ url: this.CURRENT_LOCATION
1290
+ });
1258
1291
  }
1259
1292
  }
1260
1293
  finally {
@@ -1307,12 +1340,12 @@ class DeployApplicationComponent {
1307
1340
  });
1308
1341
  }
1309
1342
  }
1310
- DeployApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DeployApplicationComponent, deps: [{ token: i1.EcosystemService }, { token: i2$1.ApplicationService }, { token: i2.WizardComponent }, { token: i4.TranslateService }, { token: i2$1.InventoryService }], target: i0.ɵɵFactoryTarget.Component });
1343
+ DeployApplicationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DeployApplicationComponent, deps: [{ token: i1.EcosystemService }, { token: i2$1.ApplicationService }, { token: i2.WizardComponent }, { token: i4.TranslateService }, { token: i2$1.InventoryService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
1311
1344
  DeployApplicationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: DeployApplicationComponent, selector: "c8y-deploy-application", viewQueries: [{ propertyName: "applicationPropertiesForm", first: true, predicate: ApplicationPropertiesFormComponent, descendants: true }], ngImport: i0, template: "<c8y-wizard-header>\n <div class=\"modal-header dialog-header\">\n <i c8yIcon=\"output\"></i>\n <h4 id=\"modal-title\">{{ 'Deploy application' | translate }}</h4>\n </div>\n</c8y-wizard-header>\n\n<c8y-wizard-body id=\"modal-body\">\n <ng-container *ngIf=\"!isDeployed\">\n <div class=\"fadeIn animated d-flex a-i-center j-c-center d-col\" style=\"min-height: 309px\">\n <p\n class=\"bg-level-0 fit-w p-16 text-center text-medium sticky-top bg-level-0 separator-bottom\"\n *ngIf=\"!inProgress\"\n >\n {{ headerText | translate }}\n </p>\n <c8y-application-properties-form\n *ngIf=\"!inProgress\"\n [application]=\"newAppConfig\"\n class=\"d-block fit-w bg-level-1\"\n ></c8y-application-properties-form>\n\n <ng-container *ngIf=\"!inProgress\">\n <div [ngStyle]=\"{ padding: '0 16px' }\" class=\"d-block fit-w bg-gray-white\">\n <c8y-package-version-select [ngModel]=\"model.selected\" (ngModelChange)=\"onAppVersionSelect($event)\" [packageId]=\"package?.id\" [label]=\"'Use package version' | translate\"></c8y-package-version-select>\n </div>\n </ng-container>\n\n <c8y-progress-bar\n *ngIf=\"inProgress\"\n [message]=\"'Deploying\u2026' | translate\"\n class=\"text-center\"\n ></c8y-progress-bar>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isDeployed\">\n <div\n *ngIf=\"deployedWithSuccess; else failedDeploy\"\n class=\"modal-body fadeIn animated\"\n style=\"min-height: 309px\"\n >\n <div class=\"d-flex a-i-center j-c-center d-col\">\n <c8y-operation-result\n type=\"success\"\n [size]=\"84\"\n [vertical]=\"true\"\n [text]=\"successMessageTemplate | translate: { packageName: package.name }\"\n class=\"lead d-block m-b-16\"\n ></c8y-operation-result>\n </div>\n </div>\n <ng-template #failedDeploy>\n <div class=\"modal-body fadeIn animated text-center\" style=\"min-height: 257px\">\n <c8y-operation-result\n type=\"error\"\n [size]=\"84\"\n [vertical]=\"true\"\n text=\"{{ 'Application creation failed' | translate }}\"\n class=\"lead\"\n ></c8y-operation-result>\n </div>\n </ng-template>\n </ng-container>\n</c8y-wizard-body>\n\n<c8y-wizard-footer>\n <button\n (click)=\"cancel()\"\n type=\"button\"\n class=\"btn btn-default\"\n title=\"{{ (isDeployed && deployedWithSuccess ? doneLabel : cancelLabel) | translate }}\"\n >\n {{ (isDeployed && deployedWithSuccess ? doneLabel : cancelLabel) | translate }}\n </button>\n\n <button\n (click)=\"deployApp()\"\n *ngIf=\"!isDeployed\"\n [disabled]=\"inProgress || !canDeploy\"\n [ngClass]=\"{ 'btn-pending': inProgress }\"\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Deploy' | translate }}\"\n >\n {{ 'Deploy' | translate }}\n </button>\n</c8y-wizard-footer>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.ProgressBarComponent, selector: "c8y-progress-bar", inputs: ["message", "progress"] }, { kind: "component", type: i2.OperationResultComponent, selector: "c8y-operation-result", inputs: ["text", "vertical", "size", "type"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.WizardHeaderComponent, selector: "c8y-wizard-header" }, { kind: "component", type: i2.WizardBodyComponent, selector: "c8y-wizard-body" }, { kind: "component", type: i2.WizardFooterComponent, selector: "c8y-wizard-footer" }, { kind: "component", type: i1.ApplicationPropertiesFormComponent, selector: "c8y-application-properties-form", inputs: ["application", "disabled"] }, { kind: "component", type: i1.PackageVersionSelectComponent, selector: "c8y-package-version-select", inputs: ["label", "packageContextPath", "packageId"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] });
1312
1345
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DeployApplicationComponent, decorators: [{
1313
1346
  type: Component,
1314
1347
  args: [{ selector: 'c8y-deploy-application', template: "<c8y-wizard-header>\n <div class=\"modal-header dialog-header\">\n <i c8yIcon=\"output\"></i>\n <h4 id=\"modal-title\">{{ 'Deploy application' | translate }}</h4>\n </div>\n</c8y-wizard-header>\n\n<c8y-wizard-body id=\"modal-body\">\n <ng-container *ngIf=\"!isDeployed\">\n <div class=\"fadeIn animated d-flex a-i-center j-c-center d-col\" style=\"min-height: 309px\">\n <p\n class=\"bg-level-0 fit-w p-16 text-center text-medium sticky-top bg-level-0 separator-bottom\"\n *ngIf=\"!inProgress\"\n >\n {{ headerText | translate }}\n </p>\n <c8y-application-properties-form\n *ngIf=\"!inProgress\"\n [application]=\"newAppConfig\"\n class=\"d-block fit-w bg-level-1\"\n ></c8y-application-properties-form>\n\n <ng-container *ngIf=\"!inProgress\">\n <div [ngStyle]=\"{ padding: '0 16px' }\" class=\"d-block fit-w bg-gray-white\">\n <c8y-package-version-select [ngModel]=\"model.selected\" (ngModelChange)=\"onAppVersionSelect($event)\" [packageId]=\"package?.id\" [label]=\"'Use package version' | translate\"></c8y-package-version-select>\n </div>\n </ng-container>\n\n <c8y-progress-bar\n *ngIf=\"inProgress\"\n [message]=\"'Deploying\u2026' | translate\"\n class=\"text-center\"\n ></c8y-progress-bar>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"isDeployed\">\n <div\n *ngIf=\"deployedWithSuccess; else failedDeploy\"\n class=\"modal-body fadeIn animated\"\n style=\"min-height: 309px\"\n >\n <div class=\"d-flex a-i-center j-c-center d-col\">\n <c8y-operation-result\n type=\"success\"\n [size]=\"84\"\n [vertical]=\"true\"\n [text]=\"successMessageTemplate | translate: { packageName: package.name }\"\n class=\"lead d-block m-b-16\"\n ></c8y-operation-result>\n </div>\n </div>\n <ng-template #failedDeploy>\n <div class=\"modal-body fadeIn animated text-center\" style=\"min-height: 257px\">\n <c8y-operation-result\n type=\"error\"\n [size]=\"84\"\n [vertical]=\"true\"\n text=\"{{ 'Application creation failed' | translate }}\"\n class=\"lead\"\n ></c8y-operation-result>\n </div>\n </ng-template>\n </ng-container>\n</c8y-wizard-body>\n\n<c8y-wizard-footer>\n <button\n (click)=\"cancel()\"\n type=\"button\"\n class=\"btn btn-default\"\n title=\"{{ (isDeployed && deployedWithSuccess ? doneLabel : cancelLabel) | translate }}\"\n >\n {{ (isDeployed && deployedWithSuccess ? doneLabel : cancelLabel) | translate }}\n </button>\n\n <button\n (click)=\"deployApp()\"\n *ngIf=\"!isDeployed\"\n [disabled]=\"inProgress || !canDeploy\"\n [ngClass]=\"{ 'btn-pending': inProgress }\"\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Deploy' | translate }}\"\n >\n {{ 'Deploy' | translate }}\n </button>\n</c8y-wizard-footer>\n" }]
1315
- }], ctorParameters: function () { return [{ type: i1.EcosystemService }, { type: i2$1.ApplicationService }, { type: i2.WizardComponent }, { type: i4.TranslateService }, { type: i2$1.InventoryService }]; }, propDecorators: { applicationPropertiesForm: [{
1348
+ }], ctorParameters: function () { return [{ type: i1.EcosystemService }, { type: i2$1.ApplicationService }, { type: i2.WizardComponent }, { type: i4.TranslateService }, { type: i2$1.InventoryService }, { type: i2.GainsightService }]; }, propDecorators: { applicationPropertiesForm: [{
1316
1349
  type: ViewChild,
1317
1350
  args: [ApplicationPropertiesFormComponent]
1318
1351
  }] } });
@@ -1391,12 +1424,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
1391
1424
  }] } });
1392
1425
 
1393
1426
  class PluginListComponent {
1394
- constructor(ecosystemService, bsModalService, pluginsService, alertService, translateService) {
1427
+ constructor(ecosystemService, bsModalService, pluginsService, alertService, translateService, gainsightService) {
1395
1428
  this.ecosystemService = ecosystemService;
1396
1429
  this.bsModalService = bsModalService;
1397
1430
  this.pluginsService = pluginsService;
1398
1431
  this.alertService = alertService;
1399
1432
  this.translateService = translateService;
1433
+ this.gainsightService = gainsightService;
1434
+ this.CURRENT_LOCATION = location.href;
1400
1435
  this.emptyListText = '';
1401
1436
  /**
1402
1437
  * Shows the install button for each plugin separately. Currently used in package-details view.
@@ -1440,9 +1475,19 @@ class PluginListComponent {
1440
1475
  yield this.handleRemotesInstallation(app, plugin);
1441
1476
  const successText = this.translateService.instant(gettext('Plugin installed successfully to app "{{ appName }}".'), { appName: app.name });
1442
1477
  this.alertService.success(successText);
1478
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1479
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1480
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
1481
+ url: this.CURRENT_LOCATION
1482
+ });
1443
1483
  }
1444
1484
  catch (_b) {
1445
1485
  // nothing to do
1486
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1487
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1488
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1489
+ url: this.CURRENT_LOCATION
1490
+ });
1446
1491
  }
1447
1492
  }
1448
1493
  this.installingPluginId = '';
@@ -1493,12 +1538,12 @@ class PluginListComponent {
1493
1538
  });
1494
1539
  }
1495
1540
  }
1496
- PluginListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PluginListComponent, deps: [{ token: i1.EcosystemService }, { token: i1$1.BsModalService }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1541
+ PluginListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PluginListComponent, deps: [{ token: i1.EcosystemService }, { token: i1$1.BsModalService }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i4.TranslateService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
1497
1542
  PluginListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: PluginListComponent, selector: "c8y-plugin-list", inputs: { plugins$: "plugins$", emptyListText: "emptyListText", selectable: "selectable", installable: "installable", package: "package" }, outputs: { selectedItems: "selectedItems" }, ngImport: i0, template: "<c8y-list-group class=\"bg-inherit\">\n <ng-container *ngIf=\"(plugins$ | async)?.length !== 0; else emptyList\">\n <ng-container *ngFor=\"let plugin of plugins$ | async\">\n <c8y-li [ngClass]=\"{ disabled: plugin.installed }\" class=\"bg-inherit\">\n <c8y-plugin-list-item\n (isItemSelected)=\"updateSelectedItems($event, plugin?.id)\"\n [plugin]=\"plugin\"\n [selectable]=\"selectable\"\n class=\"d-flex\"\n ></c8y-plugin-list-item>\n <div class=\"p-l-40 m-t-4\">\n <button\n *ngIf=\"installable\"\n (click)=\"installPlugin(plugin)\"\n [ngClass]=\"{ 'btn-pending': plugin.id === installingPluginId }\"\n [disabled]=\"installingPluginId && plugin.id !== installingPluginId\"\n class=\"btn btn-default btn-sm m-l-4\"\n title=\"{{ 'Install plugin' | translate }}\"\n translate\n >\n Install plugin\n </button>\n </div>\n </c8y-li>\n </ng-container>\n </ng-container>\n</c8y-list-group>\n<ng-template #emptyList>\n <div class=\"c8y-empty-state text-left\" *ngIf=\"emptyListText\">\n <h1 c8yIcon=\"plugin\"></h1>\n <p>\n {{ emptyListText | translate }}\n </p>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: PluginListItemComponent, selector: "c8y-plugin-list-item", inputs: ["plugin", "selectable"], outputs: ["isItemSelected"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] });
1498
1543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PluginListComponent, decorators: [{
1499
1544
  type: Component,
1500
1545
  args: [{ selector: 'c8y-plugin-list', template: "<c8y-list-group class=\"bg-inherit\">\n <ng-container *ngIf=\"(plugins$ | async)?.length !== 0; else emptyList\">\n <ng-container *ngFor=\"let plugin of plugins$ | async\">\n <c8y-li [ngClass]=\"{ disabled: plugin.installed }\" class=\"bg-inherit\">\n <c8y-plugin-list-item\n (isItemSelected)=\"updateSelectedItems($event, plugin?.id)\"\n [plugin]=\"plugin\"\n [selectable]=\"selectable\"\n class=\"d-flex\"\n ></c8y-plugin-list-item>\n <div class=\"p-l-40 m-t-4\">\n <button\n *ngIf=\"installable\"\n (click)=\"installPlugin(plugin)\"\n [ngClass]=\"{ 'btn-pending': plugin.id === installingPluginId }\"\n [disabled]=\"installingPluginId && plugin.id !== installingPluginId\"\n class=\"btn btn-default btn-sm m-l-4\"\n title=\"{{ 'Install plugin' | translate }}\"\n translate\n >\n Install plugin\n </button>\n </div>\n </c8y-li>\n </ng-container>\n </ng-container>\n</c8y-list-group>\n<ng-template #emptyList>\n <div class=\"c8y-empty-state text-left\" *ngIf=\"emptyListText\">\n <h1 c8yIcon=\"plugin\"></h1>\n <p>\n {{ emptyListText | translate }}\n </p>\n </div>\n</ng-template>\n" }]
1501
- }], ctorParameters: function () { return [{ type: i1.EcosystemService }, { type: i1$1.BsModalService }, { type: i2.PluginsService }, { type: i2.AlertService }, { type: i4.TranslateService }]; }, propDecorators: { plugins$: [{
1546
+ }], ctorParameters: function () { return [{ type: i1.EcosystemService }, { type: i1$1.BsModalService }, { type: i2.PluginsService }, { type: i2.AlertService }, { type: i4.TranslateService }, { type: i2.GainsightService }]; }, propDecorators: { plugins$: [{
1502
1547
  type: Input
1503
1548
  }], emptyListText: [{
1504
1549
  type: Input
@@ -1743,7 +1788,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
1743
1788
 
1744
1789
  const DEFAULT_VERSIONS_LIMIT = 20;
1745
1790
  class PackageVersionsListComponent {
1746
- constructor(activatedRoute, pluginsService, ecosystemService, translateService, modal, alertService, optionsService, permissions) {
1791
+ constructor(activatedRoute, pluginsService, ecosystemService, translateService, modal, alertService, optionsService, permissions, gainsightService) {
1747
1792
  this.activatedRoute = activatedRoute;
1748
1793
  this.pluginsService = pluginsService;
1749
1794
  this.ecosystemService = ecosystemService;
@@ -1752,6 +1797,8 @@ class PackageVersionsListComponent {
1752
1797
  this.alertService = alertService;
1753
1798
  this.optionsService = optionsService;
1754
1799
  this.permissions = permissions;
1800
+ this.gainsightService = gainsightService;
1801
+ this.CURRENT_LOCATION = location.href;
1755
1802
  this.isLoading = false;
1756
1803
  this.hasAdminPermissions = false;
1757
1804
  this.isPackageOwnedByCurrentTenant = false;
@@ -1771,6 +1818,11 @@ class PackageVersionsListComponent {
1771
1818
  }
1772
1819
  downloadArchive(appVersion) {
1773
1820
  return __awaiter(this, void 0, void 0, function* () {
1821
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_VERSIONS, {
1822
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PACKAGE_VERSIONS,
1823
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DOWNLOAD,
1824
+ url: this.CURRENT_LOCATION
1825
+ });
1774
1826
  const archiveMO = yield this.ecosystemService.getArchiveManagedObject(appVersion.binaryId);
1775
1827
  yield this.ecosystemService.downloadArchive(this.package, {
1776
1828
  id: appVersion.binaryId,
@@ -1794,9 +1846,21 @@ class PackageVersionsListComponent {
1794
1846
  this.alertService.success(this.translateService.instant(gettext('Package version {{version}} has been removed'), {
1795
1847
  version
1796
1848
  }));
1849
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_VERSIONS, {
1850
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PACKAGE_VERSIONS,
1851
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DELETE,
1852
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SUCCESS,
1853
+ url: this.CURRENT_LOCATION
1854
+ });
1797
1855
  }
1798
1856
  catch (e) {
1799
1857
  this.alertService.addServerFailure(e);
1858
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_VERSIONS, {
1859
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PACKAGE_VERSIONS,
1860
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DELETE,
1861
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1862
+ url: this.CURRENT_LOCATION
1863
+ });
1800
1864
  }
1801
1865
  if (version === this.selectedVersion) {
1802
1866
  this.selectVersion(null);
@@ -1815,9 +1879,21 @@ class PackageVersionsListComponent {
1815
1879
  // Remove it when BE fixes issues with activeVersion.
1816
1880
  yield this.ecosystemService.setAppActiveVersion(this.package, appVersion.binaryId);
1817
1881
  this.alertService.success(gettext('Tag has been set.'));
1882
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_VERSIONS, {
1883
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PACKAGE_VERSIONS,
1884
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.SET_AS_LATEST,
1885
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SUCCESS,
1886
+ url: this.CURRENT_LOCATION
1887
+ });
1818
1888
  }
1819
1889
  catch (e) {
1820
1890
  this.alertService.addServerFailure(e);
1891
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_VERSIONS, {
1892
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PACKAGE_VERSIONS,
1893
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.SET_AS_LATEST,
1894
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1895
+ url: this.CURRENT_LOCATION
1896
+ });
1821
1897
  return;
1822
1898
  }
1823
1899
  yield this.refreshPackage();
@@ -1849,6 +1925,12 @@ class PackageVersionsListComponent {
1849
1925
  return __awaiter(this, void 0, void 0, function* () {
1850
1926
  const uploadedVersion = this.package.applicationVersions[this.package.applicationVersions.length - 1];
1851
1927
  try {
1928
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_VERSIONS, {
1929
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PACKAGE_VERSIONS,
1930
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.UPLOAD,
1931
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SUCCESS,
1932
+ url: this.CURRENT_LOCATION
1933
+ });
1852
1934
  yield this.modal.confirm(gettext('Upload successful'), this.translateService.instant(gettext('Do you want to set version {{version}} as the latest? Deploying a new app will always use this version.'), { version: uploadedVersion.version }), Status.SUCCESS, {
1853
1935
  ok: gettext('Set as latest`version`'),
1854
1936
  cancel: gettext('Keep unchanged`version`')
@@ -1868,12 +1950,12 @@ class PackageVersionsListComponent {
1868
1950
  : this.acknowledgeLimitReached.bind(this);
1869
1951
  }
1870
1952
  }
1871
- PackageVersionsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageVersionsListComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i2.PluginsService }, { token: i1.EcosystemService }, { token: i4.TranslateService }, { token: i2.ModalService }, { token: i2.AlertService }, { token: i2.OptionsService }, { token: i2.Permissions }], target: i0.ɵɵFactoryTarget.Component });
1953
+ PackageVersionsListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageVersionsListComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i2.PluginsService }, { token: i1.EcosystemService }, { token: i4.TranslateService }, { token: i2.ModalService }, { token: i2.AlertService }, { token: i2.OptionsService }, { token: i2.Permissions }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
1872
1954
  PackageVersionsListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: PackageVersionsListComponent, selector: "c8y-package-versions-list", outputs: { onVersionSelect: "onVersionSelect" }, ngImport: i0, template: "<div class=\"inner-scroll split-view__list\">\n <div class=\"card-header separator sticky-top bg-component\">\n <div class=\"card-title\" translate>Versions</div>\n </div>\n\n <div class=\"bg-level-1 flex-grow\">\n <div class=\"p-16\" *ngIf=\"isLoading\">\n <c8y-loading></c8y-loading>\n </div>\n <ul class=\"nav c8y-nav-stacked\" *ngIf=\"!isLoading\">\n <li\n class=\"c8y-stacked-item p-t-0 p-b-0 p-r-4\"\n [ngClass]=\"{ active: selectedVersion === applicationVersion.version }\"\n *ngFor=\"let applicationVersion of sortedVersions\"\n >\n <div\n class=\"flex-grow d-flex a-i-center gap-4 p-t-8 p-b-8\"\n (click)=\"selectVersion(applicationVersion.version)\"\n >\n <i c8yIcon=\"big-parcel\" class=\"icon-20\"></i>\n <span class=\"text-label-small\">\n {{ 'Version' | translate }}\n </span>\n <span class=\"text-medium\">{{ applicationVersion.version }}</span>\n <div class=\"text-truncate d-flex j-c-end flex-grow gap-4 flex-wrap m-l-auto\">\n <span *ngFor=\"let tag of applicationVersion.tags\" class=\"label label-info\">\n {{ tag }}\n </span>\n </div>\n </div>\n <div class=\"dropdown\" dropdown *ngIf=\"hasAdminPermissions && isPackageOwnedByCurrentTenant\">\n <button\n class=\"dropdown-toggle c8y-dropdown\"\n dropdownToggle\n title=\"{{ 'Settings' | translate }}\"\n >\n <i c8yIcon=\"ellipsis-v\"></i>\n </button>\n <ul *dropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <li>\n <button\n (click)=\"setVersionAsLatest(applicationVersion)\"\n [disabled]=\"applicationVersion.tags?.includes('latest')\"\n title=\"{{ 'Set as latest`version`' | translate }}\"\n type=\"button\"\n >\n <i c8yIcon=\"collect\" class=\"m-r-4\"></i>\n {{ 'Set as latest`version`' | translate }}\n </button>\n </li>\n <li>\n <button\n (click)=\"downloadArchive(applicationVersion)\"\n title=\"{{ 'Download' | translate }}\"\n type=\"button\"\n >\n <i c8yIcon=\"download\" class=\"m-r-4\"></i>\n {{ 'Download' | translate }}\n </button>\n </li>\n <li>\n <button\n (click)=\"removeVersionPackage(applicationVersion.version)\"\n [disabled]=\"applicationVersion.tags?.includes('latest')\"\n title=\"{{ 'Delete' | translate }}\"\n type=\"button\"\n >\n <i c8yIcon=\"trash\" class=\"m-r-4\"></i>\n {{ 'Delete' | translate }}\n </button>\n </li>\n </ul>\n </div>\n </li>\n </ul>\n </div>\n\n <div\n class=\"card-footer separator sticky-bottom\"\n *ngIf=\"!isLoading && isPackageOwnedByCurrentTenant\"\n >\n <div class=\"form-group m-b-0\">\n <label translate>Upload a new version</label>\n <c8y-upload-archive\n [(application)]=\"package\"\n [uploadNewVersion]=\"true\"\n (refresh)=\"packageVersionUploaded()\"\n [preUploadCallback]=\"preUploadCallback\"\n ></c8y-upload-archive>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.LoadingComponent, selector: "c8y-loading" }, { kind: "directive", type: i6.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i6.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i6.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "component", type: i1.UploadArchiveComponent, selector: "c8y-upload-archive", inputs: ["application", "uploadNewVersion", "preUploadCallback"], outputs: ["applicationChange", "refresh"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] });
1873
1955
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: PackageVersionsListComponent, decorators: [{
1874
1956
  type: Component,
1875
1957
  args: [{ selector: 'c8y-package-versions-list', template: "<div class=\"inner-scroll split-view__list\">\n <div class=\"card-header separator sticky-top bg-component\">\n <div class=\"card-title\" translate>Versions</div>\n </div>\n\n <div class=\"bg-level-1 flex-grow\">\n <div class=\"p-16\" *ngIf=\"isLoading\">\n <c8y-loading></c8y-loading>\n </div>\n <ul class=\"nav c8y-nav-stacked\" *ngIf=\"!isLoading\">\n <li\n class=\"c8y-stacked-item p-t-0 p-b-0 p-r-4\"\n [ngClass]=\"{ active: selectedVersion === applicationVersion.version }\"\n *ngFor=\"let applicationVersion of sortedVersions\"\n >\n <div\n class=\"flex-grow d-flex a-i-center gap-4 p-t-8 p-b-8\"\n (click)=\"selectVersion(applicationVersion.version)\"\n >\n <i c8yIcon=\"big-parcel\" class=\"icon-20\"></i>\n <span class=\"text-label-small\">\n {{ 'Version' | translate }}\n </span>\n <span class=\"text-medium\">{{ applicationVersion.version }}</span>\n <div class=\"text-truncate d-flex j-c-end flex-grow gap-4 flex-wrap m-l-auto\">\n <span *ngFor=\"let tag of applicationVersion.tags\" class=\"label label-info\">\n {{ tag }}\n </span>\n </div>\n </div>\n <div class=\"dropdown\" dropdown *ngIf=\"hasAdminPermissions && isPackageOwnedByCurrentTenant\">\n <button\n class=\"dropdown-toggle c8y-dropdown\"\n dropdownToggle\n title=\"{{ 'Settings' | translate }}\"\n >\n <i c8yIcon=\"ellipsis-v\"></i>\n </button>\n <ul *dropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <li>\n <button\n (click)=\"setVersionAsLatest(applicationVersion)\"\n [disabled]=\"applicationVersion.tags?.includes('latest')\"\n title=\"{{ 'Set as latest`version`' | translate }}\"\n type=\"button\"\n >\n <i c8yIcon=\"collect\" class=\"m-r-4\"></i>\n {{ 'Set as latest`version`' | translate }}\n </button>\n </li>\n <li>\n <button\n (click)=\"downloadArchive(applicationVersion)\"\n title=\"{{ 'Download' | translate }}\"\n type=\"button\"\n >\n <i c8yIcon=\"download\" class=\"m-r-4\"></i>\n {{ 'Download' | translate }}\n </button>\n </li>\n <li>\n <button\n (click)=\"removeVersionPackage(applicationVersion.version)\"\n [disabled]=\"applicationVersion.tags?.includes('latest')\"\n title=\"{{ 'Delete' | translate }}\"\n type=\"button\"\n >\n <i c8yIcon=\"trash\" class=\"m-r-4\"></i>\n {{ 'Delete' | translate }}\n </button>\n </li>\n </ul>\n </div>\n </li>\n </ul>\n </div>\n\n <div\n class=\"card-footer separator sticky-bottom\"\n *ngIf=\"!isLoading && isPackageOwnedByCurrentTenant\"\n >\n <div class=\"form-group m-b-0\">\n <label translate>Upload a new version</label>\n <c8y-upload-archive\n [(application)]=\"package\"\n [uploadNewVersion]=\"true\"\n (refresh)=\"packageVersionUploaded()\"\n [preUploadCallback]=\"preUploadCallback\"\n ></c8y-upload-archive>\n </div>\n </div>\n</div>\n" }]
1876
- }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i2.PluginsService }, { type: i1.EcosystemService }, { type: i4.TranslateService }, { type: i2.ModalService }, { type: i2.AlertService }, { type: i2.OptionsService }, { type: i2.Permissions }]; }, propDecorators: { onVersionSelect: [{
1958
+ }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i2.PluginsService }, { type: i1.EcosystemService }, { type: i4.TranslateService }, { type: i2.ModalService }, { type: i2.AlertService }, { type: i2.OptionsService }, { type: i2.Permissions }, { type: i2.GainsightService }]; }, propDecorators: { onVersionSelect: [{
1877
1959
  type: Output
1878
1960
  }] } });
1879
1961
 
@@ -2047,10 +2129,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
2047
2129
  }], ctorParameters: function () { return [{ type: i2.CellRendererContext }]; } });
2048
2130
 
2049
2131
  class UpdatePluginOfAppComponent {
2050
- constructor(bsModalRef, pluginsService, alert) {
2132
+ constructor(bsModalRef, pluginsService, alert, gainsightService) {
2051
2133
  this.bsModalRef = bsModalRef;
2052
2134
  this.pluginsService = pluginsService;
2053
2135
  this.alert = alert;
2136
+ this.gainsightService = gainsightService;
2137
+ this.CURRENT_LOCATION = location.href;
2054
2138
  this.result = new Promise((resolve, reject) => {
2055
2139
  this._install = resolve;
2056
2140
  this._cancel = reject;
@@ -2097,9 +2181,21 @@ class UpdatePluginOfAppComponent {
2097
2181
  try {
2098
2182
  yield this.pluginsService.updateRemotesInAppConfig(this.app, newRemotes);
2099
2183
  this.alert.success(gettext(`Switched the version of plugin.`));
2184
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2185
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.UPDATE_PLUGIN_OF_APP,
2186
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.CHANGE_PLUGIN_VERSION,
2187
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_VERSION_CHANGED,
2188
+ url: this.CURRENT_LOCATION
2189
+ });
2100
2190
  }
2101
2191
  catch (e) {
2102
2192
  this.alert.addServerFailure(e);
2193
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2194
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.UPDATE_PLUGIN_OF_APP,
2195
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.CHANGE_PLUGIN_VERSION,
2196
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
2197
+ url: this.CURRENT_LOCATION
2198
+ });
2103
2199
  }
2104
2200
  this.bsModalRef.hide();
2105
2201
  this._install();
@@ -2110,15 +2206,15 @@ class UpdatePluginOfAppComponent {
2110
2206
  this._cancel();
2111
2207
  }
2112
2208
  }
2113
- UpdatePluginOfAppComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UpdatePluginOfAppComponent, deps: [{ token: i1$1.BsModalRef }, { token: i2.PluginsService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component });
2209
+ UpdatePluginOfAppComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UpdatePluginOfAppComponent, deps: [{ token: i1$1.BsModalRef }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
2114
2210
  UpdatePluginOfAppComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: UpdatePluginOfAppComponent, selector: "c8y-update-plugin-of-app", ngImport: i0, template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-modules'\"></i>\n <h4 *ngIf=\"!downgrade\" id=\"modal-title\" translate>Update plugin</h4>\n <h4 *ngIf=\"downgrade\" id=\"modal-title\" translate>Downgrade plugin</h4>\n </div>\n <div class=\"inner-scroll\" id=\"modal-body\">\n <div class=\"p-16\">\n <div class=\"d-block fit-w bg-gray-white\">\n <c8y-package-version-select\n [packageContextPath]=\"plugin?.contextPath\"\n [(ngModel)]=\"applicationVersion\"\n ></c8y-package-version-select>\n <div\n *ngIf=\"plugin?.version && plugin.version === applicationVersion?.version\"\n class=\"alert alert-info\"\n role=\"alert\"\n >\n <span translate ngNonBindable [translateParams]=\"applicationVersion\">\n Select another version, as {{ version }} is currently used.\n </span>\n </div>\n </div>\n\n <div class=\"form-group\">\n <label class=\"c8y-checkbox\">\n <input [(ngModel)]=\"updateAll\" type=\"checkbox\" />\n <span></span>\n <span translate ngNonBindable [translateParams]=\"plugin\">\n Set version for all plugins using the same context path \"{{ contextPath }}\".\n </span>\n </label>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Set version' | translate }}\"\n [disabled]=\"!applicationVersion || plugin?.version === applicationVersion?.version\"\n (click)=\"update()\"\n >\n {{ 'Set version' | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.PackageVersionSelectComponent, selector: "c8y-package-version-select", inputs: ["label", "packageContextPath", "packageId"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] });
2115
2211
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UpdatePluginOfAppComponent, decorators: [{
2116
2212
  type: Component,
2117
2213
  args: [{ selector: 'c8y-update-plugin-of-app', template: "<div class=\"viewport-modal\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'c8y-modules'\"></i>\n <h4 *ngIf=\"!downgrade\" id=\"modal-title\" translate>Update plugin</h4>\n <h4 *ngIf=\"downgrade\" id=\"modal-title\" translate>Downgrade plugin</h4>\n </div>\n <div class=\"inner-scroll\" id=\"modal-body\">\n <div class=\"p-16\">\n <div class=\"d-block fit-w bg-gray-white\">\n <c8y-package-version-select\n [packageContextPath]=\"plugin?.contextPath\"\n [(ngModel)]=\"applicationVersion\"\n ></c8y-package-version-select>\n <div\n *ngIf=\"plugin?.version && plugin.version === applicationVersion?.version\"\n class=\"alert alert-info\"\n role=\"alert\"\n >\n <span translate ngNonBindable [translateParams]=\"applicationVersion\">\n Select another version, as {{ version }} is currently used.\n </span>\n </div>\n </div>\n\n <div class=\"form-group\">\n <label class=\"c8y-checkbox\">\n <input [(ngModel)]=\"updateAll\" type=\"checkbox\" />\n <span></span>\n <span translate ngNonBindable [translateParams]=\"plugin\">\n Set version for all plugins using the same context path \"{{ contextPath }}\".\n </span>\n </label>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Set version' | translate }}\"\n [disabled]=\"!applicationVersion || plugin?.version === applicationVersion?.version\"\n (click)=\"update()\"\n >\n {{ 'Set version' | translate }}\n </button>\n </div>\n</div>\n" }]
2118
- }], ctorParameters: function () { return [{ type: i1$1.BsModalRef }, { type: i2.PluginsService }, { type: i2.AlertService }]; } });
2214
+ }], ctorParameters: function () { return [{ type: i1$1.BsModalRef }, { type: i2.PluginsService }, { type: i2.AlertService }, { type: i2.GainsightService }]; } });
2119
2215
 
2120
2216
  class ApplicationPluginsComponent {
2121
- constructor(activatedRoute, ecosystemService, bsModalService, modal, translateService, pluginsService, alertService) {
2217
+ constructor(activatedRoute, ecosystemService, bsModalService, modal, translateService, pluginsService, alertService, gainsightService) {
2122
2218
  this.activatedRoute = activatedRoute;
2123
2219
  this.ecosystemService = ecosystemService;
2124
2220
  this.bsModalService = bsModalService;
@@ -2126,6 +2222,9 @@ class ApplicationPluginsComponent {
2126
2222
  this.translateService = translateService;
2127
2223
  this.pluginsService = pluginsService;
2128
2224
  this.alertService = alertService;
2225
+ this.gainsightService = gainsightService;
2226
+ this.PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE;
2227
+ this.CURRENT_LOCATION = location.href;
2129
2228
  this.exportedPlugins$ = new BehaviorSubject([]);
2130
2229
  this.remotePlugins$ = new BehaviorSubject({});
2131
2230
  this.allAvailablePlugins$ = new BehaviorSubject([]);
@@ -2214,10 +2313,20 @@ class ApplicationPluginsComponent {
2214
2313
  this.isLoading = true;
2215
2314
  yield this.handleRemotesInstallation(pluginsToAdd);
2216
2315
  this.alertService.success(gettext('Plugins installed.'));
2316
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2317
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2318
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
2319
+ url: this.CURRENT_LOCATION
2320
+ });
2217
2321
  }
2218
2322
  catch (ex) {
2219
2323
  if (ex) {
2220
2324
  this.alertService.addServerFailure(ex);
2325
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2326
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2327
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
2328
+ url: this.CURRENT_LOCATION
2329
+ });
2221
2330
  }
2222
2331
  }
2223
2332
  finally {
@@ -2234,10 +2343,20 @@ class ApplicationPluginsComponent {
2234
2343
  this.isLoading = false;
2235
2344
  this.dataGrid.cancel();
2236
2345
  this.alertService.success(gettext('Plugins removed.'));
2346
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2347
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2348
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_REMOVED,
2349
+ url: this.CURRENT_LOCATION
2350
+ });
2237
2351
  }
2238
2352
  catch (ex) {
2239
2353
  if (ex) {
2240
2354
  this.alertService.addServerFailure(ex);
2355
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2356
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2357
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
2358
+ url: this.CURRENT_LOCATION
2359
+ });
2241
2360
  }
2242
2361
  }
2243
2362
  finally {
@@ -2482,12 +2601,12 @@ class ApplicationPluginsComponent {
2482
2601
  return value.replace(/(@|\/)/g, '');
2483
2602
  }
2484
2603
  }
2485
- ApplicationPluginsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationPluginsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1.EcosystemService }, { token: i1$1.BsModalService }, { token: i2.ModalService }, { token: i4.TranslateService }, { token: i2.PluginsService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component });
2486
- ApplicationPluginsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: { appId: "appId" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: DataGridComponent, descendants: true }], ngImport: i0, template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'All applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item *ngIf=\"orphanedPlugins?.length\" [placement]=\"'right'\">\n <button\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n class=\"d-contents\"\n >\n <!-- No search/filtered results empty state -->\n <c8y-ui-empty-state\n *ngIf=\"(installedPlugins$ | async)?.length\"\n [icon]=\"'search'\"\n [title]=\"'No plugins to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n >\n </c8y-ui-empty-state>\n <!-- No installed plugins empty state -->\n <c8y-ui-empty-state\n *ngIf=\"!(installedPlugins$ | async)?.length && !isLoading\"\n [icon]=\"'plugin'\"\n [title]=\"'No plugins installed.' | translate\"\n [subtitle]=\"'This application doesn\\'t have any plugin. Click below to install.' | translate\"\n [horizontal]=\"true\"\n >\n <div class=\"fit-w p-t-16\">\n <button\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n translate\n >\n Install plugins\n </button>\n </div>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] });
2604
+ ApplicationPluginsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationPluginsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1.EcosystemService }, { token: i1$1.BsModalService }, { token: i2.ModalService }, { token: i4.TranslateService }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
2605
+ ApplicationPluginsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: { appId: "appId" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: DataGridComponent, descendants: true }], ngImport: i0, template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'All applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item *ngIf=\"orphanedPlugins?.length\" [placement]=\"'right'\">\n <button\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n class=\"d-contents\"\n >\n <!-- No search/filtered results empty state -->\n <c8y-ui-empty-state\n *ngIf=\"(installedPlugins$ | async)?.length\"\n [icon]=\"'search'\"\n [title]=\"'No plugins to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n >\n </c8y-ui-empty-state>\n <!-- No installed plugins empty state -->\n <c8y-ui-empty-state\n *ngIf=\"!(installedPlugins$ | async)?.length && !isLoading\"\n [icon]=\"'plugin'\"\n [title]=\"'No plugins installed.' | translate\"\n [subtitle]=\"'This application doesn\\'t have any plugin. Click below to install.' | translate\"\n [horizontal]=\"true\"\n >\n <div class=\"fit-w p-t-16\">\n <button\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,\n action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.INSTALL_PLUGINS,\n url: CURRENT_LOCATION\n }\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n translate\n >\n Install plugins\n </button>\n </div>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i2.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] });
2487
2606
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationPluginsComponent, decorators: [{
2488
2607
  type: Component,
2489
- args: [{ selector: 'c8y-app-plugins', template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'All applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item *ngIf=\"orphanedPlugins?.length\" [placement]=\"'right'\">\n <button\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n class=\"d-contents\"\n >\n <!-- No search/filtered results empty state -->\n <c8y-ui-empty-state\n *ngIf=\"(installedPlugins$ | async)?.length\"\n [icon]=\"'search'\"\n [title]=\"'No plugins to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n >\n </c8y-ui-empty-state>\n <!-- No installed plugins empty state -->\n <c8y-ui-empty-state\n *ngIf=\"!(installedPlugins$ | async)?.length && !isLoading\"\n [icon]=\"'plugin'\"\n [title]=\"'No plugins installed.' | translate\"\n [subtitle]=\"'This application doesn\\'t have any plugin. Click below to install.' | translate\"\n [horizontal]=\"true\"\n >\n <div class=\"fit-w p-t-16\">\n <button\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n translate\n >\n Install plugins\n </button>\n </div>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n" }]
2490
- }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i1.EcosystemService }, { type: i1$1.BsModalService }, { type: i2.ModalService }, { type: i4.TranslateService }, { type: i2.PluginsService }, { type: i2.AlertService }]; }, propDecorators: { appId: [{
2608
+ args: [{ selector: 'c8y-app-plugins', template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item [icon]=\"'c8y-atom'\" [label]=\"'Ecosystem' | translate\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'All applications' | translate\"\n [path]=\"'ecosystem/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item *ngIf=\"orphanedPlugins?.length\" [placement]=\"'right'\">\n <button\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n class=\"d-contents\"\n >\n <!-- No search/filtered results empty state -->\n <c8y-ui-empty-state\n *ngIf=\"(installedPlugins$ | async)?.length\"\n [icon]=\"'search'\"\n [title]=\"'No plugins to display.' | translate\"\n [subtitle]=\"'Refine your search terms or check your spelling.' | translate\"\n [horizontal]=\"true\"\n >\n </c8y-ui-empty-state>\n <!-- No installed plugins empty state -->\n <c8y-ui-empty-state\n *ngIf=\"!(installedPlugins$ | async)?.length && !isLoading\"\n [icon]=\"'plugin'\"\n [title]=\"'No plugins installed.' | translate\"\n [subtitle]=\"'This application doesn\\'t have any plugin. Click below to install.' | translate\"\n [horizontal]=\"true\"\n >\n <div class=\"fit-w p-t-16\">\n <button\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,\n action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.INSTALL_PLUGINS,\n url: CURRENT_LOCATION\n }\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n translate\n >\n Install plugins\n </button>\n </div>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n" }]
2609
+ }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i1.EcosystemService }, { type: i1$1.BsModalService }, { type: i2.ModalService }, { type: i4.TranslateService }, { type: i2.PluginsService }, { type: i2.AlertService }, { type: i2.GainsightService }]; }, propDecorators: { appId: [{
2491
2610
  type: Input
2492
2611
  }], dataGrid: [{
2493
2612
  type: ViewChild,