@c8y/ngx-components 1017.0.449 → 1017.0.454

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 (27) hide show
  1. package/esm2020/device-grid/columns/registration-date.device-grid-column.mjs +4 -10
  2. package/esm2020/ecosystem/application-plugins/application-plugins.component.mjs +23 -11
  3. package/esm2020/ecosystem/application-plugins/plugin-list.component.mjs +10 -4
  4. package/esm2020/ecosystem/packages/deploy-application/deploy-application.component.mjs +14 -3
  5. package/esm2020/repository/shared/repository.service.mjs +4 -4
  6. package/esm2020/services/services-device-tab/columns/last-updated-date.device-grid-column.mjs +4 -10
  7. package/fesm2015/c8y-ngx-components-device-grid.mjs +3 -9
  8. package/fesm2015/c8y-ngx-components-device-grid.mjs.map +1 -1
  9. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs +28 -18
  10. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  11. package/fesm2015/c8y-ngx-components-ecosystem.mjs +39 -25
  12. package/fesm2015/c8y-ngx-components-ecosystem.mjs.map +1 -1
  13. package/fesm2015/c8y-ngx-components-repository-shared.mjs +3 -3
  14. package/fesm2015/c8y-ngx-components-repository-shared.mjs.map +1 -1
  15. package/fesm2015/c8y-ngx-components-services.mjs +3 -9
  16. package/fesm2015/c8y-ngx-components-services.mjs.map +1 -1
  17. package/fesm2020/c8y-ngx-components-device-grid.mjs +3 -9
  18. package/fesm2020/c8y-ngx-components-device-grid.mjs.map +1 -1
  19. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs +31 -14
  20. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  21. package/fesm2020/c8y-ngx-components-ecosystem.mjs +43 -16
  22. package/fesm2020/c8y-ngx-components-ecosystem.mjs.map +1 -1
  23. package/fesm2020/c8y-ngx-components-repository-shared.mjs +3 -3
  24. package/fesm2020/c8y-ngx-components-repository-shared.mjs.map +1 -1
  25. package/fesm2020/c8y-ngx-components-services.mjs +3 -9
  26. package/fesm2020/c8y-ngx-components-services.mjs.map +1 -1
  27. package/package.json +2 -2
@@ -22,7 +22,7 @@ import { tap, switchMap, shareReplay, takeUntil, map } from 'rxjs/operators';
22
22
  import * as i6 from 'ngx-bootstrap/dropdown';
23
23
  import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
24
24
  import { PopoverModule } from 'ngx-bootstrap/popover';
25
- import { uniq } from 'lodash-es';
25
+ import { pick, uniq } from 'lodash-es';
26
26
 
27
27
  class ActivityLogComponent {
28
28
  constructor(ecosystemService, alertService) {
@@ -1244,6 +1244,7 @@ class DeployApplicationComponent {
1244
1244
  });
1245
1245
  }
1246
1246
  deployApp() {
1247
+ var _a, _b, _c;
1247
1248
  return __awaiter(this, void 0, void 0, function* () {
1248
1249
  this.inProgress = true;
1249
1250
  const formGroupValue = this.applicationPropertiesForm.formGroup.getRawValue();
@@ -1251,12 +1252,14 @@ class DeployApplicationComponent {
1251
1252
  try {
1252
1253
  this.deployedApp = yield this.ecosystemService.deployApp(this.package, formGroupValue, this.model);
1253
1254
  this.deployedWithSuccess = true;
1254
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DEPLOY_APPLICATION, {
1255
- component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION,
1256
- action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION,
1257
- result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.DEPLOYED,
1258
- url: this.CURRENT_LOCATION
1259
- });
1255
+ const applicationCustomEventInfo = pick(this.package, [
1256
+ 'id',
1257
+ 'name',
1258
+ 'contextPath',
1259
+ 'label',
1260
+ 'key'
1261
+ ]);
1262
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DEPLOY_APPLICATION, Object.assign(Object.assign({ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION, action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION, result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.DEPLOYED, url: this.CURRENT_LOCATION }, applicationCustomEventInfo), { package: (_c = (_b = (_a = this.deployedApp) === null || _a === void 0 ? void 0 : _a.manifest) === null || _b === void 0 ? void 0 : _b.package) !== null && _c !== void 0 ? _c : null }));
1260
1263
  }
1261
1264
  catch (error) {
1262
1265
  this.ecosystemService.alertError(error);
@@ -1264,7 +1267,8 @@ class DeployApplicationComponent {
1264
1267
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION,
1265
1268
  action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION,
1266
1269
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1267
- url: this.CURRENT_LOCATION
1270
+ url: this.CURRENT_LOCATION,
1271
+ error
1268
1272
  });
1269
1273
  }
1270
1274
  finally {
@@ -1429,19 +1433,17 @@ class PluginListComponent {
1429
1433
  try {
1430
1434
  yield this.handleRemotesInstallation(app, plugin);
1431
1435
  const successText = this.translateService.instant(gettext('Plugin installed successfully to app "{{ appName }}".'), { appName: app.name });
1436
+ const pluginCustomEventInfo = pick(plugin, ['name', 'module', 'version', 'id']);
1432
1437
  this.alertService.success(successText);
1433
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1434
- component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1435
- result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
1436
- url: this.CURRENT_LOCATION
1437
- });
1438
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, Object.assign(Object.assign({ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST, result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED, url: this.CURRENT_LOCATION }, pluginCustomEventInfo), { targetApplicationName: app.name, targetApplicationContextPath: app.contextPath }));
1438
1439
  }
1439
- catch (_b) {
1440
+ catch (error) {
1440
1441
  // nothing to do
1441
1442
  this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1442
1443
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1443
1444
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1444
- url: this.CURRENT_LOCATION
1445
+ url: this.CURRENT_LOCATION,
1446
+ error
1445
1447
  });
1446
1448
  }
1447
1449
  }
@@ -2268,10 +2270,15 @@ class ApplicationPluginsComponent {
2268
2270
  this.isLoading = true;
2269
2271
  yield this.handleRemotesInstallation(pluginsToAdd);
2270
2272
  this.alertService.success(gettext('Plugins installed.'));
2271
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2272
- component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2273
- result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
2274
- url: this.CURRENT_LOCATION
2273
+ pluginsToAdd.forEach(plugin => {
2274
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2275
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2276
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
2277
+ url: this.CURRENT_LOCATION,
2278
+ id: plugin,
2279
+ targetApplicationName: this.app.name,
2280
+ targetApplicationContextPath: this.app.contextPath
2281
+ });
2275
2282
  });
2276
2283
  }
2277
2284
  catch (ex) {
@@ -2280,7 +2287,8 @@ class ApplicationPluginsComponent {
2280
2287
  this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2281
2288
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2282
2289
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
2283
- url: this.CURRENT_LOCATION
2290
+ url: this.CURRENT_LOCATION,
2291
+ error: ex
2284
2292
  });
2285
2293
  }
2286
2294
  }
@@ -2298,10 +2306,15 @@ class ApplicationPluginsComponent {
2298
2306
  this.isLoading = false;
2299
2307
  this.dataGrid.cancel();
2300
2308
  this.alertService.success(gettext('Plugins removed.'));
2301
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2302
- component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2303
- result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_REMOVED,
2304
- url: this.CURRENT_LOCATION
2309
+ plugins.forEach(plugin => {
2310
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2311
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2312
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_REMOVED,
2313
+ url: this.CURRENT_LOCATION,
2314
+ id: plugin,
2315
+ targetApplicationName: this.app.name,
2316
+ targetApplicationContextPath: this.app.contextPath
2317
+ });
2305
2318
  });
2306
2319
  }
2307
2320
  catch (ex) {
@@ -2310,7 +2323,8 @@ class ApplicationPluginsComponent {
2310
2323
  this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2311
2324
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2312
2325
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
2313
- url: this.CURRENT_LOCATION
2326
+ url: this.CURRENT_LOCATION,
2327
+ error: ex
2314
2328
  });
2315
2329
  }
2316
2330
  }