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,320 @@
|
|
|
1
|
+
import {Component, Input, OnDestroy, OnInit} from '@angular/core';
|
|
2
|
+
import {BehaviorSubject, merge, Subject, Subscription} from 'rxjs';
|
|
3
|
+
import {debounceTime, distinctUntilChanged, map, switchMap} from 'rxjs/operators';
|
|
4
|
+
import {DataExplorerComponent} from '../data-explorer/data-explorer.component';
|
|
5
|
+
import {MatLegacyDialog as MatDialog} from '@angular/material/legacy-dialog';
|
|
6
|
+
import {TagService} from '../../services/tag.service';
|
|
7
|
+
import {ProjectService} from '../../services/project.service';
|
|
8
|
+
import {DatasetService} from '../../services/dataset.service';
|
|
9
|
+
import {KinintelModuleConfig} from '../../ng-kinintel.module';
|
|
10
|
+
import * as lodash from 'lodash';
|
|
11
|
+
const _ = lodash.default;
|
|
12
|
+
import {MetadataComponent} from '../metadata/metadata.component';
|
|
13
|
+
import {ActivatedRoute, Router} from '@angular/router';
|
|
14
|
+
import {CreateDatasetComponent} from './create-dataset/create-dataset.component';
|
|
15
|
+
import {Location} from '@angular/common';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'ki-dataset',
|
|
19
|
+
templateUrl: './dataset.component.html',
|
|
20
|
+
styleUrls: ['./dataset.component.sass']
|
|
21
|
+
})
|
|
22
|
+
export class DatasetComponent implements OnInit, OnDestroy {
|
|
23
|
+
|
|
24
|
+
@Input() headingLabel: string;
|
|
25
|
+
@Input() headingDescription: string;
|
|
26
|
+
@Input() backendUrl: string;
|
|
27
|
+
@Input() newTitle: string;
|
|
28
|
+
@Input() newDescription: string;
|
|
29
|
+
@Input() hideCreate: boolean;
|
|
30
|
+
@Input() shared: boolean;
|
|
31
|
+
@Input() admin: boolean;
|
|
32
|
+
@Input() reload: Subject<any>;
|
|
33
|
+
@Input() url: string;
|
|
34
|
+
@Input() accountId: any;
|
|
35
|
+
@Input() contactUs: string;
|
|
36
|
+
@Input() tableHeading: string;
|
|
37
|
+
@Input() listStyle = 'LIST';
|
|
38
|
+
|
|
39
|
+
public datasets: any = [];
|
|
40
|
+
public searchText = new BehaviorSubject('');
|
|
41
|
+
public limit = 10;
|
|
42
|
+
public offset = 0;
|
|
43
|
+
public page = 1;
|
|
44
|
+
public endOfResults = false;
|
|
45
|
+
public categories: any = [];
|
|
46
|
+
public filteredCategories: any = [];
|
|
47
|
+
public Date = Date;
|
|
48
|
+
public activeTagSub = new Subject();
|
|
49
|
+
public projectSub = new Subject();
|
|
50
|
+
public activeTag: any;
|
|
51
|
+
public loading = true;
|
|
52
|
+
public gridItems: any = {};
|
|
53
|
+
public projectSettings: any = {};
|
|
54
|
+
|
|
55
|
+
private tagSub: Subscription;
|
|
56
|
+
private activeProject: any;
|
|
57
|
+
private activeProjectSub: Subscription;
|
|
58
|
+
|
|
59
|
+
constructor(private dialog: MatDialog,
|
|
60
|
+
private tagService: TagService,
|
|
61
|
+
private projectService: ProjectService,
|
|
62
|
+
private datasetService: DatasetService,
|
|
63
|
+
private router: Router,
|
|
64
|
+
private route: ActivatedRoute,
|
|
65
|
+
public config: KinintelModuleConfig,
|
|
66
|
+
private location: Location) {
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async ngOnInit() {
|
|
70
|
+
this.activeProject = this.projectService.activeProject.getValue();
|
|
71
|
+
|
|
72
|
+
this.activeProjectSub = this.projectService.activeProject.subscribe(activeProject => {
|
|
73
|
+
this.activeProject = activeProject;
|
|
74
|
+
|
|
75
|
+
this.projectSettings = (this.activeProject && this.activeProject.settings) ? (Array.isArray(this.activeProject.settings) ? {
|
|
76
|
+
hideExisting: false, shortcutPosition: 'after', homeDashboard: {}, shortcutsMenu: []
|
|
77
|
+
} : this.activeProject.settings) : {
|
|
78
|
+
hideExisting: false, shortcutPosition: 'after', homeDashboard: {}, shortcutsMenu: []
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const listKey = this.getCurrentPathListKey();
|
|
82
|
+
if (this.projectSettings[listKey]) {
|
|
83
|
+
this.listStyle = this.projectSettings[listKey];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
this.searchText.subscribe(() => {
|
|
88
|
+
this.page = 1;
|
|
89
|
+
this.offset = 0;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const pagingValues = this.projectService.getDataItemPagingValues();
|
|
93
|
+
this.limit = pagingValues.limit || 10;
|
|
94
|
+
this.offset = pagingValues.offset || 0;
|
|
95
|
+
this.page = pagingValues.page || 1;
|
|
96
|
+
|
|
97
|
+
this.route.params.subscribe(param => {
|
|
98
|
+
if (param.id) {
|
|
99
|
+
this.view(param.id);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (!this.reload) {
|
|
104
|
+
this.reload = new Subject();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (this.tagService) {
|
|
108
|
+
this.activeTagSub = this.tagService.activeTag;
|
|
109
|
+
this.tagSub = this.tagService.activeTag.subscribe(tag => this.activeTag = tag);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (this.projectService) {
|
|
113
|
+
this.projectSub = this.projectService.activeProject;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
this.getCategories();
|
|
117
|
+
|
|
118
|
+
merge(this.searchText, this.activeTagSub, this.projectSub, this.reload)
|
|
119
|
+
.pipe(
|
|
120
|
+
debounceTime(300),
|
|
121
|
+
// distinctUntilChanged(),
|
|
122
|
+
switchMap(() =>
|
|
123
|
+
this.getDatasets()
|
|
124
|
+
)
|
|
125
|
+
).subscribe((datasets: any) => {
|
|
126
|
+
this.datasets = datasets;
|
|
127
|
+
|
|
128
|
+
if (this.categories.length) {
|
|
129
|
+
this.gridItems = {};
|
|
130
|
+
this.categories.forEach(category => {
|
|
131
|
+
const items = _.filter(datasets, dataset => {
|
|
132
|
+
return !!_.find(dataset.categories, {key: category.key});
|
|
133
|
+
});
|
|
134
|
+
this.gridItems[category.key] = {
|
|
135
|
+
key: category.key,
|
|
136
|
+
title: category.category,
|
|
137
|
+
list: items
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const otherItems = _.filter(datasets, dataset => {
|
|
142
|
+
return !dataset.categories || !dataset.categories.length;
|
|
143
|
+
});
|
|
144
|
+
this.gridItems.other = {
|
|
145
|
+
key: 'other',
|
|
146
|
+
title: 'Other',
|
|
147
|
+
list: otherItems
|
|
148
|
+
};
|
|
149
|
+
} else {
|
|
150
|
+
this.listStyle = 'LIST';
|
|
151
|
+
}
|
|
152
|
+
this.loading = false;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
ngOnDestroy() {
|
|
157
|
+
if (this.tagSub) {
|
|
158
|
+
this.tagSub.unsubscribe();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
public view(datasetId) {
|
|
163
|
+
this.datasetService.getDataset(datasetId).then(datasetInstanceSummary => {
|
|
164
|
+
this.viewDataset(datasetInstanceSummary);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
public extend(id) {
|
|
169
|
+
this.datasetService.getExtendedDataset(id).then(datasetInstanceSummary => {
|
|
170
|
+
this.viewDataset(datasetInstanceSummary);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
public removeActiveTag() {
|
|
175
|
+
this.tagService.resetActiveTag();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
public updateListStyle() {
|
|
179
|
+
if (!this.admin) {
|
|
180
|
+
this.datasets = [];
|
|
181
|
+
const listKey = this.getCurrentPathListKey();
|
|
182
|
+
this.projectSettings[listKey] = this.listStyle;
|
|
183
|
+
this.projectService.updateProjectSettings(this.activeProject.projectKey, this.projectSettings);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
public toggleCategory(event, category) {
|
|
188
|
+
event.stopPropagation();
|
|
189
|
+
category.checked = !category.checked;
|
|
190
|
+
this.updateCategoryFilters();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
public updateCategoryFilters() {
|
|
194
|
+
this.offset = 0;
|
|
195
|
+
this.page = 1;
|
|
196
|
+
this.reload.next(Date.now());
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public delete(datasetId) {
|
|
200
|
+
const message = 'Are you sure you would like to remove this Dataset?';
|
|
201
|
+
if (window.confirm(message)) {
|
|
202
|
+
this.datasetService.removeDataset(datasetId).then(() => {
|
|
203
|
+
this.reload.next(Date.now());
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
public increaseOffset() {
|
|
209
|
+
this.page = this.page + 1;
|
|
210
|
+
this.offset = (this.limit * this.page) - this.limit;
|
|
211
|
+
this.reload.next(Date.now());
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
public decreaseOffset() {
|
|
215
|
+
this.page = this.page <= 1 ? 1 : this.page - 1;
|
|
216
|
+
this.offset = (this.limit * this.page) - this.limit;
|
|
217
|
+
this.reload.next(Date.now());
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
public pageSizeChange(value) {
|
|
221
|
+
this.page = 1;
|
|
222
|
+
this.offset = 0;
|
|
223
|
+
this.limit = value;
|
|
224
|
+
this.reload.next(Date.now());
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
public editMetadata(searchResult) {
|
|
228
|
+
const dialogRef = this.dialog.open(MetadataComponent, {
|
|
229
|
+
width: '700px',
|
|
230
|
+
height: '900px',
|
|
231
|
+
data: {
|
|
232
|
+
metadata: _.clone(searchResult),
|
|
233
|
+
service: this.datasetService
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
dialogRef.afterClosed().subscribe(res => {
|
|
237
|
+
if (res) {
|
|
238
|
+
this.reload.next(Date.now());
|
|
239
|
+
this.getCategories();
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
public create() {
|
|
245
|
+
const dialogRef = this.dialog.open(CreateDatasetComponent, {
|
|
246
|
+
width: '1200px',
|
|
247
|
+
height: '800px',
|
|
248
|
+
data: {
|
|
249
|
+
admin: this.admin,
|
|
250
|
+
accountId: this.accountId
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
dialogRef.afterClosed().subscribe(res => {
|
|
254
|
+
if (res) {
|
|
255
|
+
this.viewDataset(res);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
private viewDataset(datasetInstanceSummary) {
|
|
261
|
+
this.router.navigate([this.url || '/dataset'], {fragment: _.kebabCase(datasetInstanceSummary.title)});
|
|
262
|
+
const dialogRef = this.dialog.open(DataExplorerComponent, {
|
|
263
|
+
width: '100vw',
|
|
264
|
+
height: '100vh',
|
|
265
|
+
maxWidth: '100vw',
|
|
266
|
+
maxHeight: '100vh',
|
|
267
|
+
hasBackdrop: false,
|
|
268
|
+
closeOnNavigation: true,
|
|
269
|
+
data: {
|
|
270
|
+
datasetInstanceSummary,
|
|
271
|
+
backendUrl: this.backendUrl,
|
|
272
|
+
showChart: false,
|
|
273
|
+
admin: this.admin,
|
|
274
|
+
newTitle: this.newTitle ? this.newTitle + ' Name' : null,
|
|
275
|
+
newDescription: this.newDescription || null,
|
|
276
|
+
accountId: this.accountId,
|
|
277
|
+
breadcrumb: this.headingLabel || 'Datasets',
|
|
278
|
+
url: this.url
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
dialogRef.afterClosed().subscribe(res => {
|
|
282
|
+
if (res) {
|
|
283
|
+
if (res.breadcrumb) {
|
|
284
|
+
return this.router.navigate([res.breadcrumb], {fragment: null});
|
|
285
|
+
}
|
|
286
|
+
this.router.navigate([this.url || '/dataset'], {fragment: null});
|
|
287
|
+
this.reload.next(Date.now());
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
private getDatasets() {
|
|
293
|
+
this.projectService.setDataItemPagingValue(this.limit, this.offset, this.page);
|
|
294
|
+
|
|
295
|
+
const checkedCategories = _.filter(this.categories, 'checked');
|
|
296
|
+
return this.datasetService.getDatasets(
|
|
297
|
+
this.searchText.getValue() || '',
|
|
298
|
+
this.listStyle === 'GRID' ? '1000' : this.limit.toString(),
|
|
299
|
+
this.listStyle === 'GRID' ? '0' : this.offset.toString(),
|
|
300
|
+
this.shared ? null : (!_.isNil(this.accountId) ? this.accountId : ''),
|
|
301
|
+
'',
|
|
302
|
+
_.map(checkedCategories, 'key')
|
|
303
|
+
).pipe(map((datasets: any) => {
|
|
304
|
+
this.endOfResults = datasets.length < this.limit;
|
|
305
|
+
return datasets;
|
|
306
|
+
})
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
private getCategories() {
|
|
311
|
+
return this.datasetService.getDatasetCategories(this.shared).then(categories => this.categories = categories);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
private getCurrentPathListKey() {
|
|
315
|
+
const currentPath = this.location.path().replace('/', '-');
|
|
316
|
+
return _.camelCase('listStyle' + currentPath);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
protected readonly Object = Object;
|
|
320
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<div class="dialog" cdkDrag cdkDragRootElement=".cdk-overlay-pane">
|
|
2
|
+
|
|
3
|
+
<div class="dialog-title" cdkDragHandle>
|
|
4
|
+
<h2 mat-dialog-title>Advanced Settings</h2>
|
|
5
|
+
|
|
6
|
+
<button mat-icon-button mat-dialog-close>
|
|
7
|
+
<mat-icon>clear</mat-icon>
|
|
8
|
+
</button>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="dialog-content">
|
|
12
|
+
|
|
13
|
+
<div class="rounded-md bg-red-50 p-4 mb-4" *ngIf="errorMessage">
|
|
14
|
+
<div class="flex">
|
|
15
|
+
<div class="flex-shrink-0">
|
|
16
|
+
<svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
17
|
+
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd" />
|
|
18
|
+
</svg>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="ml-3">
|
|
21
|
+
<h3 class="text-sm font-medium text-red-800">There was an issue saving your datasource.</h3>
|
|
22
|
+
<div class="mt-2 text-sm text-red-700">
|
|
23
|
+
<ul role="list" class="list-disc space-y-1 pl-5">
|
|
24
|
+
<li>{{errorMessage}}</li>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<mat-checkbox class="mb-0" [(ngModel)]="advancedSettings.showAutoIncrement"
|
|
32
|
+
[disabled]="advancedSettings.primaryKeys.length">
|
|
33
|
+
Show Auto Increment Column
|
|
34
|
+
</mat-checkbox>
|
|
35
|
+
<div class="text-xs text-gray-500 mb-8">By default, datasources are created with an auto increment ID primary
|
|
36
|
+
key
|
|
37
|
+
column. Show this column using the toggle above.
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<hr>
|
|
41
|
+
|
|
42
|
+
<div class="font-medium text-base mt-6">Create custom primary key</div>
|
|
43
|
+
<div class="text-gray-500 text-sm mb-6">Drag column(s) to make up the primary key for this datasource</div>
|
|
44
|
+
|
|
45
|
+
<div class="flex justify-between">
|
|
46
|
+
<div class="example-container">
|
|
47
|
+
<div class="font-medium">Available Columns</div>
|
|
48
|
+
|
|
49
|
+
<div
|
|
50
|
+
cdkDropList
|
|
51
|
+
#columnList="cdkDropList"
|
|
52
|
+
[cdkDropListData]="columns"
|
|
53
|
+
[cdkDropListConnectedTo]="[pkList]"
|
|
54
|
+
class="example-list"
|
|
55
|
+
(cdkDropListDropped)="drop($event)">
|
|
56
|
+
<div class="example-box" *ngFor="let item of columns" cdkDrag>{{ item.title }}</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="example-container">
|
|
61
|
+
<div class="font-medium">Primary Key(s)</div>
|
|
62
|
+
|
|
63
|
+
<div
|
|
64
|
+
cdkDropList
|
|
65
|
+
#pkList="cdkDropList"
|
|
66
|
+
[cdkDropListData]="advancedSettings.primaryKeys"
|
|
67
|
+
[cdkDropListConnectedTo]="[columnList]"
|
|
68
|
+
class="example-list"
|
|
69
|
+
(cdkDropListDropped)="drop($event)">
|
|
70
|
+
<div class="example-box" *ngFor="let item of advancedSettings.primaryKeys" cdkDrag>
|
|
71
|
+
{{ item.title }}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<hr>
|
|
78
|
+
|
|
79
|
+
<div class="font-medium text-base mt-6">Datasource Indexes</div>
|
|
80
|
+
<div class="text-gray-500 text-sm mb-6">Select the columns to be indexed and drag to reorder if required.</div>
|
|
81
|
+
|
|
82
|
+
<ng-template ngFor let-aIndex [ngForOf]="advancedSettings.indexes" let-i=index>
|
|
83
|
+
<div class="flex justify-between p-3 mb-3 bg-gray-50">
|
|
84
|
+
<div class="example-container">
|
|
85
|
+
<div class="font-medium">Available Columns</div>
|
|
86
|
+
|
|
87
|
+
<mat-select [(ngModel)]="aIndex.indexCols" (ngModelChange)="updateIndexes(aIndex)" [multiple]="true">
|
|
88
|
+
<mat-option *ngFor="let column of columns2" [value]="column">
|
|
89
|
+
{{column.title}}
|
|
90
|
+
</mat-option>
|
|
91
|
+
</mat-select>
|
|
92
|
+
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div class="example-container">
|
|
96
|
+
<div class="font-medium">Indexes</div>
|
|
97
|
+
|
|
98
|
+
<div
|
|
99
|
+
cdkDropList
|
|
100
|
+
class="example-list"
|
|
101
|
+
(cdkDropListDropped)="dropIndex($event, aIndex.fieldNames)">
|
|
102
|
+
<div class="example-box" *ngFor="let item of aIndex.fieldNames" cdkDrag>
|
|
103
|
+
{{ aIndex.indexCols.length ? _.find(aIndex.indexCols, {name: item})?.title : '' }}
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<button mat-icon-button color="warn" class="self-center" type="button"
|
|
109
|
+
(click)="advancedSettings.indexes.splice(i, 1)">
|
|
110
|
+
<mat-icon>remove_circle_outline</mat-icon>
|
|
111
|
+
</button>
|
|
112
|
+
</div>
|
|
113
|
+
</ng-template>
|
|
114
|
+
<div class="flex justify-between">
|
|
115
|
+
<div></div>
|
|
116
|
+
<button mat-stroked-button color="primary" type="button"
|
|
117
|
+
(click)="advancedSettings.indexes.push({fieldNames: []})">
|
|
118
|
+
Create additional index
|
|
119
|
+
</button>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="dialog-footer">
|
|
125
|
+
<div></div>
|
|
126
|
+
<button mat-flat-button color="primary" type="button"
|
|
127
|
+
(click)="saveChanges()">Save Changes
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.example-container
|
|
2
|
+
width: 400px
|
|
3
|
+
max-width: 100%
|
|
4
|
+
margin: 0 25px 25px 0
|
|
5
|
+
display: inline-block
|
|
6
|
+
vertical-align: top
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
.example-list
|
|
10
|
+
border: solid 1px #ccc
|
|
11
|
+
min-height: 60px
|
|
12
|
+
background: white
|
|
13
|
+
border-radius: 4px
|
|
14
|
+
overflow: hidden
|
|
15
|
+
display: block
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
.example-box
|
|
19
|
+
padding: 10px
|
|
20
|
+
border-bottom: solid 1px #ccc
|
|
21
|
+
color: rgba(0, 0, 0, 0.87)
|
|
22
|
+
display: flex
|
|
23
|
+
flex-direction: row
|
|
24
|
+
align-items: center
|
|
25
|
+
justify-content: space-between
|
|
26
|
+
box-sizing: border-box
|
|
27
|
+
cursor: move
|
|
28
|
+
background: white
|
|
29
|
+
font-size: 14px
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
.cdk-drag-preview
|
|
33
|
+
box-sizing: border-box
|
|
34
|
+
border-radius: 4px
|
|
35
|
+
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
.cdk-drag-placeholder
|
|
39
|
+
opacity: 0
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
.cdk-drag-animating
|
|
43
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
.example-box:last-child
|
|
47
|
+
border: none
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder)
|
|
51
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AdvancedSettingsComponent } from './advanced-settings.component';
|
|
4
|
+
|
|
5
|
+
describe('AdvancedSettingsComponent', () => {
|
|
6
|
+
let component: AdvancedSettingsComponent;
|
|
7
|
+
let fixture: ComponentFixture<AdvancedSettingsComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ AdvancedSettingsComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(AdvancedSettingsComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {CdkDragDrop, moveItemInArray, transferArrayItem} from '@angular/cdk/drag-drop';
|
|
2
|
+
import {Component, Inject, OnInit} from '@angular/core';
|
|
3
|
+
import {
|
|
4
|
+
MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA,
|
|
5
|
+
MatLegacyDialogRef as MatDialogRef
|
|
6
|
+
} from '@angular/material/legacy-dialog';
|
|
7
|
+
import * as lodash from 'lodash';
|
|
8
|
+
import {DatasourceService} from '../../../../services/datasource.service';
|
|
9
|
+
|
|
10
|
+
const _ = lodash.default;
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'ki-advanced-settings',
|
|
14
|
+
templateUrl: './advanced-settings.component.html',
|
|
15
|
+
styleUrls: ['./advanced-settings.component.sass'],
|
|
16
|
+
host: {class: 'dialog-wrapper'}
|
|
17
|
+
})
|
|
18
|
+
export class AdvancedSettingsComponent implements OnInit {
|
|
19
|
+
|
|
20
|
+
public _ = _;
|
|
21
|
+
public columns: any = [];
|
|
22
|
+
public columns2: any = [];
|
|
23
|
+
public advancedSettings: any = {
|
|
24
|
+
showAutoIncrement: false,
|
|
25
|
+
primaryKeys: [],
|
|
26
|
+
indexes: [{fieldNames: []}]
|
|
27
|
+
};
|
|
28
|
+
public datasourceUpdate: any;
|
|
29
|
+
public errorMessage = '';
|
|
30
|
+
|
|
31
|
+
private datasourceInstanceKey: string;
|
|
32
|
+
private allColumns: any;
|
|
33
|
+
|
|
34
|
+
constructor(public dialogRef: MatDialogRef<AdvancedSettingsComponent>,
|
|
35
|
+
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
36
|
+
private datasourceService: DatasourceService) {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
ngOnInit() {
|
|
40
|
+
this.datasourceUpdate = this.data.datasourceUpdate;
|
|
41
|
+
this.datasourceInstanceKey = this.data.datasourceInstanceKey;
|
|
42
|
+
|
|
43
|
+
this.advancedSettings.showAutoIncrement = this.data.showAutoIncrement || false;
|
|
44
|
+
this.advancedSettings.primaryKeys = _.clone(_.filter(this.data.columns, {keyField: true}));
|
|
45
|
+
this.allColumns = _.clone(this.data.columns);
|
|
46
|
+
this.columns = _.clone(_.filter(this.data.columns, col => {
|
|
47
|
+
return !col.keyField;
|
|
48
|
+
}));
|
|
49
|
+
this.columns2 = _.clone(_.filter(this.data.columns, col => {
|
|
50
|
+
return true;
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
if (this.datasourceUpdate.indexes && this.datasourceUpdate.indexes.length) {
|
|
54
|
+
this.advancedSettings.indexes = this.datasourceUpdate.indexes;
|
|
55
|
+
this.advancedSettings.indexes.forEach(indexObj => {
|
|
56
|
+
indexObj.indexCols = _.clone(_.filter(this.data.columns, col => {
|
|
57
|
+
return indexObj.fieldNames.indexOf(col.name) > -1;
|
|
58
|
+
}));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public drop(event: CdkDragDrop<string[]>) {
|
|
64
|
+
if (event.previousContainer === event.container) {
|
|
65
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
66
|
+
} else {
|
|
67
|
+
transferArrayItem(
|
|
68
|
+
event.previousContainer.data,
|
|
69
|
+
event.container.data,
|
|
70
|
+
event.previousIndex,
|
|
71
|
+
event.currentIndex,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public dropIndex(event: CdkDragDrop<string[]>, data?: any) {
|
|
77
|
+
moveItemInArray(data || event.container.data, event.previousIndex, event.currentIndex);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public updateIndexes(index: any) {
|
|
81
|
+
index.indexCols.forEach(col => {
|
|
82
|
+
if (index.fieldNames.indexOf(col.name) === -1) {
|
|
83
|
+
index.fieldNames.push(col.name);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
index.fieldNames.forEach((fieldName: string, nameIndex: number) => {
|
|
87
|
+
if (_.findIndex(index.indexCols, {name: fieldName}) === -1) {
|
|
88
|
+
index.fieldNames.splice(nameIndex, 1);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
public async saveChanges() {
|
|
94
|
+
this.errorMessage = '';
|
|
95
|
+
this.datasourceUpdate.indexes = _.filter(this.advancedSettings.indexes, index => {
|
|
96
|
+
return index.fieldNames.length;
|
|
97
|
+
});
|
|
98
|
+
let showAutoIncrement = this.advancedSettings.showAutoIncrement;
|
|
99
|
+
|
|
100
|
+
if (this.advancedSettings.primaryKeys.length) {
|
|
101
|
+
showAutoIncrement = false;
|
|
102
|
+
_.remove(this.allColumns, {type: 'id'});
|
|
103
|
+
|
|
104
|
+
this.allColumns.map(column => {
|
|
105
|
+
column.keyField = !!_.find(this.advancedSettings.primaryKeys, {name: column.name});
|
|
106
|
+
return column;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
} else {
|
|
110
|
+
if (!_.find(this.allColumns, {type: 'id'})) {
|
|
111
|
+
this.allColumns.map(column => {
|
|
112
|
+
column.keyField = false;
|
|
113
|
+
return column;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
this.allColumns.unshift({
|
|
117
|
+
title: 'ID',
|
|
118
|
+
name: 'id',
|
|
119
|
+
type: 'id'
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
this.datasourceUpdate.fields = this.allColumns.map(column => {
|
|
125
|
+
if (column.name === column.previousName) {
|
|
126
|
+
delete column.previousName;
|
|
127
|
+
}
|
|
128
|
+
return column;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
try {
|
|
132
|
+
await this.datasourceService.updateCustomDatasource(this.datasourceInstanceKey, this.datasourceUpdate);
|
|
133
|
+
this.dialogRef.close({datasourceUpdate: this.datasourceUpdate, columns: this.allColumns, showAutoIncrement});
|
|
134
|
+
} catch (e) {
|
|
135
|
+
const error = e.error;
|
|
136
|
+
this.errorMessage = error.message || 'There was a problem updating this datasource. Please check your settings and try again.';
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
}
|