@c8y/ngx-components 1010.0.20 → 1010.0.24

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.
@@ -1,20 +1,17 @@
1
1
  import * as tslib_1 from "tslib";
2
2
  import { Component, EventEmitter } from '@angular/core';
3
3
  import { ActivatedRoute } from '@angular/router';
4
- import { AppStateService, DisplayOptions } from '@c8y/ngx-components';
5
4
  import { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';
6
5
  import { SubAssetsService } from './sub-assets.service';
7
6
  var SubAssetsComponent = /** @class */ (function () {
8
- function SubAssetsComponent(route, appState, deviceGroupService, subAssetsService) {
7
+ function SubAssetsComponent(route, deviceGroupService, subAssetsService) {
9
8
  var _this = this;
10
9
  this.route = route;
11
- this.appState = appState;
12
10
  this.deviceGroupService = deviceGroupService;
13
11
  this.subAssetsService = subAssetsService;
14
12
  this.toggle = false;
15
13
  this.showAddGroup = false;
16
14
  this.showAssignDevices = false;
17
- this.showGroupInfo = true;
18
15
  this.showAssignChildDevices = false;
19
16
  this.refresh = new EventEmitter();
20
17
  this.filterable = true;
@@ -27,10 +24,6 @@ var SubAssetsComponent = /** @class */ (function () {
27
24
  });
28
25
  }
29
26
  SubAssetsComponent.prototype.ngOnInit = function () {
30
- var _this = this;
31
- this.appState.state$.subscribe(function (state) {
32
- _this.showGroupInfo = state.app.name === 'cockpit' || state.app.name === 'devicemanagement';
33
- });
34
27
  this.displayOptions = {
35
28
  striped: true,
36
29
  bordered: false,
@@ -57,17 +50,16 @@ var SubAssetsComponent = /** @class */ (function () {
57
50
  };
58
51
  SubAssetsComponent.ctorParameters = function () { return [
59
52
  { type: ActivatedRoute },
60
- { type: AppStateService },
61
53
  { type: DeviceGroupService },
62
54
  { type: SubAssetsService }
63
55
  ]; };
64
56
  SubAssetsComponent = tslib_1.__decorate([
65
57
  Component({
66
58
  selector: 'c8y-sub-assets',
67
- template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-flex d-col\">\n <c8y-group-info\n *ngIf=\"showGroupInfo\"\n [group]=\"group\"\n (onGroupChange)=\"groupChange($event)\"\n ></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices=$event\"\n (selectedDevice)=\"showChildrenForDevice=$event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\" *ngIf=\"showAssignChildDevices\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n"
59
+ template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-flex d-col\">\n <c8y-group-info [group]=\"group\" (onGroupChange)=\"groupChange($event)\"></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices = $event\"\n (selectedDevice)=\"showChildrenForDevice = $event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\" *ngIf=\"showAssignChildDevices\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n"
68
60
  })
69
61
  ], SubAssetsComponent);
70
62
  return SubAssetsComponent;
71
63
  }());
72
64
  export { SubAssetsComponent };
73
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ViLWFzc2V0cy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYzh5L25neC1jb21wb25lbnRzL3N1Yi1hc3NldHMvIiwic291cmNlcyI6WyJzdWItYXNzZXRzLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQXFCLE1BQU0sZUFBZSxDQUFDO0FBQzNFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUVqRCxPQUFPLEVBQUUsZUFBZSxFQUFFLGNBQWMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3RFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBRTFFLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHNCQUFzQixDQU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iAgfVxufVxuIl19
@@ -456,15 +456,13 @@ GroupInfoComponent = __decorate([
456
456
  ], GroupInfoComponent);
457
457
 
458
458
  let SubAssetsComponent = class SubAssetsComponent {
459
- constructor(route, appState, deviceGroupService, subAssetsService) {
459
+ constructor(route, deviceGroupService, subAssetsService) {
460
460
  this.route = route;
461
- this.appState = appState;
462
461
  this.deviceGroupService = deviceGroupService;
463
462
  this.subAssetsService = subAssetsService;
464
463
  this.toggle = false;
465
464
  this.showAddGroup = false;
466
465
  this.showAssignDevices = false;
467
- this.showGroupInfo = true;
468
466
  this.showAssignChildDevices = false;
469
467
  this.refresh = new EventEmitter();
470
468
  this.filterable = true;
@@ -476,9 +474,6 @@ let SubAssetsComponent = class SubAssetsComponent {
476
474
  });
477
475
  }
478
476
  ngOnInit() {
479
- this.appState.state$.subscribe(state => {
480
- this.showGroupInfo = state.app.name === 'cockpit' || state.app.name === 'devicemanagement';
481
- });
482
477
  this.displayOptions = {
483
478
  striped: true,
484
479
  bordered: false,
@@ -506,14 +501,13 @@ let SubAssetsComponent = class SubAssetsComponent {
506
501
  };
507
502
  SubAssetsComponent.ctorParameters = () => [
508
503
  { type: ActivatedRoute },
509
- { type: AppStateService },
510
504
  { type: DeviceGroupService },
511
505
  { type: SubAssetsService }
512
506
  ];
513
507
  SubAssetsComponent = __decorate([
514
508
  Component({
515
509
  selector: 'c8y-sub-assets',
516
- template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-flex d-col\">\n <c8y-group-info\n *ngIf=\"showGroupInfo\"\n [group]=\"group\"\n (onGroupChange)=\"groupChange($event)\"\n ></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices=$event\"\n (selectedDevice)=\"showChildrenForDevice=$event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\" *ngIf=\"showAssignChildDevices\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n"
510
+ template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i><span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-flex d-col\">\n <c8y-group-info [group]=\"group\" (onGroupChange)=\"groupChange($event)\"></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices = $event\"\n (selectedDevice)=\"showChildrenForDevice = $event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\" *ngIf=\"showAssignChildDevices\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n"
517
511
  })
518
512
  ], SubAssetsComponent);
519
513
 
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-sub-assets.js","sources":["ng://@c8y/ngx-components/sub-assets/columns/asset-type.cell-renderer.component.ts","ng://@c8y/ngx-components/sub-assets/columns/asset-type-grid-column.ts","ng://@c8y/ngx-components/sub-assets/sub-assets.service.ts","ng://@c8y/ngx-components/sub-assets/group-info.component.ts","ng://@c8y/ngx-components/sub-assets/sub-assets.component.ts","ng://@c8y/ngx-components/sub-assets/delete-assets-modal/delete-assets-modal.component.ts","ng://@c8y/ngx-components/sub-assets/unassign-assets-modal/unassign-modal.component.ts","ng://@c8y/ngx-components/sub-assets/sub-assets-grid.component.ts","ng://@c8y/ngx-components/sub-assets/add-group/add-group.service.ts","ng://@c8y/ngx-components/sub-assets/add-group/add-group.component.ts","ng://@c8y/ngx-components/sub-assets/add-group/add-group.module.ts","ng://@c8y/ngx-components/sub-assets/groups.component.ts","ng://@c8y/ngx-components/sub-assets/assign-devices/assign-devices.service.ts","ng://@c8y/ngx-components/sub-assets/assign-devices/assign-devices.component.ts","ng://@c8y/ngx-components/sub-assets/assign-devices/assign-child-devices.component.ts","ng://@c8y/ngx-components/sub-assets/sub-assets.module.ts","ng://@c8y/ngx-components/sub-assets/c8y-ngx-components-sub-assets.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { CellRendererContext, gettext } from '@c8y/ngx-components';\nimport { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\n\n@Component({\n templateUrl: './asset-type.cell-renderer.component.html'\n})\nexport class AssetTypeCellRendererComponent implements OnInit {\n groupIcon: string;\n isAnyGroup: boolean;\n isDevice: boolean;\n iconTitle: string;\n constructor(\n public context: CellRendererContext,\n private deviceGroupService: DeviceGroupService\n ) {}\n\n ngOnInit() {\n this.isAnyGroup = this.deviceGroupService.isAnyGroup(this.context.item);\n this.isDevice = this.deviceGroupService.isDevice(this.context.item);\n this.groupIcon = this.deviceGroupService.icon(this.context.item);\n this.iconTitle = this.getIconTitle(this.groupIcon);\n }\n\n private getIconTitle(icon: string) {\n switch (icon) {\n case 'c8y-group':\n return gettext('Group');\n case 'c8y-group-smart':\n return gettext('Smart group');\n case 'c8y-group-remote-inactive':\n return 'Inactive remote group';\n case 'c8y-group-remote':\n return gettext('Remote group');\n default:\n return gettext('Child device');\n }\n }\n}\n","import { gettext, ColumnDataType, ColumnConfig } from '@c8y/ngx-components';\nimport { AssetTypeCellRendererComponent } from './asset-type.cell-renderer.component';\nimport { BaseDeviceGridColumn } from '@c8y/ngx-components/device-grid';\n\nexport class AssetTypeGridColumn extends BaseDeviceGridColumn {\n constructor(initialColumnConfig?: ColumnConfig) {\n super(initialColumnConfig);\n this.name = 'type';\n this.header = gettext('Type');\n this.dataType = ColumnDataType.Icon;\n this.cellRendererComponent = AssetTypeCellRendererComponent;\n this.sortable = true;\n this.sortingConfig = {\n pathSortingConfigs: [{ path: `c8y_IsDeviceGroup` }]\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n IManagedObject,\n InventoryService,\n IRule,\n QueriesUtil,\n SmartGroupsService,\n SmartRulesService,\n UserService\n} from '@c8y/client';\nimport {\n ActionControl,\n AlertService,\n AppStateService,\n BulkActionControl,\n gettext,\n Pagination,\n Permissions\n} from '@c8y/ngx-components';\nimport { AssetNodeService, DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\nimport {\n AlarmsDeviceGridColumn,\n DeviceGridColumn,\n DeviceGridService,\n ImeiDeviceGridColumn,\n ModelDeviceGridColumn,\n NameDeviceGridColumn,\n RegistrationDateDeviceGridColumn,\n SerialNumberDeviceGridColumn,\n SystemIdDeviceGridColumn\n} from '@c8y/ngx-components/device-grid';\nimport { TranslateService } from '@ngx-translate/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { AssetTypeGridColumn } from './columns/asset-type-grid-column';\n\n@Injectable()\nexport class SubAssetsService extends DeviceGridService {\n queriesUtil: QueriesUtil;\n uiOnlyCountersUpdate = new BehaviorSubject(null);\n protected GRID_CONFIG_DEFAULT_STORAGE_KEY = 'sub-assets-grid-config';\n private IS_DEVICE_GROUP_FRAGMENT = 'c8y_IsDeviceGroup';\n private IS_DYNAMIC_GROUP_FRAGMENT = 'c8y_IsDynamicGroup';\n\n constructor(\n protected translateService: TranslateService,\n protected inventoryService: InventoryService,\n protected appState: AppStateService,\n protected user: UserService,\n protected assetNodeService: AssetNodeService,\n protected deviceGroupService: DeviceGroupService,\n protected smartGroupsService: SmartGroupsService,\n protected smartRulesService: SmartRulesService,\n protected alertService: AlertService,\n protected permissionsService: Permissions\n ) {\n super(inventoryService, translateService);\n }\n\n getDefaultColumns(filterable: boolean = true, sortable: boolean = true): DeviceGridColumn[] {\n const defaultColumns = [\n new AssetTypeGridColumn({ sortOrder: 'desc' }),\n new NameDeviceGridColumn({ sortOrder: 'asc' }),\n new ModelDeviceGridColumn(),\n new SerialNumberDeviceGridColumn({ visible: false }),\n new RegistrationDateDeviceGridColumn({ visible: false }),\n new SystemIdDeviceGridColumn({ visible: false }),\n new ImeiDeviceGridColumn({ visible: false }),\n new AlarmsDeviceGridColumn()\n ];\n return defaultColumns;\n }\n\n getDefaultPagination(): Pagination {\n const { pagination } = this.getConfig();\n return {\n pageSize: pagination.pageSize,\n currentPage: 1\n };\n }\n\n getDefaultActionControls(): ActionControl[] {\n return [];\n }\n\n async unassignAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const { id: assetId } = asset;\n const { id: parentId } = parentRef;\n\n if (this.isDevice(asset)) {\n try {\n await this.inventoryService.childAssetsRemove(assetId, parentId);\n const alertMessage = this.translateService.instant(gettext('Asset unassigned.'));\n this.alertService.success(alertMessage);\n } catch (error) {\n const alertMessage = this.translateService.instant(gettext('Could not unassign devices.'));\n this.alertService.danger(alertMessage);\n }\n await this.deactivateSmartrulesForAsset(asset, parentRef);\n }\n }\n\n isDevice(asset: IManagedObject): boolean {\n return (\n !asset.hasOwnProperty(this.IS_DEVICE_GROUP_FRAGMENT) &&\n !asset.hasOwnProperty(this.IS_DYNAMIC_GROUP_FRAGMENT)\n );\n }\n\n async deleteAsset(asset: IManagedObject, parentRef: IManagedObject, params = {}) {\n const isGroup =\n asset.hasOwnProperty(this.IS_DEVICE_GROUP_FRAGMENT) ||\n this.smartGroupsService.isSmartGroup(asset);\n\n if (isGroup) {\n await this.deleteGroup(asset, params);\n } else {\n await this.deleteDevice(asset, params);\n }\n\n if (\n parentRef &&\n !this.smartGroupsService.isSmartGroup(asset) &&\n !this.smartGroupsService.isSmartGroupV2(asset)\n ) {\n await this.deactivateSmartrulesForAsset(asset, parentRef);\n }\n }\n\n shouldShowWithDeviceUserCheckbox(asset: IManagedObject): boolean {\n const { owner, c8y_IsDevice: isRootDevice } = asset;\n const hasDeviceUserAsOwner = asset.owner && this.isDeviceUser(owner);\n\n return Boolean(isRootDevice && hasDeviceUserAsOwner);\n }\n\n getDefaultBulkActionControls(): BulkActionControl[] {\n return [];\n }\n\n async getData(\n columns: DeviceGridColumn[],\n pagination: Pagination,\n parentReference: IManagedObject,\n baseQuery: any = {}\n ) {\n const isRoot = !parentReference;\n if (isRoot) {\n const query = this.buildCombinedRootQueryFilter(columns, pagination);\n return this.assetNodeService.getRootNodes({ ...pagination, query });\n }\n const filters = {\n ...this.getAssetsFilters(columns, pagination, baseQuery),\n withParents: false\n };\n if (this.deviceGroupService.isGroup(parentReference)) {\n return this.assetNodeService.getGroupItems(parentReference.id, filters);\n }\n if (this.deviceGroupService.isDynamicGroup(parentReference)) {\n return this.assetNodeService.getDynamicGroupItems(\n parentReference.c8y_DeviceQueryString,\n filters\n );\n }\n if (this.deviceGroupService.isDevice(parentReference)) {\n return this.assetNodeService.getDeviceChildren(parentReference.id, filters);\n }\n }\n\n async getCount(\n columns: DeviceGridColumn[],\n pagination: Pagination,\n parentReference: IManagedObject,\n baseQuery: any = {}\n ): Promise<number> {\n const defaultFilters = {\n pageSize: 1,\n withChildren: false\n };\n const filters = !parentReference\n ? {\n query: this.buildCombinedRootQueryFilter(columns, pagination),\n ...defaultFilters\n }\n : {\n ...this.getAssetsFilters(columns, pagination, baseQuery),\n ...defaultFilters\n };\n return this.getAssetsStatistics(parentReference, filters);\n }\n\n getTotal(parentReference: IManagedObject, baseQuery: any = {}): Promise<number> {\n const queryFilter = this.assetNodeService.rootQueryFilter();\n const query = !parentReference\n ? this.queriesUtil.addAndFilter(queryFilter, baseQuery)\n : baseQuery;\n const filters = {\n query: this.queriesUtil.buildQuery(query),\n withChildren: false,\n withTotalPages: true,\n pageSize: 1\n };\n return this.getAssetsStatistics(parentReference, filters);\n }\n\n canEditGroup(group: IManagedObject) {\n const currentUser = this.appState.currentUser.value;\n const hasAdminRole = this.user.hasAnyRole(currentUser, ['ROLE_INVENTORY_ADMIN']);\n const isOwner = group.owner === currentUser.userName;\n return hasAdminRole || isOwner;\n }\n\n canEditSmartGroup(): boolean {\n const SMART_GROUPS_ROLES_EDIT = ['ROLE_SMARTGROUP_UPDATE', 'ROLE_SMARTGROUP_ADMIN'];\n return this.permissionsService.hasAnyRole(SMART_GROUPS_ROLES_EDIT);\n }\n\n canDeleteSmartGroup(): boolean {\n const SMART_GROUPS_ROLES_DELETE = ['ROLE_SMARTGROUP_ADMIN', 'ROLE_INVENTORY_ADMIN'];\n return this.permissionsService.hasAnyRole(SMART_GROUPS_ROLES_DELETE);\n }\n\n isSmartGroup(group: IManagedObject): boolean {\n return this.smartGroupsService.isSmartGroup(group) || this.smartGroupsService.isSmartGroupV2(group);\n }\n\n isUsingInventoryRoles() {\n const currentUser = this.appState.currentUser.value;\n const hasAnyInventoryRole = this.user.hasAnyRole(currentUser, [\n 'ROLE_INVENTORY_ADMIN',\n 'ROLE_INVENTORY_READ',\n 'ROLE_INVENTORY_CREATE'\n ]);\n return !hasAnyInventoryRole;\n }\n\n protected async getAssetsStatistics(\n parentReference: IManagedObject,\n filters: object\n ): Promise<number> {\n const isRoot = !parentReference;\n if (isRoot) {\n return (await this.assetNodeService.getRootNodes(filters)).paging.totalPages;\n }\n if (this.deviceGroupService.isGroup(parentReference)) {\n return (await this.assetNodeService.getGroupItems(parentReference.id, filters)).paging\n .totalPages;\n }\n if (this.deviceGroupService.isDynamicGroup(parentReference)) {\n return (await this.assetNodeService.getDynamicGroupItems(\n parentReference.c8y_DeviceQueryString,\n filters\n )).paging.totalPages;\n }\n if (this.deviceGroupService.isDevice(parentReference)) {\n return (await this.assetNodeService.getDeviceChildren(parentReference.id, filters)).paging\n .totalPages;\n }\n }\n\n protected buildCombinedRootQueryFilter(columns, pagination) {\n const queryFilter = this.assetNodeService.rootQueryFilter();\n const userQuery = this.getQueryObj(columns, pagination);\n\n const queryPart = this.queriesUtil.addOrderbys(queryFilter, userQuery.__orderby, 'append');\n const fullQuery = this.queriesUtil.addAndFilter(queryPart, userQuery.__filter);\n return this.queriesUtil.buildQuery(fullQuery);\n }\n\n private async deleteGroup(group: IManagedObject, params: any = {}) {\n const { cascade } = params;\n\n try {\n this.smartGroupsService.isSmartGroup(group) || this.smartGroupsService.isSmartGroupV2(group)\n ? await this.smartGroupsService.delete(group, { cascade })\n : await this.inventoryService.delete(group, { cascade });\n\n const alertMessage = this.translateService.instant(gettext('Asset deleted.'));\n this.alertService.success(alertMessage);\n } catch (error) {\n const alertMessage = this.translateService.instant(gettext('Could not delete asset.'));\n this.alertService.danger(alertMessage);\n }\n }\n\n private async deleteDevice(device: IManagedObject, params: any = {}) {\n const { cascade, withDeviceUser } = params;\n try {\n const { owner } = device;\n const shouldRemoveOwner = withDeviceUser && owner && this.isDeviceUser(owner);\n\n shouldRemoveOwner\n ? await this.deleteDeviceWithUser(device, cascade)\n : await this.inventoryService.delete(device, { cascade });\n\n const alertMessage = this.translateService.instant(gettext('Asset deleted.'));\n this.alertService.success(alertMessage);\n } catch (error) {\n const alertMessage = this.translateService.instant(gettext('Could not delete asset.'));\n this.alertService.danger(alertMessage);\n }\n }\n\n private async deactivateSmartrulesForAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const { id: assetId } = asset;\n const { id: parentId } = parentRef;\n const rules: IRule[] = (await this.smartRulesService.listByContext(parentId)).data;\n\n const upateSmartrulesPromises = rules.map(rule =>\n this.smartRulesService.bulkDeactivateEnabledSources(rule, [assetId])\n );\n\n try {\n await Promise.all(upateSmartrulesPromises);\n } catch (error) {\n const alertMessage = this.translateService.instant(\n gettext('Could not deactivate smart rules.')\n );\n this.alertService.danger(alertMessage);\n }\n }\n\n private isDeviceUser(userId: string) {\n return userId.match(/^device_/);\n }\n\n private async deleteDeviceWithUser(device: IManagedObject, cascade: boolean) {\n const params = { cascade, withDeviceUser: true };\n try {\n return await this.inventoryService.delete(device, params);\n } catch (error) {\n return await this.inventoryService.delete(device, { cascade });\n }\n }\n\n private getAssetsFilters(columns: DeviceGridColumn[], pagination: Pagination, baseQuery) {\n const query = this.queriesUtil.addAndFilter(this.getQueryObj(columns), baseQuery);\n return {\n query: this.queriesUtil.buildQuery(query),\n pageSize: pagination.pageSize || this.DEFAULT_PAGE_SIZE,\n currentPage: pagination.currentPage,\n withTotalPages: true\n };\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { IManagedObject, InventoryService, SmartGroupsService } from '@c8y/client';\nimport { AlertService, gettext, ModalService, Status } from '@c8y/ngx-components';\nimport { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\nimport { TranslateService } from '@ngx-translate/core';\nimport { SubAssetsService } from './sub-assets.service';\n\n@Component({\n selector: 'c8y-group-info',\n templateUrl: './group-info.component.html'\n})\nexport class GroupInfoComponent {\n @Input() group: IManagedObject;\n @Output() onGroupChange = new EventEmitter();\n canEdit: boolean;\n groupIcon: string;\n smartGroupFilter: string;\n filterHintMsg: string;\n\n private filterMsg = gettext(\n 'Smart groups are groups dynamically constructed based on filtering criteria.'\n );\n private canEditMsg = gettext('You can edit the filter here.');\n private readonly GROUP_UPDATED_MSG = gettext('Group updated.');\n constructor(\n private inventory: InventoryService,\n private subAssetsService: SubAssetsService,\n private deviceGroupService: DeviceGroupService,\n private smartGroupsService: SmartGroupsService,\n private alertService: AlertService,\n private translate: TranslateService,\n private modalService: ModalService\n ) {}\n\n ngOnInit() {\n this.canEdit = this.smartGroupsService.isSmartGroupV2(this.group)\n ? this.subAssetsService.canEditSmartGroup()\n : this.subAssetsService.canEditGroup(this.group);\n this.groupIcon = this.deviceGroupService.icon(this.group);\n this.smartGroupFilter = this.group.c8y_DeviceQueryString;\n\n this.setHintMsg();\n }\n\n isSmartGroup() {\n return this.subAssetsService.isSmartGroup(this.group);\n }\n\n async update(partialGroup: Partial<IManagedObject>) {\n try {\n const isSmartGroup: boolean = this.subAssetsService.isSmartGroup(this.group);\n isSmartGroup\n ? await this.updateSmartGroup(partialGroup)\n : await this.updateGroup(partialGroup);\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n private setHintMsg() {\n const filterMsgTranslated = this.translate.instant(this.filterMsg);\n const canEditMsgTranslated = this.translate.instant(this.canEditMsg);\n this.filterHintMsg = this.canEdit\n ? `${filterMsgTranslated} ${canEditMsgTranslated}`\n : this.filterMsg;\n }\n\n private async updateGroup(partialGroup: Partial<IManagedObject>) {\n const { id } = this.group;\n const group: Partial<IManagedObject> = { id, ...partialGroup };\n\n const updatedGroup = (await this.inventory.update(group)).data;\n this.setGroup(updatedGroup);\n }\n\n private async updateSmartGroup(partialGroup: Partial<IManagedObject>) {\n const { id } = this.group;\n const { c8y_DeviceQueryString } = partialGroup;\n const group: Partial<IManagedObject> = { id, ...partialGroup };\n let updatedGroup: IManagedObject;\n\n if (!c8y_DeviceQueryString) {\n updatedGroup = (await this.smartGroupsService.update(group)).data;\n this.setGroup(updatedGroup);\n return;\n }\n\n try {\n const modalBody = gettext(\n 'You are about to change the smart group filter. Do you want to proceed?'\n );\n const title = gettext('Smart group filter');\n await this.modalService.confirm(title, modalBody, Status.WARNING, {\n ok: gettext('Save'),\n cancel: gettext('Cancel')\n });\n\n if (!(await this.isQueryExecutable(c8y_DeviceQueryString))) {\n return;\n }\n } catch (e) {\n return;\n }\n updatedGroup = (await this.smartGroupsService.update(group)).data;\n this.setGroup(updatedGroup);\n }\n\n private setGroup(group: IManagedObject) {\n this.onGroupChange.emit(group);\n this.alertService.success(this.GROUP_UPDATED_MSG);\n }\n\n private async isQueryExecutable(query: string): Promise<boolean> {\n try {\n const filter = { q: query };\n await this.inventory.list(filter);\n return true;\n } catch (error) {\n this.alertService.addServerFailure(error);\n return false;\n }\n }\n}\n","import { Component, EventEmitter, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IIdentified, IManagedObject } from '@c8y/client';\nimport { AppStateService, DisplayOptions } from '@c8y/ngx-components';\nimport { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\nimport { Subscription } from 'rxjs';\nimport { SubAssetsService } from './sub-assets.service';\n\n@Component({\n selector: 'c8y-sub-assets',\n templateUrl: './sub-assets.component.html'\n})\nexport class SubAssetsComponent implements OnInit, OnDestroy {\n currentGroupId: IIdentified;\n showChildrenForDevice: IManagedObject;\n title: string;\n toggle: boolean = false;\n showAddGroup: boolean = false;\n showAssignDevices: boolean = false;\n requestInProgress: boolean;\n group: IManagedObject;\n showGroupInfo: boolean = true;\n showAssignChildDevices: boolean = false;\n refresh: EventEmitter<any> = new EventEmitter();\n filterable: boolean = true;\n displayOptions: DisplayOptions;\n private dataSub: Subscription;\n\n constructor(\n private route: ActivatedRoute,\n private appState: AppStateService,\n private deviceGroupService: DeviceGroupService,\n private subAssetsService: SubAssetsService\n ) {\n this.dataSub = this.route.parent.data.subscribe(({ contextData }) => {\n this.title = contextData.name;\n this.currentGroupId = contextData.id;\n this.group = contextData;\n this.filterable = !this.deviceGroupService.isDynamicGroup(contextData);\n });\n }\n\n ngOnInit(): void {\n this.appState.state$.subscribe(state => {\n this.showGroupInfo = state.app.name === 'cockpit' || state.app.name === 'devicemanagement';\n });\n\n this.displayOptions = {\n striped: true,\n bordered: false,\n gridHeader: true,\n filter: !this.isSmartGroup()\n };\n }\n\n groupChange(group: IManagedObject): void {\n /**\n * Group is cached in the context-route guard. To avoid loading old data (when switching tabs) we need to update\n * this object in the cache.\n */\n Object.assign(this.group, group);\n this.title = group.name;\n this.refresh.emit();\n }\n\n isSmartGroup() {\n return this.subAssetsService.isSmartGroup(this.group);\n }\n\n ngOnDestroy(): void {\n if (this.dataSub) {\n this.dataSub.unsubscribe();\n }\n }\n}\n","import { Component, Input, ViewChild } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport {\n ConfirmModalComponent,\n gettext,\n ModalLabels,\n Status,\n StatusType\n} from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { DeleteModalCheckboxes } from './delete-assets-modal.model';\n\n@Component({\n selector: 'c8y-delete-assets-modal',\n templateUrl: './delete-assets-modal.component.html'\n})\nexport class DeleteAssetsModalComponent {\n @Input() showWithCascadeCheckbox: boolean = true;\n @Input() showWithDeviceUserCheckbox: boolean = false;\n @Input() asset: IManagedObject;\n @ViewChild('modalRef', { static: false }) modalRef: ConfirmModalComponent;\n closeSubject: Subject<DeleteModalCheckboxes> = new Subject();\n labels: ModalLabels = { ok: gettext('Delete'), cancel: gettext('Cancel') };\n title = gettext('Delete asset');\n status: StatusType = Status.DANGER;\n config: DeleteModalCheckboxes = {\n cascade: false,\n withDeviceUser: false\n };\n message: string;\n\n constructor(private translateService: TranslateService) {}\n\n ngOnInit() {\n this.message = this.translateService.instant(\n gettext(\n 'You are about to delete asset: \"{{name}}\". This operation is irreversible. Do you want to proceed?'\n ),\n { name: this.asset.name }\n );\n }\n\n async ngAfterViewInit() {\n try {\n await this.modalRef.result;\n this.onClose();\n } catch (error) {\n this.onDismiss();\n }\n }\n\n onClose() {\n this.closeSubject.next(this.config);\n this.closeSubject.complete();\n }\n\n onDismiss() {\n this.closeSubject.complete();\n }\n}\n","import { Component, Input, ViewChild } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport {\n ConfirmModalComponent,\n gettext,\n ModalLabels,\n Status,\n StatusType\n} from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\n@Component({\n selector: 'c8y-unassign-modal',\n templateUrl: './unassign-modal.component.html'\n})\nexport class UnassignModalComponent {\n @Input() asset: IManagedObject;\n @ViewChild('modalRef', { static: false }) modalRef: ConfirmModalComponent;\n message: string;\n closeSubject: Subject<boolean> = new Subject();\n labels: ModalLabels = { ok: gettext('Unassign'), cancel: gettext('Cancel') };\n title = gettext('Unassign devices');\n status: StatusType = Status.WARNING;\n\n constructor(private translateService: TranslateService) {}\n\n ngOnInit() {\n this.message = this.translateService.instant(\n gettext('You are about to unassign asset: \"{{name}}\" . Do you want to proceed?'),\n { name: this.asset.name }\n );\n }\n\n async ngAfterViewInit() {\n try {\n await this.modalRef.result;\n this.onClose();\n } catch (error) {\n this.onDismiss();\n }\n }\n\n onClose() {\n this.closeSubject.next(true);\n this.closeSubject.complete();\n }\n\n onDismiss() {\n this.closeSubject.complete();\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { IManagedObject, SmartGroupsService } from '@c8y/client';\nimport {\n ActionControl,\n BuiltInActionType,\n BulkActionControl,\n DataGridComponent,\n DataSourceModifier,\n DisplayOptions,\n gettext,\n Pagination,\n Row,\n ServerSideDataResult\n} from '@c8y/ngx-components';\nimport { DeviceGridColumn } from '@c8y/ngx-components/device-grid';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { DeleteModalCheckboxes } from './delete-assets-modal';\nimport { DeleteAssetsModalComponent } from './delete-assets-modal/delete-assets-modal.component';\nimport { SubAssetsService } from './sub-assets.service';\nimport { UnassignModalComponent } from './unassign-assets-modal/unassign-modal.component';\n@Component({\n selector: 'c8y-sub-assets-grid',\n templateUrl: './sub-assets-grid.component.html'\n})\nexport class SubAssetsGridComponent implements OnInit {\n @Input('parent-group') parentGroup: IManagedObject;\n @Input() refresh: EventEmitter<any>;\n @Input() title: string = gettext('Subassets');\n @Input() emptyStateText: string = gettext(\n 'Add your first group or assign devices using the buttons on the toolbar.'\n );\n @Input() loadingItemsLabel: string = gettext('Loading assets…');\n\n get columns() {\n return this._columns;\n }\n @Input() set columns(value: DeviceGridColumn[]) {\n if (value) {\n this._columns = this.subAssetsGridService.getUserConfiguredColumns(value);\n } else {\n this._columns = this.subAssetsGridService.getUserConfiguredColumns(\n this.subAssetsGridService.getDefaultColumns()\n );\n }\n }\n @Input('pagination') set _pagination(value: Pagination) {\n if (value) {\n this.pagination = value;\n } else {\n this.pagination = this.subAssetsGridService.getDefaultPagination();\n }\n }\n @Input('actionControls') set _actionControls(value: ActionControl[]) {\n if (value) {\n this.actionControls = value;\n } else {\n this.actionControls = this.subAssetsGridService.getDefaultActionControls();\n }\n }\n @Input() selectable: boolean = false;\n @Input() baseQuery: any = {};\n @Input('bulkActionControls') set _bulkActionControls(value: BulkActionControl[]) {\n if (value) {\n this.bulkActionControls = value;\n } else {\n this.bulkActionControls = this.subAssetsGridService.getDefaultBulkActionControls();\n }\n }\n @Input() filterable: boolean = true;\n @Input() sortable: boolean = true;\n @Output() onColumnsChange: EventEmitter<DeviceGridColumn[]> = new EventEmitter<\n DeviceGridColumn[]\n >();\n @Output() itemsSelect: EventEmitter<string[]> = new EventEmitter<string[]>();\n\n pagination: Pagination = this.subAssetsGridService.getDefaultPagination();\n actionControls: ActionControl[];\n bulkActionControls: BulkActionControl[] = this.subAssetsGridService.getDefaultBulkActionControls();\n serverSideDataCallback: any;\n\n @ViewChild(DataGridComponent, { static: true })\n dataGrid: DataGridComponent;\n\n displayOptions: DisplayOptions = {\n striped: true,\n bordered: false,\n gridHeader: true,\n filter: true\n };\n\n private _columns: DeviceGridColumn[];\n\n get isRootGroup() {\n return !this.parentGroup;\n }\n\n get getInfiniteScrollMode() {\n return this.isRootGroup && this.subAssetsGridService.isUsingInventoryRoles()\n ? 'auto'\n : undefined;\n }\n\n @Input('displayOptions')\n set _displayOptions(displayOptions) {\n this.displayOptions = { ...this.displayOptions, ...displayOptions };\n }\n\n constructor(\n public subAssetsGridService: SubAssetsService,\n private bsModalService: BsModalService,\n private smartGroupsService: SmartGroupsService\n ) {\n this.serverSideDataCallback = this.onDataSourceModifier.bind(this);\n }\n\n ngOnInit() {\n this.columns = this.subAssetsGridService.getDefaultColumns(this.filterable, this.sortable);\n if (!this.filterable || !this.sortable) {\n this.columns.forEach(column => {\n column.filterable = this.filterable;\n column.sortable = this.sortable;\n });\n }\n this.setActionControls();\n }\n\n async setActionControls() {\n const actionControls: ActionControl[] = [];\n const {\n data: isMicroserviceInstalled\n } = await this.smartGroupsService.isSmartGroupsV2MicroserviceInstalled();\n\n const deleteAction: ActionControl = {\n type: BuiltInActionType.Delete,\n callback: (asset: Row) => this.onDeleteAsset(asset as IManagedObject, this.parentGroup),\n showIf: (asset: Row) => {\n if (this.smartGroupsService.isSmartGroupV2(asset as IManagedObject)) {\n return isMicroserviceInstalled ? this.subAssetsGridService.canDeleteSmartGroup() : false;\n }\n\n if (this.smartGroupsService.isSmartGroup(asset as IManagedObject)) {\n return this.subAssetsGridService.canDeleteSmartGroup();\n }\n\n return true;\n }\n };\n\n actionControls.push(deleteAction);\n\n const unassignAction: ActionControl = {\n type: 'UNASSIGN',\n icon: 'unlink',\n text: gettext('Unassign'),\n callback: (asset: Row) => this.onUnassignAsset(asset as IManagedObject, this.parentGroup),\n showIf: (asset: Row) =>\n this.subAssetsGridService.isDevice(asset as IManagedObject) &&\n !this.subAssetsGridService.isSmartGroup(this.parentGroup as IManagedObject)\n };\n\n actionControls.push(unassignAction);\n\n if (!this.actionControls) {\n this.actionControls = actionControls;\n }\n }\n\n onUnassignAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const initialState = {\n asset\n };\n const modalRef = this.bsModalService.show(UnassignModalComponent, { initialState });\n\n modalRef.content.closeSubject.subscribe(async (result: boolean) => {\n if (result) {\n await this.subAssetsGridService.unassignAsset(asset, parentRef);\n this.refresh.emit();\n }\n });\n }\n\n async onDeleteAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const initialState = {\n showWithDeviceUserCheckbox: this.subAssetsGridService.shouldShowWithDeviceUserCheckbox(asset),\n asset,\n showWithCascadeCheckbox:\n !this.smartGroupsService.isSmartGroup(asset) &&\n !this.smartGroupsService.isSmartGroupV2(asset)\n };\n\n const modalRef = this.bsModalService.show(DeleteAssetsModalComponent, { initialState });\n\n modalRef.content.closeSubject.subscribe(async (result: DeleteModalCheckboxes) => {\n if (result) {\n this.subAssetsGridService.uiOnlyCountersUpdate.next('DECREASE');\n await this.subAssetsGridService.deleteAsset(asset, parentRef, result);\n this.refresh.emit();\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.parentGroup && !changes.parentGroup.firstChange) {\n this.dataGrid.reload();\n }\n }\n\n trackByName(_index, column: DeviceGridColumn): string {\n return column.name;\n }\n\n async onDataSourceModifier(\n dataSourceModifier: DataSourceModifier\n ): Promise<ServerSideDataResult> {\n const promises = [];\n let counters;\n\n promises.push(\n this.subAssetsGridService.getData(\n dataSourceModifier.columns,\n dataSourceModifier.pagination,\n this.parentGroup,\n this.baseQuery\n )\n );\n\n const action = this.subAssetsGridService.uiOnlyCountersUpdate.value;\n if (action) {\n counters = this.uiOnlyCountersUpdate(action);\n this.subAssetsGridService.uiOnlyCountersUpdate.next(null);\n } else {\n promises.push(this.subAssetsGridService.getTotal(this.parentGroup, this.baseQuery));\n promises.push(\n this.subAssetsGridService.getCount(\n dataSourceModifier.columns,\n dataSourceModifier.pagination,\n this.parentGroup,\n this.baseQuery\n )\n );\n }\n const [dataResponse, size, filteredSize] = await Promise.all(promises);\n if (!counters) {\n counters = {\n size,\n filteredSize\n };\n }\n this.onColumnsChange.emit(dataSourceModifier.columns);\n\n return {\n res: dataResponse.res,\n data: dataResponse.data,\n paging: dataResponse.paging,\n ...counters\n };\n }\n\n configChange(config) {\n this.subAssetsGridService.saveConfig(config);\n }\n\n // workaround since the totalPages value is cached on the BE\n private uiOnlyCountersUpdate(action: 'INCREASE' | 'DECREASE') {\n const currentAllItemsCount = this.dataGrid.filteringLabelsParams.allItemsCount;\n const currentFilteredItemsCount = this.dataGrid.filteringLabelsParams.filteredItemsCount;\n let counters;\n if (action === 'DECREASE') {\n counters = {\n size: currentAllItemsCount - 1,\n filteredSize: currentFilteredItemsCount - 1\n };\n }\n if (action === 'INCREASE') {\n counters = {\n size: currentAllItemsCount + 1,\n filteredSize: currentFilteredItemsCount + 1\n };\n }\n return counters;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { IIdentified, IManagedObject, InventoryService } from '@c8y/client';\nimport { GroupForm } from './add-group.model';\nimport { GroupFragment } from '@c8y/ngx-components/assets-navigator';\n\n@Injectable()\nexport class AddGroupService {\n private GROUP_FRAGMENT_TYPE = 'c8y_IsDeviceGroup';\n\n constructor(private inventoryService: InventoryService) {}\n\n async createGroupAndAssignDevices(\n groupForm: GroupForm,\n groupContextId: string | number,\n selectedDevices: string[]\n ): Promise<IManagedObject | IIdentified> {\n let group: IManagedObject | IIdentified;\n const { name, description } = groupForm;\n const newGroupMO = this.getGroupMO(name, description, groupContextId);\n\n if (groupContextId) {\n group = (await this.inventoryService.childAssetsCreate(newGroupMO, groupContextId)).data;\n } else {\n group = (await this.inventoryService.create(newGroupMO)).data;\n }\n\n if (selectedDevices.length > 0) {\n await this.assignDevices(group.id, selectedDevices);\n }\n\n return group;\n }\n\n private getGroupMO(\n name: string,\n description: string = '',\n groupContextId: string | number\n ): Partial<IManagedObject> {\n const group = {\n type: this.getGroupType(groupContextId),\n [this.GROUP_FRAGMENT_TYPE]: {},\n name,\n description\n };\n\n return group;\n }\n\n private getGroupType(\n groupContextId: string | number\n ): GroupFragment.subGroupType | GroupFragment.groupType {\n return groupContextId ? GroupFragment.subGroupType : GroupFragment.groupType;\n }\n\n private async assignDevices(id: string | number, selectedDevices: string[]) {\n const promises = [];\n\n selectedDevices.forEach(moId => {\n promises.push(this.inventoryService.childAssetsAdd(moId, id));\n });\n\n return await Promise.all(promises);\n }\n}\n","import {\n Component,\n Output,\n EventEmitter,\n ViewChild,\n Input,\n HostListener,\n ElementRef\n} from '@angular/core';\nimport { FormGroup, Validators, FormBuilder } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { DeviceGridService } from '@c8y/ngx-components/device-grid';\nimport { C8yStepper, Pagination, AlertService, gettext } from '@c8y/ngx-components';\nimport { AddGroupService } from './add-group.service';\nimport { SubAssetsService } from '../sub-assets.service';\n\n@Component({\n selector: 'c8y-add-group',\n templateUrl: './add-group.component.html'\n})\nexport class AddGroupComponent {\n @Input() currentGroupId: string;\n @Input() refresh = new EventEmitter<any>();\n @Output() onDeviceQueryStringChange: EventEmitter<string> = new EventEmitter<string>();\n @Output() onCancel = new EventEmitter<any>();\n @ViewChild(C8yStepper, { static: false })\n stepper: C8yStepper;\n @ViewChild('nameRef', { static: false })\n nameInputRef: ElementRef;\n deviceQueryStringOutput: string;\n formGroupStepOne: FormGroup;\n pendingStatus: boolean = false;\n pagination: Pagination = { pageSize: 20, currentPage: 1 };\n selected: string[] = [];\n subscription: Subscription;\n\n readonly ITEMS_SELECT_LIMIT: number = 15;\n readonly btnLabels = {\n next: gettext('Next'),\n cancel: gettext('Cancel'),\n create: gettext('Create')\n };\n\n private nameInput: HTMLInputElement;\n\n constructor(\n protected deviceGridService: DeviceGridService,\n private fb: FormBuilder,\n private addGroupService: AddGroupService,\n private alert: AlertService,\n private subAssetsService: SubAssetsService\n ) {}\n\n @HostListener('document:keydown.enter', ['$event']) onEnterKeyDown(event: KeyboardEvent) {\n // Order matters! Needs to be placed before this.stepper.next\n if (this.stepper.selectedIndex === 1) {\n this.createGroup();\n }\n this.stepper.next();\n }\n\n @HostListener('document:keydown.escape', ['$event']) onEscapeKeyDown(event: KeyboardEvent) {\n this.onCancel.emit();\n }\n\n @HostListener('document:keydown.backspace', ['$event']) onBackspaceKeyDown(event: KeyboardEvent) {\n this.stepper.previous();\n\n setTimeout(() => {\n this.setFocusOnNameInput();\n });\n }\n\n ngOnInit() {\n this.formGroupStepOne = this.fb.group({\n name: ['', Validators.required],\n description: ['']\n });\n this.subscription = this.onCancel.subscribe(() => this.resetStepper());\n }\n\n ngAfterViewInit() {\n this.nameInput = this.nameInputRef.nativeElement as HTMLInputElement;\n this.setFocusOnNameInput();\n }\n\n async createGroup() {\n this.pendingStatus = true;\n this.subAssetsService.uiOnlyCountersUpdate.next('INCREASE');\n await this.addGroupService.createGroupAndAssignDevices(\n this.formGroupStepOne.value,\n this.currentGroupId,\n this.selected\n );\n\n this.pendingStatus = false;\n this.resetStepper();\n this.alert.success(gettext('Group created.'));\n\n this.refresh.emit();\n this.onCancel.emit();\n }\n\n onSelected(selectedDevicesIDs: string[]) {\n this.selected = selectedDevicesIDs;\n }\n\n resetStepper() {\n this.stepper.reset();\n this.stepper.selectedIndex = 1;\n this.selected = [];\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n private setFocusOnNameInput() {\n if (this.nameInput) {\n this.nameInput.focus();\n this.nameInput.select();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, HOOK_ONCE_ROUTE } from '@c8y/ngx-components';\nimport { DeviceGridModule } from '@c8y/ngx-components/device-grid';\nimport { AddGroupComponent } from './add-group.component';\nimport { AddGroupService } from './add-group.service';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [AddGroupComponent],\n imports: [CoreModule, DeviceGridModule, FormsModule, ReactiveFormsModule],\n entryComponents: [AddGroupComponent],\n exports: [AddGroupComponent],\n providers: [\n {\n provide: HOOK_ONCE_ROUTE,\n useValue: [\n {\n path: 'add-group',\n component: AddGroupComponent\n }\n ],\n multi: true\n },\n AddGroupService\n ]\n})\nexport class AddGroupModule {}\n","import { Component, EventEmitter, OnInit } from '@angular/core';\nimport { Permissions } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-groups-name',\n templateUrl: './groups.component.html'\n})\nexport class GroupsComponent implements OnInit {\n refresh: EventEmitter<any> = new EventEmitter();\n showAddGroup = false;\n filterable: boolean = false;\n sortable: boolean = true;\n\n constructor(private permissions: Permissions) {}\n\n ngOnInit() {\n if (!this.permissions.hasRole('ROLE_INVENTORY_READ')) {\n this.sortable = false;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { InventoryService } from '@c8y/client';\n\n@Injectable()\nexport class AssignDevicesService {\n constructor(private inventoryService: InventoryService) {}\n\n async assignDevices(id: string | number, selectedDevices: string[]) {\n const promises = [];\n\n selectedDevices.forEach(moId => {\n promises.push(this.inventoryService.childAssetsAdd(moId, id));\n });\n\n return await Promise.all(promises);\n }\n}\n","import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';\nimport { Pagination, AlertService, gettext, ActionControl, Row } from '@c8y/ngx-components';\nimport { InventoryService } from '@c8y/client';\nimport { SubAssetsService } from '../sub-assets.service';\nimport { IManagedObject } from '@c8y/client';\nimport { QueriesUtil } from '@c8y/client';\nimport { AssignDevicesService } from './assign-devices.service';\n\n@Component({\n selector: 'c8y-assign-devices',\n templateUrl: './assign-devices.component.html'\n})\nexport class AssignDevicesComponent {\n @Input() currentGroupId: string;\n @Input() refresh = new EventEmitter<any>();\n @Output() onCancel = new EventEmitter<any>();\n @Output() onShowChildDevices = new EventEmitter<boolean>();\n @Output() selectedDevice = new EventEmitter<IManagedObject>();\n\n deviceQueryStringOutput: string;\n pendingStatus: boolean = false;\n pagination: Pagination = { pageSize: 20, currentPage: 1 };\n selected: string[] = [];\n baseQuery: any;\n canAssignDevice: boolean = false;\n actionControls: ActionControl[] = [];\n readonly isSelectable = true;\n readonly itemsSelectLimit = 15;\n private queriesUtil: QueriesUtil;\n\n constructor(private assignDevicesService: AssignDevicesService, private alert: AlertService) {\n this.queriesUtil = new QueriesUtil();\n }\n\n @HostListener('document:keydown.enter', ['$event']) onEnterKeyDown(event: KeyboardEvent) {\n if (this.selected.length > 0) {\n this.assignDevices();\n }\n }\n\n @HostListener('document:keydown.escape', ['$event']) onEscapeKeyDown(event: KeyboardEvent) {\n this.onCancel.emit();\n }\n\n ngOnInit() {\n this.setNotIncludedInGroupQuery();\n }\n\n setNotIncludedInGroupQuery() {\n const notIncludedInGroupQuery = { __not: { __bygroupid: this.currentGroupId } };\n this.baseQuery = notIncludedInGroupQuery;\n }\n\n setActionControls(showChildren: boolean) {\n const actionControls: ActionControl[] = [];\n const selectChildrenAction: ActionControl = {\n type: 'SELECT_CHILDREN',\n icon: 'enter-bottom',\n text: gettext('Select children'),\n callback: (asset: Row) => this.selectChildren(asset as IManagedObject),\n showIf: (asset: Row) =>\n asset.childDevices.references.length > 0\n };\n\n if (showChildren) {\n actionControls.push(selectChildrenAction);\n }\n this.actionControls = actionControls;\n this.refresh.emit();\n }\n\n async assignDevices() {\n this.pendingStatus = true;\n await this.assignDevicesService.assignDevices(this.currentGroupId, this.selected);\n this.pendingStatus = false;\n this.selected = [];\n\n this.onCancel.emit();\n this.refresh.emit();\n\n this.alert.success(gettext('Devices assigned to the group.'));\n }\n\n onSelected(selectedDevicesIDs: string[]) {\n this.selected = selectedDevicesIDs;\n }\n\n selectChildren(asset: IManagedObject) {\n this.onShowChildDevices.emit(true);\n this.selectedDevice.emit(asset);\n }\n}\n","import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';\nimport { AlertService, gettext } from '@c8y/ngx-components';\nimport { InventoryService } from '@c8y/client';\nimport { SubAssetsService } from '../sub-assets.service';\nimport { IManagedObject } from '@c8y/client';\nimport { AssignDevicesService } from './assign-devices.service';\n\n@Component({\n selector: 'c8y-assign-child-devices',\n templateUrl: './assign-child-devices.component.html'\n})\nexport class AssignChildDevicesComponent {\n @Input() currentGroupId: string;\n @Input() parentDevice: IManagedObject;\n @Output() onCancel = new EventEmitter<any>();\n @Input() refresh = new EventEmitter<any>();\n\n selected: string[] = [];\n baseQuery: any;\n pendingStatus: boolean = false;\n\n constructor(\n private alert: AlertService,\n private subAssetsService: SubAssetsService,\n private inventoryService: InventoryService,\n private assignDevicesService: AssignDevicesService\n ) {}\n\n @HostListener('document:keydown.enter', ['$event']) onEnterKeyDown(event: KeyboardEvent) {\n if (this.selected.length > 0) {\n this.assignDevices();\n }\n }\n\n @HostListener('document:keydown.escape', ['$event']) onEscapeKeyDown(event: KeyboardEvent) {\n this.onCancel.emit();\n }\n\n async ngOnInit() {\n this.setNotIncludedInGroupQuery();\n }\n\n setNotIncludedInGroupQuery() {\n const notIncludedInGroupQuery = { __not: { __bygroupid: this.currentGroupId } };\n this.baseQuery = notIncludedInGroupQuery;\n }\n\n async assignDevices() {\n this.pendingStatus = true;\n\n try {\n await this.assignDevicesService.assignDevices(this.currentGroupId, this.selected);\n this.refresh.emit();\n this.alert.success(gettext('Child devices assigned to the group.'));\n } catch (error) {\n this.alert.danger(gettext('Could not assign child devices to the group'), error);\n }\n this.pendingStatus = false;\n this.selected = [];\n this.onCancel.emit();\n }\n\n onSelected(selectedDevicesIDs: string[]) {\n this.selected = selectedDevicesIDs;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, gettext, HOOK_ONCE_ROUTE, ViewContext } from '@c8y/ngx-components';\nimport { DeviceGridModule } from '@c8y/ngx-components/device-grid';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { AddGroupModule } from './add-group/add-group.module';\nimport { AssetTypeCellRendererComponent } from './columns/asset-type.cell-renderer.component';\nimport { DeleteAssetsModalComponent } from './delete-assets-modal/delete-assets-modal.component';\nimport { GroupInfoComponent } from './group-info.component';\nimport { GroupsComponent } from './groups.component';\nimport { SubAssetsGridComponent } from './sub-assets-grid.component';\nimport { SubAssetsComponent } from './sub-assets.component';\nimport { SubAssetsService } from './sub-assets.service';\nimport { UnassignModalComponent } from './unassign-assets-modal/unassign-modal.component';\nimport { AssignDevicesComponent } from './assign-devices/assign-devices.component';\nimport { AssignChildDevicesComponent } from './assign-devices/assign-child-devices.component';\nimport { AssignDevicesService } from './assign-devices/assign-devices.service';\n\n@NgModule({\n declarations: [\n SubAssetsComponent,\n SubAssetsGridComponent,\n AssetTypeCellRendererComponent,\n GroupsComponent,\n GroupInfoComponent,\n DeleteAssetsModalComponent,\n UnassignModalComponent,\n AssignDevicesComponent,\n AssignChildDevicesComponent\n ],\n imports: [CoreModule, DeviceGridModule, AddGroupModule, PopoverModule],\n entryComponents: [\n SubAssetsComponent,\n AssetTypeCellRendererComponent,\n GroupsComponent,\n DeleteAssetsModalComponent,\n UnassignModalComponent\n ],\n exports: [],\n providers: [\n {\n provide: HOOK_ONCE_ROUTE,\n useValue: [\n {\n context: ViewContext.Group,\n path: 'subassets',\n priority: 1000,\n icon: 'c8y-group-open',\n label: gettext('Subassets'),\n component: SubAssetsComponent\n },\n {\n path: 'group',\n component: GroupsComponent\n }\n ],\n multi: true\n },\n SubAssetsService,\n AssignDevicesService\n ]\n})\nexport class SubAssetsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {AddGroupComponent as ɵf} from './add-group/add-group.component';\nexport {AddGroupModule as ɵe} from './add-group/add-group.module';\nexport {AddGroupService as ɵg} from './add-group/add-group.service';\nexport {AssignDevicesService as ɵd} from './assign-devices/assign-devices.service';\nexport {AssetTypeCellRendererComponent as ɵa} from './columns/asset-type.cell-renderer.component';\nexport {DeleteAssetsModalComponent as ɵb} from './delete-assets-modal/delete-assets-modal.component';\nexport {UnassignModalComponent as ɵc} from './unassign-assets-modal/unassign-modal.component';"],"names":["tslib_1.__decorate"],"mappings":";;;;;;;;;;;;;IAOa,8BAA8B,GAA3C,MAAa,8BAA8B;IAKzC,YACS,OAA4B,EAC3B,kBAAsC;QADvC,YAAO,GAAP,OAAO,CAAqB;QAC3B,uBAAkB,GAAlB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;SAC5B;QACD,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,CAAC;QACtE,eAAe,EAAE;YACf,kBAAkB;YAClB,8BAA8B;YAC9B,eAAe;YACf,0BAA0B;YAC1B,sBAAsB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,eAAe;gBACxB,QAAQ,MAaP;gBACD,KAAK,EAAE,IAAI;aACZ;YACD,gBAAgB;YAChB,oBAAoB;SACrB;KACF,CAAC;GACW,eAAe,CAAG;;AC7D/B;;GAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-sub-assets.js","sources":["ng://@c8y/ngx-components/sub-assets/columns/asset-type.cell-renderer.component.ts","ng://@c8y/ngx-components/sub-assets/columns/asset-type-grid-column.ts","ng://@c8y/ngx-components/sub-assets/sub-assets.service.ts","ng://@c8y/ngx-components/sub-assets/group-info.component.ts","ng://@c8y/ngx-components/sub-assets/sub-assets.component.ts","ng://@c8y/ngx-components/sub-assets/delete-assets-modal/delete-assets-modal.component.ts","ng://@c8y/ngx-components/sub-assets/unassign-assets-modal/unassign-modal.component.ts","ng://@c8y/ngx-components/sub-assets/sub-assets-grid.component.ts","ng://@c8y/ngx-components/sub-assets/add-group/add-group.service.ts","ng://@c8y/ngx-components/sub-assets/add-group/add-group.component.ts","ng://@c8y/ngx-components/sub-assets/add-group/add-group.module.ts","ng://@c8y/ngx-components/sub-assets/groups.component.ts","ng://@c8y/ngx-components/sub-assets/assign-devices/assign-devices.service.ts","ng://@c8y/ngx-components/sub-assets/assign-devices/assign-devices.component.ts","ng://@c8y/ngx-components/sub-assets/assign-devices/assign-child-devices.component.ts","ng://@c8y/ngx-components/sub-assets/sub-assets.module.ts","ng://@c8y/ngx-components/sub-assets/c8y-ngx-components-sub-assets.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { CellRendererContext, gettext } from '@c8y/ngx-components';\nimport { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\n\n@Component({\n templateUrl: './asset-type.cell-renderer.component.html'\n})\nexport class AssetTypeCellRendererComponent implements OnInit {\n groupIcon: string;\n isAnyGroup: boolean;\n isDevice: boolean;\n iconTitle: string;\n constructor(\n public context: CellRendererContext,\n private deviceGroupService: DeviceGroupService\n ) {}\n\n ngOnInit() {\n this.isAnyGroup = this.deviceGroupService.isAnyGroup(this.context.item);\n this.isDevice = this.deviceGroupService.isDevice(this.context.item);\n this.groupIcon = this.deviceGroupService.icon(this.context.item);\n this.iconTitle = this.getIconTitle(this.groupIcon);\n }\n\n private getIconTitle(icon: string) {\n switch (icon) {\n case 'c8y-group':\n return gettext('Group');\n case 'c8y-group-smart':\n return gettext('Smart group');\n case 'c8y-group-remote-inactive':\n return 'Inactive remote group';\n case 'c8y-group-remote':\n return gettext('Remote group');\n default:\n return gettext('Child device');\n }\n }\n}\n","import { gettext, ColumnDataType, ColumnConfig } from '@c8y/ngx-components';\nimport { AssetTypeCellRendererComponent } from './asset-type.cell-renderer.component';\nimport { BaseDeviceGridColumn } from '@c8y/ngx-components/device-grid';\n\nexport class AssetTypeGridColumn extends BaseDeviceGridColumn {\n constructor(initialColumnConfig?: ColumnConfig) {\n super(initialColumnConfig);\n this.name = 'type';\n this.header = gettext('Type');\n this.dataType = ColumnDataType.Icon;\n this.cellRendererComponent = AssetTypeCellRendererComponent;\n this.sortable = true;\n this.sortingConfig = {\n pathSortingConfigs: [{ path: `c8y_IsDeviceGroup` }]\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n IManagedObject,\n InventoryService,\n IRule,\n QueriesUtil,\n SmartGroupsService,\n SmartRulesService,\n UserService\n} from '@c8y/client';\nimport {\n ActionControl,\n AlertService,\n AppStateService,\n BulkActionControl,\n gettext,\n Pagination,\n Permissions\n} from '@c8y/ngx-components';\nimport { AssetNodeService, DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\nimport {\n AlarmsDeviceGridColumn,\n DeviceGridColumn,\n DeviceGridService,\n ImeiDeviceGridColumn,\n ModelDeviceGridColumn,\n NameDeviceGridColumn,\n RegistrationDateDeviceGridColumn,\n SerialNumberDeviceGridColumn,\n SystemIdDeviceGridColumn\n} from '@c8y/ngx-components/device-grid';\nimport { TranslateService } from '@ngx-translate/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { AssetTypeGridColumn } from './columns/asset-type-grid-column';\n\n@Injectable()\nexport class SubAssetsService extends DeviceGridService {\n queriesUtil: QueriesUtil;\n uiOnlyCountersUpdate = new BehaviorSubject(null);\n protected GRID_CONFIG_DEFAULT_STORAGE_KEY = 'sub-assets-grid-config';\n private IS_DEVICE_GROUP_FRAGMENT = 'c8y_IsDeviceGroup';\n private IS_DYNAMIC_GROUP_FRAGMENT = 'c8y_IsDynamicGroup';\n\n constructor(\n protected translateService: TranslateService,\n protected inventoryService: InventoryService,\n protected appState: AppStateService,\n protected user: UserService,\n protected assetNodeService: AssetNodeService,\n protected deviceGroupService: DeviceGroupService,\n protected smartGroupsService: SmartGroupsService,\n protected smartRulesService: SmartRulesService,\n protected alertService: AlertService,\n protected permissionsService: Permissions\n ) {\n super(inventoryService, translateService);\n }\n\n getDefaultColumns(filterable: boolean = true, sortable: boolean = true): DeviceGridColumn[] {\n const defaultColumns = [\n new AssetTypeGridColumn({ sortOrder: 'desc' }),\n new NameDeviceGridColumn({ sortOrder: 'asc' }),\n new ModelDeviceGridColumn(),\n new SerialNumberDeviceGridColumn({ visible: false }),\n new RegistrationDateDeviceGridColumn({ visible: false }),\n new SystemIdDeviceGridColumn({ visible: false }),\n new ImeiDeviceGridColumn({ visible: false }),\n new AlarmsDeviceGridColumn()\n ];\n return defaultColumns;\n }\n\n getDefaultPagination(): Pagination {\n const { pagination } = this.getConfig();\n return {\n pageSize: pagination.pageSize,\n currentPage: 1\n };\n }\n\n getDefaultActionControls(): ActionControl[] {\n return [];\n }\n\n async unassignAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const { id: assetId } = asset;\n const { id: parentId } = parentRef;\n\n if (this.isDevice(asset)) {\n try {\n await this.inventoryService.childAssetsRemove(assetId, parentId);\n const alertMessage = this.translateService.instant(gettext('Asset unassigned.'));\n this.alertService.success(alertMessage);\n } catch (error) {\n const alertMessage = this.translateService.instant(gettext('Could not unassign devices.'));\n this.alertService.danger(alertMessage);\n }\n await this.deactivateSmartrulesForAsset(asset, parentRef);\n }\n }\n\n isDevice(asset: IManagedObject): boolean {\n return (\n !asset.hasOwnProperty(this.IS_DEVICE_GROUP_FRAGMENT) &&\n !asset.hasOwnProperty(this.IS_DYNAMIC_GROUP_FRAGMENT)\n );\n }\n\n async deleteAsset(asset: IManagedObject, parentRef: IManagedObject, params = {}) {\n const isGroup =\n asset.hasOwnProperty(this.IS_DEVICE_GROUP_FRAGMENT) ||\n this.smartGroupsService.isSmartGroup(asset);\n\n if (isGroup) {\n await this.deleteGroup(asset, params);\n } else {\n await this.deleteDevice(asset, params);\n }\n\n if (\n parentRef &&\n !this.smartGroupsService.isSmartGroup(asset) &&\n !this.smartGroupsService.isSmartGroupV2(asset)\n ) {\n await this.deactivateSmartrulesForAsset(asset, parentRef);\n }\n }\n\n shouldShowWithDeviceUserCheckbox(asset: IManagedObject): boolean {\n const { owner, c8y_IsDevice: isRootDevice } = asset;\n const hasDeviceUserAsOwner = asset.owner && this.isDeviceUser(owner);\n\n return Boolean(isRootDevice && hasDeviceUserAsOwner);\n }\n\n getDefaultBulkActionControls(): BulkActionControl[] {\n return [];\n }\n\n async getData(\n columns: DeviceGridColumn[],\n pagination: Pagination,\n parentReference: IManagedObject,\n baseQuery: any = {}\n ) {\n const isRoot = !parentReference;\n if (isRoot) {\n const query = this.buildCombinedRootQueryFilter(columns, pagination);\n return this.assetNodeService.getRootNodes({ ...pagination, query });\n }\n const filters = {\n ...this.getAssetsFilters(columns, pagination, baseQuery),\n withParents: false\n };\n if (this.deviceGroupService.isGroup(parentReference)) {\n return this.assetNodeService.getGroupItems(parentReference.id, filters);\n }\n if (this.deviceGroupService.isDynamicGroup(parentReference)) {\n return this.assetNodeService.getDynamicGroupItems(\n parentReference.c8y_DeviceQueryString,\n filters\n );\n }\n if (this.deviceGroupService.isDevice(parentReference)) {\n return this.assetNodeService.getDeviceChildren(parentReference.id, filters);\n }\n }\n\n async getCount(\n columns: DeviceGridColumn[],\n pagination: Pagination,\n parentReference: IManagedObject,\n baseQuery: any = {}\n ): Promise<number> {\n const defaultFilters = {\n pageSize: 1,\n withChildren: false\n };\n const filters = !parentReference\n ? {\n query: this.buildCombinedRootQueryFilter(columns, pagination),\n ...defaultFilters\n }\n : {\n ...this.getAssetsFilters(columns, pagination, baseQuery),\n ...defaultFilters\n };\n return this.getAssetsStatistics(parentReference, filters);\n }\n\n getTotal(parentReference: IManagedObject, baseQuery: any = {}): Promise<number> {\n const queryFilter = this.assetNodeService.rootQueryFilter();\n const query = !parentReference\n ? this.queriesUtil.addAndFilter(queryFilter, baseQuery)\n : baseQuery;\n const filters = {\n query: this.queriesUtil.buildQuery(query),\n withChildren: false,\n withTotalPages: true,\n pageSize: 1\n };\n return this.getAssetsStatistics(parentReference, filters);\n }\n\n canEditGroup(group: IManagedObject) {\n const currentUser = this.appState.currentUser.value;\n const hasAdminRole = this.user.hasAnyRole(currentUser, ['ROLE_INVENTORY_ADMIN']);\n const isOwner = group.owner === currentUser.userName;\n return hasAdminRole || isOwner;\n }\n\n canEditSmartGroup(): boolean {\n const SMART_GROUPS_ROLES_EDIT = ['ROLE_SMARTGROUP_UPDATE', 'ROLE_SMARTGROUP_ADMIN'];\n return this.permissionsService.hasAnyRole(SMART_GROUPS_ROLES_EDIT);\n }\n\n canDeleteSmartGroup(): boolean {\n const SMART_GROUPS_ROLES_DELETE = ['ROLE_SMARTGROUP_ADMIN', 'ROLE_INVENTORY_ADMIN'];\n return this.permissionsService.hasAnyRole(SMART_GROUPS_ROLES_DELETE);\n }\n\n isSmartGroup(group: IManagedObject): boolean {\n return this.smartGroupsService.isSmartGroup(group) || this.smartGroupsService.isSmartGroupV2(group);\n }\n\n isUsingInventoryRoles() {\n const currentUser = this.appState.currentUser.value;\n const hasAnyInventoryRole = this.user.hasAnyRole(currentUser, [\n 'ROLE_INVENTORY_ADMIN',\n 'ROLE_INVENTORY_READ',\n 'ROLE_INVENTORY_CREATE'\n ]);\n return !hasAnyInventoryRole;\n }\n\n protected async getAssetsStatistics(\n parentReference: IManagedObject,\n filters: object\n ): Promise<number> {\n const isRoot = !parentReference;\n if (isRoot) {\n return (await this.assetNodeService.getRootNodes(filters)).paging.totalPages;\n }\n if (this.deviceGroupService.isGroup(parentReference)) {\n return (await this.assetNodeService.getGroupItems(parentReference.id, filters)).paging\n .totalPages;\n }\n if (this.deviceGroupService.isDynamicGroup(parentReference)) {\n return (await this.assetNodeService.getDynamicGroupItems(\n parentReference.c8y_DeviceQueryString,\n filters\n )).paging.totalPages;\n }\n if (this.deviceGroupService.isDevice(parentReference)) {\n return (await this.assetNodeService.getDeviceChildren(parentReference.id, filters)).paging\n .totalPages;\n }\n }\n\n protected buildCombinedRootQueryFilter(columns, pagination) {\n const queryFilter = this.assetNodeService.rootQueryFilter();\n const userQuery = this.getQueryObj(columns, pagination);\n\n const queryPart = this.queriesUtil.addOrderbys(queryFilter, userQuery.__orderby, 'append');\n const fullQuery = this.queriesUtil.addAndFilter(queryPart, userQuery.__filter);\n return this.queriesUtil.buildQuery(fullQuery);\n }\n\n private async deleteGroup(group: IManagedObject, params: any = {}) {\n const { cascade } = params;\n\n try {\n this.smartGroupsService.isSmartGroup(group) || this.smartGroupsService.isSmartGroupV2(group)\n ? await this.smartGroupsService.delete(group, { cascade })\n : await this.inventoryService.delete(group, { cascade });\n\n const alertMessage = this.translateService.instant(gettext('Asset deleted.'));\n this.alertService.success(alertMessage);\n } catch (error) {\n const alertMessage = this.translateService.instant(gettext('Could not delete asset.'));\n this.alertService.danger(alertMessage);\n }\n }\n\n private async deleteDevice(device: IManagedObject, params: any = {}) {\n const { cascade, withDeviceUser } = params;\n try {\n const { owner } = device;\n const shouldRemoveOwner = withDeviceUser && owner && this.isDeviceUser(owner);\n\n shouldRemoveOwner\n ? await this.deleteDeviceWithUser(device, cascade)\n : await this.inventoryService.delete(device, { cascade });\n\n const alertMessage = this.translateService.instant(gettext('Asset deleted.'));\n this.alertService.success(alertMessage);\n } catch (error) {\n const alertMessage = this.translateService.instant(gettext('Could not delete asset.'));\n this.alertService.danger(alertMessage);\n }\n }\n\n private async deactivateSmartrulesForAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const { id: assetId } = asset;\n const { id: parentId } = parentRef;\n const rules: IRule[] = (await this.smartRulesService.listByContext(parentId)).data;\n\n const upateSmartrulesPromises = rules.map(rule =>\n this.smartRulesService.bulkDeactivateEnabledSources(rule, [assetId])\n );\n\n try {\n await Promise.all(upateSmartrulesPromises);\n } catch (error) {\n const alertMessage = this.translateService.instant(\n gettext('Could not deactivate smart rules.')\n );\n this.alertService.danger(alertMessage);\n }\n }\n\n private isDeviceUser(userId: string) {\n return userId.match(/^device_/);\n }\n\n private async deleteDeviceWithUser(device: IManagedObject, cascade: boolean) {\n const params = { cascade, withDeviceUser: true };\n try {\n return await this.inventoryService.delete(device, params);\n } catch (error) {\n return await this.inventoryService.delete(device, { cascade });\n }\n }\n\n private getAssetsFilters(columns: DeviceGridColumn[], pagination: Pagination, baseQuery) {\n const query = this.queriesUtil.addAndFilter(this.getQueryObj(columns), baseQuery);\n return {\n query: this.queriesUtil.buildQuery(query),\n pageSize: pagination.pageSize || this.DEFAULT_PAGE_SIZE,\n currentPage: pagination.currentPage,\n withTotalPages: true\n };\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { IManagedObject, InventoryService, SmartGroupsService } from '@c8y/client';\nimport { AlertService, gettext, ModalService, Status } from '@c8y/ngx-components';\nimport { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\nimport { TranslateService } from '@ngx-translate/core';\nimport { SubAssetsService } from './sub-assets.service';\n\n@Component({\n selector: 'c8y-group-info',\n templateUrl: './group-info.component.html'\n})\nexport class GroupInfoComponent {\n @Input() group: IManagedObject;\n @Output() onGroupChange = new EventEmitter();\n canEdit: boolean;\n groupIcon: string;\n smartGroupFilter: string;\n filterHintMsg: string;\n\n private filterMsg = gettext(\n 'Smart groups are groups dynamically constructed based on filtering criteria.'\n );\n private canEditMsg = gettext('You can edit the filter here.');\n private readonly GROUP_UPDATED_MSG = gettext('Group updated.');\n constructor(\n private inventory: InventoryService,\n private subAssetsService: SubAssetsService,\n private deviceGroupService: DeviceGroupService,\n private smartGroupsService: SmartGroupsService,\n private alertService: AlertService,\n private translate: TranslateService,\n private modalService: ModalService\n ) {}\n\n ngOnInit() {\n this.canEdit = this.smartGroupsService.isSmartGroupV2(this.group)\n ? this.subAssetsService.canEditSmartGroup()\n : this.subAssetsService.canEditGroup(this.group);\n this.groupIcon = this.deviceGroupService.icon(this.group);\n this.smartGroupFilter = this.group.c8y_DeviceQueryString;\n\n this.setHintMsg();\n }\n\n isSmartGroup() {\n return this.subAssetsService.isSmartGroup(this.group);\n }\n\n async update(partialGroup: Partial<IManagedObject>) {\n try {\n const isSmartGroup: boolean = this.subAssetsService.isSmartGroup(this.group);\n isSmartGroup\n ? await this.updateSmartGroup(partialGroup)\n : await this.updateGroup(partialGroup);\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n private setHintMsg() {\n const filterMsgTranslated = this.translate.instant(this.filterMsg);\n const canEditMsgTranslated = this.translate.instant(this.canEditMsg);\n this.filterHintMsg = this.canEdit\n ? `${filterMsgTranslated} ${canEditMsgTranslated}`\n : this.filterMsg;\n }\n\n private async updateGroup(partialGroup: Partial<IManagedObject>) {\n const { id } = this.group;\n const group: Partial<IManagedObject> = { id, ...partialGroup };\n\n const updatedGroup = (await this.inventory.update(group)).data;\n this.setGroup(updatedGroup);\n }\n\n private async updateSmartGroup(partialGroup: Partial<IManagedObject>) {\n const { id } = this.group;\n const { c8y_DeviceQueryString } = partialGroup;\n const group: Partial<IManagedObject> = { id, ...partialGroup };\n let updatedGroup: IManagedObject;\n\n if (!c8y_DeviceQueryString) {\n updatedGroup = (await this.smartGroupsService.update(group)).data;\n this.setGroup(updatedGroup);\n return;\n }\n\n try {\n const modalBody = gettext(\n 'You are about to change the smart group filter. Do you want to proceed?'\n );\n const title = gettext('Smart group filter');\n await this.modalService.confirm(title, modalBody, Status.WARNING, {\n ok: gettext('Save'),\n cancel: gettext('Cancel')\n });\n\n if (!(await this.isQueryExecutable(c8y_DeviceQueryString))) {\n return;\n }\n } catch (e) {\n return;\n }\n updatedGroup = (await this.smartGroupsService.update(group)).data;\n this.setGroup(updatedGroup);\n }\n\n private setGroup(group: IManagedObject) {\n this.onGroupChange.emit(group);\n this.alertService.success(this.GROUP_UPDATED_MSG);\n }\n\n private async isQueryExecutable(query: string): Promise<boolean> {\n try {\n const filter = { q: query };\n await this.inventory.list(filter);\n return true;\n } catch (error) {\n this.alertService.addServerFailure(error);\n return false;\n }\n }\n}\n","import { Component, EventEmitter, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IIdentified, IManagedObject } from '@c8y/client';\nimport { DisplayOptions } from '@c8y/ngx-components';\nimport { DeviceGroupService } from '@c8y/ngx-components/assets-navigator';\nimport { Subscription } from 'rxjs';\nimport { SubAssetsService } from './sub-assets.service';\n\n@Component({\n selector: 'c8y-sub-assets',\n templateUrl: './sub-assets.component.html'\n})\nexport class SubAssetsComponent implements OnInit, OnDestroy {\n currentGroupId: IIdentified;\n showChildrenForDevice: IManagedObject;\n title: string;\n toggle: boolean = false;\n showAddGroup: boolean = false;\n showAssignDevices: boolean = false;\n requestInProgress: boolean;\n group: IManagedObject;\n showAssignChildDevices: boolean = false;\n refresh: EventEmitter<any> = new EventEmitter();\n filterable: boolean = true;\n displayOptions: DisplayOptions;\n private dataSub: Subscription;\n\n constructor(\n private route: ActivatedRoute,\n private deviceGroupService: DeviceGroupService,\n private subAssetsService: SubAssetsService\n ) {\n this.dataSub = this.route.parent.data.subscribe(({ contextData }) => {\n this.title = contextData.name;\n this.currentGroupId = contextData.id;\n this.group = contextData;\n this.filterable = !this.deviceGroupService.isDynamicGroup(contextData);\n });\n }\n\n ngOnInit(): void {\n this.displayOptions = {\n striped: true,\n bordered: false,\n gridHeader: true,\n filter: !this.isSmartGroup()\n };\n }\n\n groupChange(group: IManagedObject): void {\n /**\n * Group is cached in the context-route guard. To avoid loading old data (when switching tabs) we need to update\n * this object in the cache.\n */\n Object.assign(this.group, group);\n this.title = group.name;\n this.refresh.emit();\n }\n\n isSmartGroup() {\n return this.subAssetsService.isSmartGroup(this.group);\n }\n\n ngOnDestroy(): void {\n if (this.dataSub) {\n this.dataSub.unsubscribe();\n }\n }\n}\n","import { Component, Input, ViewChild } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport {\n ConfirmModalComponent,\n gettext,\n ModalLabels,\n Status,\n StatusType\n} from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport { DeleteModalCheckboxes } from './delete-assets-modal.model';\n\n@Component({\n selector: 'c8y-delete-assets-modal',\n templateUrl: './delete-assets-modal.component.html'\n})\nexport class DeleteAssetsModalComponent {\n @Input() showWithCascadeCheckbox: boolean = true;\n @Input() showWithDeviceUserCheckbox: boolean = false;\n @Input() asset: IManagedObject;\n @ViewChild('modalRef', { static: false }) modalRef: ConfirmModalComponent;\n closeSubject: Subject<DeleteModalCheckboxes> = new Subject();\n labels: ModalLabels = { ok: gettext('Delete'), cancel: gettext('Cancel') };\n title = gettext('Delete asset');\n status: StatusType = Status.DANGER;\n config: DeleteModalCheckboxes = {\n cascade: false,\n withDeviceUser: false\n };\n message: string;\n\n constructor(private translateService: TranslateService) {}\n\n ngOnInit() {\n this.message = this.translateService.instant(\n gettext(\n 'You are about to delete asset: \"{{name}}\". This operation is irreversible. Do you want to proceed?'\n ),\n { name: this.asset.name }\n );\n }\n\n async ngAfterViewInit() {\n try {\n await this.modalRef.result;\n this.onClose();\n } catch (error) {\n this.onDismiss();\n }\n }\n\n onClose() {\n this.closeSubject.next(this.config);\n this.closeSubject.complete();\n }\n\n onDismiss() {\n this.closeSubject.complete();\n }\n}\n","import { Component, Input, ViewChild } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport {\n ConfirmModalComponent,\n gettext,\n ModalLabels,\n Status,\n StatusType\n} from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\n@Component({\n selector: 'c8y-unassign-modal',\n templateUrl: './unassign-modal.component.html'\n})\nexport class UnassignModalComponent {\n @Input() asset: IManagedObject;\n @ViewChild('modalRef', { static: false }) modalRef: ConfirmModalComponent;\n message: string;\n closeSubject: Subject<boolean> = new Subject();\n labels: ModalLabels = { ok: gettext('Unassign'), cancel: gettext('Cancel') };\n title = gettext('Unassign devices');\n status: StatusType = Status.WARNING;\n\n constructor(private translateService: TranslateService) {}\n\n ngOnInit() {\n this.message = this.translateService.instant(\n gettext('You are about to unassign asset: \"{{name}}\" . Do you want to proceed?'),\n { name: this.asset.name }\n );\n }\n\n async ngAfterViewInit() {\n try {\n await this.modalRef.result;\n this.onClose();\n } catch (error) {\n this.onDismiss();\n }\n }\n\n onClose() {\n this.closeSubject.next(true);\n this.closeSubject.complete();\n }\n\n onDismiss() {\n this.closeSubject.complete();\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport { IManagedObject, SmartGroupsService } from '@c8y/client';\nimport {\n ActionControl,\n BuiltInActionType,\n BulkActionControl,\n DataGridComponent,\n DataSourceModifier,\n DisplayOptions,\n gettext,\n Pagination,\n Row,\n ServerSideDataResult\n} from '@c8y/ngx-components';\nimport { DeviceGridColumn } from '@c8y/ngx-components/device-grid';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { DeleteModalCheckboxes } from './delete-assets-modal';\nimport { DeleteAssetsModalComponent } from './delete-assets-modal/delete-assets-modal.component';\nimport { SubAssetsService } from './sub-assets.service';\nimport { UnassignModalComponent } from './unassign-assets-modal/unassign-modal.component';\n@Component({\n selector: 'c8y-sub-assets-grid',\n templateUrl: './sub-assets-grid.component.html'\n})\nexport class SubAssetsGridComponent implements OnInit {\n @Input('parent-group') parentGroup: IManagedObject;\n @Input() refresh: EventEmitter<any>;\n @Input() title: string = gettext('Subassets');\n @Input() emptyStateText: string = gettext(\n 'Add your first group or assign devices using the buttons on the toolbar.'\n );\n @Input() loadingItemsLabel: string = gettext('Loading assets…');\n\n get columns() {\n return this._columns;\n }\n @Input() set columns(value: DeviceGridColumn[]) {\n if (value) {\n this._columns = this.subAssetsGridService.getUserConfiguredColumns(value);\n } else {\n this._columns = this.subAssetsGridService.getUserConfiguredColumns(\n this.subAssetsGridService.getDefaultColumns()\n );\n }\n }\n @Input('pagination') set _pagination(value: Pagination) {\n if (value) {\n this.pagination = value;\n } else {\n this.pagination = this.subAssetsGridService.getDefaultPagination();\n }\n }\n @Input('actionControls') set _actionControls(value: ActionControl[]) {\n if (value) {\n this.actionControls = value;\n } else {\n this.actionControls = this.subAssetsGridService.getDefaultActionControls();\n }\n }\n @Input() selectable: boolean = false;\n @Input() baseQuery: any = {};\n @Input('bulkActionControls') set _bulkActionControls(value: BulkActionControl[]) {\n if (value) {\n this.bulkActionControls = value;\n } else {\n this.bulkActionControls = this.subAssetsGridService.getDefaultBulkActionControls();\n }\n }\n @Input() filterable: boolean = true;\n @Input() sortable: boolean = true;\n @Output() onColumnsChange: EventEmitter<DeviceGridColumn[]> = new EventEmitter<\n DeviceGridColumn[]\n >();\n @Output() itemsSelect: EventEmitter<string[]> = new EventEmitter<string[]>();\n\n pagination: Pagination = this.subAssetsGridService.getDefaultPagination();\n actionControls: ActionControl[];\n bulkActionControls: BulkActionControl[] = this.subAssetsGridService.getDefaultBulkActionControls();\n serverSideDataCallback: any;\n\n @ViewChild(DataGridComponent, { static: true })\n dataGrid: DataGridComponent;\n\n displayOptions: DisplayOptions = {\n striped: true,\n bordered: false,\n gridHeader: true,\n filter: true\n };\n\n private _columns: DeviceGridColumn[];\n\n get isRootGroup() {\n return !this.parentGroup;\n }\n\n get getInfiniteScrollMode() {\n return this.isRootGroup && this.subAssetsGridService.isUsingInventoryRoles()\n ? 'auto'\n : undefined;\n }\n\n @Input('displayOptions')\n set _displayOptions(displayOptions) {\n this.displayOptions = { ...this.displayOptions, ...displayOptions };\n }\n\n constructor(\n public subAssetsGridService: SubAssetsService,\n private bsModalService: BsModalService,\n private smartGroupsService: SmartGroupsService\n ) {\n this.serverSideDataCallback = this.onDataSourceModifier.bind(this);\n }\n\n ngOnInit() {\n this.columns = this.subAssetsGridService.getDefaultColumns(this.filterable, this.sortable);\n if (!this.filterable || !this.sortable) {\n this.columns.forEach(column => {\n column.filterable = this.filterable;\n column.sortable = this.sortable;\n });\n }\n this.setActionControls();\n }\n\n async setActionControls() {\n const actionControls: ActionControl[] = [];\n const {\n data: isMicroserviceInstalled\n } = await this.smartGroupsService.isSmartGroupsV2MicroserviceInstalled();\n\n const deleteAction: ActionControl = {\n type: BuiltInActionType.Delete,\n callback: (asset: Row) => this.onDeleteAsset(asset as IManagedObject, this.parentGroup),\n showIf: (asset: Row) => {\n if (this.smartGroupsService.isSmartGroupV2(asset as IManagedObject)) {\n return isMicroserviceInstalled ? this.subAssetsGridService.canDeleteSmartGroup() : false;\n }\n\n if (this.smartGroupsService.isSmartGroup(asset as IManagedObject)) {\n return this.subAssetsGridService.canDeleteSmartGroup();\n }\n\n return true;\n }\n };\n\n actionControls.push(deleteAction);\n\n const unassignAction: ActionControl = {\n type: 'UNASSIGN',\n icon: 'unlink',\n text: gettext('Unassign'),\n callback: (asset: Row) => this.onUnassignAsset(asset as IManagedObject, this.parentGroup),\n showIf: (asset: Row) =>\n this.subAssetsGridService.isDevice(asset as IManagedObject) &&\n !this.subAssetsGridService.isSmartGroup(this.parentGroup as IManagedObject)\n };\n\n actionControls.push(unassignAction);\n\n if (!this.actionControls) {\n this.actionControls = actionControls;\n }\n }\n\n onUnassignAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const initialState = {\n asset\n };\n const modalRef = this.bsModalService.show(UnassignModalComponent, { initialState });\n\n modalRef.content.closeSubject.subscribe(async (result: boolean) => {\n if (result) {\n await this.subAssetsGridService.unassignAsset(asset, parentRef);\n this.refresh.emit();\n }\n });\n }\n\n async onDeleteAsset(asset: IManagedObject, parentRef: IManagedObject) {\n const initialState = {\n showWithDeviceUserCheckbox: this.subAssetsGridService.shouldShowWithDeviceUserCheckbox(asset),\n asset,\n showWithCascadeCheckbox:\n !this.smartGroupsService.isSmartGroup(asset) &&\n !this.smartGroupsService.isSmartGroupV2(asset)\n };\n\n const modalRef = this.bsModalService.show(DeleteAssetsModalComponent, { initialState });\n\n modalRef.content.closeSubject.subscribe(async (result: DeleteModalCheckboxes) => {\n if (result) {\n this.subAssetsGridService.uiOnlyCountersUpdate.next('DECREASE');\n await this.subAssetsGridService.deleteAsset(asset, parentRef, result);\n this.refresh.emit();\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.parentGroup && !changes.parentGroup.firstChange) {\n this.dataGrid.reload();\n }\n }\n\n trackByName(_index, column: DeviceGridColumn): string {\n return column.name;\n }\n\n async onDataSourceModifier(\n dataSourceModifier: DataSourceModifier\n ): Promise<ServerSideDataResult> {\n const promises = [];\n let counters;\n\n promises.push(\n this.subAssetsGridService.getData(\n dataSourceModifier.columns,\n dataSourceModifier.pagination,\n this.parentGroup,\n this.baseQuery\n )\n );\n\n const action = this.subAssetsGridService.uiOnlyCountersUpdate.value;\n if (action) {\n counters = this.uiOnlyCountersUpdate(action);\n this.subAssetsGridService.uiOnlyCountersUpdate.next(null);\n } else {\n promises.push(this.subAssetsGridService.getTotal(this.parentGroup, this.baseQuery));\n promises.push(\n this.subAssetsGridService.getCount(\n dataSourceModifier.columns,\n dataSourceModifier.pagination,\n this.parentGroup,\n this.baseQuery\n )\n );\n }\n const [dataResponse, size, filteredSize] = await Promise.all(promises);\n if (!counters) {\n counters = {\n size,\n filteredSize\n };\n }\n this.onColumnsChange.emit(dataSourceModifier.columns);\n\n return {\n res: dataResponse.res,\n data: dataResponse.data,\n paging: dataResponse.paging,\n ...counters\n };\n }\n\n configChange(config) {\n this.subAssetsGridService.saveConfig(config);\n }\n\n // workaround since the totalPages value is cached on the BE\n private uiOnlyCountersUpdate(action: 'INCREASE' | 'DECREASE') {\n const currentAllItemsCount = this.dataGrid.filteringLabelsParams.allItemsCount;\n const currentFilteredItemsCount = this.dataGrid.filteringLabelsParams.filteredItemsCount;\n let counters;\n if (action === 'DECREASE') {\n counters = {\n size: currentAllItemsCount - 1,\n filteredSize: currentFilteredItemsCount - 1\n };\n }\n if (action === 'INCREASE') {\n counters = {\n size: currentAllItemsCount + 1,\n filteredSize: currentFilteredItemsCount + 1\n };\n }\n return counters;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { IIdentified, IManagedObject, InventoryService } from '@c8y/client';\nimport { GroupForm } from './add-group.model';\nimport { GroupFragment } from '@c8y/ngx-components/assets-navigator';\n\n@Injectable()\nexport class AddGroupService {\n private GROUP_FRAGMENT_TYPE = 'c8y_IsDeviceGroup';\n\n constructor(private inventoryService: InventoryService) {}\n\n async createGroupAndAssignDevices(\n groupForm: GroupForm,\n groupContextId: string | number,\n selectedDevices: string[]\n ): Promise<IManagedObject | IIdentified> {\n let group: IManagedObject | IIdentified;\n const { name, description } = groupForm;\n const newGroupMO = this.getGroupMO(name, description, groupContextId);\n\n if (groupContextId) {\n group = (await this.inventoryService.childAssetsCreate(newGroupMO, groupContextId)).data;\n } else {\n group = (await this.inventoryService.create(newGroupMO)).data;\n }\n\n if (selectedDevices.length > 0) {\n await this.assignDevices(group.id, selectedDevices);\n }\n\n return group;\n }\n\n private getGroupMO(\n name: string,\n description: string = '',\n groupContextId: string | number\n ): Partial<IManagedObject> {\n const group = {\n type: this.getGroupType(groupContextId),\n [this.GROUP_FRAGMENT_TYPE]: {},\n name,\n description\n };\n\n return group;\n }\n\n private getGroupType(\n groupContextId: string | number\n ): GroupFragment.subGroupType | GroupFragment.groupType {\n return groupContextId ? GroupFragment.subGroupType : GroupFragment.groupType;\n }\n\n private async assignDevices(id: string | number, selectedDevices: string[]) {\n const promises = [];\n\n selectedDevices.forEach(moId => {\n promises.push(this.inventoryService.childAssetsAdd(moId, id));\n });\n\n return await Promise.all(promises);\n }\n}\n","import {\n Component,\n Output,\n EventEmitter,\n ViewChild,\n Input,\n HostListener,\n ElementRef\n} from '@angular/core';\nimport { FormGroup, Validators, FormBuilder } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { DeviceGridService } from '@c8y/ngx-components/device-grid';\nimport { C8yStepper, Pagination, AlertService, gettext } from '@c8y/ngx-components';\nimport { AddGroupService } from './add-group.service';\nimport { SubAssetsService } from '../sub-assets.service';\n\n@Component({\n selector: 'c8y-add-group',\n templateUrl: './add-group.component.html'\n})\nexport class AddGroupComponent {\n @Input() currentGroupId: string;\n @Input() refresh = new EventEmitter<any>();\n @Output() onDeviceQueryStringChange: EventEmitter<string> = new EventEmitter<string>();\n @Output() onCancel = new EventEmitter<any>();\n @ViewChild(C8yStepper, { static: false })\n stepper: C8yStepper;\n @ViewChild('nameRef', { static: false })\n nameInputRef: ElementRef;\n deviceQueryStringOutput: string;\n formGroupStepOne: FormGroup;\n pendingStatus: boolean = false;\n pagination: Pagination = { pageSize: 20, currentPage: 1 };\n selected: string[] = [];\n subscription: Subscription;\n\n readonly ITEMS_SELECT_LIMIT: number = 15;\n readonly btnLabels = {\n next: gettext('Next'),\n cancel: gettext('Cancel'),\n create: gettext('Create')\n };\n\n private nameInput: HTMLInputElement;\n\n constructor(\n protected deviceGridService: DeviceGridService,\n private fb: FormBuilder,\n private addGroupService: AddGroupService,\n private alert: AlertService,\n private subAssetsService: SubAssetsService\n ) {}\n\n @HostListener('document:keydown.enter', ['$event']) onEnterKeyDown(event: KeyboardEvent) {\n // Order matters! Needs to be placed before this.stepper.next\n if (this.stepper.selectedIndex === 1) {\n this.createGroup();\n }\n this.stepper.next();\n }\n\n @HostListener('document:keydown.escape', ['$event']) onEscapeKeyDown(event: KeyboardEvent) {\n this.onCancel.emit();\n }\n\n @HostListener('document:keydown.backspace', ['$event']) onBackspaceKeyDown(event: KeyboardEvent) {\n this.stepper.previous();\n\n setTimeout(() => {\n this.setFocusOnNameInput();\n });\n }\n\n ngOnInit() {\n this.formGroupStepOne = this.fb.group({\n name: ['', Validators.required],\n description: ['']\n });\n this.subscription = this.onCancel.subscribe(() => this.resetStepper());\n }\n\n ngAfterViewInit() {\n this.nameInput = this.nameInputRef.nativeElement as HTMLInputElement;\n this.setFocusOnNameInput();\n }\n\n async createGroup() {\n this.pendingStatus = true;\n this.subAssetsService.uiOnlyCountersUpdate.next('INCREASE');\n await this.addGroupService.createGroupAndAssignDevices(\n this.formGroupStepOne.value,\n this.currentGroupId,\n this.selected\n );\n\n this.pendingStatus = false;\n this.resetStepper();\n this.alert.success(gettext('Group created.'));\n\n this.refresh.emit();\n this.onCancel.emit();\n }\n\n onSelected(selectedDevicesIDs: string[]) {\n this.selected = selectedDevicesIDs;\n }\n\n resetStepper() {\n this.stepper.reset();\n this.stepper.selectedIndex = 1;\n this.selected = [];\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n private setFocusOnNameInput() {\n if (this.nameInput) {\n this.nameInput.focus();\n this.nameInput.select();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, HOOK_ONCE_ROUTE } from '@c8y/ngx-components';\nimport { DeviceGridModule } from '@c8y/ngx-components/device-grid';\nimport { AddGroupComponent } from './add-group.component';\nimport { AddGroupService } from './add-group.service';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [AddGroupComponent],\n imports: [CoreModule, DeviceGridModule, FormsModule, ReactiveFormsModule],\n entryComponents: [AddGroupComponent],\n exports: [AddGroupComponent],\n providers: [\n {\n provide: HOOK_ONCE_ROUTE,\n useValue: [\n {\n path: 'add-group',\n component: AddGroupComponent\n }\n ],\n multi: true\n },\n AddGroupService\n ]\n})\nexport class AddGroupModule {}\n","import { Component, EventEmitter, OnInit } from '@angular/core';\nimport { Permissions } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-groups-name',\n templateUrl: './groups.component.html'\n})\nexport class GroupsComponent implements OnInit {\n refresh: EventEmitter<any> = new EventEmitter();\n showAddGroup = false;\n filterable: boolean = false;\n sortable: boolean = true;\n\n constructor(private permissions: Permissions) {}\n\n ngOnInit() {\n if (!this.permissions.hasRole('ROLE_INVENTORY_READ')) {\n this.sortable = false;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { InventoryService } from '@c8y/client';\n\n@Injectable()\nexport class AssignDevicesService {\n constructor(private inventoryService: InventoryService) {}\n\n async assignDevices(id: string | number, selectedDevices: string[]) {\n const promises = [];\n\n selectedDevices.forEach(moId => {\n promises.push(this.inventoryService.childAssetsAdd(moId, id));\n });\n\n return await Promise.all(promises);\n }\n}\n","import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';\nimport { Pagination, AlertService, gettext, ActionControl, Row } from '@c8y/ngx-components';\nimport { InventoryService } from '@c8y/client';\nimport { SubAssetsService } from '../sub-assets.service';\nimport { IManagedObject } from '@c8y/client';\nimport { QueriesUtil } from '@c8y/client';\nimport { AssignDevicesService } from './assign-devices.service';\n\n@Component({\n selector: 'c8y-assign-devices',\n templateUrl: './assign-devices.component.html'\n})\nexport class AssignDevicesComponent {\n @Input() currentGroupId: string;\n @Input() refresh = new EventEmitter<any>();\n @Output() onCancel = new EventEmitter<any>();\n @Output() onShowChildDevices = new EventEmitter<boolean>();\n @Output() selectedDevice = new EventEmitter<IManagedObject>();\n\n deviceQueryStringOutput: string;\n pendingStatus: boolean = false;\n pagination: Pagination = { pageSize: 20, currentPage: 1 };\n selected: string[] = [];\n baseQuery: any;\n canAssignDevice: boolean = false;\n actionControls: ActionControl[] = [];\n readonly isSelectable = true;\n readonly itemsSelectLimit = 15;\n private queriesUtil: QueriesUtil;\n\n constructor(private assignDevicesService: AssignDevicesService, private alert: AlertService) {\n this.queriesUtil = new QueriesUtil();\n }\n\n @HostListener('document:keydown.enter', ['$event']) onEnterKeyDown(event: KeyboardEvent) {\n if (this.selected.length > 0) {\n this.assignDevices();\n }\n }\n\n @HostListener('document:keydown.escape', ['$event']) onEscapeKeyDown(event: KeyboardEvent) {\n this.onCancel.emit();\n }\n\n ngOnInit() {\n this.setNotIncludedInGroupQuery();\n }\n\n setNotIncludedInGroupQuery() {\n const notIncludedInGroupQuery = { __not: { __bygroupid: this.currentGroupId } };\n this.baseQuery = notIncludedInGroupQuery;\n }\n\n setActionControls(showChildren: boolean) {\n const actionControls: ActionControl[] = [];\n const selectChildrenAction: ActionControl = {\n type: 'SELECT_CHILDREN',\n icon: 'enter-bottom',\n text: gettext('Select children'),\n callback: (asset: Row) => this.selectChildren(asset as IManagedObject),\n showIf: (asset: Row) =>\n asset.childDevices.references.length > 0\n };\n\n if (showChildren) {\n actionControls.push(selectChildrenAction);\n }\n this.actionControls = actionControls;\n this.refresh.emit();\n }\n\n async assignDevices() {\n this.pendingStatus = true;\n await this.assignDevicesService.assignDevices(this.currentGroupId, this.selected);\n this.pendingStatus = false;\n this.selected = [];\n\n this.onCancel.emit();\n this.refresh.emit();\n\n this.alert.success(gettext('Devices assigned to the group.'));\n }\n\n onSelected(selectedDevicesIDs: string[]) {\n this.selected = selectedDevicesIDs;\n }\n\n selectChildren(asset: IManagedObject) {\n this.onShowChildDevices.emit(true);\n this.selectedDevice.emit(asset);\n }\n}\n","import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';\nimport { AlertService, gettext } from '@c8y/ngx-components';\nimport { InventoryService } from '@c8y/client';\nimport { SubAssetsService } from '../sub-assets.service';\nimport { IManagedObject } from '@c8y/client';\nimport { AssignDevicesService } from './assign-devices.service';\n\n@Component({\n selector: 'c8y-assign-child-devices',\n templateUrl: './assign-child-devices.component.html'\n})\nexport class AssignChildDevicesComponent {\n @Input() currentGroupId: string;\n @Input() parentDevice: IManagedObject;\n @Output() onCancel = new EventEmitter<any>();\n @Input() refresh = new EventEmitter<any>();\n\n selected: string[] = [];\n baseQuery: any;\n pendingStatus: boolean = false;\n\n constructor(\n private alert: AlertService,\n private subAssetsService: SubAssetsService,\n private inventoryService: InventoryService,\n private assignDevicesService: AssignDevicesService\n ) {}\n\n @HostListener('document:keydown.enter', ['$event']) onEnterKeyDown(event: KeyboardEvent) {\n if (this.selected.length > 0) {\n this.assignDevices();\n }\n }\n\n @HostListener('document:keydown.escape', ['$event']) onEscapeKeyDown(event: KeyboardEvent) {\n this.onCancel.emit();\n }\n\n async ngOnInit() {\n this.setNotIncludedInGroupQuery();\n }\n\n setNotIncludedInGroupQuery() {\n const notIncludedInGroupQuery = { __not: { __bygroupid: this.currentGroupId } };\n this.baseQuery = notIncludedInGroupQuery;\n }\n\n async assignDevices() {\n this.pendingStatus = true;\n\n try {\n await this.assignDevicesService.assignDevices(this.currentGroupId, this.selected);\n this.refresh.emit();\n this.alert.success(gettext('Child devices assigned to the group.'));\n } catch (error) {\n this.alert.danger(gettext('Could not assign child devices to the group'), error);\n }\n this.pendingStatus = false;\n this.selected = [];\n this.onCancel.emit();\n }\n\n onSelected(selectedDevicesIDs: string[]) {\n this.selected = selectedDevicesIDs;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, gettext, HOOK_ONCE_ROUTE, ViewContext } from '@c8y/ngx-components';\nimport { DeviceGridModule } from '@c8y/ngx-components/device-grid';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { AddGroupModule } from './add-group/add-group.module';\nimport { AssetTypeCellRendererComponent } from './columns/asset-type.cell-renderer.component';\nimport { DeleteAssetsModalComponent } from './delete-assets-modal/delete-assets-modal.component';\nimport { GroupInfoComponent } from './group-info.component';\nimport { GroupsComponent } from './groups.component';\nimport { SubAssetsGridComponent } from './sub-assets-grid.component';\nimport { SubAssetsComponent } from './sub-assets.component';\nimport { SubAssetsService } from './sub-assets.service';\nimport { UnassignModalComponent } from './unassign-assets-modal/unassign-modal.component';\nimport { AssignDevicesComponent } from './assign-devices/assign-devices.component';\nimport { AssignChildDevicesComponent } from './assign-devices/assign-child-devices.component';\nimport { AssignDevicesService } from './assign-devices/assign-devices.service';\n\n@NgModule({\n declarations: [\n SubAssetsComponent,\n SubAssetsGridComponent,\n AssetTypeCellRendererComponent,\n GroupsComponent,\n GroupInfoComponent,\n DeleteAssetsModalComponent,\n UnassignModalComponent,\n AssignDevicesComponent,\n AssignChildDevicesComponent\n ],\n imports: [CoreModule, DeviceGridModule, AddGroupModule, PopoverModule],\n entryComponents: [\n SubAssetsComponent,\n AssetTypeCellRendererComponent,\n GroupsComponent,\n DeleteAssetsModalComponent,\n UnassignModalComponent\n ],\n exports: [],\n providers: [\n {\n provide: HOOK_ONCE_ROUTE,\n useValue: [\n {\n context: ViewContext.Group,\n path: 'subassets',\n priority: 1000,\n icon: 'c8y-group-open',\n label: gettext('Subassets'),\n component: SubAssetsComponent\n },\n {\n path: 'group',\n component: GroupsComponent\n }\n ],\n multi: true\n },\n SubAssetsService,\n AssignDevicesService\n ]\n})\nexport class SubAssetsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {AddGroupComponent as ɵf} from './add-group/add-group.component';\nexport {AddGroupModule as ɵe} from './add-group/add-group.module';\nexport {AddGroupService as ɵg} from './add-group/add-group.service';\nexport {AssignDevicesService as ɵd} from './assign-devices/assign-devices.service';\nexport {AssetTypeCellRendererComponent as ɵa} from './columns/asset-type.cell-renderer.component';\nexport {DeleteAssetsModalComponent as ɵb} from './delete-assets-modal/delete-assets-modal.component';\nexport {UnassignModalComponent as ɵc} from './unassign-assets-modal/unassign-modal.component';"],"names":["tslib_1.__decorate"],"mappings":";;;;;;;;;;;;;IAOa,8BAA8B,GAA3C,MAAa,8BAA8B;IAKzC,YACS,OAA4B,EAC3B,kBAAsC;QADvC,YAAO,GAAP,OAA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