@perses-dev/alert-manager-plugin 0.1.1 → 0.2.0-beta.2

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 (334) hide show
  1. package/__mf/js/AlertManager.42d95b33.js +7 -0
  2. package/__mf/js/async/1299.d5af4767.js +1 -0
  3. package/__mf/js/async/1522.04dc197d.js +22 -0
  4. package/__mf/js/async/1616.0c9baa4c.js +1 -0
  5. package/__mf/js/async/1871.5e21fb62.js +1 -0
  6. package/__mf/js/async/1969.e54f3991.js +1 -0
  7. package/__mf/js/async/2043.4e8f2371.js +2 -0
  8. package/__mf/js/async/{430.74d85c4b.js.LICENSE.txt → 2043.4e8f2371.js.LICENSE.txt} +1 -41
  9. package/__mf/js/async/2197.53bcb69e.js +1 -0
  10. package/__mf/js/async/2218.8b7e30c2.js +2 -0
  11. package/__mf/js/async/2317.e656eab3.js +2 -0
  12. package/__mf/js/async/2377.5295b064.js +1 -0
  13. package/__mf/js/async/2650.0b5955b5.js +3 -0
  14. package/__mf/js/async/2657.e6a11726.js +1 -0
  15. package/__mf/js/async/3222.6ad1b128.js +1 -0
  16. package/__mf/js/async/3514.e71d5cb9.js +2 -0
  17. package/__mf/js/async/3910.1bd28e15.js +1 -0
  18. package/__mf/js/async/392.26ae5cc4.js +2 -0
  19. package/__mf/js/async/3963.181d3782.js +1 -0
  20. package/__mf/js/async/4077.91abd1da.js +1 -0
  21. package/__mf/js/async/4121.f9595b70.js +2 -0
  22. package/__mf/js/async/4133.cc678ae9.js +28 -0
  23. package/__mf/js/async/4213.005a1a65.js +1 -0
  24. package/__mf/js/async/{4466.a8145edd.js → 4466.7cca717d.js} +3 -3
  25. package/__mf/js/async/4481.5bc5aa13.js +2 -0
  26. package/__mf/js/async/4496.3760da2f.js +1 -0
  27. package/__mf/js/async/4978.f1550309.js +1 -0
  28. package/__mf/js/async/5038.b1e9133a.js +2 -0
  29. package/__mf/js/async/5071.eeb1c9b1.js +1 -0
  30. package/__mf/js/async/5428.6922d4df.js +1 -0
  31. package/__mf/js/async/5759.84fc4d0b.js +7 -0
  32. package/__mf/js/async/{3540.96681482.js.LICENSE.txt → 5759.84fc4d0b.js.LICENSE.txt} +41 -1
  33. package/__mf/js/async/6274.9f68ee7d.js +2 -0
  34. package/__mf/js/async/6390.0fd40bd8.js +2 -0
  35. package/__mf/js/async/6401.7bf2c4c2.js +1 -0
  36. package/__mf/js/async/6594.b3a19fc1.js +2 -0
  37. package/__mf/js/async/6854.f05f8da0.js +1 -0
  38. package/__mf/js/async/6911.bc380f0c.js +37 -0
  39. package/__mf/js/async/7177.83345474.js +1 -0
  40. package/__mf/js/async/7192.715c4cb3.js +1 -0
  41. package/__mf/js/async/733.8bc3bc96.js +1 -0
  42. package/__mf/js/async/7862.10a19eef.js +2 -0
  43. package/__mf/js/async/7978.4ca49c3a.js +1 -0
  44. package/__mf/js/async/8470.7ebe8e66.js +2 -0
  45. package/__mf/js/async/8697.7b6d10e1.js +1 -0
  46. package/__mf/js/async/873.fcc6e5b7.js +1 -0
  47. package/__mf/js/async/8907.5d1f9505.js +1 -0
  48. package/__mf/js/async/{9040.94717f28.js → 9040.8de751d6.js} +4 -4
  49. package/__mf/js/async/9184.307e83da.js +1 -0
  50. package/__mf/js/async/9235.1b0d1de0.js +1 -0
  51. package/__mf/js/async/941.36858244.js +2 -0
  52. package/__mf/js/async/9588.31544c69.js +1 -0
  53. package/__mf/js/async/9836.e4cf02db.js +1 -0
  54. package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.4fbf2fa1.js +2 -0
  55. package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.27d99dac.js +1 -0
  56. package/__mf/js/async/__federation_expose_AlertManagerDatasource.c2b36e70.js +2 -0
  57. package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.65e1901a.js +2 -0
  58. package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.f619a448.js +2 -0
  59. package/__mf/js/async/__federation_expose_AlertTable.6c37126b.js +1 -0
  60. package/__mf/js/async/__federation_expose_SilenceTable.3a614a2f.js +1 -0
  61. package/__mf/js/async/lib-router.20ba053c.js +2 -0
  62. package/__mf/js/{main.259f5b24.js → main.babca431.js} +2 -2
  63. package/lib/bootstrap.js +2 -2
  64. package/lib/components/ColumnsEditor.d.ts +1 -1
  65. package/lib/components/ColumnsEditor.d.ts.map +1 -1
  66. package/lib/components/ColumnsEditor.js +7 -7
  67. package/lib/components/ColumnsEditor.js.map +1 -1
  68. package/lib/components/LazyTextField.d.ts +1 -1
  69. package/lib/components/LazyTextField.d.ts.map +1 -1
  70. package/lib/components/LazyTextField.js +2 -2
  71. package/lib/components/LazyTextField.js.map +1 -1
  72. package/lib/components/MatcherEditor.d.ts +1 -1
  73. package/lib/components/MatcherEditor.d.ts.map +1 -1
  74. package/lib/components/MatcherEditor.js +4 -4
  75. package/lib/components/MatcherEditor.js.map +1 -1
  76. package/lib/components/MatchersList.d.ts +2 -2
  77. package/lib/components/MatchersList.d.ts.map +1 -1
  78. package/lib/components/MatchersList.js +1 -1
  79. package/lib/components/MatchersList.js.map +1 -1
  80. package/lib/components/SilenceForm.d.ts +2 -2
  81. package/lib/components/SilenceForm.d.ts.map +1 -1
  82. package/lib/components/SilenceForm.js +4 -4
  83. package/lib/components/SilenceForm.js.map +1 -1
  84. package/lib/components/StatusBadge.d.ts +1 -1
  85. package/lib/components/StatusBadge.d.ts.map +1 -1
  86. package/lib/components/StatusBadge.js +1 -1
  87. package/lib/components/StatusBadge.js.map +1 -1
  88. package/lib/components/index.js +5 -5
  89. package/lib/components/index.js.map +1 -1
  90. package/lib/explore/AlertManagerAlertsExplorer.d.ts +1 -1
  91. package/lib/explore/AlertManagerAlertsExplorer.d.ts.map +1 -1
  92. package/lib/explore/AlertManagerAlertsExplorer.js +5 -5
  93. package/lib/explore/AlertManagerAlertsExplorer.js.map +1 -1
  94. package/lib/explore/AlertManagerSilencesExplorer.d.ts +1 -1
  95. package/lib/explore/AlertManagerSilencesExplorer.d.ts.map +1 -1
  96. package/lib/explore/AlertManagerSilencesExplorer.js +10 -10
  97. package/lib/explore/AlertManagerSilencesExplorer.js.map +1 -1
  98. package/lib/getPluginModule.d.ts +1 -1
  99. package/lib/getPluginModule.d.ts.map +1 -1
  100. package/lib/getPluginModule.js +3 -1
  101. package/lib/getPluginModule.js.map +1 -1
  102. package/lib/index-federation.js +1 -1
  103. package/lib/index.js +4 -4
  104. package/lib/index.js.map +1 -1
  105. package/lib/model/alertmanager-client.d.ts +3 -3
  106. package/lib/model/alertmanager-client.d.ts.map +1 -1
  107. package/lib/model/alertmanager-client.js +4 -2
  108. package/lib/model/alertmanager-client.js.map +1 -1
  109. package/lib/model/alertmanager-selectors.d.ts +2 -2
  110. package/lib/model/alertmanager-selectors.d.ts.map +1 -1
  111. package/lib/model/alertmanager-selectors.js +1 -1
  112. package/lib/model/alertmanager-selectors.js.map +1 -1
  113. package/lib/model/index.js +3 -3
  114. package/lib/model/index.js.map +1 -1
  115. package/lib/plugins/AlertManagerDatasourceEditor.d.ts +2 -2
  116. package/lib/plugins/AlertManagerDatasourceEditor.d.ts.map +1 -1
  117. package/lib/plugins/AlertManagerDatasourceEditor.js +1 -1
  118. package/lib/plugins/AlertManagerDatasourceEditor.js.map +1 -1
  119. package/lib/plugins/alert-table/AlertTable.d.ts +3 -3
  120. package/lib/plugins/alert-table/AlertTable.d.ts.map +1 -1
  121. package/lib/plugins/alert-table/AlertTable.js +5 -5
  122. package/lib/plugins/alert-table/AlertTable.js.map +1 -1
  123. package/lib/plugins/alert-table/AlertTableColumnsEditor.d.ts +3 -3
  124. package/lib/plugins/alert-table/AlertTableColumnsEditor.d.ts.map +1 -1
  125. package/lib/plugins/alert-table/AlertTableColumnsEditor.js +4 -4
  126. package/lib/plugins/alert-table/AlertTableColumnsEditor.js.map +1 -1
  127. package/lib/plugins/alert-table/AlertTableDeduplicationEditor.d.ts +3 -3
  128. package/lib/plugins/alert-table/AlertTableDeduplicationEditor.d.ts.map +1 -1
  129. package/lib/plugins/alert-table/AlertTableDeduplicationEditor.js +4 -4
  130. package/lib/plugins/alert-table/AlertTableDeduplicationEditor.js.map +1 -1
  131. package/lib/plugins/alert-table/AlertTableLabelsEditor.d.ts +3 -3
  132. package/lib/plugins/alert-table/AlertTableLabelsEditor.d.ts.map +1 -1
  133. package/lib/plugins/alert-table/AlertTableLabelsEditor.js +6 -6
  134. package/lib/plugins/alert-table/AlertTableLabelsEditor.js.map +1 -1
  135. package/lib/plugins/alert-table/AlertTableOptionsEditor.d.ts +3 -3
  136. package/lib/plugins/alert-table/AlertTableOptionsEditor.d.ts.map +1 -1
  137. package/lib/plugins/alert-table/AlertTableOptionsEditor.js +5 -5
  138. package/lib/plugins/alert-table/AlertTableOptionsEditor.js.map +1 -1
  139. package/lib/plugins/alert-table/AlertTablePanel.d.ts +4 -4
  140. package/lib/plugins/alert-table/AlertTablePanel.d.ts.map +1 -1
  141. package/lib/plugins/alert-table/AlertTablePanel.js +21 -21
  142. package/lib/plugins/alert-table/AlertTablePanel.js.map +1 -1
  143. package/lib/plugins/alert-table/alert-table-model.d.ts +1 -1
  144. package/lib/plugins/alert-table/alert-table-model.d.ts.map +1 -1
  145. package/lib/plugins/alert-table/alert-table-model.js +2 -2
  146. package/lib/plugins/alert-table/alert-table-model.js.map +1 -1
  147. package/lib/plugins/alert-table/alert-table-sorting.d.ts +2 -2
  148. package/lib/plugins/alert-table/alert-table-sorting.d.ts.map +1 -1
  149. package/lib/plugins/alert-table/alert-table-sorting.js +1 -1
  150. package/lib/plugins/alert-table/alert-table-sorting.js.map +1 -1
  151. package/lib/plugins/alert-table/label-colors.d.ts +1 -1
  152. package/lib/plugins/alert-table/label-colors.d.ts.map +1 -1
  153. package/lib/plugins/alert-table/label-colors.js.map +1 -1
  154. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.d.ts +2 -2
  155. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.d.ts.map +1 -1
  156. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js +3 -3
  157. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js.map +1 -1
  158. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.d.ts +2 -2
  159. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.d.ts.map +1 -1
  160. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js +7 -7
  161. package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js.map +1 -1
  162. package/lib/plugins/alertmanager-alerts-query/get-alerts-data.d.ts +3 -3
  163. package/lib/plugins/alertmanager-alerts-query/get-alerts-data.d.ts.map +1 -1
  164. package/lib/plugins/alertmanager-alerts-query/get-alerts-data.js +2 -2
  165. package/lib/plugins/alertmanager-alerts-query/get-alerts-data.js.map +1 -1
  166. package/lib/plugins/alertmanager-datasource.d.ts +3 -3
  167. package/lib/plugins/alertmanager-datasource.d.ts.map +1 -1
  168. package/lib/plugins/alertmanager-datasource.js +2 -2
  169. package/lib/plugins/alertmanager-datasource.js.map +1 -1
  170. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.d.ts +2 -2
  171. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.d.ts.map +1 -1
  172. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js +3 -3
  173. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js.map +1 -1
  174. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.d.ts +2 -2
  175. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.d.ts.map +1 -1
  176. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js +7 -7
  177. package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js.map +1 -1
  178. package/lib/plugins/alertmanager-silences-query/get-silences-data.d.ts +3 -3
  179. package/lib/plugins/alertmanager-silences-query/get-silences-data.d.ts.map +1 -1
  180. package/lib/plugins/alertmanager-silences-query/get-silences-data.js +2 -2
  181. package/lib/plugins/alertmanager-silences-query/get-silences-data.js.map +1 -1
  182. package/lib/plugins/index.js +16 -16
  183. package/lib/plugins/index.js.map +1 -1
  184. package/lib/plugins/silence-table/SilenceTable.d.ts +2 -2
  185. package/lib/plugins/silence-table/SilenceTable.d.ts.map +1 -1
  186. package/lib/plugins/silence-table/SilenceTable.js +3 -3
  187. package/lib/plugins/silence-table/SilenceTable.js.map +1 -1
  188. package/lib/plugins/silence-table/SilenceTableColumnsEditor.d.ts +3 -3
  189. package/lib/plugins/silence-table/SilenceTableColumnsEditor.d.ts.map +1 -1
  190. package/lib/plugins/silence-table/SilenceTableColumnsEditor.js +5 -5
  191. package/lib/plugins/silence-table/SilenceTableColumnsEditor.js.map +1 -1
  192. package/lib/plugins/silence-table/SilenceTableOptionsEditor.d.ts +3 -3
  193. package/lib/plugins/silence-table/SilenceTableOptionsEditor.d.ts.map +1 -1
  194. package/lib/plugins/silence-table/SilenceTableOptionsEditor.js +5 -5
  195. package/lib/plugins/silence-table/SilenceTableOptionsEditor.js.map +1 -1
  196. package/lib/plugins/silence-table/SilenceTablePanel.d.ts +4 -4
  197. package/lib/plugins/silence-table/SilenceTablePanel.d.ts.map +1 -1
  198. package/lib/plugins/silence-table/SilenceTablePanel.js +13 -13
  199. package/lib/plugins/silence-table/SilenceTablePanel.js.map +1 -1
  200. package/lib/plugins/silence-table/silence-table-model.d.ts +1 -1
  201. package/lib/plugins/silence-table/silence-table-model.d.ts.map +1 -1
  202. package/lib/plugins/silence-table/silence-table-model.js.map +1 -1
  203. package/lib/plugins/silence-table/silence-table-sorting.d.ts +2 -2
  204. package/lib/plugins/silence-table/silence-table-sorting.d.ts.map +1 -1
  205. package/lib/plugins/silence-table/silence-table-sorting.js +1 -1
  206. package/lib/plugins/silence-table/silence-table-sorting.js.map +1 -1
  207. package/lib/plugins/types.d.ts +3 -3
  208. package/lib/plugins/types.d.ts.map +1 -1
  209. package/lib/plugins/types.js.map +1 -1
  210. package/lib/setup-tests.d.ts +1 -1
  211. package/lib/setup-tests.d.ts.map +1 -1
  212. package/lib/setup-tests.js +2 -2
  213. package/lib/setup-tests.js.map +1 -1
  214. package/mf-manifest.json +302 -308
  215. package/mf-stats.json +308 -314
  216. package/package.json +12 -12
  217. package/__mf/js/AlertManager.377d377b.js +0 -7
  218. package/__mf/js/async/1616.24f00c9d.js +0 -1
  219. package/__mf/js/async/1728.8a326412.js +0 -1
  220. package/__mf/js/async/1871.23ff54b3.js +0 -1
  221. package/__mf/js/async/1969.a83b1b48.js +0 -1
  222. package/__mf/js/async/2218.7829c9d9.js +0 -2
  223. package/__mf/js/async/2377.f8875a4e.js +0 -1
  224. package/__mf/js/async/2657.fe8dd44f.js +0 -1
  225. package/__mf/js/async/2842.993baf22.js +0 -1
  226. package/__mf/js/async/3468.1679f87f.js +0 -1
  227. package/__mf/js/async/3540.96681482.js +0 -2
  228. package/__mf/js/async/392.7e11dd69.js +0 -2
  229. package/__mf/js/async/3963.fb6246d2.js +0 -1
  230. package/__mf/js/async/3981.84d12fdc.js +0 -4
  231. package/__mf/js/async/3981.84d12fdc.js.LICENSE.txt +0 -24
  232. package/__mf/js/async/4121.ec666be2.js +0 -2
  233. package/__mf/js/async/4133.e94df4f8.js +0 -28
  234. package/__mf/js/async/4213.a0c4f2eb.js +0 -1
  235. package/__mf/js/async/430.74d85c4b.js +0 -7
  236. package/__mf/js/async/4788.49ffeac3.js +0 -1
  237. package/__mf/js/async/5038.269393e3.js +0 -2
  238. package/__mf/js/async/5481.cf6703fd.js +0 -2
  239. package/__mf/js/async/5570.d4dd47e0.js +0 -1
  240. package/__mf/js/async/573.ce8ce2ef.js +0 -2
  241. package/__mf/js/async/6274.8c77cb1a.js +0 -2
  242. package/__mf/js/async/6390.3f6f279d.js +0 -2
  243. package/__mf/js/async/6401.1a59dbad.js +0 -1
  244. package/__mf/js/async/6594.b02adfd9.js +0 -2
  245. package/__mf/js/async/663.5445c7e0.js +0 -1
  246. package/__mf/js/async/6854.1d628838.js +0 -1
  247. package/__mf/js/async/7177.27c86137.js +0 -1
  248. package/__mf/js/async/7192.ede9860b.js +0 -1
  249. package/__mf/js/async/7283.8c1cb6ee.js +0 -2
  250. package/__mf/js/async/7984.163a6ddb.js +0 -22
  251. package/__mf/js/async/804.23da0d30.js +0 -37
  252. package/__mf/js/async/8470.2df0db71.js +0 -2
  253. package/__mf/js/async/8697.c13c6603.js +0 -1
  254. package/__mf/js/async/8711.c7dc09b8.js +0 -2
  255. package/__mf/js/async/8907.9e3edf43.js +0 -1
  256. package/__mf/js/async/9184.27a439a4.js +0 -1
  257. package/__mf/js/async/9235.00f9412f.js +0 -1
  258. package/__mf/js/async/941.d3bc6208.js +0 -2
  259. package/__mf/js/async/9537.36ff6f15.js +0 -1
  260. package/__mf/js/async/9634.3a366799.js +0 -1
  261. package/__mf/js/async/983.36857235.js +0 -1
  262. package/__mf/js/async/9836.cc839227.js +0 -1
  263. package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.47ee46dc.js +0 -2
  264. package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.22b0e5bc.js +0 -1
  265. package/__mf/js/async/__federation_expose_AlertManagerDatasource.7ee7440a.js +0 -2
  266. package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.35860f1b.js +0 -2
  267. package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.52a24c9e.js +0 -2
  268. package/__mf/js/async/__federation_expose_AlertTable.5d005bae.js +0 -1
  269. package/__mf/js/async/__federation_expose_SilenceTable.3fc487a4.js +0 -2
  270. package/__mf/js/async/__federation_expose_SilenceTable.3fc487a4.js.LICENSE.txt +0 -9
  271. package/__mf/js/async/lib-router.19f64904.js +0 -2
  272. package/lib/cjs/bootstrap.js +0 -26
  273. package/lib/cjs/components/ColumnsEditor.js +0 -271
  274. package/lib/cjs/components/LazyTextField.js +0 -50
  275. package/lib/cjs/components/MatcherEditor.js +0 -153
  276. package/lib/cjs/components/MatchersList.js +0 -46
  277. package/lib/cjs/components/SilenceForm.js +0 -205
  278. package/lib/cjs/components/StatusBadge.js +0 -71
  279. package/lib/cjs/components/index.js +0 -44
  280. package/lib/cjs/explore/AlertManagerAlertsExplorer.js +0 -79
  281. package/lib/cjs/explore/AlertManagerSilencesExplorer.js +0 -153
  282. package/lib/cjs/getPluginModule.js +0 -39
  283. package/lib/cjs/index-federation.js +0 -55
  284. package/lib/cjs/index.js +0 -39
  285. package/lib/cjs/model/alertmanager-client.js +0 -128
  286. package/lib/cjs/model/alertmanager-selectors.js +0 -66
  287. package/lib/cjs/model/api-types.js +0 -22
  288. package/lib/cjs/model/index.js +0 -32
  289. package/lib/cjs/plugins/AlertManagerDatasourceEditor.js +0 -71
  290. package/lib/cjs/plugins/alert-table/AlertTable.js +0 -56
  291. package/lib/cjs/plugins/alert-table/AlertTableColumnsEditor.js +0 -110
  292. package/lib/cjs/plugins/alert-table/AlertTableDeduplicationEditor.js +0 -138
  293. package/lib/cjs/plugins/alert-table/AlertTableLabelsEditor.js +0 -277
  294. package/lib/cjs/plugins/alert-table/AlertTableOptionsEditor.js +0 -128
  295. package/lib/cjs/plugins/alert-table/AlertTablePanel.js +0 -773
  296. package/lib/cjs/plugins/alert-table/alert-table-model.js +0 -142
  297. package/lib/cjs/plugins/alert-table/alert-table-sorting.js +0 -205
  298. package/lib/cjs/plugins/alert-table/label-colors.js +0 -170
  299. package/lib/cjs/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js +0 -51
  300. package/lib/cjs/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js +0 -138
  301. package/lib/cjs/plugins/alertmanager-alerts-query/get-alerts-data.js +0 -124
  302. package/lib/cjs/plugins/alertmanager-datasource.js +0 -69
  303. package/lib/cjs/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js +0 -45
  304. package/lib/cjs/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js +0 -78
  305. package/lib/cjs/plugins/alertmanager-silences-query/get-silences-data.js +0 -64
  306. package/lib/cjs/plugins/index.js +0 -74
  307. package/lib/cjs/plugins/silence-table/SilenceTable.js +0 -42
  308. package/lib/cjs/plugins/silence-table/SilenceTableColumnsEditor.js +0 -137
  309. package/lib/cjs/plugins/silence-table/SilenceTableOptionsEditor.js +0 -63
  310. package/lib/cjs/plugins/silence-table/SilenceTablePanel.js +0 -345
  311. package/lib/cjs/plugins/silence-table/silence-table-model.js +0 -116
  312. package/lib/cjs/plugins/silence-table/silence-table-sorting.js +0 -68
  313. package/lib/cjs/plugins/types.js +0 -16
  314. package/lib/cjs/setup-tests.js +0 -18
  315. /package/__mf/css/async/{430.85c2cbf6.css → 5759.85c2cbf6.css} +0 -0
  316. /package/__mf/js/async/{7984.163a6ddb.js.LICENSE.txt → 1522.04dc197d.js.LICENSE.txt} +0 -0
  317. /package/__mf/js/async/{2218.7829c9d9.js.LICENSE.txt → 2218.8b7e30c2.js.LICENSE.txt} +0 -0
  318. /package/__mf/js/async/{5038.269393e3.js.LICENSE.txt → 2317.e656eab3.js.LICENSE.txt} +0 -0
  319. /package/__mf/js/async/{6390.3f6f279d.js.LICENSE.txt → 3514.e71d5cb9.js.LICENSE.txt} +0 -0
  320. /package/__mf/js/async/{392.7e11dd69.js.LICENSE.txt → 392.26ae5cc4.js.LICENSE.txt} +0 -0
  321. /package/__mf/js/async/{4121.ec666be2.js.LICENSE.txt → 4121.f9595b70.js.LICENSE.txt} +0 -0
  322. /package/__mf/js/async/{6594.b02adfd9.js.LICENSE.txt → 5038.b1e9133a.js.LICENSE.txt} +0 -0
  323. /package/__mf/js/async/{6274.8c77cb1a.js.LICENSE.txt → 6274.9f68ee7d.js.LICENSE.txt} +0 -0
  324. /package/__mf/js/async/{7283.8c1cb6ee.js.LICENSE.txt → 6390.0fd40bd8.js.LICENSE.txt} +0 -0
  325. /package/__mf/js/async/{8711.c7dc09b8.js.LICENSE.txt → 6594.b3a19fc1.js.LICENSE.txt} +0 -0
  326. /package/__mf/js/async/{5481.cf6703fd.js.LICENSE.txt → 7862.10a19eef.js.LICENSE.txt} +0 -0
  327. /package/__mf/js/async/{8470.2df0db71.js.LICENSE.txt → 8470.7ebe8e66.js.LICENSE.txt} +0 -0
  328. /package/__mf/js/async/{9040.94717f28.js.LICENSE.txt → 9040.8de751d6.js.LICENSE.txt} +0 -0
  329. /package/__mf/js/async/{941.d3bc6208.js.LICENSE.txt → 941.36858244.js.LICENSE.txt} +0 -0
  330. /package/__mf/js/async/{__federation_expose_AlertManagerAlertsExplorer.47ee46dc.js.LICENSE.txt → __federation_expose_AlertManagerAlertsExplorer.4fbf2fa1.js.LICENSE.txt} +0 -0
  331. /package/__mf/js/async/{__federation_expose_AlertManagerDatasource.7ee7440a.js.LICENSE.txt → __federation_expose_AlertManagerDatasource.c2b36e70.js.LICENSE.txt} +0 -0
  332. /package/__mf/js/async/{__federation_expose_AlertManagerSilencesExplorer.35860f1b.js.LICENSE.txt → __federation_expose_AlertManagerSilencesExplorer.65e1901a.js.LICENSE.txt} +0 -0
  333. /package/__mf/js/async/{__federation_expose_AlertManagerSilencesQuery.52a24c9e.js.LICENSE.txt → __federation_expose_AlertManagerSilencesQuery.f619a448.js.LICENSE.txt} +0 -0
  334. /package/__mf/js/async/{lib-router.19f64904.js.LICENSE.txt → lib-router.20ba053c.js.LICENSE.txt} +0 -0
@@ -1,128 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- function _export(target, all) {
18
- for(var name in all)Object.defineProperty(target, name, {
19
- enumerable: true,
20
- get: Object.getOwnPropertyDescriptor(all, name).get
21
- });
22
- }
23
- _export(exports, {
24
- get createSilence () {
25
- return createSilence;
26
- },
27
- get deleteSilence () {
28
- return deleteSilence;
29
- },
30
- get getAlerts () {
31
- return getAlerts;
32
- },
33
- get getSilence () {
34
- return getSilence;
35
- },
36
- get getSilences () {
37
- return getSilences;
38
- },
39
- get getStatus () {
40
- return getStatus;
41
- }
42
- });
43
- const _client = require("@perses-dev/client");
44
- async function throwOnError(response) {
45
- if (!response.ok) {
46
- let message = response.statusText;
47
- try {
48
- const body = await response.json();
49
- if (body?.message) message = body.message;
50
- } catch {
51
- // no JSON body
52
- }
53
- throw new Error(message);
54
- }
55
- }
56
- const executeRequest = async (...args)=>{
57
- const response = await (0, _client.fetch)(...args);
58
- await throwOnError(response);
59
- try {
60
- return await response.json();
61
- } catch (e) {
62
- console.error('Invalid response from server', e);
63
- throw new Error('Invalid response from server');
64
- }
65
- };
66
- function buildSearchParams(params) {
67
- const urlSearchParams = new URLSearchParams();
68
- Object.entries(params).forEach(([key, value])=>{
69
- if (value === undefined) {
70
- return;
71
- }
72
- if (Array.isArray(value)) {
73
- value.forEach((entry)=>urlSearchParams.append(key, String(entry)));
74
- return;
75
- }
76
- urlSearchParams.append(key, String(value));
77
- });
78
- return urlSearchParams;
79
- }
80
- function fetchWithGet(apiURI, params, queryOptions) {
81
- const { datasourceUrl, headers = {} } = queryOptions;
82
- let url = `${datasourceUrl}${apiURI}`;
83
- const urlParams = buildSearchParams(params).toString();
84
- if (urlParams !== '') {
85
- url += `?${urlParams}`;
86
- }
87
- return executeRequest(url, {
88
- method: 'GET',
89
- headers
90
- });
91
- }
92
- function getAlerts(params, queryOptions) {
93
- const opts = queryOptions ?? {
94
- datasourceUrl: ''
95
- };
96
- return fetchWithGet('/api/v2/alerts', params ?? {}, opts);
97
- }
98
- function getSilences(params, queryOptions) {
99
- const opts = queryOptions ?? {
100
- datasourceUrl: ''
101
- };
102
- return fetchWithGet('/api/v2/silences', params ?? {}, opts);
103
- }
104
- function getSilence(id, queryOptions) {
105
- return fetchWithGet(`/api/v2/silence/${encodeURIComponent(id)}`, {}, queryOptions);
106
- }
107
- function createSilence(silence, queryOptions) {
108
- const { datasourceUrl, headers = {} } = queryOptions;
109
- return executeRequest(`${datasourceUrl}/api/v2/silences`, {
110
- method: 'POST',
111
- headers: {
112
- ...headers,
113
- 'Content-Type': 'application/json'
114
- },
115
- body: JSON.stringify(silence)
116
- });
117
- }
118
- async function deleteSilence(id, queryOptions) {
119
- const { datasourceUrl, headers = {} } = queryOptions;
120
- const response = await (0, _client.fetch)(`${datasourceUrl}/api/v2/silence/${encodeURIComponent(id)}`, {
121
- method: 'DELETE',
122
- headers
123
- });
124
- await throwOnError(response);
125
- }
126
- function getStatus(queryOptions) {
127
- return fetchWithGet('/api/v2/status', {}, queryOptions);
128
- }
@@ -1,66 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- function _export(target, all) {
18
- for(var name in all)Object.defineProperty(target, name, {
19
- enumerable: true,
20
- get: Object.getOwnPropertyDescriptor(all, name).get
21
- });
22
- }
23
- _export(exports, {
24
- get ALERTMANAGER_DATASOURCE_KIND () {
25
- return ALERTMANAGER_DATASOURCE_KIND;
26
- },
27
- get DEFAULT_ALERTMANAGER () {
28
- return DEFAULT_ALERTMANAGER;
29
- },
30
- get extractDatasourceSelector () {
31
- return extractDatasourceSelector;
32
- },
33
- get isAlertManagerDatasourceSelector () {
34
- return isAlertManagerDatasourceSelector;
35
- },
36
- get isDefaultAlertManagerSelector () {
37
- return isDefaultAlertManagerSelector;
38
- }
39
- });
40
- const _pluginsystem = require("@perses-dev/plugin-system");
41
- const ALERTMANAGER_DATASOURCE_KIND = 'AlertManagerDatasource';
42
- const DEFAULT_ALERTMANAGER = {
43
- kind: ALERTMANAGER_DATASOURCE_KIND
44
- };
45
- function isDefaultAlertManagerSelector(datasourceSelectValue) {
46
- return !(0, _pluginsystem.isVariableDatasource)(datasourceSelectValue) && datasourceSelectValue.name === undefined;
47
- }
48
- function isAlertManagerDatasourceSelector(datasourceSelectValue) {
49
- return (0, _pluginsystem.isVariableDatasource)(datasourceSelectValue) || datasourceSelectValue.kind === ALERTMANAGER_DATASOURCE_KIND;
50
- }
51
- function extractDatasourceSelector(queryResults) {
52
- const defSpec = queryResults[0]?.definition?.spec;
53
- if (defSpec && typeof defSpec === 'object' && 'plugin' in defSpec) {
54
- const plugin = defSpec.plugin;
55
- if (plugin && typeof plugin === 'object' && 'spec' in plugin) {
56
- const spec = plugin.spec;
57
- if (spec && typeof spec === 'object' && 'datasource' in spec) {
58
- const ds = spec.datasource;
59
- if (ds && typeof ds === 'object' && 'kind' in ds) {
60
- return ds;
61
- }
62
- }
63
- }
64
- }
65
- return DEFAULT_ALERTMANAGER;
66
- }
@@ -1,22 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- /**
14
- * Alert Manager v2 API response types.
15
- * Based on the Alertmanager OpenAPI v2 spec.
16
- * @see https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml
17
- */ /**
18
- * A matcher used by silences and alerts.
19
- */ "use strict";
20
- Object.defineProperty(exports, "__esModule", {
21
- value: true
22
- });
@@ -1,32 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- _export_star(require("./api-types"), exports);
18
- _export_star(require("./alertmanager-client"), exports);
19
- _export_star(require("./alertmanager-selectors"), exports);
20
- function _export_star(from, to) {
21
- Object.keys(from).forEach(function(k) {
22
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
23
- Object.defineProperty(to, k, {
24
- enumerable: true,
25
- get: function() {
26
- return from[k];
27
- }
28
- });
29
- }
30
- });
31
- return from;
32
- }
@@ -1,71 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "AlertManagerDatasourceEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return AlertManagerDatasourceEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _pluginsystem = require("@perses-dev/plugin-system");
25
- function AlertManagerDatasourceEditor(props) {
26
- const { value, onChange, isReadonly } = props;
27
- const initialSpecDirect = {
28
- directUrl: ''
29
- };
30
- const initialSpecProxy = {
31
- proxy: {
32
- kind: 'HTTPProxy',
33
- spec: {
34
- allowedEndpoints: [
35
- {
36
- endpointPattern: '/api/v2/alerts',
37
- method: 'GET'
38
- },
39
- {
40
- endpointPattern: '/api/v2/silences',
41
- method: 'GET'
42
- },
43
- {
44
- endpointPattern: '/api/v2/silences',
45
- method: 'POST'
46
- },
47
- {
48
- endpointPattern: '/api/v2/silence/.*',
49
- method: 'GET'
50
- },
51
- {
52
- endpointPattern: '/api/v2/silence/.*',
53
- method: 'DELETE'
54
- },
55
- {
56
- endpointPattern: '/api/v2/status',
57
- method: 'GET'
58
- }
59
- ],
60
- url: ''
61
- }
62
- }
63
- };
64
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.HTTPSettingsEditor, {
65
- value: value,
66
- onChange: onChange,
67
- isReadonly: isReadonly,
68
- initialSpecDirect: initialSpecDirect,
69
- initialSpecProxy: initialSpecProxy
70
- });
71
- }
@@ -1,56 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "AlertTable", {
18
- enumerable: true,
19
- get: function() {
20
- return AlertTable;
21
- }
22
- });
23
- const _AlertTableColumnsEditor = require("./AlertTableColumnsEditor");
24
- const _AlertTableDeduplicationEditor = require("./AlertTableDeduplicationEditor");
25
- const _AlertTableLabelsEditor = require("./AlertTableLabelsEditor");
26
- const _AlertTableOptionsEditor = require("./AlertTableOptionsEditor");
27
- const _AlertTablePanel = require("./AlertTablePanel");
28
- const AlertTable = {
29
- PanelComponent: _AlertTablePanel.AlertTablePanel,
30
- supportedQueryTypes: [
31
- 'AlertsQuery'
32
- ],
33
- panelOptionsEditorComponents: [
34
- {
35
- label: 'General',
36
- content: _AlertTableOptionsEditor.AlertTableOptionsEditor
37
- },
38
- {
39
- label: 'Columns',
40
- content: _AlertTableColumnsEditor.AlertTableColumnsEditor
41
- },
42
- {
43
- label: 'Labels',
44
- content: _AlertTableLabelsEditor.AlertTableLabelsEditor
45
- },
46
- {
47
- label: 'Deduplication',
48
- content: _AlertTableDeduplicationEditor.AlertTableDeduplicationEditor
49
- }
50
- ],
51
- createInitialOptions: ()=>({
52
- defaultGroupBy: [
53
- 'alertname'
54
- ]
55
- })
56
- };
@@ -1,110 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "AlertTableColumnsEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return AlertTableColumnsEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _immer = require("immer");
26
- const _react = require("react");
27
- const _ColumnsEditor = require("../../components/ColumnsEditor");
28
- const SORT_MODE_LABELS = {
29
- alphabetical: 'Alphabetical',
30
- numeric: 'Numeric',
31
- severity: 'Severity (critical → other)',
32
- status: 'Status (firing → resolved)'
33
- };
34
- function AlertTableColumnsEditor(props) {
35
- const { value, onChange } = props;
36
- const columns = value.columns ?? [];
37
- const handleAddColumn = (0, _react.useCallback)(()=>{
38
- onChange((0, _immer.produce)(value, (draft)=>{
39
- if (!draft.columns) draft.columns = [];
40
- draft.columns.push({
41
- name: ''
42
- });
43
- }));
44
- }, [
45
- value,
46
- onChange
47
- ]);
48
- const handleRemoveColumn = (0, _react.useCallback)((index)=>{
49
- onChange((0, _immer.produce)(value, (draft)=>{
50
- draft.columns?.splice(index, 1);
51
- }));
52
- }, [
53
- value,
54
- onChange
55
- ]);
56
- const handleUpdateColumn = (0, _react.useCallback)((index, updater)=>{
57
- onChange((0, _immer.produce)(value, (draft)=>{
58
- const column = draft.columns?.[index];
59
- if (column) {
60
- updater(column);
61
- }
62
- }));
63
- }, [
64
- value,
65
- onChange
66
- ]);
67
- const handleMoveUp = (0, _react.useCallback)((index)=>{
68
- if (index <= 0) return;
69
- onChange((0, _immer.produce)(value, (draft)=>{
70
- if (!draft.columns) return;
71
- const item = draft.columns.splice(index, 1)[0];
72
- draft.columns.splice(index - 1, 0, item);
73
- }));
74
- }, [
75
- value,
76
- onChange
77
- ]);
78
- const handleMoveDown = (0, _react.useCallback)((index)=>{
79
- onChange((0, _immer.produce)(value, (draft)=>{
80
- if (!draft.columns || index >= draft.columns.length - 1) return;
81
- const item = draft.columns.splice(index, 1)[0];
82
- draft.columns.splice(index + 1, 0, item);
83
- }));
84
- }, [
85
- value,
86
- onChange
87
- ]);
88
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ColumnsEditor.ColumnsEditor, {
89
- columns: columns,
90
- description: "Status and Alert Name are always shown. Add extra columns below.",
91
- sortModeLabels: SORT_MODE_LABELS,
92
- defaultSortMode: "alphabetical",
93
- getDisplayName: (col)=>col.header || col.name || 'New column',
94
- getHeaderPlaceholder: (col)=>col.name || 'Column header',
95
- onAdd: handleAddColumn,
96
- onRemove: handleRemoveColumn,
97
- onUpdate: handleUpdateColumn,
98
- onMoveUp: handleMoveUp,
99
- onMoveDown: handleMoveDown,
100
- renderNameField: (col, index, onUpdate)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
101
- label: "Label key",
102
- value: col.name,
103
- onChange: (e)=>onUpdate(index, (draft)=>{
104
- draft.name = e.target.value;
105
- }),
106
- size: "small",
107
- fullWidth: true
108
- })
109
- });
110
- }
@@ -1,138 +0,0 @@
1
- // Copyright The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- "use strict";
14
- Object.defineProperty(exports, "__esModule", {
15
- value: true
16
- });
17
- Object.defineProperty(exports, "AlertTableDeduplicationEditor", {
18
- enumerable: true,
19
- get: function() {
20
- return AlertTableDeduplicationEditor;
21
- }
22
- });
23
- const _jsxruntime = require("react/jsx-runtime");
24
- const _material = require("@mui/material");
25
- const _components = require("@perses-dev/components");
26
- const _immer = require("immer");
27
- const _react = require("react");
28
- const MODE_DESCRIPTIONS = {
29
- none: 'No deduplication. All alerts from all datasources are shown as-is.',
30
- fingerprint: 'Alerts with the same fingerprint from different datasources are merged. This is the default.',
31
- labels: 'Alerts are considered duplicates when all specified label values match.'
32
- };
33
- function AlertTableDeduplicationEditor(props) {
34
- const { value, onChange } = props;
35
- const dedup = value.deduplication ?? {
36
- mode: 'fingerprint'
37
- };
38
- const handleModeChange = (0, _react.useCallback)((mode)=>{
39
- onChange((0, _immer.produce)(value, (draft)=>{
40
- draft.deduplication = {
41
- mode
42
- };
43
- if (mode === 'labels') {
44
- draft.deduplication.labels = draft.deduplication.labels ?? [];
45
- }
46
- }));
47
- }, [
48
- value,
49
- onChange
50
- ]);
51
- const handleLabelsChange = (0, _react.useCallback)((_event, newLabels)=>{
52
- onChange((0, _immer.produce)(value, (draft)=>{
53
- if (!draft.deduplication) {
54
- draft.deduplication = {
55
- mode: 'labels'
56
- };
57
- }
58
- draft.deduplication.labels = newLabels.length > 0 ? newLabels : undefined;
59
- }));
60
- }, [
61
- value,
62
- onChange
63
- ]);
64
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
65
- children: [
66
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.OptionsEditorGroup, {
67
- title: "Mode",
68
- children: [
69
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
70
- size: "small",
71
- fullWidth: true,
72
- children: [
73
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
74
- id: "dedup-mode-label",
75
- children: "Deduplication Mode"
76
- }),
77
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Select, {
78
- labelId: "dedup-mode-label",
79
- value: dedup.mode,
80
- label: "Deduplication Mode",
81
- onChange: (e)=>handleModeChange(e.target.value),
82
- children: [
83
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
84
- value: "none",
85
- children: "None"
86
- }),
87
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
88
- value: "fingerprint",
89
- children: "Fingerprint"
90
- }),
91
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
92
- value: "labels",
93
- children: "Labels"
94
- })
95
- ]
96
- })
97
- ]
98
- }),
99
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
100
- variant: "body2",
101
- color: "text.secondary",
102
- sx: {
103
- mt: 1
104
- },
105
- children: MODE_DESCRIPTIONS[dedup.mode]
106
- })
107
- ]
108
- }),
109
- dedup.mode === 'labels' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorGroup, {
110
- title: "Deduplication Labels",
111
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Autocomplete, {
112
- multiple: true,
113
- freeSolo: true,
114
- options: [],
115
- value: dedup.labels ?? [],
116
- onChange: handleLabelsChange,
117
- renderTags: (tagValues, getTagProps)=>tagValues.map((option, index)=>{
118
- const { key, ...rest } = getTagProps({
119
- index
120
- });
121
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Chip, {
122
- label: option,
123
- size: "small",
124
- variant: "outlined",
125
- ...rest
126
- }, key);
127
- }),
128
- renderInput: (params)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
129
- ...params,
130
- size: "small",
131
- placeholder: "Type a label key and press Enter",
132
- helperText: "Alerts with identical values for all listed labels are considered duplicates."
133
- })
134
- })
135
- })
136
- ]
137
- });
138
- }