@c8y/ngx-components 1018.0.225 → 1018.0.229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/context-dashboard/add-dashboard.factory.d.ts +3 -2
- package/context-dashboard/context-dashboard.model.d.ts +16 -1
- package/context-dashboard/context-dashboard.service.d.ts +4 -2
- package/context-dashboard/report-dashboard/report-dashboard-list.component.d.ts +3 -2
- package/esm2020/context-dashboard/add-dashboard.factory.mjs +17 -5
- package/esm2020/context-dashboard/context-dashboard.component.mjs +23 -3
- package/esm2020/context-dashboard/context-dashboard.model.mjs +19 -4
- package/esm2020/context-dashboard/context-dashboard.service.mjs +21 -6
- package/esm2020/context-dashboard/dashboard-availability.component.mjs +3 -3
- package/esm2020/context-dashboard/report-dashboard/report-dashboard-list.component.mjs +21 -6
- package/esm2020/core/data-grid/column/filtering-form-renderer.component.mjs +4 -1
- package/esm2020/core/docs/docs.service.mjs +1 -11
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs +90 -14
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components.mjs +3 -9
- package/fesm2015/c8y-ngx-components.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs +90 -14
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components.mjs +3 -9
- package/fesm2020/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -116,19 +116,34 @@ const ALL_GLOBAL_ROLES_SELECTED = 'all';
|
|
|
116
116
|
const PRODUCT_EXPERIENCE = {
|
|
117
117
|
DASHBOARD: {
|
|
118
118
|
EVENTS: {
|
|
119
|
-
|
|
119
|
+
DASHBOARDS: 'dashboards',
|
|
120
|
+
REPORTS: 'reports'
|
|
120
121
|
},
|
|
121
122
|
COMPONENTS: {
|
|
122
|
-
|
|
123
|
+
DASHBOARD_VIEW: 'context-dashboard',
|
|
124
|
+
DASHBOARD_AVAILABILITY: 'dashboard-availability',
|
|
125
|
+
REPORTS_LIST: 'report-dashboard-list',
|
|
126
|
+
ADD_REPORT: 'report-dashboard-list',
|
|
127
|
+
ADD_DASHBOARD: 'add-dashboard',
|
|
128
|
+
DELETE_DASHBOARD: 'context-dashboard'
|
|
129
|
+
},
|
|
130
|
+
CONTEXT: {
|
|
131
|
+
REPORT: 'report',
|
|
132
|
+
DEVICE: 'device',
|
|
133
|
+
ASSET: 'asset',
|
|
134
|
+
GROUP: 'group'
|
|
123
135
|
},
|
|
124
136
|
ACTIONS: {
|
|
125
|
-
APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges'
|
|
137
|
+
APPLY_GLOBAL_ROLES_CHANGES: 'applyGlobalRolesChanges',
|
|
138
|
+
DELETE: 'delete',
|
|
139
|
+
LOAD: 'load',
|
|
140
|
+
CREATE: 'create'
|
|
126
141
|
}
|
|
127
142
|
}
|
|
128
143
|
};
|
|
129
144
|
|
|
130
145
|
class ContextDashboardService {
|
|
131
|
-
constructor(inventory, tabs, modal, translateService, router, navigator, permissions, alert, dynamicComponent) {
|
|
146
|
+
constructor(inventory, tabs, modal, translateService, router, navigator, permissions, alert, dynamicComponent, groupService) {
|
|
132
147
|
this.inventory = inventory;
|
|
133
148
|
this.tabs = tabs;
|
|
134
149
|
this.modal = modal;
|
|
@@ -138,6 +153,7 @@ class ContextDashboardService {
|
|
|
138
153
|
this.permissions = permissions;
|
|
139
154
|
this.alert = alert;
|
|
140
155
|
this.dynamicComponent = dynamicComponent;
|
|
156
|
+
this.groupService = groupService;
|
|
141
157
|
this.REPORT_PARTIAL_NAME = 'report_';
|
|
142
158
|
this.INVENTORY_ROLES = [
|
|
143
159
|
Permissions.ROLE_INVENTORY_ADMIN,
|
|
@@ -346,6 +362,20 @@ class ContextDashboardService {
|
|
|
346
362
|
}
|
|
347
363
|
}
|
|
348
364
|
}
|
|
365
|
+
getContextForGS(mo) {
|
|
366
|
+
if (this.groupService.isDevice(mo)) {
|
|
367
|
+
return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.DEVICE;
|
|
368
|
+
}
|
|
369
|
+
else if (this.groupService.isAsset(mo)) {
|
|
370
|
+
return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.ASSET;
|
|
371
|
+
}
|
|
372
|
+
else if (this.groupService.isGroup(mo)) {
|
|
373
|
+
return PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.GROUP;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
349
379
|
async serializeWidgetConfigs(dashboard) {
|
|
350
380
|
const children = cloneDeep(dashboard.c8y_Dashboard.children);
|
|
351
381
|
if (!children) {
|
|
@@ -522,14 +552,14 @@ class ContextDashboardService {
|
|
|
522
552
|
return null;
|
|
523
553
|
}
|
|
524
554
|
}
|
|
525
|
-
ContextDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, deps: [{ token: i1.InventoryService }, { token: i5.TabsService }, { token: i5.ModalService }, { token: i3.TranslateService }, { token: i1$1.Router }, { token: i5.NavigatorService }, { token: i5.Permissions }, { token: i5.AlertService }, { token: i5.DynamicComponentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
555
|
+
ContextDashboardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, deps: [{ token: i1.InventoryService }, { token: i5.TabsService }, { token: i5.ModalService }, { token: i3.TranslateService }, { token: i1$1.Router }, { token: i5.NavigatorService }, { token: i5.Permissions }, { token: i5.AlertService }, { token: i5.DynamicComponentService }, { token: i5.GroupService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
526
556
|
ContextDashboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, providedIn: 'root' });
|
|
527
557
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ContextDashboardService, decorators: [{
|
|
528
558
|
type: Injectable,
|
|
529
559
|
args: [{
|
|
530
560
|
providedIn: 'root'
|
|
531
561
|
}]
|
|
532
|
-
}], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: i5.TabsService }, { type: i5.ModalService }, { type: i3.TranslateService }, { type: i1$1.Router }, { type: i5.NavigatorService }, { type: i5.Permissions }, { type: i5.AlertService }, { type: i5.DynamicComponentService }]; } });
|
|
562
|
+
}], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: i5.TabsService }, { type: i5.ModalService }, { type: i3.TranslateService }, { type: i1$1.Router }, { type: i5.NavigatorService }, { type: i5.Permissions }, { type: i5.AlertService }, { type: i5.DynamicComponentService }, { type: i5.GroupService }]; } });
|
|
533
563
|
|
|
534
564
|
class ReportDashboardService {
|
|
535
565
|
constructor(inventoryService, navigatorService) {
|
|
@@ -727,7 +757,7 @@ class DashboardAvailabilityComponent {
|
|
|
727
757
|
this.globalRolesItemsSelected = items;
|
|
728
758
|
if (allItemsSelected) {
|
|
729
759
|
this.globalRolesIdsChange.emit(ALL_GLOBAL_ROLES_SELECTED);
|
|
730
|
-
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.
|
|
760
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
|
|
731
761
|
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_AVAILABILITY,
|
|
732
762
|
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.APPLY_GLOBAL_ROLES_CHANGES,
|
|
733
763
|
globalRoles: ALL_GLOBAL_ROLES_SELECTED
|
|
@@ -736,7 +766,7 @@ class DashboardAvailabilityComponent {
|
|
|
736
766
|
else {
|
|
737
767
|
const selectedGlobalRolesIds = items.map(i => i.id);
|
|
738
768
|
this.globalRolesIdsChange.emit([...selectedGlobalRolesIds]);
|
|
739
|
-
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.
|
|
769
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
|
|
740
770
|
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_AVAILABILITY,
|
|
741
771
|
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.APPLY_GLOBAL_ROLES_CHANGES,
|
|
742
772
|
globalRoles: selectedGlobalRolesIds?.sort()?.join()
|
|
@@ -903,11 +933,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
903
933
|
}] } });
|
|
904
934
|
|
|
905
935
|
class AddDashboardFactory {
|
|
906
|
-
constructor(permissions, contextDashboardService, bsModal, contextRoute) {
|
|
936
|
+
constructor(permissions, contextDashboardService, bsModal, contextRoute, gainsightService) {
|
|
907
937
|
this.permissions = permissions;
|
|
908
938
|
this.contextDashboardService = contextDashboardService;
|
|
909
939
|
this.bsModal = bsModal;
|
|
910
940
|
this.contextRoute = contextRoute;
|
|
941
|
+
this.gainsightService = gainsightService;
|
|
911
942
|
}
|
|
912
943
|
async get(activatedRoute) {
|
|
913
944
|
this.currentContext = this.contextRoute.getContextData(activatedRoute);
|
|
@@ -942,6 +973,16 @@ class AddDashboardFactory {
|
|
|
942
973
|
const dashboardMO = await this.contextDashboardService.create(dashboardCfg, this.currentContext);
|
|
943
974
|
await this.contextDashboardService.navigateToDashboard(dashboardMO);
|
|
944
975
|
modal.close();
|
|
976
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
|
|
977
|
+
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_DASHBOARD,
|
|
978
|
+
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,
|
|
979
|
+
name: dashboardCfg.name,
|
|
980
|
+
id: dashboardMO.id,
|
|
981
|
+
dashboardType: dashboardMO.c8y_Dashboard.deviceType
|
|
982
|
+
? dashboardMO.c8y_Dashboard.deviceTypeValue
|
|
983
|
+
: null,
|
|
984
|
+
context: this.contextDashboardService.getContextForGS(this.currentContext.contextData)
|
|
985
|
+
});
|
|
945
986
|
}
|
|
946
987
|
catch (ex) {
|
|
947
988
|
// intended empty
|
|
@@ -964,14 +1005,14 @@ class AddDashboardFactory {
|
|
|
964
1005
|
]);
|
|
965
1006
|
}
|
|
966
1007
|
}
|
|
967
|
-
AddDashboardFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, deps: [{ token: i5.Permissions }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i5.ContextRouteService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1008
|
+
AddDashboardFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, deps: [{ token: i5.Permissions }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i5.ContextRouteService }, { token: i5.GainsightService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
968
1009
|
AddDashboardFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, providedIn: 'root' });
|
|
969
1010
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddDashboardFactory, decorators: [{
|
|
970
1011
|
type: Injectable,
|
|
971
1012
|
args: [{
|
|
972
1013
|
providedIn: 'root'
|
|
973
1014
|
}]
|
|
974
|
-
}], ctorParameters: function () { return [{ type: i5.Permissions }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i5.ContextRouteService }]; } });
|
|
1015
|
+
}], ctorParameters: function () { return [{ type: i5.Permissions }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i5.ContextRouteService }, { type: i5.GainsightService }]; } });
|
|
975
1016
|
|
|
976
1017
|
class AddDashboardComponent {
|
|
977
1018
|
constructor(addDashboardFactory) {
|
|
@@ -1428,6 +1469,14 @@ class ContextDashboardComponent {
|
|
|
1428
1469
|
const route = this.route.parent.snapshot.url.map(segment => segment.path).join('/');
|
|
1429
1470
|
this.router.navigateByUrl(route);
|
|
1430
1471
|
}
|
|
1472
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
|
|
1473
|
+
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DELETE_DASHBOARD,
|
|
1474
|
+
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,
|
|
1475
|
+
name: this.dashboard.name,
|
|
1476
|
+
id: this.mo.id,
|
|
1477
|
+
dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,
|
|
1478
|
+
context: this.contextDashboardService.getContextForGS(this.context)
|
|
1479
|
+
});
|
|
1431
1480
|
}
|
|
1432
1481
|
/**
|
|
1433
1482
|
* Edits the current dashboard
|
|
@@ -1689,6 +1738,18 @@ class ContextDashboardComponent {
|
|
|
1689
1738
|
this.addReportDashboardSettings();
|
|
1690
1739
|
}
|
|
1691
1740
|
this.isLoading = false;
|
|
1741
|
+
this.gainsightService.triggerEvent(isReport
|
|
1742
|
+
? PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS
|
|
1743
|
+
: PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.DASHBOARDS, {
|
|
1744
|
+
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.DASHBOARD_VIEW,
|
|
1745
|
+
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.LOAD,
|
|
1746
|
+
name: this.dashboard.name,
|
|
1747
|
+
id: this.mo.id,
|
|
1748
|
+
dashboardType: this.dashboard.deviceType ? this.dashboard.deviceTypeValue : null,
|
|
1749
|
+
context: isReport
|
|
1750
|
+
? PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
|
|
1751
|
+
: this.contextDashboardService.getContextForGS(this.context)
|
|
1752
|
+
});
|
|
1692
1753
|
}
|
|
1693
1754
|
mergeWidgetClasses(widget) {
|
|
1694
1755
|
const hasHeaderClass = WIDGET_HEADER_CLASSES.find(el => widget.classes && widget.classes[el.class]);
|
|
@@ -2490,7 +2551,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
2490
2551
|
}] });
|
|
2491
2552
|
|
|
2492
2553
|
class ReportDashboardListComponent {
|
|
2493
|
-
constructor(inventoryService, contextDashboardService, bsModal, translateService, modal, alertService, reportDashboardService, permissions) {
|
|
2554
|
+
constructor(inventoryService, contextDashboardService, bsModal, translateService, modal, alertService, reportDashboardService, permissions, gainsightService) {
|
|
2494
2555
|
this.inventoryService = inventoryService;
|
|
2495
2556
|
this.contextDashboardService = contextDashboardService;
|
|
2496
2557
|
this.bsModal = bsModal;
|
|
@@ -2499,6 +2560,7 @@ class ReportDashboardListComponent {
|
|
|
2499
2560
|
this.alertService = alertService;
|
|
2500
2561
|
this.reportDashboardService = reportDashboardService;
|
|
2501
2562
|
this.permissions = permissions;
|
|
2563
|
+
this.gainsightService = gainsightService;
|
|
2502
2564
|
this.textFilter$ = new BehaviorSubject('');
|
|
2503
2565
|
this.reload$ = new BehaviorSubject(null);
|
|
2504
2566
|
this.reloading = false;
|
|
@@ -2551,6 +2613,13 @@ class ReportDashboardListComponent {
|
|
|
2551
2613
|
}
|
|
2552
2614
|
this.reload$.next();
|
|
2553
2615
|
modal.close();
|
|
2616
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {
|
|
2617
|
+
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.ADD_REPORT,
|
|
2618
|
+
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.CREATE,
|
|
2619
|
+
name: report.name,
|
|
2620
|
+
id: report.id,
|
|
2621
|
+
context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
|
|
2622
|
+
});
|
|
2554
2623
|
}
|
|
2555
2624
|
catch (ex) {
|
|
2556
2625
|
if (ex) {
|
|
@@ -2580,6 +2649,13 @@ class ReportDashboardListComponent {
|
|
|
2580
2649
|
this.reportDashboardService.removeNavigatorNode(report);
|
|
2581
2650
|
}
|
|
2582
2651
|
this.reload$.next();
|
|
2652
|
+
this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.DASHBOARD.EVENTS.REPORTS, {
|
|
2653
|
+
component: PRODUCT_EXPERIENCE.DASHBOARD.COMPONENTS.REPORTS_LIST,
|
|
2654
|
+
action: PRODUCT_EXPERIENCE.DASHBOARD.ACTIONS.DELETE,
|
|
2655
|
+
name: report.name,
|
|
2656
|
+
id: report.id,
|
|
2657
|
+
context: PRODUCT_EXPERIENCE.DASHBOARD.CONTEXT.REPORT
|
|
2658
|
+
});
|
|
2583
2659
|
}
|
|
2584
2660
|
catch (ex) {
|
|
2585
2661
|
if (ex) {
|
|
@@ -2595,12 +2671,12 @@ class ReportDashboardListComponent {
|
|
|
2595
2671
|
: this.reportDashboardService.removeNavigatorNode(report);
|
|
2596
2672
|
}
|
|
2597
2673
|
}
|
|
2598
|
-
ReportDashboardListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1.InventoryService }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i3.TranslateService }, { token: i5.ModalService }, { token: i5.AlertService }, { token: ReportDashboardService }, { token: i5.Permissions }], target: i0.ɵɵFactoryTarget.Component });
|
|
2674
|
+
ReportDashboardListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ReportDashboardListComponent, deps: [{ token: i1.InventoryService }, { token: ContextDashboardService }, { token: i3$1.BsModalService }, { token: i3.TranslateService }, { token: i5.ModalService }, { token: i5.AlertService }, { token: ReportDashboardService }, { token: i5.Permissions }, { token: i5.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2599
2675
|
ReportDashboardListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ReportDashboardListComponent, selector: "c8y-report-dashboard-list", viewQueries: [{ propertyName: "filter", first: true, predicate: FilterInputComponent, descendants: true }], ngImport: i0, template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'left'\" itemClass=\"navbar-form\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n type=\"search\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n <i c8yIcon=\"search\" *ngIf=\"(textFilter$ | async).length === 0\"></i>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"(textFilter$ | async).length > 0\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n type=\"button\"\n title=\"{{ 'Add report' | translate }}\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n (click)=\"add()\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n <button\n class=\"btn btn-dot m-r-16\"\n type=\"button\"\n aria-label=\"{{ 'Info' | translate}}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n triggers=\"focus\"\n placement=\"top\"\n container=\"body\"\n *ngIf=\"!canAddReport\"\n >\n <i [c8yIcon]=\"'info-circle'\" class=\"text-primary\"></i>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n class=\"btn btn-link\"\n (click)=\"loadReports()\"\n >\n <i [ngClass]=\"{ 'icon-spin': reloading }\" c8yIcon=\"refresh\"></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/users-guide/cockpit/#reports\"></c8y-help>\n\n<c8y-list-group>\n <c8y-li\n class=\"page-sticky-header hidden-xs hidden-sm\"\n *ngIf=\"(reports$ | async)?.data.length > 0\"\n >\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n type=\"button\"\n title=\"{{ report.name }}\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ report.name }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n <em class=\"text-muted\" *ngIf=\"!report.description; else showDescription\">\n {{ 'No description available' | translate }}\n </em>\n <ng-template #showDescription>\n {{ report.description }}\n </ng-template>\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label class=\"c8y-switch c8y-switch--inline\" title=\"{{ 'Show in navigator' | translate }}\">\n <input\n [(ngModel)]=\"!!report.c8y_IsNavigatorNode\"\n type=\"checkbox\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n type=\"button\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n type=\"button\"\n title=\"{{ 'Remove report' | translate }}\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n<c8y-ui-empty-state\n *ngIf=\"(reports$ | async)?.data.length === 0\"\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n>\n <p>\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Add report' | translate }}\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n (click)=\"add()\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small translate ngNonBindable>\n Find out more in the\n <a c8y-guide-href=\"users-guide/cockpit/#reports\">User guide`KEEP_ORIGINAL`</a>\n .\n </small>\n </p>\n</c8y-ui-empty-state>\n", dependencies: [{ kind: "component", type: i5.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId"] }, { kind: "component", type: i5.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i5.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i5.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount"] }, { kind: "component", type: i5.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.GuideHrefDirective, selector: "[c8y-guide-href]", inputs: ["c8y-guide-href"] }, { kind: "component", type: i5.GuideDocsComponent, selector: "[c8y-guide-docs]" }, { kind: "component", type: i5.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i5.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "emptyActions", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i5.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i5.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i5.HelpComponent, selector: "c8y-help", inputs: ["src", "isCollapsed", "priority", "icon"] }, { kind: "directive", type: i3$2.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: i1$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i5.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }] });
|
|
2600
2676
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ReportDashboardListComponent, decorators: [{
|
|
2601
2677
|
type: Component,
|
|
2602
2678
|
args: [{ selector: 'c8y-report-dashboard-list', template: "<c8y-title>\n {{ 'Reports' | translate }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'left'\" itemClass=\"navbar-form\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n type=\"search\"\n [attr.aria-label]=\"'Filter' | translate\"\n placeholder=\"{{ 'Filter\u2026' | translate }}\"\n [ngModel]=\"textFilter$ | async\"\n (ngModelChange)=\"textFilter$.next($event)\"\n />\n <span class=\"input-group-addon\">\n <i c8yIcon=\"search\" *ngIf=\"(textFilter$ | async).length === 0\"></i>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"(textFilter$ | async).length > 0\"\n (click)=\"textFilter$.next('')\"\n px-event=\"Clear filtering reports\"\n ></i>\n </span>\n </div>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n type=\"button\"\n title=\"{{ 'Add report' | translate }}\"\n [attr.data-cy]=\"'reports-add-report-action-bar-button'\"\n (click)=\"add()\"\n [disabled]=\"!canAddReport\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Add report' | translate }}\n </button>\n <button\n class=\"btn btn-dot m-r-16\"\n type=\"button\"\n aria-label=\"{{ 'Info' | translate}}\"\n popover=\"{{ 'You don\\'t have permission to add reports' | translate }}\"\n triggers=\"focus\"\n placement=\"top\"\n container=\"body\"\n *ngIf=\"!canAddReport\"\n >\n <i [c8yIcon]=\"'info-circle'\" class=\"text-primary\"></i>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n title=\"{{ 'Reload' | translate }}\"\n type=\"button\"\n class=\"btn btn-link\"\n (click)=\"loadReports()\"\n >\n <i [ngClass]=\"{ 'icon-spin': reloading }\" c8yIcon=\"refresh\"></i>\n {{ 'Reload' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-help src=\"/users-guide/cockpit/#reports\"></c8y-help>\n\n<c8y-list-group>\n <c8y-li\n class=\"page-sticky-header hidden-xs hidden-sm\"\n *ngIf=\"(reports$ | async)?.data.length > 0\"\n >\n <c8y-li-icon>\n <i class=\"p-l-24\"></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n {{ 'Report' | translate }}\n </div>\n <div class=\"col-6\">\n {{ 'Description' | translate }}\n </div>\n <div class=\"col-2\">\n {{ 'Show in navigator' | translate }}\n </div>\n </c8y-li-body>\n </c8y-li>\n\n <c8y-li *c8yFor=\"let report of reports$; let i = index; loadMore: 'auto'\">\n <c8y-li-icon [icon]=\"report.icon\"></c8y-li-icon>\n <c8y-li-body class=\"content-flex-60\">\n <div class=\"col-3\">\n <button\n class=\"btn-clean\"\n type=\"button\"\n title=\"{{ report.name }}\"\n routerLink=\"/reports/{{ report.id }}\"\n >\n <span class=\"text-truncate\">\n {{ report.name }}\n </span>\n </button>\n </div>\n <div class=\"col-6\">\n <p class=\"small text-truncate-wrap\">\n <em class=\"text-muted\" *ngIf=\"!report.description; else showDescription\">\n {{ 'No description available' | translate }}\n </em>\n <ng-template #showDescription>\n {{ report.description }}\n </ng-template>\n </p>\n </div>\n <div class=\"col-2 fit-h-20 m-t-xs-8\">\n <label class=\"c8y-switch c8y-switch--inline\" title=\"{{ 'Show in navigator' | translate }}\">\n <input\n [(ngModel)]=\"!!report.c8y_IsNavigatorNode\"\n type=\"checkbox\"\n (change)=\"update(report)\"\n />\n <span></span>\n <span class=\"visible-xs\">\n {{ 'Show in navigator' | translate }}\n </span>\n </label>\n </div>\n <div class=\"col-1 hidden-xs\">\n <button\n class=\"btn btn-dot btn-dot--danger showOnHover m-l-auto d-flex\"\n type=\"button\"\n [attr.aria-label]=\"'Remove report' | translate\"\n tooltip=\"{{ 'Remove report' | translate }}\"\n [delay]=\"500\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n <div class=\"visible-xs p-t-8 text-right\">\n <button\n class=\"btn btn-default btn-sm\"\n type=\"button\"\n title=\"{{ 'Remove report' | translate }}\"\n (click)=\"delete(report)\"\n >\n <i c8yIcon=\"delete\"></i>\n {{ 'Remove report' | translate }}\n </button>\n </div>\n </c8y-li-body>\n </c8y-li>\n</c8y-list-group>\n\n<c8y-ui-empty-state\n *ngIf=\"(reports$ | async)?.data.length === 0\"\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n>\n <p>\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Add report' | translate }}\"\n [attr.data-cy]=\"'reports-add-report-empty-state-button'\"\n [disabled]=\"!canAddReport\"\n (click)=\"add()\"\n >\n {{ 'Add report' | translate }}\n </button>\n </p>\n <p c8y-guide-docs>\n <small translate ngNonBindable>\n Find out more in the\n <a c8y-guide-href=\"users-guide/cockpit/#reports\">User guide`KEEP_ORIGINAL`</a>\n .\n </small>\n </p>\n</c8y-ui-empty-state>\n" }]
|
|
2603
|
-
}], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i3.TranslateService }, { type: i5.ModalService }, { type: i5.AlertService }, { type: ReportDashboardService }, { type: i5.Permissions }]; }, propDecorators: { filter: [{
|
|
2679
|
+
}], ctorParameters: function () { return [{ type: i1.InventoryService }, { type: ContextDashboardService }, { type: i3$1.BsModalService }, { type: i3.TranslateService }, { type: i5.ModalService }, { type: i5.AlertService }, { type: ReportDashboardService }, { type: i5.Permissions }, { type: i5.GainsightService }]; }, propDecorators: { filter: [{
|
|
2604
2680
|
type: ViewChild,
|
|
2605
2681
|
args: [FilterInputComponent, { static: false }]
|
|
2606
2682
|
}] } });
|