@c8y/ngx-components 1021.22.39 → 1021.22.42
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.
- package/context-dashboard/context-dashboard.model.d.ts +1 -0
- package/context-dashboard/context-dashboard.model.d.ts.map +1 -1
- package/core/docs/help-and-support-outlet/help-and-support-outlet.component.d.ts +5 -1
- package/core/docs/help-and-support-outlet/help-and-support-outlet.component.d.ts.map +1 -1
- package/core/docs/legal-notices-outlet/legal-notices-outlet.component.d.ts +5 -1
- package/core/docs/legal-notices-outlet/legal-notices-outlet.component.d.ts.map +1 -1
- package/core/docs/support-outlet/support-outlet.component.d.ts +5 -1
- package/core/docs/support-outlet/support-outlet.component.d.ts.map +1 -1
- package/core/i18n/translate.service.d.ts.map +1 -1
- package/core/shared/core.model.d.ts +5 -1
- package/core/shared/core.model.d.ts.map +1 -1
- package/ecosystem/application-plugins/application-plugins.component.d.ts +4 -0
- package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
- package/ecosystem/application-plugins/plugin-list.component.d.ts.map +1 -1
- package/ecosystem/packages/package-details/package-details.component.d.ts +3 -2
- package/ecosystem/packages/package-details/package-details.component.d.ts.map +1 -1
- package/ecosystem/shared/ecosystem.model.d.ts +3 -0
- package/ecosystem/shared/ecosystem.model.d.ts.map +1 -1
- package/esm2022/branding/shared/lazy/branding-form/branding-form.component.mjs +3 -3
- package/esm2022/context-dashboard/context-dashboard.model.mjs +3 -2
- package/esm2022/core/docs/support-outlet/support-outlet.component.mjs +3 -3
- package/esm2022/core/i18n/translate.service.mjs +7 -5
- package/esm2022/core/shared/core.model.mjs +6 -2
- package/esm2022/ecosystem/application-plugins/application-plugins.component.mjs +36 -38
- package/esm2022/ecosystem/application-plugins/plugin-list.component.mjs +9 -12
- package/esm2022/ecosystem/packages/package-details/package-details.component.mjs +11 -6
- package/esm2022/ecosystem/shared/ecosystem.model.mjs +6 -3
- package/esm2022/report-dashboard/report-dashboard-list.component.mjs +4 -3
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +2 -2
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -48
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +5 -2
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +51 -51
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +3 -2
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +13 -7
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/report-dashboard/report-dashboard-list.component.d.ts +29 -0
- package/report-dashboard/report-dashboard-list.component.d.ts.map +1 -1
|
@@ -229,17 +229,12 @@ class PluginListComponent {
|
|
|
229
229
|
this.onUpdateEventHandleGS(plugin, app, updateType);
|
|
230
230
|
}
|
|
231
231
|
catch (error) {
|
|
232
|
-
this.
|
|
233
|
-
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
|
|
234
|
-
result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE,
|
|
235
|
-
url: this.CURRENT_LOCATION,
|
|
236
|
-
error
|
|
237
|
-
});
|
|
232
|
+
this.onUpdateEventHandleGS(plugin, app, updateType, error);
|
|
238
233
|
}
|
|
239
234
|
}
|
|
240
235
|
this.updatingPluginId[updateType] = '';
|
|
241
236
|
}
|
|
242
|
-
onUpdateEventHandleGS(plugin, app, updateType) {
|
|
237
|
+
onUpdateEventHandleGS(plugin, app, updateType, error) {
|
|
243
238
|
const pluginCustomEventInfo = pick(plugin, [
|
|
244
239
|
'name',
|
|
245
240
|
'contextPath',
|
|
@@ -251,14 +246,16 @@ class PluginListComponent {
|
|
|
251
246
|
const gsEventResult = updateType === 'install'
|
|
252
247
|
? PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_INSTALLED
|
|
253
248
|
: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_REMOVED;
|
|
254
|
-
|
|
249
|
+
const eventData = {
|
|
255
250
|
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
|
|
256
|
-
result: gsEventResult,
|
|
251
|
+
result: error || gsEventResult,
|
|
257
252
|
url: this.CURRENT_LOCATION,
|
|
258
253
|
...pluginCustomEventInfo,
|
|
259
254
|
targetApplicationName: app.name,
|
|
260
|
-
targetApplicationContextPath: app.contextPath
|
|
261
|
-
|
|
255
|
+
targetApplicationContextPath: app.contextPath,
|
|
256
|
+
...(error && { error })
|
|
257
|
+
};
|
|
258
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, eventData);
|
|
262
259
|
}
|
|
263
260
|
async getAppsForUpdate(plugin, updateType) {
|
|
264
261
|
let apps = (await this.ecosystemService.getWebApplications()).filter(app => this.ecosystemService.isOwner(app) && app.type !== ApplicationType.EXTERNAL);
|
|
@@ -704,7 +701,15 @@ class ApplicationPluginsComponent {
|
|
|
704
701
|
this.alertService.success(gettext('The application was reset to its default plugins.'));
|
|
705
702
|
}
|
|
706
703
|
async installPlugins() {
|
|
704
|
+
let currentPlugin = null;
|
|
707
705
|
try {
|
|
706
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
|
|
707
|
+
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
|
|
708
|
+
action: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.ACTIONS.INSTALL_PLUGINS_INITIATED,
|
|
709
|
+
url: this.CURRENT_LOCATION,
|
|
710
|
+
targetApplicationName: this.app.name,
|
|
711
|
+
targetApplicationContextPath: this.app.contextPath
|
|
712
|
+
});
|
|
708
713
|
const pluginsToAdd = await this.bsModalService.show(InstallPluginComponent, {
|
|
709
714
|
class: 'modal-sm',
|
|
710
715
|
ariaDescribedby: 'modal-body',
|
|
@@ -724,33 +729,14 @@ class ApplicationPluginsComponent {
|
|
|
724
729
|
await this.handleRemotesInstallation(pluginsToAdd);
|
|
725
730
|
this.alertService.success(gettext('Plugins installed.'));
|
|
726
731
|
pluginsToAdd.forEach(plugin => {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
'contextPath',
|
|
730
|
-
'module',
|
|
731
|
-
'version',
|
|
732
|
-
'type',
|
|
733
|
-
'id'
|
|
734
|
-
]);
|
|
735
|
-
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
|
|
736
|
-
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
|
|
737
|
-
result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
|
|
738
|
-
url: this.CURRENT_LOCATION,
|
|
739
|
-
...pluginCustomEventInfo,
|
|
740
|
-
targetApplicationName: this.app.name,
|
|
741
|
-
targetApplicationContextPath: this.app.contextPath
|
|
742
|
-
});
|
|
732
|
+
currentPlugin = plugin;
|
|
733
|
+
this.triggerPluginEvent(plugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_INSTALLED);
|
|
743
734
|
});
|
|
744
735
|
}
|
|
745
736
|
catch (ex) {
|
|
746
737
|
if (ex) {
|
|
747
738
|
this.alertService.addServerFailure(ex);
|
|
748
|
-
this.
|
|
749
|
-
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
|
|
750
|
-
result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE,
|
|
751
|
-
url: this.CURRENT_LOCATION,
|
|
752
|
-
error: ex
|
|
753
|
-
});
|
|
739
|
+
this.triggerPluginEvent(currentPlugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE);
|
|
754
740
|
}
|
|
755
741
|
}
|
|
756
742
|
finally {
|
|
@@ -758,34 +744,25 @@ class ApplicationPluginsComponent {
|
|
|
758
744
|
}
|
|
759
745
|
}
|
|
760
746
|
async removePlugins(plugins) {
|
|
747
|
+
let currentPlugin = null;
|
|
761
748
|
try {
|
|
762
749
|
this.isLoading = true;
|
|
763
750
|
const installedPlugins = await firstValueFrom(this.installedPlugins$);
|
|
751
|
+
const pluginsToRemove = installedPlugins.filter(p => plugins.includes(p.id));
|
|
764
752
|
const updatedRemotes = await this.pluginsService.removeRemotes(this.app, plugins.map(id => installedPlugins.find(p => p.id === id)));
|
|
765
753
|
this.emitRemotes(updatedRemotes);
|
|
766
754
|
this.isLoading = false;
|
|
767
755
|
this.dataGrid.cancel();
|
|
768
756
|
this.alertService.success(gettext('Plugins removed.'));
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_REMOVED,
|
|
773
|
-
url: this.CURRENT_LOCATION,
|
|
774
|
-
id: plugin,
|
|
775
|
-
targetApplicationName: this.app.name,
|
|
776
|
-
targetApplicationContextPath: this.app.contextPath
|
|
777
|
-
});
|
|
757
|
+
pluginsToRemove.forEach(plugin => {
|
|
758
|
+
currentPlugin = plugin;
|
|
759
|
+
this.triggerPluginEvent(plugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_REMOVED);
|
|
778
760
|
});
|
|
779
761
|
}
|
|
780
762
|
catch (ex) {
|
|
781
763
|
if (ex) {
|
|
782
764
|
this.alertService.addServerFailure(ex);
|
|
783
|
-
this.
|
|
784
|
-
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
|
|
785
|
-
result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE,
|
|
786
|
-
url: this.CURRENT_LOCATION,
|
|
787
|
-
error: ex
|
|
788
|
-
});
|
|
765
|
+
this.triggerPluginEvent(currentPlugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE);
|
|
789
766
|
}
|
|
790
767
|
}
|
|
791
768
|
finally {
|
|
@@ -1028,6 +1005,24 @@ class ApplicationPluginsComponent {
|
|
|
1028
1005
|
const value = matches ? matches[0] : '';
|
|
1029
1006
|
return value.replace(/(@|\/)/g, '');
|
|
1030
1007
|
}
|
|
1008
|
+
triggerPluginEvent(plugin, result) {
|
|
1009
|
+
const pluginInfo = pick(plugin, [
|
|
1010
|
+
'name',
|
|
1011
|
+
'contextPath',
|
|
1012
|
+
'module',
|
|
1013
|
+
'version',
|
|
1014
|
+
'type',
|
|
1015
|
+
'id'
|
|
1016
|
+
]);
|
|
1017
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
|
|
1018
|
+
component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
|
|
1019
|
+
result,
|
|
1020
|
+
url: this.CURRENT_LOCATION,
|
|
1021
|
+
...pluginInfo,
|
|
1022
|
+
targetApplicationName: this.app.name,
|
|
1023
|
+
targetApplicationContextPath: this.app.contextPath
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1031
1026
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ApplicationPluginsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i3.EcosystemService }, { token: i1.BsModalService }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1032
1027
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", 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\n [icon]=\"'c8y-atom'\"\n [label]=\"'Ecosystem' | translate\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/application/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\n [placement]=\"'right'\"\n *ngIf=\"!(isStandard$ | async)\"\n>\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reset to default plugins' | translate }}\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n (click)=\"resetToDefault()\"\n >\n <i c8yIcon=\"undo\"></i>\n {{ 'Reset to default' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\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\n *ngIf=\"orphanedPlugins?.length\"\n [placement]=\"'right'\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\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 class=\"d-contents\"\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 >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'plugin'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <p *ngIf=\"stats?.size === 0\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n translate\n >\n Install plugins\n </button>\n </p>\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", "inGroupPriority"] }, { 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.EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.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", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows"], 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: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] }); }
|
|
1033
1028
|
}
|