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,257 @@
|
|
|
1
|
+
<div class="dialog" cdkDrag cdkDragRootElement=".cdk-overlay-pane">
|
|
2
|
+
|
|
3
|
+
<div class="dialog-title" cdkDragHandle>
|
|
4
|
+
<h2 mat-dialog-title>API Access</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="text-lg font-semibold mb-4">
|
|
14
|
+
Import Key
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="mb-4">
|
|
18
|
+
<input class="mt-2 w-full" type="text" [(ngModel)]="datasourceUpdate.instanceImportKey"
|
|
19
|
+
placeholder="Enter import key">
|
|
20
|
+
<small class="font-normal">This will be used as part of the API request</small>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<ng-template [ngIf]="showExample">
|
|
24
|
+
|
|
25
|
+
<div class="text-lg font-semibold mb-4">
|
|
26
|
+
Example API Usage
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="relative w-full mb-8">
|
|
30
|
+
<div class="text-base font-semibold">List</div>
|
|
31
|
+
<div class="text-sm mb-2">
|
|
32
|
+
Return the data for this datasource.
|
|
33
|
+
<br><br>
|
|
34
|
+
Filtering of the returned data can be effected by supplying parameters of the format <b>filter_COLUMNNAME</b>. The parameter value can either be
|
|
35
|
+
simply a value for exact match filtering or a value followed by a | and a match type which should be one of the following values:
|
|
36
|
+
<br><br>
|
|
37
|
+
<table>
|
|
38
|
+
<tr>
|
|
39
|
+
<td>eq</td>
|
|
40
|
+
<td>for an equals match</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr>
|
|
43
|
+
<td>neq</td>
|
|
44
|
+
<td>for a not equals match</td>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr>
|
|
47
|
+
<td>null</td>
|
|
48
|
+
<td>for a null match</td>
|
|
49
|
+
</tr>
|
|
50
|
+
<tr>
|
|
51
|
+
<td>notnull</td>
|
|
52
|
+
<td>for a not null match</td>
|
|
53
|
+
</tr>
|
|
54
|
+
<tr>
|
|
55
|
+
<td>gt</td>
|
|
56
|
+
<td>for a greater than match</td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td>lt</td>
|
|
60
|
+
<td>for a less than match</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td>gte</td>
|
|
64
|
+
<td>for a greater than or equals match</td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td>lte</td>
|
|
68
|
+
<td>for a less than or equals match</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td>startswith</td>
|
|
72
|
+
<td>for a string starts with match</td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td>endswith</td>
|
|
76
|
+
<td>for a string ends with match</td>
|
|
77
|
+
</tr>
|
|
78
|
+
<tr>
|
|
79
|
+
<td>contains</td>
|
|
80
|
+
<td>or a string contains match</td>
|
|
81
|
+
</tr>
|
|
82
|
+
</table>
|
|
83
|
+
<br><br>
|
|
84
|
+
Results can be sorted by supplying a <b>sort</b> parameter which identifies columns to sort and directions (either asc or desc) using pipe separation
|
|
85
|
+
<br><br>
|
|
86
|
+
By default the first 100 rows will be returned. Paging can be achieved by supplying
|
|
87
|
+
<b>limit</b> and <b>offset</b> parameters.
|
|
88
|
+
</div>
|
|
89
|
+
<div #list class=" bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4">
|
|
90
|
+
<pre class="whitespace-normal">curl -H <span class="text-cta">"API-KEY:<b>{{apiKeys ? apiKeys.apiKey : '[[apiKey]]'}}</b>"</span> -H <span class="text-cta">"API-SECRET:<b>{{apiKeys ? apiKeys.apiSecret : '[[apiSecret]]'}}</b>"</span></pre><pre class="whitespace-normal"> -X <b>GET</b> <span class="text-cta">{{backendURL}}/api/tabularData/{{datasourceUpdate.instanceImportKey}}?{{listQueryString}}&limit=50&offset=10</span></pre>
|
|
91
|
+
</div>
|
|
92
|
+
<button mat-icon-button [cdkCopyToClipboard]="list.textContent" (cdkCopyToClipboardCopied)="copied()"
|
|
93
|
+
class="text-white absolute bottom-0 right-0">
|
|
94
|
+
<mat-icon>content_copy</mat-icon>
|
|
95
|
+
</button>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<div class="relative w-full">
|
|
100
|
+
<div class="text-base font-semibold">Create</div>
|
|
101
|
+
<div class="text-sm mb-2">
|
|
102
|
+
Insert a set of new rows to the data source identified by the passed import key
|
|
103
|
+
</div>
|
|
104
|
+
<div #create class=" bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4">
|
|
105
|
+
<pre class="whitespace-normal">curl -H <span class="text-cta">"API-KEY:<b>{{apiKeys ? apiKeys.apiKey : '[[apiKey]]'}}</b>"</span> -H <span class="text-cta">"API-SECRET:<b>{{apiKeys ? apiKeys.apiSecret : '[[apiSecret]]'}}</b>"</span></pre><pre class="whitespace-normal"> -X <b>POST</b> <span class="text-cta">{{backendURL}}/api/tabularData/{{datasourceUpdate.instanceImportKey}}</span></pre>
|
|
106
|
+
</div>
|
|
107
|
+
<button mat-icon-button [cdkCopyToClipboard]="create.textContent" (cdkCopyToClipboardCopied)="copied()"
|
|
108
|
+
class="text-white absolute bottom-0 right-0">
|
|
109
|
+
<mat-icon>content_copy</mat-icon>
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div class="font-semibold text-sm my-1">Example Payload</div>
|
|
114
|
+
<div class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4 mb-8">
|
|
115
|
+
<pre class="whitespace-normal" [innerHTML]="createExample"></pre>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<div class="relative w-full">
|
|
119
|
+
<div class="text-base font-semibold">Replace</div>
|
|
120
|
+
<div class="text-sm mb-2">
|
|
121
|
+
Replace a set of rows to the data source identified by the passed import key. This will perform
|
|
122
|
+
an insert or update depending on whether the row already exists according to the unique key.
|
|
123
|
+
</div>
|
|
124
|
+
<div #replace class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4">
|
|
125
|
+
<pre class="whitespace-normal">curl -H <span class="text-cta">"API-KEY:<b>{{apiKeys ? apiKeys.apiKey : '[[apiKey]]'}}</b>"</span> -H <span class="text-cta">"API-SECRET:<b>{{apiKeys ? apiKeys.apiSecret : '[[apiSecret]]'}}</b>"</span></pre><pre class="whitespace-normal"> -X <b>PATCH</b> <span class="text-cta">{{backendURL}}/api/tabularData/{{datasourceUpdate.instanceImportKey}}</span></pre>
|
|
126
|
+
</div>
|
|
127
|
+
<button mat-icon-button [cdkCopyToClipboard]="replace.textContent"
|
|
128
|
+
class="text-white absolute bottom-0 right-0">
|
|
129
|
+
<mat-icon>content_copy</mat-icon>
|
|
130
|
+
</button>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="font-semibold text-sm my-1">Example Payload</div>
|
|
133
|
+
<div class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4 mb-8">
|
|
134
|
+
<pre class="whitespace-normal" [innerHTML]="updateExample"></pre>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<div class="relative w-full">
|
|
138
|
+
<div class="text-base font-semibold">Update</div>
|
|
139
|
+
<div class="text-sm mb-2">
|
|
140
|
+
Update a set of rows to the data source identified by the passed import key. This will perform
|
|
141
|
+
an update based upon the unique key and will not add any new rows if they don't already exist.
|
|
142
|
+
</div>
|
|
143
|
+
<div #update class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4">
|
|
144
|
+
<pre class="whitespace-normal">curl -H <span class="text-cta">"API-KEY:<b>{{apiKeys ? apiKeys.apiKey : '[[apiKey]]'}}</b>"</span> -H <span class="text-cta">"API-SECRET:<b>{{apiKeys ? apiKeys.apiSecret : '[[apiSecret]]'}}</b>"</span></pre><pre class="whitespace-normal"> -X <b>PUT</b> <span class="text-cta">{{backendURL}}/api/tabularData/{{datasourceUpdate.instanceImportKey}}</span></pre>
|
|
145
|
+
</div>
|
|
146
|
+
<button mat-icon-button [cdkCopyToClipboard]="update.textContent"
|
|
147
|
+
class="text-white absolute bottom-0 right-0">
|
|
148
|
+
<mat-icon>content_copy</mat-icon>
|
|
149
|
+
</button>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="font-semibold text-sm my-1">Example Payload</div>
|
|
152
|
+
<div class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4 mb-8">
|
|
153
|
+
<pre class="whitespace-normal" [innerHTML]="updateExample"></pre>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<div class="relative w-full">
|
|
157
|
+
<div class="text-base font-semibold">Delete</div>
|
|
158
|
+
<div class="text-sm mb-2">
|
|
159
|
+
Delete a set of rows explicitly by unique key for the data source identified by the passed import key.
|
|
160
|
+
</div>
|
|
161
|
+
<div #delete class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4">
|
|
162
|
+
<pre class="whitespace-normal">curl -H <span class="text-cta">"API-KEY:<b>{{apiKeys ? apiKeys.apiKey : '[[apiKey]]'}}</b>"</span> -H <span class="text-cta">"API-SECRET:<b>{{apiKeys ? apiKeys.apiSecret : '[[apiSecret]]'}}</b>"</span></pre><pre class="whitespace-normal"> -X <b>DELETE</b> <span class="text-cta">{{backendURL}}/api/tabularData/{{datasourceUpdate.instanceImportKey}}</span></pre>
|
|
163
|
+
</div>
|
|
164
|
+
<button mat-icon-button [cdkCopyToClipboard]="delete.textContent"
|
|
165
|
+
class="text-white absolute bottom-0 right-0">
|
|
166
|
+
<mat-icon>content_copy</mat-icon>
|
|
167
|
+
</button>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="font-semibold text-sm my-1">Example Payload</div>
|
|
170
|
+
<div class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4 mb-8">
|
|
171
|
+
<pre class="whitespace-normal" [innerHTML]="deleteExample">
|
|
172
|
+
</pre>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<div class="relative w-full">
|
|
176
|
+
<div class="text-base font-semibold">Filtered Delete</div>
|
|
177
|
+
<div class="text-sm mb-2">
|
|
178
|
+
Delete a set of rows using one or more filter expressions additively to identify the rows for deletion for the data source identified by the passed import key.
|
|
179
|
+
<br><br>
|
|
180
|
+
Filters are supplied as objects containing a column name supplied as the <b>column</b> property, a match value supplied as the <b>value</b> property and a match type supplied as
|
|
181
|
+
the <b>matchType</b> property.
|
|
182
|
+
<br><br>
|
|
183
|
+
Possible values for the <b>matchType</b> are:<br><br>
|
|
184
|
+
<table>
|
|
185
|
+
<tr>
|
|
186
|
+
<td>eq</td>
|
|
187
|
+
<td>for an equals match</td>
|
|
188
|
+
</tr>
|
|
189
|
+
<tr>
|
|
190
|
+
<td>neq</td>
|
|
191
|
+
<td>for a not equals match</td>
|
|
192
|
+
</tr>
|
|
193
|
+
<tr>
|
|
194
|
+
<td>null</td>
|
|
195
|
+
<td>for a null match</td>
|
|
196
|
+
</tr>
|
|
197
|
+
<tr>
|
|
198
|
+
<td>notnull</td>
|
|
199
|
+
<td>for a not null match</td>
|
|
200
|
+
</tr>
|
|
201
|
+
<tr>
|
|
202
|
+
<td>gt</td>
|
|
203
|
+
<td>for a greater than match</td>
|
|
204
|
+
</tr>
|
|
205
|
+
<tr>
|
|
206
|
+
<td>lt</td>
|
|
207
|
+
<td>for a less than match</td>
|
|
208
|
+
</tr>
|
|
209
|
+
<tr>
|
|
210
|
+
<td>gte</td>
|
|
211
|
+
<td>for a greater than or equals match</td>
|
|
212
|
+
</tr>
|
|
213
|
+
<tr>
|
|
214
|
+
<td>lte</td>
|
|
215
|
+
<td>for a less than or equals match</td>
|
|
216
|
+
</tr>
|
|
217
|
+
<tr>
|
|
218
|
+
<td>startswith</td>
|
|
219
|
+
<td>for a string starts with match</td>
|
|
220
|
+
</tr>
|
|
221
|
+
<tr>
|
|
222
|
+
<td>endswith</td>
|
|
223
|
+
<td>for a string ends with match</td>
|
|
224
|
+
</tr>
|
|
225
|
+
<tr>
|
|
226
|
+
<td>contains</td>
|
|
227
|
+
<td>or a string contains match</td>
|
|
228
|
+
</tr>
|
|
229
|
+
</table>
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
</div>
|
|
233
|
+
<div #deleteFiltered class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4">
|
|
234
|
+
<pre class="whitespace-normal">curl -H <span class="text-cta">"API-KEY:<b>{{apiKeys ? apiKeys.apiKey : '[[apiKey]]'}}</b>"</span> -H <span class="text-cta">"API-SECRET:<b>{{apiKeys ? apiKeys.apiSecret : '[[apiSecret]]'}}</b>"</span></pre><pre class="whitespace-normal"> -X <b>DELETE</b> <span class="text-cta">{{backendURL}}/api/tabularData/filtered/{{datasourceUpdate.instanceImportKey}}</span></pre>
|
|
235
|
+
</div>
|
|
236
|
+
<button mat-icon-button [cdkCopyToClipboard]="deleteFiltered.textContent"
|
|
237
|
+
class="text-white absolute bottom-0 right-0">
|
|
238
|
+
<mat-icon>content_copy</mat-icon>
|
|
239
|
+
</button>
|
|
240
|
+
</div>
|
|
241
|
+
<div class="font-semibold text-sm my-1">Example Payload</div>
|
|
242
|
+
<div class="relative bg-gray-800 border-2 border-gray-900 text-white rounded-md p-4 mb-8">
|
|
243
|
+
<pre class="whitespace-normal" [innerHTML]="deleteFilteredExample"></pre>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
</ng-template>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<div class="dialog-footer">
|
|
251
|
+
<button mat-button mat-dialog-close mat-stroked-button type="button">Close</button>
|
|
252
|
+
<button mat-button mat-flat-button color="primary" type="button" (click)="saveApiAccess()">Save</button>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
|
|
File without changes
|
package/src/lib/components/datasource/create-datasource/api-access/api-access.component.spec.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ApiAccessComponent } from './api-access.component';
|
|
4
|
+
|
|
5
|
+
describe('ApiAccessComponent', () => {
|
|
6
|
+
let component: ApiAccessComponent;
|
|
7
|
+
let fixture: ComponentFixture<ApiAccessComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ ApiAccessComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(ApiAccessComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import {Component, Inject, Input, OnInit} from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA,
|
|
4
|
+
MatLegacyDialogRef as MatDialogRef
|
|
5
|
+
} from '@angular/material/legacy-dialog';
|
|
6
|
+
import {DatasourceService} from '../../../../services/datasource.service';
|
|
7
|
+
import {MatLegacySnackBar as MatSnackBar} from '@angular/material/legacy-snack-bar';
|
|
8
|
+
import {HttpClient} from '@angular/common/http';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'ki-api-access',
|
|
12
|
+
templateUrl: './api-access.component.html',
|
|
13
|
+
styleUrls: ['./api-access.component.sass'],
|
|
14
|
+
host: {class: 'dialog-wrapper'}
|
|
15
|
+
})
|
|
16
|
+
export class ApiAccessComponent implements OnInit {
|
|
17
|
+
|
|
18
|
+
@Input() apiKeys: any;
|
|
19
|
+
|
|
20
|
+
public backendURL: string;
|
|
21
|
+
public datasourceUpdate: any;
|
|
22
|
+
public datasourceInstanceKey: any;
|
|
23
|
+
public columns: any;
|
|
24
|
+
public listQueryString: string = '';
|
|
25
|
+
public createExample: string;
|
|
26
|
+
public updateExample: string;
|
|
27
|
+
public deleteExample: string;
|
|
28
|
+
public deleteFilteredExample: string;
|
|
29
|
+
public showExample = false;
|
|
30
|
+
|
|
31
|
+
constructor(public dialogRef: MatDialogRef<ApiAccessComponent>,
|
|
32
|
+
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
33
|
+
private datasourceService: DatasourceService,
|
|
34
|
+
private snackBar: MatSnackBar,
|
|
35
|
+
private http: HttpClient) {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async ngOnInit() {
|
|
39
|
+
this.backendURL = this.data.backendURL;
|
|
40
|
+
this.datasourceUpdate = this.data.datasourceUpdate;
|
|
41
|
+
this.datasourceInstanceKey = this.data.datasourceInstanceKey;
|
|
42
|
+
this.columns = this.data.columns;
|
|
43
|
+
|
|
44
|
+
this.showExample = !!this.datasourceUpdate.instanceImportKey;
|
|
45
|
+
|
|
46
|
+
const example = ['[{'];
|
|
47
|
+
|
|
48
|
+
this.columns.forEach((column, index) => {
|
|
49
|
+
if (column.type !== 'id') {
|
|
50
|
+
example.push('<span class="text-cta">"' + column.name + '":</span> ' + this.getColumnTypeDisplayString(column.type));
|
|
51
|
+
if (index !== this.columns.length - 1) {
|
|
52
|
+
example.push(', ');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
this.listQueryString += 'filter_' + column.name + '=VALUE&';
|
|
56
|
+
if (index == this.columns.length - 1)
|
|
57
|
+
this.listQueryString += 'sort=' + column.name + '|desc';
|
|
58
|
+
});
|
|
59
|
+
example.push('}]');
|
|
60
|
+
this.createExample = example.join('');
|
|
61
|
+
|
|
62
|
+
const update = ['[{'];
|
|
63
|
+
this.columns.forEach((column, index) => {
|
|
64
|
+
update.push('<span class="text-cta">"' + column.name + '":</span> ' + this.getColumnTypeDisplayString(column.type));
|
|
65
|
+
if (index !== this.columns.length - 1) {
|
|
66
|
+
update.push(', ');
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
update.push('}]');
|
|
70
|
+
this.updateExample = update.join('');
|
|
71
|
+
|
|
72
|
+
const deleteString: string[] = ['[{'];
|
|
73
|
+
this.columns.forEach((column, index) => {
|
|
74
|
+
if (column.type === 'id' || column.keyField) {
|
|
75
|
+
if (index > 0) {
|
|
76
|
+
deleteString.push(', ');
|
|
77
|
+
}
|
|
78
|
+
deleteString.push('<span class="text-cta">"' + column.name + '":</span> ' + this.getColumnTypeDisplayString(column.type));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
deleteString.push('}]');
|
|
83
|
+
this.deleteExample = deleteString.join('');
|
|
84
|
+
|
|
85
|
+
const deleteFiltered: string[] = ['[{'];
|
|
86
|
+
if (this.columns.length > 0) {
|
|
87
|
+
deleteFiltered.push('<span class="text-cta">"column":</span> "' + this.columns[0].name + '", <span class="text-cta">"value:</span> "25", <span class="text-cta">"matchType:</span> "eq"');
|
|
88
|
+
}
|
|
89
|
+
deleteFiltered.push('}]');
|
|
90
|
+
this.deleteFilteredExample = deleteFiltered.join('');
|
|
91
|
+
|
|
92
|
+
this.apiKeys = await this.http.get('/account/apikey/first/customdatasourceupdate').toPromise();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
private getColumnTypeDisplayString(columnType) {
|
|
97
|
+
let exampleValue = null;
|
|
98
|
+
switch (columnType) {
|
|
99
|
+
case "integer":
|
|
100
|
+
exampleValue = 10;
|
|
101
|
+
break;
|
|
102
|
+
case "id":
|
|
103
|
+
exampleValue = 1;
|
|
104
|
+
break;
|
|
105
|
+
case "float":
|
|
106
|
+
exampleValue = "1.5";
|
|
107
|
+
break;
|
|
108
|
+
case "date":
|
|
109
|
+
exampleValue= "2025-01-01";
|
|
110
|
+
break;
|
|
111
|
+
case "datetime":
|
|
112
|
+
exampleValue = "2025-01-01 10:00:00";
|
|
113
|
+
break;
|
|
114
|
+
case "boolean":
|
|
115
|
+
exampleValue = "true";
|
|
116
|
+
break;
|
|
117
|
+
default:
|
|
118
|
+
exampleValue = "string value";
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
return columnType === "id" || columnType === "integer" || columnType === "float" || columnType === "boolean" ? exampleValue : '"' + exampleValue + '"';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
public copied() {
|
|
125
|
+
this.snackBar.open('Copied to Clipboard', null, {
|
|
126
|
+
duration: 2000,
|
|
127
|
+
verticalPosition: 'top'
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
public async saveApiAccess() {
|
|
132
|
+
await this.datasourceService.updateCustomDatasource(this.datasourceInstanceKey, {
|
|
133
|
+
title: this.datasourceUpdate.title,
|
|
134
|
+
importKey: this.datasourceUpdate.instanceImportKey,
|
|
135
|
+
fields: this.datasourceUpdate.fields,
|
|
136
|
+
adds: [],
|
|
137
|
+
updates: [],
|
|
138
|
+
deletes: [],
|
|
139
|
+
replaces: []
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
if (this.showExample) {
|
|
143
|
+
this.dialogRef.close();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
this.showExample = !!this.datasourceUpdate.instanceImportKey;
|
|
147
|
+
}
|
|
148
|
+
}
|