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.
Files changed (315) hide show
  1. package/README.md +24 -0
  2. package/karma.conf.js +44 -0
  3. package/ng-package.json +7 -0
  4. package/package.json +11 -0
  5. package/src/lib/components/alert-groups/alert-groups.component.html +140 -0
  6. package/src/lib/components/alert-groups/alert-groups.component.sass +4 -0
  7. package/src/lib/components/alert-groups/alert-groups.component.spec.ts +25 -0
  8. package/src/lib/components/alert-groups/alert-groups.component.ts +86 -0
  9. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.html +91 -0
  10. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.sass +2 -0
  11. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.spec.ts +25 -0
  12. package/src/lib/components/alert-groups/edit-alert-group/edit-alert-group.component.ts +78 -0
  13. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.html +2006 -0
  14. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.sass +106 -0
  15. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.spec.ts +25 -0
  16. package/src/lib/components/dashboard-editor/configure-item/configure-item.component.ts +967 -0
  17. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.html +81 -0
  18. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.sass +0 -0
  19. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.spec.ts +25 -0
  20. package/src/lib/components/dashboard-editor/configure-item/edit-dashboard-alert/edit-dashboard-alert.component.ts +48 -0
  21. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.html +142 -0
  22. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.sass +0 -0
  23. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.spec.ts +25 -0
  24. package/src/lib/components/dashboard-editor/configure-item/html-documentation/html-documentation.component.ts +117 -0
  25. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.html +224 -0
  26. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.sass +0 -0
  27. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.spec.ts +25 -0
  28. package/src/lib/components/dashboard-editor/configure-item/table-cell-formatter/table-cell-formatter.component.ts +149 -0
  29. package/src/lib/components/dashboard-editor/configure-item/vis-network-options.json +135 -0
  30. package/src/lib/components/dashboard-editor/dashboard-editor.component.html +205 -0
  31. package/src/lib/components/dashboard-editor/dashboard-editor.component.sass +247 -0
  32. package/src/lib/components/dashboard-editor/dashboard-editor.component.spec.ts +25 -0
  33. package/src/lib/components/dashboard-editor/dashboard-editor.component.ts +645 -0
  34. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.html +1 -0
  35. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.sass +0 -0
  36. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.spec.ts +25 -0
  37. package/src/lib/components/dashboard-editor/dashboard-parameter/dashboard-parameter.component.ts +16 -0
  38. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.html +167 -0
  39. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.sass +0 -0
  40. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.spec.ts +23 -0
  41. package/src/lib/components/dashboard-editor/dashboard-settings/dashboard-settings.component.ts +47 -0
  42. package/src/lib/components/dashboard-editor/item-component/item-component.component.html +486 -0
  43. package/src/lib/components/dashboard-editor/item-component/item-component.component.sass +137 -0
  44. package/src/lib/components/dashboard-editor/item-component/item-component.component.spec.ts +25 -0
  45. package/src/lib/components/dashboard-editor/item-component/item-component.component.ts +1381 -0
  46. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.html +48 -0
  47. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.sass +3 -0
  48. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.spec.ts +25 -0
  49. package/src/lib/components/dashboard-editor/source-selector-dialog/source-selector-dialog.component.ts +111 -0
  50. package/src/lib/components/dashboards/dashboards.component.html +175 -0
  51. package/src/lib/components/dashboards/dashboards.component.sass +64 -0
  52. package/src/lib/components/dashboards/dashboards.component.spec.ts +25 -0
  53. package/src/lib/components/dashboards/dashboards.component.ts +176 -0
  54. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.html +138 -0
  55. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.sass +284 -0
  56. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.spec.ts +25 -0
  57. package/src/lib/components/dashboards/view-dashboard/view-dashboard.component.ts +462 -0
  58. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.html +35 -0
  59. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.sass +0 -0
  60. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.spec.ts +23 -0
  61. package/src/lib/components/data-explorer/change-source-warning/change-source-warning.component.ts +21 -0
  62. package/src/lib/components/data-explorer/data-explorer.component.html +326 -0
  63. package/src/lib/components/data-explorer/data-explorer.component.sass +96 -0
  64. package/src/lib/components/data-explorer/data-explorer.component.spec.ts +25 -0
  65. package/src/lib/components/data-explorer/data-explorer.component.ts +267 -0
  66. package/src/lib/components/data-explorer/export-data/export-data.component.html +69 -0
  67. package/src/lib/components/data-explorer/export-data/export-data.component.sass +0 -0
  68. package/src/lib/components/data-explorer/export-data/export-data.component.spec.ts +25 -0
  69. package/src/lib/components/data-explorer/export-data/export-data.component.ts +56 -0
  70. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.html +195 -0
  71. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.sass +0 -0
  72. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.spec.ts +23 -0
  73. package/src/lib/components/data-explorer/snapshot-api-access/snapshot-api-access.component.ts +79 -0
  74. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.html +375 -0
  75. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.sass +21 -0
  76. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.spec.ts +25 -0
  77. package/src/lib/components/data-explorer/snapshot-profile-dialog/snapshot-profile-dialog.component.ts +197 -0
  78. package/src/lib/components/data-picker/data-picker.component.html +127 -0
  79. package/src/lib/components/data-picker/data-picker.component.sass +0 -0
  80. package/src/lib/components/data-picker/data-picker.component.spec.ts +25 -0
  81. package/src/lib/components/data-picker/data-picker.component.ts +90 -0
  82. package/src/lib/components/data-search/data-search.component.html +1 -0
  83. package/src/lib/components/data-search/data-search.component.sass +0 -0
  84. package/src/lib/components/data-search/data-search.component.spec.ts +23 -0
  85. package/src/lib/components/data-search/data-search.component.ts +10 -0
  86. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.html +53 -0
  87. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.sass +0 -0
  88. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.spec.ts +23 -0
  89. package/src/lib/components/data-sharing-invite/data-sharing-invite.component.ts +56 -0
  90. package/src/lib/components/dataset/create-dataset/create-dataset.component.html +25 -0
  91. package/src/lib/components/dataset/create-dataset/create-dataset.component.sass +0 -0
  92. package/src/lib/components/dataset/create-dataset/create-dataset.component.spec.ts +25 -0
  93. package/src/lib/components/dataset/create-dataset/create-dataset.component.ts +44 -0
  94. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.html +28 -0
  95. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.sass +0 -0
  96. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.spec.ts +25 -0
  97. package/src/lib/components/dataset/dataset-editor/available-columns/available-columns.component.ts +22 -0
  98. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.html +196 -0
  99. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.sass +17 -0
  100. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.spec.ts +25 -0
  101. package/src/lib/components/dataset/dataset-editor/dataset-add-join/dataset-add-join.component.ts +422 -0
  102. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.html +30 -0
  103. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.sass +47 -0
  104. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.spec.ts +25 -0
  105. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-editor/dataset-column-editor.component.ts +78 -0
  106. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.html +86 -0
  107. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.sass +0 -0
  108. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.spec.ts +25 -0
  109. package/src/lib/components/dataset/dataset-editor/dataset-column-settings/dataset-column-settings.component.ts +49 -0
  110. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.html +68 -0
  111. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.sass +15 -0
  112. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.spec.ts +25 -0
  113. package/src/lib/components/dataset/dataset-editor/dataset-create-formula/dataset-create-formula.component.ts +65 -0
  114. package/src/lib/components/dataset/dataset-editor/dataset-editor-popup.html +19 -0
  115. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.html +609 -0
  116. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.sass +267 -0
  117. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.spec.ts +25 -0
  118. package/src/lib/components/dataset/dataset-editor/dataset-editor.component.ts +1228 -0
  119. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.html +309 -0
  120. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.sass +41 -0
  121. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.spec.ts +25 -0
  122. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter/dataset-filter.component.ts +215 -0
  123. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.html +33 -0
  124. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.sass +3 -0
  125. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.spec.ts +23 -0
  126. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-inclusion/dataset-filter-inclusion.component.ts +20 -0
  127. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.html +52 -0
  128. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.sass +14 -0
  129. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.spec.ts +25 -0
  130. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filter-junction/dataset-filter-junction.component.ts +58 -0
  131. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.html +47 -0
  132. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.sass +25 -0
  133. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.spec.ts +25 -0
  134. package/src/lib/components/dataset/dataset-editor/dataset-filters/dataset-filters.component.ts +49 -0
  135. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.html +49 -0
  136. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.sass +2 -0
  137. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.spec.ts +25 -0
  138. package/src/lib/components/dataset/dataset-editor/dataset-name-dialog/dataset-name-dialog.component.ts +39 -0
  139. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.html +195 -0
  140. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.sass +14 -0
  141. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.spec.ts +25 -0
  142. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-add-parameter/dataset-add-parameter.component.ts +82 -0
  143. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.html +78 -0
  144. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.sass +16 -0
  145. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.spec.ts +25 -0
  146. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-type/dataset-parameter-type.component.ts +32 -0
  147. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.html +24 -0
  148. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.sass +22 -0
  149. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.spec.ts +25 -0
  150. package/src/lib/components/dataset/dataset-editor/dataset-parameter-values/dataset-parameter-values.component.ts +64 -0
  151. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.html +177 -0
  152. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.sass +80 -0
  153. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.spec.ts +25 -0
  154. package/src/lib/components/dataset/dataset-editor/dataset-summarise/dataset-summarise.component.ts +113 -0
  155. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.html +32 -0
  156. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.sass +0 -0
  157. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.spec.ts +23 -0
  158. package/src/lib/components/dataset/dataset-editor/move-transformation-confirmation/move-transformation-confirmation.component.ts +20 -0
  159. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.html +37 -0
  160. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.sass +0 -0
  161. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.spec.ts +23 -0
  162. package/src/lib/components/dataset/dataset-editor/remove-transformation-warning/remove-transformation-warning.component.ts +19 -0
  163. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.html +69 -0
  164. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.sass +0 -0
  165. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.spec.ts +23 -0
  166. package/src/lib/components/dataset/dataset-editor/save-as-query/save-as-query.component.ts +58 -0
  167. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.html +195 -0
  168. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.sass +0 -0
  169. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.spec.ts +23 -0
  170. package/src/lib/components/dataset/dataset-editor/share-query/share-query.component.ts +128 -0
  171. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.html +34 -0
  172. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.sass +3 -0
  173. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.spec.ts +23 -0
  174. package/src/lib/components/dataset/dataset-editor/upstream-changes-confirmation/upstream-changes-confirmation.component.ts +21 -0
  175. package/src/lib/components/dataset/dataset.component.html +317 -0
  176. package/src/lib/components/dataset/dataset.component.sass +73 -0
  177. package/src/lib/components/dataset/dataset.component.spec.ts +25 -0
  178. package/src/lib/components/dataset/dataset.component.ts +320 -0
  179. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.html +133 -0
  180. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.sass +51 -0
  181. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.spec.ts +23 -0
  182. package/src/lib/components/datasource/create-datasource/advanced-settings/advanced-settings.component.ts +140 -0
  183. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.html +257 -0
  184. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.sass +0 -0
  185. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.spec.ts +23 -0
  186. package/src/lib/components/datasource/create-datasource/api-access/api-access.component.ts +148 -0
  187. package/src/lib/components/datasource/create-datasource/create-datasource.component.html +430 -0
  188. package/src/lib/components/datasource/create-datasource/create-datasource.component.sass +162 -0
  189. package/src/lib/components/datasource/create-datasource/create-datasource.component.spec.ts +25 -0
  190. package/src/lib/components/datasource/create-datasource/create-datasource.component.ts +789 -0
  191. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.html +119 -0
  192. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.sass +8 -0
  193. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.spec.ts +25 -0
  194. package/src/lib/components/datasource/create-datasource/import-data/import-data.component.ts +163 -0
  195. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.html +239 -0
  196. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.sass +0 -0
  197. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.spec.ts +23 -0
  198. package/src/lib/components/datasource/create-datasource/import-data/import-wizard/import-wizard.component.ts +182 -0
  199. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.html +167 -0
  200. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.sass +87 -0
  201. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.spec.ts +23 -0
  202. package/src/lib/components/datasource/create-datasource/tabular-datasource/tabular-datasource.component.ts +164 -0
  203. package/src/lib/components/datasource/datasource.component.html +165 -0
  204. package/src/lib/components/datasource/datasource.component.sass +4 -0
  205. package/src/lib/components/datasource/datasource.component.spec.ts +25 -0
  206. package/src/lib/components/datasource/datasource.component.ts +174 -0
  207. package/src/lib/components/datasource/document-datasource/document-datasource.component.html +558 -0
  208. package/src/lib/components/datasource/document-datasource/document-datasource.component.sass +84 -0
  209. package/src/lib/components/datasource/document-datasource/document-datasource.component.spec.ts +25 -0
  210. package/src/lib/components/datasource/document-datasource/document-datasource.component.ts +351 -0
  211. package/src/lib/components/export-project/export-project.component.html +280 -0
  212. package/src/lib/components/export-project/export-project.component.sass +0 -0
  213. package/src/lib/components/export-project/export-project.component.spec.ts +23 -0
  214. package/src/lib/components/export-project/export-project.component.ts +29 -0
  215. package/src/lib/components/feeds/feed/feed.component.html +144 -0
  216. package/src/lib/components/feeds/feed/feed.component.sass +0 -0
  217. package/src/lib/components/feeds/feed/feed.component.spec.ts +25 -0
  218. package/src/lib/components/feeds/feed/feed.component.ts +102 -0
  219. package/src/lib/components/feeds/feeds.component.html +210 -0
  220. package/src/lib/components/feeds/feeds.component.sass +4 -0
  221. package/src/lib/components/feeds/feeds.component.spec.ts +25 -0
  222. package/src/lib/components/feeds/feeds.component.ts +163 -0
  223. package/src/lib/components/job-tasks/job-tasks.component.html +22 -0
  224. package/src/lib/components/job-tasks/job-tasks.component.sass +0 -0
  225. package/src/lib/components/job-tasks/job-tasks.component.spec.ts +25 -0
  226. package/src/lib/components/job-tasks/job-tasks.component.ts +19 -0
  227. package/src/lib/components/marketplace/marketplace.component.html +143 -0
  228. package/src/lib/components/marketplace/marketplace.component.sass +0 -0
  229. package/src/lib/components/marketplace/marketplace.component.spec.ts +23 -0
  230. package/src/lib/components/marketplace/marketplace.component.ts +73 -0
  231. package/src/lib/components/metadata/metadata.component.html +62 -0
  232. package/src/lib/components/metadata/metadata.component.sass +0 -0
  233. package/src/lib/components/metadata/metadata.component.spec.ts +25 -0
  234. package/src/lib/components/metadata/metadata.component.ts +67 -0
  235. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.html +82 -0
  236. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.sass +21 -0
  237. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.spec.ts +25 -0
  238. package/src/lib/components/notification-groups/edit-notification-group/edit-notification-group.component.ts +123 -0
  239. package/src/lib/components/notification-groups/notification-groups.component.html +125 -0
  240. package/src/lib/components/notification-groups/notification-groups.component.sass +4 -0
  241. package/src/lib/components/notification-groups/notification-groups.component.spec.ts +25 -0
  242. package/src/lib/components/notification-groups/notification-groups.component.ts +98 -0
  243. package/src/lib/components/project-picker/project-picker.component.html +167 -0
  244. package/src/lib/components/project-picker/project-picker.component.sass +1 -0
  245. package/src/lib/components/project-picker/project-picker.component.spec.ts +25 -0
  246. package/src/lib/components/project-picker/project-picker.component.ts +138 -0
  247. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.html +120 -0
  248. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.sass +0 -0
  249. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.spec.ts +23 -0
  250. package/src/lib/components/project-settings/project-link-selection/project-link-selection.component.ts +161 -0
  251. package/src/lib/components/project-settings/project-settings.component.html +353 -0
  252. package/src/lib/components/project-settings/project-settings.component.sass +0 -0
  253. package/src/lib/components/project-settings/project-settings.component.spec.ts +23 -0
  254. package/src/lib/components/project-settings/project-settings.component.ts +178 -0
  255. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.html +96 -0
  256. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.sass +0 -0
  257. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.spec.ts +23 -0
  258. package/src/lib/components/query-caching/edit-query-cache/edit-query-cache.component.ts +48 -0
  259. package/src/lib/components/query-caching/query-caching.component.html +122 -0
  260. package/src/lib/components/query-caching/query-caching.component.sass +0 -0
  261. package/src/lib/components/query-caching/query-caching.component.spec.ts +23 -0
  262. package/src/lib/components/query-caching/query-caching.component.ts +184 -0
  263. package/src/lib/components/shared-with-me/shared-with-me.component.html +115 -0
  264. package/src/lib/components/shared-with-me/shared-with-me.component.sass +0 -0
  265. package/src/lib/components/shared-with-me/shared-with-me.component.spec.ts +23 -0
  266. package/src/lib/components/shared-with-me/shared-with-me.component.ts +123 -0
  267. package/src/lib/components/snapshots/snapshots.component.html +408 -0
  268. package/src/lib/components/snapshots/snapshots.component.sass +4 -0
  269. package/src/lib/components/snapshots/snapshots.component.spec.ts +25 -0
  270. package/src/lib/components/snapshots/snapshots.component.ts +286 -0
  271. package/src/lib/components/tag-picker/tag-picker.component.html +155 -0
  272. package/src/lib/components/tag-picker/tag-picker.component.sass +2 -0
  273. package/src/lib/components/tag-picker/tag-picker.component.spec.ts +25 -0
  274. package/src/lib/components/tag-picker/tag-picker.component.ts +82 -0
  275. package/src/lib/components/task-time-periods/task-time-periods.component.html +93 -0
  276. package/src/lib/components/task-time-periods/task-time-periods.component.sass +7 -0
  277. package/src/lib/components/task-time-periods/task-time-periods.component.spec.ts +25 -0
  278. package/src/lib/components/task-time-periods/task-time-periods.component.ts +50 -0
  279. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.html +111 -0
  280. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.sass +0 -0
  281. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.spec.ts +25 -0
  282. package/src/lib/components/whitelisted-sql-functions/whitelisted-sql-functions.component.ts +38 -0
  283. package/src/lib/guards/dashboard-changes.guard.spec.ts +16 -0
  284. package/src/lib/guards/dashboard-changes.guard.ts +27 -0
  285. package/src/lib/ng-kinintel.module.ts +272 -0
  286. package/src/lib/objects/action-event.spec.ts +7 -0
  287. package/src/lib/objects/action-event.ts +27 -0
  288. package/src/lib/services/alert.service.spec.ts +16 -0
  289. package/src/lib/services/alert.service.ts +49 -0
  290. package/src/lib/services/dashboard.service.spec.ts +16 -0
  291. package/src/lib/services/dashboard.service.ts +79 -0
  292. package/src/lib/services/data-processor.service.spec.ts +16 -0
  293. package/src/lib/services/data-processor.service.ts +61 -0
  294. package/src/lib/services/data-search.service.spec.ts +16 -0
  295. package/src/lib/services/data-search.service.ts +31 -0
  296. package/src/lib/services/dataset.service.spec.ts +16 -0
  297. package/src/lib/services/dataset.service.ts +234 -0
  298. package/src/lib/services/datasource.service.spec.ts +16 -0
  299. package/src/lib/services/datasource.service.ts +116 -0
  300. package/src/lib/services/external.service.spec.ts +16 -0
  301. package/src/lib/services/external.service.ts +29 -0
  302. package/src/lib/services/feed.service.spec.ts +16 -0
  303. package/src/lib/services/feed.service.ts +48 -0
  304. package/src/lib/services/notification.service.spec.ts +16 -0
  305. package/src/lib/services/notification.service.ts +38 -0
  306. package/src/lib/services/project.service.spec.ts +16 -0
  307. package/src/lib/services/project.service.ts +146 -0
  308. package/src/lib/services/tag.service.spec.ts +16 -0
  309. package/src/lib/services/tag.service.ts +61 -0
  310. package/src/public-api.ts +46 -0
  311. package/src/test.ts +17 -0
  312. package/tsconfig.lib.json +24 -0
  313. package/tsconfig.lib.prod.json +10 -0
  314. package/tsconfig.spec.json +17 -0
  315. package/tslint.json +17 -0
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # NgKinintel
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.11.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project ng-kinintel` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-kinintel`.
8
+ > Note: Don't forget to add `--project ng-kinintel` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build ng-kinintel` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build ng-kinintel`, go to the dist folder `cd dist/ng-kinintel` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test ng-kinintel` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
package/karma.conf.js ADDED
@@ -0,0 +1,44 @@
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-chrome-launcher'),
11
+ require('karma-jasmine-html-reporter'),
12
+ require('karma-coverage'),
13
+ require('@angular-devkit/build-angular/plugins/karma')
14
+ ],
15
+ client: {
16
+ jasmine: {
17
+ // you can add configuration options for Jasmine here
18
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
+ // for example, you can disable the random execution with `random: false`
20
+ // or set a specific seed with `seed: 4321`
21
+ },
22
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
23
+ },
24
+ jasmineHtmlReporter: {
25
+ suppressAll: true // removes the duplicated traces
26
+ },
27
+ coverageReporter: {
28
+ dir: require('path').join(__dirname, '../../coverage/ng-kinintel'),
29
+ subdir: '.',
30
+ reporters: [
31
+ { type: 'html' },
32
+ { type: 'text-summary' }
33
+ ]
34
+ },
35
+ reporters: ['progress', 'kjhtml'],
36
+ port: 9876,
37
+ colors: true,
38
+ logLevel: config.LOG_INFO,
39
+ autoWatch: true,
40
+ browsers: ['Chrome'],
41
+ singleRun: false,
42
+ restartOnFileChange: true
43
+ });
44
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/ng-kinintel",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
+ }
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "ng-kinintel",
3
+ "version": "0.0.317",
4
+ "peerDependencies": {
5
+ "@angular/common": "^11.2.11",
6
+ "@angular/core": "^11.2.11"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.0.0"
10
+ }
11
+ }
@@ -0,0 +1,140 @@
1
+ <div class="p-6 bg-white border-b border-gray-200">
2
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
3
+ <div class="flex items-start flex-1">
4
+ <div class="pt-1.5">
5
+ <h1 class="text-2xl font-bold text-gray-900">Alert Groups</h1>
6
+ <p class="text-sm font-medium text-gray-500">
7
+ A list of all the alert groups currently available.
8
+ </p>
9
+ </div>
10
+ </div>
11
+ <div class="mt-6 flex flex-col-reverse justify-stretch">
12
+ <button type="button" [routerLink]="['/alert-groups', 0]"
13
+ class="inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-primary focus:outline-none">
14
+ Create Alert Group
15
+ </button>
16
+ </div>
17
+ </div>
18
+ </div>
19
+
20
+ <div class="p-4" *ngIf="!alertGroups.length && !loading">
21
+ <button type="button" [routerLink]="['/alert-groups', 0]"
22
+ class="relative block w-full border-2 border-gray-300 border-dashed rounded-lg p-12 text-center hover:border-gray-400 focus:outline-none">
23
+
24
+ <div class="relative inline-block">
25
+ <span class="material-symbols-outlined mx-auto text-6xl h-14 w-20 text-gray-300">campaign</span>
26
+ <svg xmlns="http://www.w3.org/2000/svg"
27
+ class="right-0 bottom-0 absolute h-8 w-8 text-gray-400" fill="none" viewBox="0 0 24 24"
28
+ stroke="currentColor" stroke-width="4">
29
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4"/>
30
+ </svg>
31
+ </div>
32
+
33
+ <span class="mt-2 block text-sm font-medium text-gray-900">Create Alert Group</span>
34
+ </button>
35
+ </div>
36
+
37
+ <div class="px-4 sm:px-6 lg:px-8 mt-0">
38
+ <div class="flex flex-col">
39
+ <div class="-my-2 -mx-4 sm:-mx-6 lg:-mx-8">
40
+ <div class="inline-block min-w-full py-2 align-middle">
41
+ <div class="mt-3 sm:mt-0 flex-1" *ngIf="alertGroups.length">
42
+ <label for="mobile-search-candidate" class="sr-only">Search</label>
43
+ <div class="flex">
44
+ <div class="relative flex-grow focus-within:z-10">
45
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
46
+ <svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg"
47
+ viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
48
+ <path fill-rule="evenodd"
49
+ d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
50
+ clip-rule="evenodd"/>
51
+ </svg>
52
+ </div>
53
+ <input type="text" name="mobile-search-candidate" id="mobile-search-candidate"
54
+ class="block w-full rounded-none pl-10 border-t-0 border-l-0 border-gray-300"
55
+ placeholder="Search alert groups"
56
+ (keyup)="searchText.next($event.target.value)">
57
+ </div>
58
+ </div>
59
+ </div>
60
+ <table class="min-w-full border-separate" style="border-spacing: 0" *ngIf="alertGroups.length">
61
+ <thead class="bg-gray-100">
62
+ <tr>
63
+ <th scope="col"
64
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 text-left text-xs font-semibold text-gray-900 backdrop-blur backdrop-filter">
65
+ Name
66
+ </th>
67
+ <th scope="col"
68
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 text-left text-xs font-semibold text-gray-900 backdrop-blur backdrop-filter">
69
+ Status
70
+ </th>
71
+ <th scope="col"
72
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 text-left text-xs font-semibold text-gray-900 backdrop-blur backdrop-filter">
73
+ Next Run
74
+ </th>
75
+ <th scope="col"
76
+ class="sticky top-0 z-10 border-b border-gray-300 bg-gray-50 bg-opacity-75 py-3.5 px-4 backdrop-blur backdrop-filter">
77
+ <span class="sr-only">Edit</span>
78
+ </th>
79
+ </tr>
80
+ </thead>
81
+ <tbody class="bg-white">
82
+ <tr *ngFor="let element of alertGroups; let i = index" class="cursor-pointer hover:bg-gray-50">
83
+ <td [ngClass]="{'border-b-0': i === alertGroups.length - 1, 'border-b': i !== alertGroups.length - 1}"
84
+ class="whitespace-nowrap border-gray-200 py-2 px-4 text-sm font-medium text-gray-900">
85
+ {{element.title}}
86
+ </td>
87
+ <td [ngClass]="{'border-b-0': i === alertGroups.length - 1, 'border-b': i !== alertGroups.length - 1}"
88
+ class="whitespace-nowrap border-gray-200 py-2 px-4 text-sm text-gray-900">
89
+ {{element.taskStatus}}
90
+ </td>
91
+ <td [ngClass]="{'border-b-0': i === alertGroups.length - 1, 'border-b': i !== alertGroups.length - 1}"
92
+ class="whitespace-nowrap border-gray-200 py-2 px-4 text-sm text-gray-900">
93
+ {{moment.unix(element.taskNextStartTime.timestamp).format('DD/MM/YYYY HH:mm')}}
94
+ </td>
95
+ <td class="relative whitespace-nowrap border-gray-200 py-2 px-4 text-right text-sm"
96
+ [ngClass]="{'border-b-0': i === alertGroups.length - 1, 'border-b': i !== alertGroups.length - 1}">
97
+ <div class="align-center justify-end">
98
+ <button mat-button color="primary" [routerLink]="['/alert-groups', element.id]"> Edit
99
+ </button>
100
+ <div class="divider"></div>
101
+ <div class="divider"></div>
102
+ <button color="primary" mat-icon-button [matMenuTriggerFor]="itemMenu">
103
+ <mat-icon>more_vert</mat-icon>
104
+ </button>
105
+ <mat-menu #itemMenu="matMenu">
106
+ <button mat-menu-item (click)="delete(element.id)">Delete Alert Group</button>
107
+ </mat-menu>
108
+ </div>
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <td colspan="5"
113
+ class="border-t bg-gray-50 whitespace-nowrap border-b border-gray-200 py-1 px-4 text-sm font-medium text-gray-900">
114
+ <div class="paging-toolbar flex align-center justify-end">
115
+ <select [value]="limit.getValue()" (change)="pageSizeChange($event.target.value)"
116
+ class="mr-8 p-1.5">
117
+ <option [value]="1">1</option>
118
+ <option [value]="5">5</option>
119
+ <option [value]="10">10</option>
120
+ <option [value]="25">25</option>
121
+ <option [value]="50">50</option>
122
+ <option [value]="100">100</option>
123
+ <option [value]="250">250</option>
124
+ <option [value]="1000">1000</option>
125
+ </select>
126
+ <button mat-icon-button class="mr-4" (click)="decreaseOffset()" [disabled]="page <= 1">
127
+ <mat-icon>chevron_left</mat-icon>
128
+ </button>
129
+ <button mat-icon-button (click)="increaseOffset()" [disabled]="endOfResults">
130
+ <mat-icon>chevron_right</mat-icon>
131
+ </button>
132
+ </div>
133
+ </td>
134
+ </tr>
135
+ </tbody>
136
+ </table>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </div>
@@ -0,0 +1,4 @@
1
+ .divider
2
+ width: 1px
3
+ height: 17px
4
+ background-color: #cecece
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { AlertGroupsComponent } from './alert-groups.component';
4
+
5
+ describe('AlertGroupsComponent', () => {
6
+ let component: AlertGroupsComponent;
7
+ let fixture: ComponentFixture<AlertGroupsComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ AlertGroupsComponent ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(AlertGroupsComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,86 @@
1
+ import {Component, OnInit} from '@angular/core';
2
+ import {BehaviorSubject, merge, Subject} from 'rxjs';
3
+ import {debounceTime, map, switchMap} from 'rxjs/operators';
4
+ import {ProjectService} from '../../../lib/services/project.service';
5
+ import {AlertService} from '../../../lib/services/alert.service';
6
+ import moment from 'moment';
7
+
8
+ @Component({
9
+ selector: 'ki-alert-groups',
10
+ templateUrl: './alert-groups.component.html',
11
+ styleUrls: ['./alert-groups.component.sass']
12
+ })
13
+ export class AlertGroupsComponent implements OnInit {
14
+
15
+ public alertGroups: any = [];
16
+ public searchText = new BehaviorSubject('');
17
+ public limit = new BehaviorSubject(10);
18
+ public offset = new BehaviorSubject(0);
19
+ public projectSub = new Subject();
20
+ public moment = moment;
21
+ public page = 1;
22
+ public endOfResults = false;
23
+ public loading = true;
24
+
25
+ private reload = new Subject();
26
+
27
+ constructor(private projectService: ProjectService,
28
+ private alertService: AlertService) {
29
+
30
+ }
31
+
32
+ ngOnInit(): void {
33
+ if (this.projectService) {
34
+ this.projectSub = this.projectService.activeProject;
35
+ }
36
+
37
+ merge(this.searchText, this.limit, this.offset, this.projectSub, this.reload)
38
+ .pipe(
39
+ debounceTime(300),
40
+ // distinctUntilChanged(),
41
+ switchMap(() =>
42
+ this.getAlertGroups()
43
+ )
44
+ ).subscribe((alertGroups: any) => {
45
+ this.endOfResults = alertGroups.length < this.limit.getValue();
46
+ this.alertGroups = alertGroups;
47
+ this.loading = false;
48
+ });
49
+
50
+ }
51
+
52
+ public increaseOffset() {
53
+ this.page = this.page + 1;
54
+ this.offset.next((this.limit.getValue() * this.page) - this.limit.getValue());
55
+ }
56
+
57
+ public decreaseOffset() {
58
+ this.page = this.page <= 1 ? 1 : this.page - 1;
59
+ this.offset.next((this.limit.getValue() * this.page) - this.limit.getValue());
60
+ }
61
+
62
+ public pageSizeChange(value) {
63
+ this.limit.next(value);
64
+ }
65
+
66
+ public delete(id) {
67
+ const message = 'Are you sure you would like to delete this Alert Group?';
68
+ if (window.confirm(message)) {
69
+ this.alertService.deleteAlertGroup(id).then(() => {
70
+ this.reload.next(Date.now());
71
+ });
72
+ }
73
+ }
74
+
75
+ private getAlertGroups() {
76
+ return this.alertService.getAlertGroups(
77
+ this.searchText.getValue() || '',
78
+ this.limit.getValue().toString(),
79
+ this.offset.getValue().toString()
80
+ ).pipe(map((alertGroups: any) => {
81
+ return alertGroups;
82
+ })
83
+ );
84
+ }
85
+
86
+ }
@@ -0,0 +1,91 @@
1
+ <div class="p-6 bg-white border-b border-gray-200">
2
+ <div class="md:flex md:items-center md:justify-between md:space-x-5">
3
+ <div class="flex items-start flex-1">
4
+ <div class="pt-1.5">
5
+ <h1 class="text-2xl font-bold text-gray-900 mb-0">Alert Group</h1>
6
+ <p class="text-sm font-medium text-gray-500">
7
+ These details will be used to schedule alerts with the system.
8
+ </p>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="space-y-8 divide-y divide-gray-200 p-6">
15
+ <div class="space-y-8 divide-y divide-gray-200 sm:space-y-5">
16
+ <div>
17
+ <div class="space-y-6 sm:space-y-5">
18
+ <div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start">
19
+ <label class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">
20
+ Name <span class="text-red-500">*</span>
21
+ </label>
22
+ <div class="mt-1 sm:mt-0 sm:col-span-2">
23
+ <input type="text" name="title" [(ngModel)]="alertGroup.title"
24
+ class="max-w-lg block w-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-md">
25
+ </div>
26
+ </div>
27
+
28
+ <div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
29
+ <label class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">
30
+ Time Periods <span class="text-red-500">*</span>
31
+ </label>
32
+ <div class="mt-1 sm:mt-0 sm:col-span-2">
33
+ <ki-task-time-periods [showTitle]="false" [(taskTimePeriods)]="alertGroup.taskTimePeriods"></ki-task-time-periods>
34
+ </div>
35
+ </div>
36
+
37
+ <div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
38
+ <label class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">
39
+ Notification Groups <span class="text-red-500">*</span>
40
+ </label>
41
+ <div class="mt-1 sm:mt-0 sm:col-span-2">
42
+ <mat-select [(ngModel)]="alertGroup.notificationGroups" multiple [compareWith]="notificationGroupDisplay">
43
+ <mat-option [value]="group" *ngFor="let group of notificationGroups">{{group.name}}</mat-option>
44
+ </mat-select>
45
+ <button mat-button color="primary" (click)="createNotificationGroup()">
46
+ <mat-icon>group_add</mat-icon>&nbsp;Create new notification group
47
+ </button>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
52
+ <label class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2"> Notification Title </label>
53
+ <div class="mt-1 sm:mt-0 sm:col-span-2">
54
+ <input type="text" name="notificationTitle" [(ngModel)]="alertGroup.notificationTitle"
55
+ class="max-w-lg block w-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-md">
56
+ <p class="mt-2 text-sm text-gray-500">Will be used as the subject for the notification</p>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
61
+ <label class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2"> Notification Prefix Text </label>
62
+ <div class="mt-1 sm:mt-0 sm:col-span-2">
63
+ <textarea name="notificationPrefixText" rows="3" [(ngModel)]="alertGroup.notificationPrefixText"
64
+ class="max-w-lg shadow-sm block w-full sm:text-sm border border-gray-300 rounded-md"></textarea>
65
+ <p class="mt-2 text-sm text-gray-500">Text to include at the beginning of the notification</p>
66
+ </div>
67
+ </div>
68
+
69
+ <div class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start sm:border-t sm:border-gray-200 sm:pt-5">
70
+ <label class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2"> Notification Suffix Text </label>
71
+ <div class="mt-1 sm:mt-0 sm:col-span-2">
72
+ <textarea name="notificationSuffixText" rows="3" [(ngModel)]="alertGroup.notificationSuffixText"
73
+ class="max-w-lg shadow-sm block w-full sm:text-sm border border-gray-300 rounded-md"></textarea>
74
+ <p class="mt-2 text-sm text-gray-500">Text to include at the end of the notification</p>
75
+ </div>
76
+ </div>
77
+
78
+ </div>
79
+ </div>
80
+ </div>
81
+
82
+ <div class="pt-5">
83
+ <div class="flex justify-end">
84
+ <button type="button" [routerLink]="['/alert-groups']"
85
+ class="bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none">Cancel</button>
86
+ <button type="button" (click)="save()" [disabled]="!alertGroup.title || (!alertGroup.taskTimePeriods || !alertGroup.taskTimePeriods.length) || (!alertGroup.notificationGroups || !alertGroup.notificationGroups.length)"
87
+ class="disabled:opacity-50 ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary focus:outline-none">
88
+ Save Changes</button>
89
+ </div>
90
+ </div>
91
+ </div>
@@ -0,0 +1,2 @@
1
+ input, select, textarea, mat-select
2
+ max-width: 500px
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { EditAlertGroupComponent } from './edit-alert-group.component';
4
+
5
+ describe('EditAlertGroupComponent', () => {
6
+ let component: EditAlertGroupComponent;
7
+ let fixture: ComponentFixture<EditAlertGroupComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ EditAlertGroupComponent ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(EditAlertGroupComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,78 @@
1
+ import {Component, OnInit} from '@angular/core';
2
+ import {NotificationService} from '../../../../lib/services/notification.service';
3
+ import {AlertService} from '../../../../lib/services/alert.service';
4
+ import {MatLegacyDialog as MatDialog} from '@angular/material/legacy-dialog';
5
+ import {EditNotificationGroupComponent} from '../../notification-groups/edit-notification-group/edit-notification-group.component';
6
+ import * as lodash from 'lodash';
7
+ const _ = lodash.default;
8
+ import {ActivatedRoute, Router} from '@angular/router';
9
+
10
+ @Component({
11
+ selector: 'ki-edit-alert-group',
12
+ templateUrl: './edit-alert-group.component.html',
13
+ styleUrls: ['./edit-alert-group.component.sass']
14
+ })
15
+ export class EditAlertGroupComponent implements OnInit {
16
+
17
+ public alertGroup: any = {};
18
+ public notificationGroups: any = [];
19
+ public showNewTaskTimePeriod = false;
20
+ public newTaskTimePeriod: any = {};
21
+ public _ = _;
22
+ public Object = Object;
23
+
24
+ constructor(private notificationService: NotificationService,
25
+ private alertService: AlertService,
26
+ private matDialog: MatDialog,
27
+ private router: Router,
28
+ private route: ActivatedRoute) {
29
+ }
30
+
31
+ ngOnInit(): void {
32
+ const id = this.route.snapshot.params.id;
33
+ this.alertService.getAlertGroup(id).then(alertGroup => {
34
+ if (alertGroup) {
35
+ this.alertGroup = alertGroup;
36
+ }
37
+ if (!this.alertGroup.taskTimePeriods || !this.alertGroup.taskTimePeriods.length) {
38
+ if (!this.alertGroup.taskTimePeriods) {
39
+ this.alertGroup.taskTimePeriods = [];
40
+ }
41
+ this.showNewTaskTimePeriod = true;
42
+ }
43
+ });
44
+ this.loadNotificationGroups();
45
+ }
46
+
47
+ public notificationGroupDisplay(v1, v2) {
48
+ return v1 && v2 && (v2.id === v2.id);
49
+ }
50
+
51
+ public createNotificationGroup() {
52
+ const dialogRef = this.matDialog.open(EditNotificationGroupComponent, {
53
+ width: '800px',
54
+ height: '575px',
55
+ data: {
56
+ groupId: 0
57
+ }
58
+ });
59
+
60
+ dialogRef.afterClosed().subscribe(res => {
61
+ if (res) {
62
+ this.loadNotificationGroups();
63
+ }
64
+ });
65
+ }
66
+
67
+ public save() {
68
+ this.alertService.saveAlertGroup(this.alertGroup).then(() => {
69
+ this.router.navigate(['/alert-groups']);
70
+ });
71
+ }
72
+
73
+ private loadNotificationGroups() {
74
+ this.notificationService.getNotificationGroups().toPromise().then(groups => {
75
+ this.notificationGroups = groups;
76
+ });
77
+ }
78
+ }