ng-kinintel 0.0.317
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/README.md +24 -0
- package/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +11 -0
- package/src/lib/components/alert-groups/alert-groups.component.html +140 -0
- package/src/lib/components/alert-groups/alert-groups.component.sass +4 -0
- package/src/lib/components/alert-groups/alert-groups.component.spec.ts +25 -0
- package/src/lib/components/alert-groups/alert-groups.component.ts +86 -0
- package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.html +91 -0
- package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.sass +2 -0
- package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.spec.ts +25 -0
- package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.ts +78 -0
- package/src/lib/components/dashboard-editor/configure-item/configure-item.component.html +2006 -0
- package/src/lib/components/dashboard-editor/configure-item/configure-item.component.sass +106 -0
- package/src/lib/components/dashboard-editor/configure-item/configure-item.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/configure-item/configure-item.component.ts +967 -0
- package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.html +81 -0
- package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.sass +0 -0
- package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.ts +48 -0
- package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.html +142 -0
- package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.sass +0 -0
- package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.ts +117 -0
- package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.html +224 -0
- package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.sass +0 -0
- package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.ts +149 -0
- package/src/lib/components/dashboard-editor/configure-item/vis-network-options.json +135 -0
- package/src/lib/components/dashboard-editor/dashboard-editor.component.html +205 -0
- package/src/lib/components/dashboard-editor/dashboard-editor.component.sass +247 -0
- package/src/lib/components/dashboard-editor/dashboard-editor.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/dashboard-editor.component.ts +645 -0
- package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.html +1 -0
- package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.sass +0 -0
- package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.ts +16 -0
- package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.html +167 -0
- package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.sass +0 -0
- package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.spec.ts +23 -0
- package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.ts +47 -0
- package/src/lib/components/dashboard-editor/item-component/item-component.component.html +486 -0
- package/src/lib/components/dashboard-editor/item-component/item-component.component.sass +137 -0
- package/src/lib/components/dashboard-editor/item-component/item-component.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/item-component/item-component.component.ts +1381 -0
- package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.html +48 -0
- package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.sass +3 -0
- package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.spec.ts +25 -0
- package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.ts +111 -0
- package/src/lib/components/dashboards/dashboards.component.html +175 -0
- package/src/lib/components/dashboards/dashboards.component.sass +64 -0
- package/src/lib/components/dashboards/dashboards.component.spec.ts +25 -0
- package/src/lib/components/dashboards/dashboards.component.ts +176 -0
- package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.html +138 -0
- package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.sass +284 -0
- package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.spec.ts +25 -0
- package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.ts +462 -0
- package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.html +35 -0
- package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.sass +0 -0
- package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.spec.ts +23 -0
- package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.ts +21 -0
- package/src/lib/components/data-explorer/data-explorer.component.html +326 -0
- package/src/lib/components/data-explorer/data-explorer.component.sass +96 -0
- package/src/lib/components/data-explorer/data-explorer.component.spec.ts +25 -0
- package/src/lib/components/data-explorer/data-explorer.component.ts +267 -0
- package/src/lib/components/data-explorer/export-data/export-data.component.html +69 -0
- package/src/lib/components/data-explorer/export-data/export-data.component.sass +0 -0
- package/src/lib/components/data-explorer/export-data/export-data.component.spec.ts +25 -0
- package/src/lib/components/data-explorer/export-data/export-data.component.ts +56 -0
- package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.html +195 -0
- package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.sass +0 -0
- package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.spec.ts +23 -0
- package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.ts +79 -0
- package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.html +375 -0
- package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.sass +21 -0
- package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.spec.ts +25 -0
- package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.ts +197 -0
- package/src/lib/components/data-picker/data-picker.component.html +127 -0
- package/src/lib/components/data-picker/data-picker.component.sass +0 -0
- package/src/lib/components/data-picker/data-picker.component.spec.ts +25 -0
- package/src/lib/components/data-picker/data-picker.component.ts +90 -0
- package/src/lib/components/data-search/data-search.component.html +1 -0
- package/src/lib/components/data-search/data-search.component.sass +0 -0
- package/src/lib/components/data-search/data-search.component.spec.ts +23 -0
- package/src/lib/components/data-search/data-search.component.ts +10 -0
- package/src/lib/components/data-sharing-invite/data-sharing-invite.component.html +53 -0
- package/src/lib/components/data-sharing-invite/data-sharing-invite.component.sass +0 -0
- package/src/lib/components/data-sharing-invite/data-sharing-invite.component.spec.ts +23 -0
- package/src/lib/components/data-sharing-invite/data-sharing-invite.component.ts +56 -0
- package/src/lib/components/dataset/create-dataset/create-dataset.component.html +25 -0
- package/src/lib/components/dataset/create-dataset/create-dataset.component.sass +0 -0
- package/src/lib/components/dataset/create-dataset/create-dataset.component.spec.ts +25 -0
- package/src/lib/components/dataset/create-dataset/create-dataset.component.ts +44 -0
- package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.html +28 -0
- package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.sass +0 -0
- package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.ts +22 -0
- package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.html +196 -0
- package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.sass +17 -0
- package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.ts +422 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.html +30 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.sass +47 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.ts +78 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.html +86 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.sass +0 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.ts +49 -0
- package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.html +68 -0
- package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.sass +15 -0
- package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.ts +65 -0
- package/src/lib/components/dataset/dataset-editor/dataset-editor-popup.html +19 -0
- package/src/lib/components/dataset/dataset-editor/dataset-editor.component.html +609 -0
- package/src/lib/components/dataset/dataset-editor/dataset-editor.component.sass +267 -0
- package/src/lib/components/dataset/dataset-editor/dataset-editor.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-editor.component.ts +1228 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.html +309 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.sass +41 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.ts +215 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.html +33 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.sass +3 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.spec.ts +23 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.ts +20 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.html +52 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.sass +14 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.ts +58 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.html +47 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.sass +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.ts +49 -0
- package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.html +49 -0
- package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.sass +2 -0
- package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.ts +39 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.html +195 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.sass +14 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.ts +82 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.html +78 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.sass +16 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.ts +32 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.html +24 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.sass +22 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.ts +64 -0
- package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.html +177 -0
- package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.sass +80 -0
- package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.ts +113 -0
- package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.html +32 -0
- package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.sass +0 -0
- package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.spec.ts +23 -0
- package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.ts +20 -0
- package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.html +37 -0
- package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.sass +0 -0
- package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.spec.ts +23 -0
- package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.ts +19 -0
- package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.html +69 -0
- package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.sass +0 -0
- package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.spec.ts +23 -0
- package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.ts +58 -0
- package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.html +195 -0
- package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.sass +0 -0
- package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.spec.ts +23 -0
- package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.ts +128 -0
- package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.html +34 -0
- package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.sass +3 -0
- package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.spec.ts +23 -0
- package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.ts +21 -0
- package/src/lib/components/dataset/dataset.component.html +317 -0
- package/src/lib/components/dataset/dataset.component.sass +73 -0
- package/src/lib/components/dataset/dataset.component.spec.ts +25 -0
- package/src/lib/components/dataset/dataset.component.ts +320 -0
- package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.html +133 -0
- package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.sass +51 -0
- package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.spec.ts +23 -0
- package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.ts +140 -0
- package/src/lib/components/datasource/create-datasource/api-access/api-access.component.html +257 -0
- package/src/lib/components/datasource/create-datasource/api-access/api-access.component.sass +0 -0
- package/src/lib/components/datasource/create-datasource/api-access/api-access.component.spec.ts +23 -0
- package/src/lib/components/datasource/create-datasource/api-access/api-access.component.ts +148 -0
- package/src/lib/components/datasource/create-datasource/create-datasource.component.html +430 -0
- package/src/lib/components/datasource/create-datasource/create-datasource.component.sass +162 -0
- package/src/lib/components/datasource/create-datasource/create-datasource.component.spec.ts +25 -0
- package/src/lib/components/datasource/create-datasource/create-datasource.component.ts +789 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-data.component.html +119 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-data.component.sass +8 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-data.component.spec.ts +25 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-data.component.ts +163 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.html +239 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.sass +0 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.spec.ts +23 -0
- package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.ts +182 -0
- package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.html +167 -0
- package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.sass +87 -0
- package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.spec.ts +23 -0
- package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.ts +164 -0
- package/src/lib/components/datasource/datasource.component.html +165 -0
- package/src/lib/components/datasource/datasource.component.sass +4 -0
- package/src/lib/components/datasource/datasource.component.spec.ts +25 -0
- package/src/lib/components/datasource/datasource.component.ts +174 -0
- package/src/lib/components/datasource/document-datasource/document-datasource.component.html +558 -0
- package/src/lib/components/datasource/document-datasource/document-datasource.component.sass +84 -0
- package/src/lib/components/datasource/document-datasource/document-datasource.component.spec.ts +25 -0
- package/src/lib/components/datasource/document-datasource/document-datasource.component.ts +351 -0
- package/src/lib/components/export-project/export-project.component.html +280 -0
- package/src/lib/components/export-project/export-project.component.sass +0 -0
- package/src/lib/components/export-project/export-project.component.spec.ts +23 -0
- package/src/lib/components/export-project/export-project.component.ts +29 -0
- package/src/lib/components/feeds/feed/feed.component.html +144 -0
- package/src/lib/components/feeds/feed/feed.component.sass +0 -0
- package/src/lib/components/feeds/feed/feed.component.spec.ts +25 -0
- package/src/lib/components/feeds/feed/feed.component.ts +102 -0
- package/src/lib/components/feeds/feeds.component.html +210 -0
- package/src/lib/components/feeds/feeds.component.sass +4 -0
- package/src/lib/components/feeds/feeds.component.spec.ts +25 -0
- package/src/lib/components/feeds/feeds.component.ts +163 -0
- package/src/lib/components/job-tasks/job-tasks.component.html +22 -0
- package/src/lib/components/job-tasks/job-tasks.component.sass +0 -0
- package/src/lib/components/job-tasks/job-tasks.component.spec.ts +25 -0
- package/src/lib/components/job-tasks/job-tasks.component.ts +19 -0
- package/src/lib/components/marketplace/marketplace.component.html +143 -0
- package/src/lib/components/marketplace/marketplace.component.sass +0 -0
- package/src/lib/components/marketplace/marketplace.component.spec.ts +23 -0
- package/src/lib/components/marketplace/marketplace.component.ts +73 -0
- package/src/lib/components/metadata/metadata.component.html +62 -0
- package/src/lib/components/metadata/metadata.component.sass +0 -0
- package/src/lib/components/metadata/metadata.component.spec.ts +25 -0
- package/src/lib/components/metadata/metadata.component.ts +67 -0
- package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.html +82 -0
- package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.sass +21 -0
- package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.spec.ts +25 -0
- package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.ts +123 -0
- package/src/lib/components/notification-groups/notification-groups.component.html +125 -0
- package/src/lib/components/notification-groups/notification-groups.component.sass +4 -0
- package/src/lib/components/notification-groups/notification-groups.component.spec.ts +25 -0
- package/src/lib/components/notification-groups/notification-groups.component.ts +98 -0
- package/src/lib/components/project-picker/project-picker.component.html +167 -0
- package/src/lib/components/project-picker/project-picker.component.sass +1 -0
- package/src/lib/components/project-picker/project-picker.component.spec.ts +25 -0
- package/src/lib/components/project-picker/project-picker.component.ts +138 -0
- package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.html +120 -0
- package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.sass +0 -0
- package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.spec.ts +23 -0
- package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.ts +161 -0
- package/src/lib/components/project-settings/project-settings.component.html +353 -0
- package/src/lib/components/project-settings/project-settings.component.sass +0 -0
- package/src/lib/components/project-settings/project-settings.component.spec.ts +23 -0
- package/src/lib/components/project-settings/project-settings.component.ts +178 -0
- package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.html +96 -0
- package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.sass +0 -0
- package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.spec.ts +23 -0
- package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.ts +48 -0
- package/src/lib/components/query-caching/query-caching.component.html +122 -0
- package/src/lib/components/query-caching/query-caching.component.sass +0 -0
- package/src/lib/components/query-caching/query-caching.component.spec.ts +23 -0
- package/src/lib/components/query-caching/query-caching.component.ts +184 -0
- package/src/lib/components/shared-with-me/shared-with-me.component.html +115 -0
- package/src/lib/components/shared-with-me/shared-with-me.component.sass +0 -0
- package/src/lib/components/shared-with-me/shared-with-me.component.spec.ts +23 -0
- package/src/lib/components/shared-with-me/shared-with-me.component.ts +123 -0
- package/src/lib/components/snapshots/snapshots.component.html +408 -0
- package/src/lib/components/snapshots/snapshots.component.sass +4 -0
- package/src/lib/components/snapshots/snapshots.component.spec.ts +25 -0
- package/src/lib/components/snapshots/snapshots.component.ts +286 -0
- package/src/lib/components/tag-picker/tag-picker.component.html +155 -0
- package/src/lib/components/tag-picker/tag-picker.component.sass +2 -0
- package/src/lib/components/tag-picker/tag-picker.component.spec.ts +25 -0
- package/src/lib/components/tag-picker/tag-picker.component.ts +82 -0
- package/src/lib/components/task-time-periods/task-time-periods.component.html +93 -0
- package/src/lib/components/task-time-periods/task-time-periods.component.sass +7 -0
- package/src/lib/components/task-time-periods/task-time-periods.component.spec.ts +25 -0
- package/src/lib/components/task-time-periods/task-time-periods.component.ts +50 -0
- package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.html +111 -0
- package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.sass +0 -0
- package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.spec.ts +25 -0
- package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.ts +38 -0
- package/src/lib/guards/dashboard-changes.guard.spec.ts +16 -0
- package/src/lib/guards/dashboard-changes.guard.ts +27 -0
- package/src/lib/ng-kinintel.module.ts +272 -0
- package/src/lib/objects/action-event.spec.ts +7 -0
- package/src/lib/objects/action-event.ts +27 -0
- package/src/lib/services/alert.service.spec.ts +16 -0
- package/src/lib/services/alert.service.ts +49 -0
- package/src/lib/services/dashboard.service.spec.ts +16 -0
- package/src/lib/services/dashboard.service.ts +79 -0
- package/src/lib/services/data-processor.service.spec.ts +16 -0
- package/src/lib/services/data-processor.service.ts +61 -0
- package/src/lib/services/data-search.service.spec.ts +16 -0
- package/src/lib/services/data-search.service.ts +31 -0
- package/src/lib/services/dataset.service.spec.ts +16 -0
- package/src/lib/services/dataset.service.ts +234 -0
- package/src/lib/services/datasource.service.spec.ts +16 -0
- package/src/lib/services/datasource.service.ts +116 -0
- package/src/lib/services/external.service.spec.ts +16 -0
- package/src/lib/services/external.service.ts +29 -0
- package/src/lib/services/feed.service.spec.ts +16 -0
- package/src/lib/services/feed.service.ts +48 -0
- package/src/lib/services/notification.service.spec.ts +16 -0
- package/src/lib/services/notification.service.ts +38 -0
- package/src/lib/services/project.service.spec.ts +16 -0
- package/src/lib/services/project.service.ts +146 -0
- package/src/lib/services/tag.service.spec.ts +16 -0
- package/src/lib/services/tag.service.ts +61 -0
- package/src/public-api.ts +46 -0
- package/src/test.ts +17 -0
- package/tsconfig.lib.json +24 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit, ApplicationRef,
|
|
3
|
+
Component, ComponentFactoryResolver, EmbeddedViewRef, HostBinding, Injector, Input, OnDestroy,
|
|
4
|
+
OnInit,
|
|
5
|
+
ViewChild,
|
|
6
|
+
ViewContainerRef,
|
|
7
|
+
ViewEncapsulation
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import {GridStack, GridStackNode} from 'gridstack';
|
|
10
|
+
// THEN to get HTML5 drag&drop
|
|
11
|
+
import 'gridstack/dist/h5/gridstack-dd-native';
|
|
12
|
+
import {ItemComponentComponent} from '../../dashboard-editor/item-component/item-component.component';
|
|
13
|
+
import {ActivatedRoute, Router} from '@angular/router';
|
|
14
|
+
import {DashboardService} from '../../../services/dashboard.service';
|
|
15
|
+
import * as lodash from 'lodash';
|
|
16
|
+
const _ = lodash.default;
|
|
17
|
+
import {MatLegacyDialog as MatDialog} from '@angular/material/legacy-dialog';
|
|
18
|
+
import {MatLegacySnackBar as MatSnackBar} from '@angular/material/legacy-snack-bar';
|
|
19
|
+
import {AlertService} from '../../../services/alert.service';
|
|
20
|
+
import moment from 'moment';
|
|
21
|
+
import {Location} from '@angular/common';
|
|
22
|
+
import {ExternalService} from '../../../services/external.service';
|
|
23
|
+
import {Subject, Subscription} from 'rxjs';
|
|
24
|
+
import {DatasetService} from '../../../services/dataset.service';
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: 'ki-view-dashboard',
|
|
28
|
+
templateUrl: './view-dashboard.component.html',
|
|
29
|
+
styleUrls: ['./view-dashboard.component.sass'],
|
|
30
|
+
encapsulation: ViewEncapsulation.None
|
|
31
|
+
})
|
|
32
|
+
export class ViewDashboardComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
33
|
+
|
|
34
|
+
@ViewChild('viewContainer', {read: ViewContainerRef}) viewContainer: ViewContainerRef;
|
|
35
|
+
|
|
36
|
+
@HostBinding('class.p-4') get t() {
|
|
37
|
+
return this.dashboard.displaySettings && this.dashboard.displaySettings.fullScreen;
|
|
38
|
+
}
|
|
39
|
+
@HostBinding('class.dark-mode-dashboard') darkMode = false;
|
|
40
|
+
|
|
41
|
+
@Input() dashboardService: any;
|
|
42
|
+
@Input() alertService: any;
|
|
43
|
+
@Input() datasetService: any;
|
|
44
|
+
@Input() datasourceService: any;
|
|
45
|
+
@Input() editAlerts: boolean;
|
|
46
|
+
@Input() sidenavService: any;
|
|
47
|
+
@Input() dashboardId: number;
|
|
48
|
+
@Input() gridOnly = false;
|
|
49
|
+
@Input() parameters: any;
|
|
50
|
+
@Input() hideToolbar = false;
|
|
51
|
+
@Input() actionEvents: any = [];
|
|
52
|
+
@Input() external = false;
|
|
53
|
+
@Input() reload: Subject<any>;
|
|
54
|
+
@Input() cssGridSelector = 'view-grid-stack';
|
|
55
|
+
|
|
56
|
+
public dashboard: any = {};
|
|
57
|
+
public activeSidePanel: string = null;
|
|
58
|
+
public _ = _;
|
|
59
|
+
public editDashboardTitle = false;
|
|
60
|
+
public fullScreen = false;
|
|
61
|
+
public admin: boolean;
|
|
62
|
+
public gridSpaces = [
|
|
63
|
+
{
|
|
64
|
+
label: 'Small',
|
|
65
|
+
value: '2px'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: 'Medium',
|
|
69
|
+
value: '5px'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Large',
|
|
73
|
+
value: '10px'
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
public refreshInterval = 0;
|
|
77
|
+
public hideParameters = false;
|
|
78
|
+
public fullOnly = false;
|
|
79
|
+
|
|
80
|
+
private grid: GridStack;
|
|
81
|
+
private queryParams: any = {};
|
|
82
|
+
private itemComponents: ItemComponentComponent[] = [];
|
|
83
|
+
private reloadSub: Subscription;
|
|
84
|
+
|
|
85
|
+
constructor(private componentFactoryResolver: ComponentFactoryResolver,
|
|
86
|
+
private applicationRef: ApplicationRef,
|
|
87
|
+
private injector: Injector,
|
|
88
|
+
private route: ActivatedRoute,
|
|
89
|
+
private kiDashboardService: DashboardService,
|
|
90
|
+
private dialog: MatDialog,
|
|
91
|
+
private snackBar: MatSnackBar,
|
|
92
|
+
private router: Router,
|
|
93
|
+
private kiAlertService: AlertService,
|
|
94
|
+
private location: Location,
|
|
95
|
+
private externalService: ExternalService,
|
|
96
|
+
private kiDatasetService: DatasetService) {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
ngOnInit(): void {
|
|
100
|
+
this.fullOnly = this.route.snapshot.data.full;
|
|
101
|
+
if (this.fullOnly) {
|
|
102
|
+
this.darkMode = localStorage.getItem('fullDashboardDarkMode') === 'true';
|
|
103
|
+
this.refreshInterval = Number(localStorage.getItem('fullDashboardRefreshInterval') || 0);
|
|
104
|
+
this.hideParameters = localStorage.getItem('fullDashboardHideParams') === 'true';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!this.dashboardService) {
|
|
108
|
+
this.dashboardService = this.kiDashboardService;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (!this.alertService) {
|
|
112
|
+
this.alertService = this.kiAlertService;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!this.datasetService) {
|
|
116
|
+
this.datasetService = this.kiDatasetService;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
this.route.queryParams.subscribe(params => {
|
|
120
|
+
const cloned = _.clone(params);
|
|
121
|
+
this.admin = !!cloned.a;
|
|
122
|
+
delete cloned.a;
|
|
123
|
+
this.queryParams = cloned;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
if (this.parameters) {
|
|
127
|
+
_.forEach(this.parameters, (value, key) => {
|
|
128
|
+
if (!this.queryParams[key]) {
|
|
129
|
+
this.queryParams[key] = value;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (this.reload) {
|
|
135
|
+
this.reloadSub = this.reload.subscribe(res => {
|
|
136
|
+
if (this.parameters) {
|
|
137
|
+
_.forEach(this.parameters, (value, key) => {
|
|
138
|
+
this.queryParams[key] = value;
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
Object.keys(this.queryParams).forEach(key => {
|
|
142
|
+
if (Object.keys(this.dashboard.layoutSettings.parameters || {}).length) {
|
|
143
|
+
if (this.dashboard.layoutSettings.parameters[key]) {
|
|
144
|
+
if (this.dashboard.layoutSettings.parameters[key].type === 'date' ||
|
|
145
|
+
this.dashboard.layoutSettings.parameters[key].type === 'datetime') {
|
|
146
|
+
this.queryParams[key] = moment(this.queryParams[key]).format('YYYY-MM-DDTHH:mm');
|
|
147
|
+
}
|
|
148
|
+
this.dashboard.layoutSettings.parameters[key].value = this.queryParams[key];
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
this.dashboard.datasetInstances.forEach(instance => {
|
|
153
|
+
if (!_.values(instance.parameterValues).length) {
|
|
154
|
+
instance.parameterValues = {};
|
|
155
|
+
}
|
|
156
|
+
instance.parameterValues[key] = this.queryParams[key];
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
this.reloadDashboard();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async ngAfterViewInit() {
|
|
166
|
+
const options = {
|
|
167
|
+
minRow: 1, // don't collapse when empty
|
|
168
|
+
float: true,
|
|
169
|
+
cellHeight: 20,
|
|
170
|
+
minW: 768,
|
|
171
|
+
disableOneColumnMode: false
|
|
172
|
+
};
|
|
173
|
+
this.grid = GridStack.init(options, '.' + this.cssGridSelector);
|
|
174
|
+
this.grid.enableMove(false);
|
|
175
|
+
this.grid.enableResize(false);
|
|
176
|
+
|
|
177
|
+
this.grid.on('added', (event: Event, newItems: GridStackNode[]) => {
|
|
178
|
+
newItems.forEach((item) => {
|
|
179
|
+
let dashboardItemType = null;
|
|
180
|
+
let itemElement: any = item.el.firstChild;
|
|
181
|
+
let instanceId = null;
|
|
182
|
+
|
|
183
|
+
if (item.content) {
|
|
184
|
+
itemElement = document.createRange().createContextualFragment(item.content);
|
|
185
|
+
dashboardItemType = itemElement.firstChild.dataset.dashboardItemType ?
|
|
186
|
+
JSON.parse(itemElement.firstChild.dataset.dashboardItemType) : null;
|
|
187
|
+
|
|
188
|
+
instanceId = itemElement.firstChild.id;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
while (item.el.firstChild.firstChild) {
|
|
192
|
+
item.el.firstChild.firstChild.remove();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
this.addComponentToGridItem(item.el.firstChild, instanceId,
|
|
196
|
+
dashboardItemType, !!dashboardItemType);
|
|
197
|
+
});
|
|
198
|
+
if (this.dashboard.displaySettings.inset) {
|
|
199
|
+
this.updateGridSpacing(this.dashboard.displaySettings.inset, false);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
const dashboardId = this.dashboardId || this.route.snapshot.params.dashboard;
|
|
204
|
+
|
|
205
|
+
if (this.external) {
|
|
206
|
+
this.dashboard = await this.externalService.getDashboard(dashboardId, this.queryParams);
|
|
207
|
+
|
|
208
|
+
this.darkMode = this.dashboard.externalSettings.darkMode;
|
|
209
|
+
this.refreshInterval = this.dashboard.externalSettings.refreshInterval;
|
|
210
|
+
this.hideParameters = !this.dashboard.externalSettings.showParameters;
|
|
211
|
+
|
|
212
|
+
} else {
|
|
213
|
+
this.dashboard = await this.dashboardService.getDashboard(dashboardId);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (this.dashboard.layoutSettings?.parameters && Object.keys(this.dashboard.layoutSettings.parameters).length) {
|
|
217
|
+
_.forEach(this.dashboard.layoutSettings.parameters, param => {
|
|
218
|
+
if (param.type === 'list') {
|
|
219
|
+
param.list = [];
|
|
220
|
+
this.loadListParameters(param);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
if (this.refreshInterval) {
|
|
227
|
+
let count = 0;
|
|
228
|
+
setInterval(() => {
|
|
229
|
+
if (count > 10) {
|
|
230
|
+
window.location.reload();
|
|
231
|
+
} else {
|
|
232
|
+
this.reloadDashboard();
|
|
233
|
+
count++;
|
|
234
|
+
}
|
|
235
|
+
}, (this.refreshInterval * 1000));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
Object.keys(this.queryParams).forEach(key => {
|
|
239
|
+
if (Object.keys(this.dashboard.layoutSettings.parameters || {}).length) {
|
|
240
|
+
if (this.dashboard.layoutSettings.parameters[key]) {
|
|
241
|
+
if (this.dashboard.layoutSettings.parameters[key].type === 'date' ||
|
|
242
|
+
this.dashboard.layoutSettings.parameters[key].type === 'datetime') {
|
|
243
|
+
this.queryParams[key] = moment(this.queryParams[key]).format('YYYY-MM-DDTHH:mm');
|
|
244
|
+
}
|
|
245
|
+
this.dashboard.layoutSettings.parameters[key].value = this.queryParams[key];
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
this.dashboard.datasetInstances.forEach(instance => {
|
|
250
|
+
if (!_.values(instance.parameterValues).length) {
|
|
251
|
+
instance.parameterValues = {};
|
|
252
|
+
}
|
|
253
|
+
instance.parameterValues[key] = this.queryParams[key];
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
if (Object.keys(this.dashboard.layoutSettings.parameters || {}).length) {
|
|
258
|
+
_.forEach(this.dashboard.layoutSettings.parameters, item => {
|
|
259
|
+
item.locked = !!item.locked;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (!this.dashboard.displaySettings) {
|
|
264
|
+
this.dashboard.displaySettings = {};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (this.dashboard.layoutSettings) {
|
|
268
|
+
if (this.dashboard.layoutSettings.grid && this.dashboard.layoutSettings.grid.length) {
|
|
269
|
+
this.grid.load(this.dashboard.layoutSettings.grid);
|
|
270
|
+
}
|
|
271
|
+
} else {
|
|
272
|
+
this.dashboard.layoutSettings = {};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (this.sidenavService && !this.fullOnly) {
|
|
276
|
+
setTimeout(() => {
|
|
277
|
+
this.sidenavService.close();
|
|
278
|
+
}, 0);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
ngOnDestroy() {
|
|
283
|
+
document.body.classList.remove('dark');
|
|
284
|
+
if (this.sidenavService) {
|
|
285
|
+
this.sidenavService.open();
|
|
286
|
+
}
|
|
287
|
+
if (this.reloadSub) {
|
|
288
|
+
this.reloadSub.unsubscribe();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
public back() {
|
|
293
|
+
this.location.back();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
public booleanUpdate(event, parameter) {
|
|
297
|
+
parameter.value = event.checked;
|
|
298
|
+
this.reloadDashboard();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
public changeDateType(event, parameter, value) {
|
|
302
|
+
event.stopPropagation();
|
|
303
|
+
event.preventDefault();
|
|
304
|
+
parameter._dateType = value;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
public updatePeriodValue(value, period, parameter) {
|
|
308
|
+
parameter.value = `${value}_${period}_AGO`;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
public editNotifications() {
|
|
312
|
+
this.editAlerts = !this.editAlerts;
|
|
313
|
+
this.grid.removeAll();
|
|
314
|
+
this.grid.load(this.dashboard.layoutSettings.grid);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
public viewFullscreen() {
|
|
318
|
+
const dashboardId = this.dashboardId || this.route.snapshot.params.dashboard;
|
|
319
|
+
window.location.href = `/dashboards/${dashboardId}/full${this.admin ? '?a=true&' : '?'}`;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
public toggleDarkMode() {
|
|
323
|
+
this.darkMode = !this.darkMode;
|
|
324
|
+
localStorage.setItem('fullDashboardDarkMode', String(this.darkMode));
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
public setRefreshInterval(intervalSeconds) {
|
|
328
|
+
if (intervalSeconds) {
|
|
329
|
+
localStorage.setItem('fullDashboardRefreshInterval', String(intervalSeconds));
|
|
330
|
+
} else {
|
|
331
|
+
localStorage.removeItem('fullDashboardRefreshInterval');
|
|
332
|
+
}
|
|
333
|
+
window.location.reload();
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
public toggleParameters() {
|
|
337
|
+
this.hideParameters = !this.hideParameters;
|
|
338
|
+
localStorage.setItem('fullDashboardHideParams', String(this.hideParameters));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
public updateGridSpacing(space, save = true) {
|
|
342
|
+
this.dashboard.displaySettings.inset = space;
|
|
343
|
+
document.querySelectorAll('.grid-stack-item-content')
|
|
344
|
+
.forEach((el: any) => el.style.inset = space);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
public setParameterValue(parameter, value) {
|
|
348
|
+
parameter.value = value;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
public async loadListParameters(parameter: any) {
|
|
352
|
+
if (parameter.settings && parameter.settings.datasetInstance) {
|
|
353
|
+
return this.datasetService.evaluateDataset(parameter.settings.datasetInstance, '0', '100000')
|
|
354
|
+
.then((data: any) => {
|
|
355
|
+
const list = _.map(data.allData, item => {
|
|
356
|
+
return {label: item[parameter.settings.labelColumn], value: item[parameter.settings.valueColumn]};
|
|
357
|
+
});
|
|
358
|
+
parameter.list = _.uniqWith(list, _.isEqual);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
public async reloadDashboard() {
|
|
364
|
+
for (const item of this.itemComponents) {
|
|
365
|
+
if (item.dashboardDatasetInstance) {
|
|
366
|
+
await item.init(true);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
private addComponentToGridItem(element, instanceId?, dashboardItemType?, load?) {
|
|
372
|
+
if (!this.dashboard.layoutSettings) {
|
|
373
|
+
this.dashboard.layoutSettings = {};
|
|
374
|
+
}
|
|
375
|
+
if (!this.dashboard.displaySettings) {
|
|
376
|
+
this.dashboard.displaySettings = {};
|
|
377
|
+
}
|
|
378
|
+
// create a component reference
|
|
379
|
+
const componentRef = this.componentFactoryResolver.resolveComponentFactory(ItemComponentComponent)
|
|
380
|
+
.create(this.injector);
|
|
381
|
+
|
|
382
|
+
// get DOM element from component
|
|
383
|
+
const domElem = (componentRef.hostView as EmbeddedViewRef<any>)
|
|
384
|
+
.rootNodes[0] as HTMLElement;
|
|
385
|
+
|
|
386
|
+
domElem.dataset.dashboardItemType = JSON.stringify(dashboardItemType || {});
|
|
387
|
+
|
|
388
|
+
element.appendChild(domElem);
|
|
389
|
+
|
|
390
|
+
element.firstChild.id = instanceId ? instanceId : 'i' + Date.now().toString();
|
|
391
|
+
instanceId = element.firstChild.id;
|
|
392
|
+
|
|
393
|
+
componentRef.instance.viewOnly = true;
|
|
394
|
+
componentRef.instance.admin = this.admin;
|
|
395
|
+
componentRef.instance.grid = this.grid;
|
|
396
|
+
componentRef.instance.dashboard = this.dashboard;
|
|
397
|
+
componentRef.instance.editAlerts = this.editAlerts;
|
|
398
|
+
componentRef.instance.actionEvents = this.actionEvents;
|
|
399
|
+
componentRef.instance.external = !!this.external;
|
|
400
|
+
componentRef.instance.queryParams = this.queryParams;
|
|
401
|
+
componentRef.instance.optimise = false;
|
|
402
|
+
|
|
403
|
+
const chartDetails = this.dashboard.layoutSettings.charts ? this.dashboard.layoutSettings.charts[instanceId] : null;
|
|
404
|
+
|
|
405
|
+
const dashboardDatasetInstance = _.find(this.dashboard.datasetInstances, {instanceKey: instanceId}) || null;
|
|
406
|
+
componentRef.instance.dashboardDatasetInstance = dashboardDatasetInstance;
|
|
407
|
+
componentRef.instance.dashboardItemType = chartDetails || (dashboardItemType || {});
|
|
408
|
+
componentRef.instance.itemInstanceKey = instanceId;
|
|
409
|
+
componentRef.instance.configureClass = !load;
|
|
410
|
+
componentRef.instance.init();
|
|
411
|
+
if (load) {
|
|
412
|
+
if (this.dashboard.layoutSettings.dependencies) {
|
|
413
|
+
const dependencies = this.dashboard.layoutSettings.dependencies[instanceId] || {};
|
|
414
|
+
if (!dependencies.instanceKeys || !dependencies.instanceKeys.length) {
|
|
415
|
+
componentRef.instance.load();
|
|
416
|
+
}
|
|
417
|
+
} else {
|
|
418
|
+
componentRef.instance.load();
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (this.dashboard.alertsEnabled && !this.external) {
|
|
423
|
+
if (dashboardDatasetInstance && dashboardDatasetInstance.alerts && dashboardDatasetInstance.alerts.length) {
|
|
424
|
+
this.alertService.processAlertsForDashboardDatasetInstance(dashboardDatasetInstance)
|
|
425
|
+
.then((res: any) => {
|
|
426
|
+
if (res && res.length) {
|
|
427
|
+
componentRef.instance.alert = true;
|
|
428
|
+
componentRef.instance.alertData = res;
|
|
429
|
+
const itemElement = document.getElementById(instanceId);
|
|
430
|
+
itemElement.classList.add('alert');
|
|
431
|
+
itemElement.parentElement.classList.add('alert');
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// attach component to the appRef so that it will be dirty checked.
|
|
438
|
+
this.applicationRef.attachView(componentRef.hostView);
|
|
439
|
+
|
|
440
|
+
const generalSettings = this.dashboard.layoutSettings.general ? this.dashboard.layoutSettings.general[instanceId] : null;
|
|
441
|
+
if (generalSettings && generalSettings.transparent) {
|
|
442
|
+
element.classList.add('bg-transparent');
|
|
443
|
+
element.classList.remove('bg-white', 'shadow');
|
|
444
|
+
} else {
|
|
445
|
+
element.classList.add('bg-white', 'shadow');
|
|
446
|
+
element.classList.remove('bg-transparent');
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
this.itemComponents.push(componentRef.instance);
|
|
450
|
+
|
|
451
|
+
return componentRef;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
private setDarkModeOnBody() {
|
|
455
|
+
if (this.darkMode) {
|
|
456
|
+
document.body.classList.add('dark');
|
|
457
|
+
} else {
|
|
458
|
+
document.body.classList.remove('dark');
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
}
|
package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.html
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<div class="flex flex-col h-full justify-between p-8">
|
|
2
|
+
<div>
|
|
3
|
+
<div class="mx-auto flex h-12 w-12 items-center justify-center">
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
|
|
5
|
+
class="w-12 h-12 text-orange-500">
|
|
6
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
|
|
7
|
+
</svg>
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
<div class="mt-3 text-center sm:mt-5">
|
|
11
|
+
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Change Source Query?</h3>
|
|
12
|
+
<div class="mt-2">
|
|
13
|
+
<p class="text-sm text-gray-500">
|
|
14
|
+
You are about to change the underlying dataset which may have different column mappings to the
|
|
15
|
+
dataset you are currently working with. Any upstream transformations that are not compatible will
|
|
16
|
+
cause the evaluation to fail. For convenience, we will disable all transformations after this point
|
|
17
|
+
so they can be reviewed manually one by one.
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="mt-5 flex align-center justify-between">
|
|
23
|
+
<button type="button" mat-dialog-close
|
|
24
|
+
class="mr-2 inline-flex w-full justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm">
|
|
25
|
+
Cancel
|
|
26
|
+
</button>
|
|
27
|
+
<button type="button" [matDialogClose]="true"
|
|
28
|
+
class="mx-2 inline-flex w-full justify-center rounded-md border border-primary text-primary bg-white px-4 py-2 text-sm font-medium shadow-sm">
|
|
29
|
+
Proceed With Change
|
|
30
|
+
</button>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.sass
ADDED
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ChangeSourceWarningComponent } from './change-source-warning.component';
|
|
4
|
+
|
|
5
|
+
describe('ChangeSourceWarningComponent', () => {
|
|
6
|
+
let component: ChangeSourceWarningComponent;
|
|
7
|
+
let fixture: ComponentFixture<ChangeSourceWarningComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ChangeSourceWarningComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ChangeSourceWarningComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {Component, OnInit} from '@angular/core';
|
|
2
|
+
import {MatLegacyDialogRef as MatDialogRef} from '@angular/material/legacy-dialog';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'ki-change-source-warning',
|
|
6
|
+
templateUrl: './change-source-warning.component.html',
|
|
7
|
+
styleUrls: ['./change-source-warning.component.sass']
|
|
8
|
+
})
|
|
9
|
+
export class ChangeSourceWarningComponent implements OnInit {
|
|
10
|
+
|
|
11
|
+
constructor(public dialogRef: MatDialogRef<ChangeSourceWarningComponent>) {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
ngOnInit(): void {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public close(res?) {
|
|
18
|
+
this.dialogRef.close(res);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|