@c8y/ngx-components 1018.503.22 → 1018.503.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/services.d.ts +1 -1
- package/core/common/permissions.service.d.ts +2 -2
- package/core/forms/validation-pattern.d.ts +4 -0
- package/esm2020/api/services.mjs +2 -2
- package/esm2020/assets-navigator/asset-node.service.mjs +9 -3
- package/esm2020/context-dashboard/add-dashboard.factory.mjs +10 -3
- package/esm2020/context-dashboard/context-dashboard.service.mjs +11 -3
- package/esm2020/context-dashboard/dashboard-detail.component.mjs +7 -2
- package/esm2020/context-dashboard/report-dashboard/report-dashboard-list.component.mjs +4 -2
- package/esm2020/core/bottom-drawer/bottom-drawer.service.mjs +1 -1
- package/esm2020/core/common/permissions.service.mjs +2 -2
- package/esm2020/core/common/user-preferences/user-preferences.service.mjs +6 -2
- package/esm2020/core/forms/validation-pattern.mjs +5 -1
- package/esm2020/core/user/user-edit.component.mjs +1 -1
- package/esm2020/files-repository/files-repository.guard.mjs +6 -5
- package/esm2020/replace-device/replace-device.service.mjs +13 -5
- package/esm2020/repository/configuration/device-tab/configuration-preview.component.mjs +11 -3
- package/esm2020/sub-assets/add-group/add-group.component.mjs +7 -2
- package/esm2020/sub-assets/groups.component.mjs +5 -2
- package/esm2020/sub-assets/sub-assets.component.mjs +7 -2
- package/esm2020/sub-assets/sub-assets.service.mjs +12 -6
- package/esm2020/trusted-certificates/crl/crl-check-settings.component.mjs +39 -0
- package/esm2020/trusted-certificates/crl/crl-settings.component.mjs +109 -0
- package/esm2020/trusted-certificates/crl/crl-settings.module.mjs +46 -0
- package/esm2020/trusted-certificates/factories/tabs.factory.mjs +36 -0
- package/esm2020/trusted-certificates/factories/trusted-certificates-navigation.factory.mjs +26 -0
- package/esm2020/trusted-certificates/index.mjs +4 -4
- package/esm2020/trusted-certificates/{add-trusted-certificate.component.mjs → list/add-trusted-certificate.component.mjs} +1 -1
- package/esm2020/trusted-certificates/list/trusted-certificate-list.component.mjs +184 -0
- package/esm2020/trusted-certificates/list/trusted-certificate-list.module.mjs +54 -0
- package/esm2020/trusted-certificates/list/trusted-certificate.model.mjs +36 -0
- package/esm2020/trusted-certificates/trusted-certificates.module.mjs +24 -35
- package/fesm2015/c8y-ngx-components-api.mjs +3 -2
- package/fesm2015/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-assets-navigator.mjs +8 -2
- package/fesm2015/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs +28 -6
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-files-repository.mjs +5 -4
- package/fesm2015/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-replace-device.mjs +13 -5
- package/fesm2015/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-repository-configuration.mjs +10 -2
- package/fesm2015/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-sub-assets.mjs +27 -8
- package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-trusted-certificates.mjs +329 -86
- package/fesm2015/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components.mjs +10 -2
- package/fesm2015/c8y-ngx-components.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-api.mjs +3 -2
- package/fesm2020/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-assets-navigator.mjs +8 -2
- package/fesm2020/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs +28 -6
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-files-repository.mjs +5 -4
- package/fesm2020/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-replace-device.mjs +13 -5
- package/fesm2020/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-repository-configuration.mjs +10 -2
- package/fesm2020/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-sub-assets.mjs +27 -8
- package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-trusted-certificates.mjs +314 -85
- package/fesm2020/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components.mjs +10 -2
- package/fesm2020/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +48 -0
- package/package.json +1 -1
- package/replace-device/replace-device.service.d.ts +3 -1
- package/trusted-certificates/crl/crl-check-settings.component.d.ts +18 -0
- package/trusted-certificates/crl/crl-settings.component.d.ts +28 -0
- package/trusted-certificates/crl/crl-settings.module.d.ts +13 -0
- package/trusted-certificates/factories/tabs.factory.d.ts +10 -0
- package/trusted-certificates/index.d.ts +3 -3
- package/trusted-certificates/{trusted-certificates.component.d.ts → list/trusted-certificate-list.component.d.ts} +4 -4
- package/trusted-certificates/list/trusted-certificate-list.module.d.ts +15 -0
- package/trusted-certificates/trusted-certificates.module.d.ts +4 -10
- package/esm2020/trusted-certificates/trusted-certificate.model.mjs +0 -36
- package/esm2020/trusted-certificates/trusted-certificates-navigation.factory.mjs +0 -26
- package/esm2020/trusted-certificates/trusted-certificates.component.mjs +0 -184
- /package/trusted-certificates/{trusted-certificates-navigation.factory.d.ts → factories/trusted-certificates-navigation.factory.d.ts} +0 -0
- /package/trusted-certificates/{add-trusted-certificate.component.d.ts → list/add-trusted-certificate.component.d.ts} +0 -0
- /package/trusted-certificates/{trusted-certificate.model.d.ts → list/trusted-certificate.model.d.ts} +0 -0
|
@@ -148,7 +148,10 @@ class ContextDashboardService {
|
|
|
148
148
|
this.alert = alert;
|
|
149
149
|
this.dynamicComponent = dynamicComponent;
|
|
150
150
|
this.REPORT_PARTIAL_NAME = 'report_';
|
|
151
|
-
this.INVENTORY_ROLES = [
|
|
151
|
+
this.INVENTORY_ROLES = [
|
|
152
|
+
Permissions.ROLE_INVENTORY_ADMIN,
|
|
153
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN
|
|
154
|
+
];
|
|
152
155
|
this.cache = new Map();
|
|
153
156
|
this.DEFAULT_PAGESIZE = 1000;
|
|
154
157
|
this.FRAGMENT_NAME = 'c8y_Dashboard';
|
|
@@ -291,7 +294,12 @@ class ContextDashboardService {
|
|
|
291
294
|
}
|
|
292
295
|
}
|
|
293
296
|
canEditDashboard(mo) {
|
|
294
|
-
return this.permissions.canEdit([
|
|
297
|
+
return this.permissions.canEdit([
|
|
298
|
+
Permissions.ROLE_INVENTORY_ADMIN,
|
|
299
|
+
Permissions.ROLE_INVENTORY_CREATE,
|
|
300
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
301
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE
|
|
302
|
+
], mo);
|
|
295
303
|
}
|
|
296
304
|
isNamed(dashboard) {
|
|
297
305
|
return some(keys(dashboard), prop => new RegExp(`^${this.FRAGMENT_NAME}${this.INDEX_SPLIT}${ContextDashboardType.Named}${this.INDEX_SPLIT}`).test(prop));
|
|
@@ -855,7 +863,12 @@ class DashboardDetailComponent {
|
|
|
855
863
|
}
|
|
856
864
|
}
|
|
857
865
|
setupApplyToDevicesOfTypeCheckbox() {
|
|
858
|
-
const rolesToCheck = [
|
|
866
|
+
const rolesToCheck = [
|
|
867
|
+
Permissions.ROLE_INVENTORY_CREATE,
|
|
868
|
+
Permissions.ROLE_INVENTORY_ADMIN,
|
|
869
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
870
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE
|
|
871
|
+
];
|
|
859
872
|
this.applyToDevicesOfTypePermitted = this.permissionsService.hasAnyRole(rolesToCheck);
|
|
860
873
|
}
|
|
861
874
|
save() {
|
|
@@ -962,11 +975,18 @@ class AddDashboardFactory {
|
|
|
962
975
|
}
|
|
963
976
|
async hasPermission(context) {
|
|
964
977
|
if (context?.id) {
|
|
965
|
-
return await this.permissions.canEdit([
|
|
978
|
+
return await this.permissions.canEdit([
|
|
979
|
+
Permissions.ROLE_INVENTORY_ADMIN,
|
|
980
|
+
Permissions.ROLE_INVENTORY_CREATE,
|
|
981
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
982
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE
|
|
983
|
+
], context);
|
|
966
984
|
}
|
|
967
985
|
return this.permissions.hasAnyRole([
|
|
968
986
|
Permissions.ROLE_INVENTORY_ADMIN,
|
|
969
|
-
Permissions.ROLE_INVENTORY_CREATE
|
|
987
|
+
Permissions.ROLE_INVENTORY_CREATE,
|
|
988
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
989
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE
|
|
970
990
|
]);
|
|
971
991
|
}
|
|
972
992
|
}
|
|
@@ -2575,7 +2595,9 @@ class ReportDashboardListComponent {
|
|
|
2575
2595
|
ngOnInit() {
|
|
2576
2596
|
this.canAddReport = this.permissions.hasAnyRole([
|
|
2577
2597
|
Permissions.ROLE_INVENTORY_CREATE,
|
|
2578
|
-
Permissions.ROLE_INVENTORY_ADMIN
|
|
2598
|
+
Permissions.ROLE_INVENTORY_ADMIN,
|
|
2599
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
2600
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE
|
|
2579
2601
|
]);
|
|
2580
2602
|
}
|
|
2581
2603
|
async loadReports(partialName) {
|