@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.
- package/__mf/js/AlertManager.42d95b33.js +7 -0
- package/__mf/js/async/1299.d5af4767.js +1 -0
- package/__mf/js/async/1522.04dc197d.js +22 -0
- package/__mf/js/async/1616.0c9baa4c.js +1 -0
- package/__mf/js/async/1871.5e21fb62.js +1 -0
- package/__mf/js/async/1969.e54f3991.js +1 -0
- package/__mf/js/async/2043.4e8f2371.js +2 -0
- package/__mf/js/async/{430.74d85c4b.js.LICENSE.txt → 2043.4e8f2371.js.LICENSE.txt} +1 -41
- package/__mf/js/async/2197.53bcb69e.js +1 -0
- package/__mf/js/async/2218.8b7e30c2.js +2 -0
- package/__mf/js/async/2317.e656eab3.js +2 -0
- package/__mf/js/async/2377.5295b064.js +1 -0
- package/__mf/js/async/2650.0b5955b5.js +3 -0
- package/__mf/js/async/2657.e6a11726.js +1 -0
- package/__mf/js/async/3222.6ad1b128.js +1 -0
- package/__mf/js/async/3514.e71d5cb9.js +2 -0
- package/__mf/js/async/3910.1bd28e15.js +1 -0
- package/__mf/js/async/392.26ae5cc4.js +2 -0
- package/__mf/js/async/3963.181d3782.js +1 -0
- package/__mf/js/async/4077.91abd1da.js +1 -0
- package/__mf/js/async/4121.f9595b70.js +2 -0
- package/__mf/js/async/4133.cc678ae9.js +28 -0
- package/__mf/js/async/4213.005a1a65.js +1 -0
- package/__mf/js/async/{4466.a8145edd.js → 4466.7cca717d.js} +3 -3
- package/__mf/js/async/4481.5bc5aa13.js +2 -0
- package/__mf/js/async/4496.3760da2f.js +1 -0
- package/__mf/js/async/4978.f1550309.js +1 -0
- package/__mf/js/async/5038.b1e9133a.js +2 -0
- package/__mf/js/async/5071.eeb1c9b1.js +1 -0
- package/__mf/js/async/5428.6922d4df.js +1 -0
- package/__mf/js/async/5759.84fc4d0b.js +7 -0
- package/__mf/js/async/{3540.96681482.js.LICENSE.txt → 5759.84fc4d0b.js.LICENSE.txt} +41 -1
- package/__mf/js/async/6274.9f68ee7d.js +2 -0
- package/__mf/js/async/6390.0fd40bd8.js +2 -0
- package/__mf/js/async/6401.7bf2c4c2.js +1 -0
- package/__mf/js/async/6594.b3a19fc1.js +2 -0
- package/__mf/js/async/6854.f05f8da0.js +1 -0
- package/__mf/js/async/6911.bc380f0c.js +37 -0
- package/__mf/js/async/7177.83345474.js +1 -0
- package/__mf/js/async/7192.715c4cb3.js +1 -0
- package/__mf/js/async/733.8bc3bc96.js +1 -0
- package/__mf/js/async/7862.10a19eef.js +2 -0
- package/__mf/js/async/7978.4ca49c3a.js +1 -0
- package/__mf/js/async/8470.7ebe8e66.js +2 -0
- package/__mf/js/async/8697.7b6d10e1.js +1 -0
- package/__mf/js/async/873.fcc6e5b7.js +1 -0
- package/__mf/js/async/8907.5d1f9505.js +1 -0
- package/__mf/js/async/{9040.94717f28.js → 9040.8de751d6.js} +4 -4
- package/__mf/js/async/9184.307e83da.js +1 -0
- package/__mf/js/async/9235.1b0d1de0.js +1 -0
- package/__mf/js/async/941.36858244.js +2 -0
- package/__mf/js/async/9588.31544c69.js +1 -0
- package/__mf/js/async/9836.e4cf02db.js +1 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.4fbf2fa1.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.27d99dac.js +1 -0
- package/__mf/js/async/__federation_expose_AlertManagerDatasource.c2b36e70.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.65e1901a.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.f619a448.js +2 -0
- package/__mf/js/async/__federation_expose_AlertTable.6c37126b.js +1 -0
- package/__mf/js/async/__federation_expose_SilenceTable.3a614a2f.js +1 -0
- package/__mf/js/async/lib-router.20ba053c.js +2 -0
- package/__mf/js/{main.259f5b24.js → main.babca431.js} +2 -2
- package/lib/bootstrap.js +2 -2
- package/lib/components/ColumnsEditor.d.ts +1 -1
- package/lib/components/ColumnsEditor.d.ts.map +1 -1
- package/lib/components/ColumnsEditor.js +7 -7
- package/lib/components/ColumnsEditor.js.map +1 -1
- package/lib/components/LazyTextField.d.ts +1 -1
- package/lib/components/LazyTextField.d.ts.map +1 -1
- package/lib/components/LazyTextField.js +2 -2
- package/lib/components/LazyTextField.js.map +1 -1
- package/lib/components/MatcherEditor.d.ts +1 -1
- package/lib/components/MatcherEditor.d.ts.map +1 -1
- package/lib/components/MatcherEditor.js +4 -4
- package/lib/components/MatcherEditor.js.map +1 -1
- package/lib/components/MatchersList.d.ts +2 -2
- package/lib/components/MatchersList.d.ts.map +1 -1
- package/lib/components/MatchersList.js +1 -1
- package/lib/components/MatchersList.js.map +1 -1
- package/lib/components/SilenceForm.d.ts +2 -2
- package/lib/components/SilenceForm.d.ts.map +1 -1
- package/lib/components/SilenceForm.js +4 -4
- package/lib/components/SilenceForm.js.map +1 -1
- package/lib/components/StatusBadge.d.ts +1 -1
- package/lib/components/StatusBadge.d.ts.map +1 -1
- package/lib/components/StatusBadge.js +1 -1
- package/lib/components/StatusBadge.js.map +1 -1
- package/lib/components/index.js +5 -5
- package/lib/components/index.js.map +1 -1
- package/lib/explore/AlertManagerAlertsExplorer.d.ts +1 -1
- package/lib/explore/AlertManagerAlertsExplorer.d.ts.map +1 -1
- package/lib/explore/AlertManagerAlertsExplorer.js +5 -5
- package/lib/explore/AlertManagerAlertsExplorer.js.map +1 -1
- package/lib/explore/AlertManagerSilencesExplorer.d.ts +1 -1
- package/lib/explore/AlertManagerSilencesExplorer.d.ts.map +1 -1
- package/lib/explore/AlertManagerSilencesExplorer.js +10 -10
- package/lib/explore/AlertManagerSilencesExplorer.js.map +1 -1
- package/lib/getPluginModule.d.ts +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +3 -1
- package/lib/getPluginModule.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/model/alertmanager-client.d.ts +3 -3
- package/lib/model/alertmanager-client.d.ts.map +1 -1
- package/lib/model/alertmanager-client.js +4 -2
- package/lib/model/alertmanager-client.js.map +1 -1
- package/lib/model/alertmanager-selectors.d.ts +2 -2
- package/lib/model/alertmanager-selectors.d.ts.map +1 -1
- package/lib/model/alertmanager-selectors.js +1 -1
- package/lib/model/alertmanager-selectors.js.map +1 -1
- package/lib/model/index.js +3 -3
- package/lib/model/index.js.map +1 -1
- package/lib/plugins/AlertManagerDatasourceEditor.d.ts +2 -2
- package/lib/plugins/AlertManagerDatasourceEditor.d.ts.map +1 -1
- package/lib/plugins/AlertManagerDatasourceEditor.js +1 -1
- package/lib/plugins/AlertManagerDatasourceEditor.js.map +1 -1
- package/lib/plugins/alert-table/AlertTable.d.ts +3 -3
- package/lib/plugins/alert-table/AlertTable.d.ts.map +1 -1
- package/lib/plugins/alert-table/AlertTable.js +5 -5
- package/lib/plugins/alert-table/AlertTable.js.map +1 -1
- package/lib/plugins/alert-table/AlertTableColumnsEditor.d.ts +3 -3
- package/lib/plugins/alert-table/AlertTableColumnsEditor.d.ts.map +1 -1
- package/lib/plugins/alert-table/AlertTableColumnsEditor.js +4 -4
- package/lib/plugins/alert-table/AlertTableColumnsEditor.js.map +1 -1
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.d.ts +3 -3
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.d.ts.map +1 -1
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.js +4 -4
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.js.map +1 -1
- package/lib/plugins/alert-table/AlertTableLabelsEditor.d.ts +3 -3
- package/lib/plugins/alert-table/AlertTableLabelsEditor.d.ts.map +1 -1
- package/lib/plugins/alert-table/AlertTableLabelsEditor.js +6 -6
- package/lib/plugins/alert-table/AlertTableLabelsEditor.js.map +1 -1
- package/lib/plugins/alert-table/AlertTableOptionsEditor.d.ts +3 -3
- package/lib/plugins/alert-table/AlertTableOptionsEditor.d.ts.map +1 -1
- package/lib/plugins/alert-table/AlertTableOptionsEditor.js +5 -5
- package/lib/plugins/alert-table/AlertTableOptionsEditor.js.map +1 -1
- package/lib/plugins/alert-table/AlertTablePanel.d.ts +4 -4
- package/lib/plugins/alert-table/AlertTablePanel.d.ts.map +1 -1
- package/lib/plugins/alert-table/AlertTablePanel.js +21 -21
- package/lib/plugins/alert-table/AlertTablePanel.js.map +1 -1
- package/lib/plugins/alert-table/alert-table-model.d.ts +1 -1
- package/lib/plugins/alert-table/alert-table-model.d.ts.map +1 -1
- package/lib/plugins/alert-table/alert-table-model.js +2 -2
- package/lib/plugins/alert-table/alert-table-model.js.map +1 -1
- package/lib/plugins/alert-table/alert-table-sorting.d.ts +2 -2
- package/lib/plugins/alert-table/alert-table-sorting.d.ts.map +1 -1
- package/lib/plugins/alert-table/alert-table-sorting.js +1 -1
- package/lib/plugins/alert-table/alert-table-sorting.js.map +1 -1
- package/lib/plugins/alert-table/label-colors.d.ts +1 -1
- package/lib/plugins/alert-table/label-colors.d.ts.map +1 -1
- package/lib/plugins/alert-table/label-colors.js.map +1 -1
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.d.ts +2 -2
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.d.ts.map +1 -1
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js +3 -3
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js.map +1 -1
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.d.ts +2 -2
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.d.ts.map +1 -1
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js +7 -7
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js.map +1 -1
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.d.ts +3 -3
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.d.ts.map +1 -1
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.js +2 -2
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.js.map +1 -1
- package/lib/plugins/alertmanager-datasource.d.ts +3 -3
- package/lib/plugins/alertmanager-datasource.d.ts.map +1 -1
- package/lib/plugins/alertmanager-datasource.js +2 -2
- package/lib/plugins/alertmanager-datasource.js.map +1 -1
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.d.ts +2 -2
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.d.ts.map +1 -1
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js +3 -3
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js.map +1 -1
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.d.ts +2 -2
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.d.ts.map +1 -1
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js +7 -7
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js.map +1 -1
- package/lib/plugins/alertmanager-silences-query/get-silences-data.d.ts +3 -3
- package/lib/plugins/alertmanager-silences-query/get-silences-data.d.ts.map +1 -1
- package/lib/plugins/alertmanager-silences-query/get-silences-data.js +2 -2
- package/lib/plugins/alertmanager-silences-query/get-silences-data.js.map +1 -1
- package/lib/plugins/index.js +16 -16
- package/lib/plugins/index.js.map +1 -1
- package/lib/plugins/silence-table/SilenceTable.d.ts +2 -2
- package/lib/plugins/silence-table/SilenceTable.d.ts.map +1 -1
- package/lib/plugins/silence-table/SilenceTable.js +3 -3
- package/lib/plugins/silence-table/SilenceTable.js.map +1 -1
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.d.ts +3 -3
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.d.ts.map +1 -1
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.js +5 -5
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.js.map +1 -1
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.d.ts +3 -3
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.d.ts.map +1 -1
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.js +5 -5
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.js.map +1 -1
- package/lib/plugins/silence-table/SilenceTablePanel.d.ts +4 -4
- package/lib/plugins/silence-table/SilenceTablePanel.d.ts.map +1 -1
- package/lib/plugins/silence-table/SilenceTablePanel.js +13 -13
- package/lib/plugins/silence-table/SilenceTablePanel.js.map +1 -1
- package/lib/plugins/silence-table/silence-table-model.d.ts +1 -1
- package/lib/plugins/silence-table/silence-table-model.d.ts.map +1 -1
- package/lib/plugins/silence-table/silence-table-model.js.map +1 -1
- package/lib/plugins/silence-table/silence-table-sorting.d.ts +2 -2
- package/lib/plugins/silence-table/silence-table-sorting.d.ts.map +1 -1
- package/lib/plugins/silence-table/silence-table-sorting.js +1 -1
- package/lib/plugins/silence-table/silence-table-sorting.js.map +1 -1
- package/lib/plugins/types.d.ts +3 -3
- package/lib/plugins/types.d.ts.map +1 -1
- package/lib/plugins/types.js.map +1 -1
- package/lib/setup-tests.d.ts +1 -1
- package/lib/setup-tests.d.ts.map +1 -1
- package/lib/setup-tests.js +2 -2
- package/lib/setup-tests.js.map +1 -1
- package/mf-manifest.json +302 -308
- package/mf-stats.json +308 -314
- package/package.json +12 -12
- package/__mf/js/AlertManager.377d377b.js +0 -7
- package/__mf/js/async/1616.24f00c9d.js +0 -1
- package/__mf/js/async/1728.8a326412.js +0 -1
- package/__mf/js/async/1871.23ff54b3.js +0 -1
- package/__mf/js/async/1969.a83b1b48.js +0 -1
- package/__mf/js/async/2218.7829c9d9.js +0 -2
- package/__mf/js/async/2377.f8875a4e.js +0 -1
- package/__mf/js/async/2657.fe8dd44f.js +0 -1
- package/__mf/js/async/2842.993baf22.js +0 -1
- package/__mf/js/async/3468.1679f87f.js +0 -1
- package/__mf/js/async/3540.96681482.js +0 -2
- package/__mf/js/async/392.7e11dd69.js +0 -2
- package/__mf/js/async/3963.fb6246d2.js +0 -1
- package/__mf/js/async/3981.84d12fdc.js +0 -4
- package/__mf/js/async/3981.84d12fdc.js.LICENSE.txt +0 -24
- package/__mf/js/async/4121.ec666be2.js +0 -2
- package/__mf/js/async/4133.e94df4f8.js +0 -28
- package/__mf/js/async/4213.a0c4f2eb.js +0 -1
- package/__mf/js/async/430.74d85c4b.js +0 -7
- package/__mf/js/async/4788.49ffeac3.js +0 -1
- package/__mf/js/async/5038.269393e3.js +0 -2
- package/__mf/js/async/5481.cf6703fd.js +0 -2
- package/__mf/js/async/5570.d4dd47e0.js +0 -1
- package/__mf/js/async/573.ce8ce2ef.js +0 -2
- package/__mf/js/async/6274.8c77cb1a.js +0 -2
- package/__mf/js/async/6390.3f6f279d.js +0 -2
- package/__mf/js/async/6401.1a59dbad.js +0 -1
- package/__mf/js/async/6594.b02adfd9.js +0 -2
- package/__mf/js/async/663.5445c7e0.js +0 -1
- package/__mf/js/async/6854.1d628838.js +0 -1
- package/__mf/js/async/7177.27c86137.js +0 -1
- package/__mf/js/async/7192.ede9860b.js +0 -1
- package/__mf/js/async/7283.8c1cb6ee.js +0 -2
- package/__mf/js/async/7984.163a6ddb.js +0 -22
- package/__mf/js/async/804.23da0d30.js +0 -37
- package/__mf/js/async/8470.2df0db71.js +0 -2
- package/__mf/js/async/8697.c13c6603.js +0 -1
- package/__mf/js/async/8711.c7dc09b8.js +0 -2
- package/__mf/js/async/8907.9e3edf43.js +0 -1
- package/__mf/js/async/9184.27a439a4.js +0 -1
- package/__mf/js/async/9235.00f9412f.js +0 -1
- package/__mf/js/async/941.d3bc6208.js +0 -2
- package/__mf/js/async/9537.36ff6f15.js +0 -1
- package/__mf/js/async/9634.3a366799.js +0 -1
- package/__mf/js/async/983.36857235.js +0 -1
- package/__mf/js/async/9836.cc839227.js +0 -1
- package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.47ee46dc.js +0 -2
- package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.22b0e5bc.js +0 -1
- package/__mf/js/async/__federation_expose_AlertManagerDatasource.7ee7440a.js +0 -2
- package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.35860f1b.js +0 -2
- package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.52a24c9e.js +0 -2
- package/__mf/js/async/__federation_expose_AlertTable.5d005bae.js +0 -1
- package/__mf/js/async/__federation_expose_SilenceTable.3fc487a4.js +0 -2
- package/__mf/js/async/__federation_expose_SilenceTable.3fc487a4.js.LICENSE.txt +0 -9
- package/__mf/js/async/lib-router.19f64904.js +0 -2
- package/lib/cjs/bootstrap.js +0 -26
- package/lib/cjs/components/ColumnsEditor.js +0 -271
- package/lib/cjs/components/LazyTextField.js +0 -50
- package/lib/cjs/components/MatcherEditor.js +0 -153
- package/lib/cjs/components/MatchersList.js +0 -46
- package/lib/cjs/components/SilenceForm.js +0 -205
- package/lib/cjs/components/StatusBadge.js +0 -71
- package/lib/cjs/components/index.js +0 -44
- package/lib/cjs/explore/AlertManagerAlertsExplorer.js +0 -79
- package/lib/cjs/explore/AlertManagerSilencesExplorer.js +0 -153
- package/lib/cjs/getPluginModule.js +0 -39
- package/lib/cjs/index-federation.js +0 -55
- package/lib/cjs/index.js +0 -39
- package/lib/cjs/model/alertmanager-client.js +0 -128
- package/lib/cjs/model/alertmanager-selectors.js +0 -66
- package/lib/cjs/model/api-types.js +0 -22
- package/lib/cjs/model/index.js +0 -32
- package/lib/cjs/plugins/AlertManagerDatasourceEditor.js +0 -71
- package/lib/cjs/plugins/alert-table/AlertTable.js +0 -56
- package/lib/cjs/plugins/alert-table/AlertTableColumnsEditor.js +0 -110
- package/lib/cjs/plugins/alert-table/AlertTableDeduplicationEditor.js +0 -138
- package/lib/cjs/plugins/alert-table/AlertTableLabelsEditor.js +0 -277
- package/lib/cjs/plugins/alert-table/AlertTableOptionsEditor.js +0 -128
- package/lib/cjs/plugins/alert-table/AlertTablePanel.js +0 -773
- package/lib/cjs/plugins/alert-table/alert-table-model.js +0 -142
- package/lib/cjs/plugins/alert-table/alert-table-sorting.js +0 -205
- package/lib/cjs/plugins/alert-table/label-colors.js +0 -170
- package/lib/cjs/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js +0 -51
- package/lib/cjs/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js +0 -138
- package/lib/cjs/plugins/alertmanager-alerts-query/get-alerts-data.js +0 -124
- package/lib/cjs/plugins/alertmanager-datasource.js +0 -69
- package/lib/cjs/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js +0 -45
- package/lib/cjs/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js +0 -78
- package/lib/cjs/plugins/alertmanager-silences-query/get-silences-data.js +0 -64
- package/lib/cjs/plugins/index.js +0 -74
- package/lib/cjs/plugins/silence-table/SilenceTable.js +0 -42
- package/lib/cjs/plugins/silence-table/SilenceTableColumnsEditor.js +0 -137
- package/lib/cjs/plugins/silence-table/SilenceTableOptionsEditor.js +0 -63
- package/lib/cjs/plugins/silence-table/SilenceTablePanel.js +0 -345
- package/lib/cjs/plugins/silence-table/silence-table-model.js +0 -116
- package/lib/cjs/plugins/silence-table/silence-table-sorting.js +0 -68
- package/lib/cjs/plugins/types.js +0 -16
- package/lib/cjs/setup-tests.js +0 -18
- /package/__mf/css/async/{430.85c2cbf6.css → 5759.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{7984.163a6ddb.js.LICENSE.txt → 1522.04dc197d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2218.7829c9d9.js.LICENSE.txt → 2218.8b7e30c2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5038.269393e3.js.LICENSE.txt → 2317.e656eab3.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6390.3f6f279d.js.LICENSE.txt → 3514.e71d5cb9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.7e11dd69.js.LICENSE.txt → 392.26ae5cc4.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4121.ec666be2.js.LICENSE.txt → 4121.f9595b70.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6594.b02adfd9.js.LICENSE.txt → 5038.b1e9133a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.8c77cb1a.js.LICENSE.txt → 6274.9f68ee7d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7283.8c1cb6ee.js.LICENSE.txt → 6390.0fd40bd8.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8711.c7dc09b8.js.LICENSE.txt → 6594.b3a19fc1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5481.cf6703fd.js.LICENSE.txt → 7862.10a19eef.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.2df0db71.js.LICENSE.txt → 8470.7ebe8e66.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{9040.94717f28.js.LICENSE.txt → 9040.8de751d6.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.d3bc6208.js.LICENSE.txt → 941.36858244.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerAlertsExplorer.47ee46dc.js.LICENSE.txt → __federation_expose_AlertManagerAlertsExplorer.4fbf2fa1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerDatasource.7ee7440a.js.LICENSE.txt → __federation_expose_AlertManagerDatasource.c2b36e70.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerSilencesExplorer.35860f1b.js.LICENSE.txt → __federation_expose_AlertManagerSilencesExplorer.65e1901a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerSilencesQuery.52a24c9e.js.LICENSE.txt → __federation_expose_AlertManagerSilencesQuery.f619a448.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.19f64904.js.LICENSE.txt → lib-router.20ba053c.js.LICENSE.txt} +0 -0
|
@@ -1,137 +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, "SilenceTableColumnsEditor", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return SilenceTableColumnsEditor;
|
|
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 _silencetablemodel = require("./silence-table-model");
|
|
29
|
-
const DEFAULT_FIELD_NAMES = new Set(_silencetablemodel.DEFAULT_SILENCE_COLUMNS.map((c)=>c.name));
|
|
30
|
-
const ALL_FIELDS = [
|
|
31
|
-
'status',
|
|
32
|
-
'matchers',
|
|
33
|
-
'createdBy',
|
|
34
|
-
'startsAt',
|
|
35
|
-
'endsAt',
|
|
36
|
-
'duration',
|
|
37
|
-
'comment',
|
|
38
|
-
'updatedAt'
|
|
39
|
-
];
|
|
40
|
-
const FIELD_OPTIONS = ALL_FIELDS.filter((f)=>!DEFAULT_FIELD_NAMES.has(f));
|
|
41
|
-
const SORT_MODE_LABELS = {
|
|
42
|
-
alphabetical: 'Alphabetical',
|
|
43
|
-
date: 'Date (chronological)',
|
|
44
|
-
status: 'Status (active > pending > expired)'
|
|
45
|
-
};
|
|
46
|
-
function SilenceTableColumnsEditor(props) {
|
|
47
|
-
const { value, onChange } = props;
|
|
48
|
-
const columns = value.columns ?? [];
|
|
49
|
-
const handleAddColumn = (0, _react.useCallback)(()=>{
|
|
50
|
-
onChange((0, _immer.produce)(value, (draft)=>{
|
|
51
|
-
if (!draft.columns) draft.columns = [];
|
|
52
|
-
draft.columns.push({
|
|
53
|
-
name: FIELD_OPTIONS[0] ?? 'updatedAt'
|
|
54
|
-
});
|
|
55
|
-
}));
|
|
56
|
-
}, [
|
|
57
|
-
value,
|
|
58
|
-
onChange
|
|
59
|
-
]);
|
|
60
|
-
const handleRemoveColumn = (0, _react.useCallback)((index)=>{
|
|
61
|
-
onChange((0, _immer.produce)(value, (draft)=>{
|
|
62
|
-
draft.columns?.splice(index, 1);
|
|
63
|
-
}));
|
|
64
|
-
}, [
|
|
65
|
-
value,
|
|
66
|
-
onChange
|
|
67
|
-
]);
|
|
68
|
-
const handleUpdateColumn = (0, _react.useCallback)((index, updater)=>{
|
|
69
|
-
onChange((0, _immer.produce)(value, (draft)=>{
|
|
70
|
-
const column = draft.columns?.[index];
|
|
71
|
-
if (column) {
|
|
72
|
-
updater(column);
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
}, [
|
|
76
|
-
value,
|
|
77
|
-
onChange
|
|
78
|
-
]);
|
|
79
|
-
const handleMoveUp = (0, _react.useCallback)((index)=>{
|
|
80
|
-
if (index <= 0) return;
|
|
81
|
-
onChange((0, _immer.produce)(value, (draft)=>{
|
|
82
|
-
if (!draft.columns) return;
|
|
83
|
-
const item = draft.columns.splice(index, 1)[0];
|
|
84
|
-
draft.columns.splice(index - 1, 0, item);
|
|
85
|
-
}));
|
|
86
|
-
}, [
|
|
87
|
-
value,
|
|
88
|
-
onChange
|
|
89
|
-
]);
|
|
90
|
-
const handleMoveDown = (0, _react.useCallback)((index)=>{
|
|
91
|
-
onChange((0, _immer.produce)(value, (draft)=>{
|
|
92
|
-
if (!draft.columns || index >= draft.columns.length - 1) return;
|
|
93
|
-
const item = draft.columns.splice(index, 1)[0];
|
|
94
|
-
draft.columns.splice(index + 1, 0, item);
|
|
95
|
-
}));
|
|
96
|
-
}, [
|
|
97
|
-
value,
|
|
98
|
-
onChange
|
|
99
|
-
]);
|
|
100
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ColumnsEditor.ColumnsEditor, {
|
|
101
|
-
columns: columns,
|
|
102
|
-
description: "Status and Matchers are always shown. Add extra columns below.",
|
|
103
|
-
sortModeLabels: SORT_MODE_LABELS,
|
|
104
|
-
defaultSortMode: "alphabetical",
|
|
105
|
-
getDisplayName: (col)=>col.header || _silencetablemodel.DEFAULT_COLUMN_HEADERS[col.name] || 'New column',
|
|
106
|
-
getHeaderPlaceholder: (col)=>_silencetablemodel.DEFAULT_COLUMN_HEADERS[col.name] || 'Column header',
|
|
107
|
-
onAdd: handleAddColumn,
|
|
108
|
-
onRemove: handleRemoveColumn,
|
|
109
|
-
onUpdate: handleUpdateColumn,
|
|
110
|
-
onMoveUp: handleMoveUp,
|
|
111
|
-
onMoveDown: handleMoveDown,
|
|
112
|
-
renderNameField: (col, index, onUpdate)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
|
|
113
|
-
size: "small",
|
|
114
|
-
fullWidth: true,
|
|
115
|
-
children: [
|
|
116
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
|
|
117
|
-
id: `field-name-label-${index}`,
|
|
118
|
-
children: "Field"
|
|
119
|
-
}),
|
|
120
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Select, {
|
|
121
|
-
labelId: `field-name-label-${index}`,
|
|
122
|
-
value: col.name,
|
|
123
|
-
onChange: (e)=>onUpdate(index, (draft)=>{
|
|
124
|
-
const field = e.target.value;
|
|
125
|
-
draft.name = field;
|
|
126
|
-
draft.sortMode = (0, _silencetablemodel.inferSortMode)(field);
|
|
127
|
-
}),
|
|
128
|
-
label: "Field",
|
|
129
|
-
children: FIELD_OPTIONS.map((field)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
130
|
-
value: field,
|
|
131
|
-
children: _silencetablemodel.DEFAULT_COLUMN_HEADERS[field]
|
|
132
|
-
}, field))
|
|
133
|
-
})
|
|
134
|
-
]
|
|
135
|
-
})
|
|
136
|
-
});
|
|
137
|
-
}
|
|
@@ -1,63 +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, "SilenceTableOptionsEditor", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return SilenceTableOptionsEditor;
|
|
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 _silencetablemodel = require("./silence-table-model");
|
|
29
|
-
const ACTION_LABELS = {
|
|
30
|
-
expire: 'Expire silence'
|
|
31
|
-
};
|
|
32
|
-
function SilenceTableOptionsEditor(props) {
|
|
33
|
-
const { value, onChange } = props;
|
|
34
|
-
const effectiveActions = value.allowedActions ?? _silencetablemodel.ALL_SILENCE_ACTIONS;
|
|
35
|
-
const handleToggle = (0, _react.useCallback)((action, checked)=>{
|
|
36
|
-
onChange((0, _immer.produce)(value, (draft)=>{
|
|
37
|
-
const current = draft.allowedActions ?? [
|
|
38
|
-
..._silencetablemodel.ALL_SILENCE_ACTIONS
|
|
39
|
-
];
|
|
40
|
-
if (checked) {
|
|
41
|
-
if (!current.includes(action)) current.push(action);
|
|
42
|
-
} else {
|
|
43
|
-
const idx = current.indexOf(action);
|
|
44
|
-
if (idx >= 0) current.splice(idx, 1);
|
|
45
|
-
}
|
|
46
|
-
draft.allowedActions = current;
|
|
47
|
-
}));
|
|
48
|
-
}, [
|
|
49
|
-
value,
|
|
50
|
-
onChange
|
|
51
|
-
]);
|
|
52
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorGroup, {
|
|
53
|
-
title: "Actions",
|
|
54
|
-
children: _silencetablemodel.ALL_SILENCE_ACTIONS.map((action)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControlLabel, {
|
|
55
|
-
control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Checkbox, {
|
|
56
|
-
checked: effectiveActions.includes(action),
|
|
57
|
-
onChange: (e)=>handleToggle(action, e.target.checked),
|
|
58
|
-
size: "small"
|
|
59
|
-
}),
|
|
60
|
-
label: ACTION_LABELS[action]
|
|
61
|
-
}, action))
|
|
62
|
-
});
|
|
63
|
-
}
|
|
@@ -1,345 +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, "SilenceTablePanel", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return SilenceTablePanel;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _material = require("@mui/material");
|
|
25
|
-
const _components = require("@perses-dev/components");
|
|
26
|
-
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
27
|
-
const _reactquery = require("@tanstack/react-query");
|
|
28
|
-
const _Delete = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Delete"));
|
|
29
|
-
const _Magnify = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Magnify"));
|
|
30
|
-
const _react = require("react");
|
|
31
|
-
const _MatchersList = require("../../components/MatchersList");
|
|
32
|
-
const _StatusBadge = require("../../components/StatusBadge");
|
|
33
|
-
const _model = require("../../model");
|
|
34
|
-
const _silencetablemodel = require("./silence-table-model");
|
|
35
|
-
const _silencetablesorting = require("./silence-table-sorting");
|
|
36
|
-
function _interop_require_default(obj) {
|
|
37
|
-
return obj && obj.__esModule ? obj : {
|
|
38
|
-
default: obj
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function renderSilenceCell(silence, field) {
|
|
42
|
-
switch(field){
|
|
43
|
-
case 'status':
|
|
44
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_StatusBadge.StatusBadge, {
|
|
45
|
-
status: silence.state,
|
|
46
|
-
variant: "silence"
|
|
47
|
-
});
|
|
48
|
-
case 'matchers':
|
|
49
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_MatchersList.MatchersList, {
|
|
50
|
-
matchers: silence.matchers
|
|
51
|
-
});
|
|
52
|
-
case 'startsAt':
|
|
53
|
-
case 'endsAt':
|
|
54
|
-
case 'updatedAt':
|
|
55
|
-
{
|
|
56
|
-
const raw = field === 'updatedAt' ? silence.updatedAt : silence[field];
|
|
57
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
58
|
-
children: raw ? new Date(raw).toLocaleString() : ''
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
case 'duration':
|
|
62
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
63
|
-
children: (0, _silencetablemodel.getSilenceDuration)(silence)
|
|
64
|
-
});
|
|
65
|
-
case 'comment':
|
|
66
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
|
|
67
|
-
title: silence.comment ?? '',
|
|
68
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
69
|
-
variant: "body2",
|
|
70
|
-
sx: {
|
|
71
|
-
maxWidth: 200,
|
|
72
|
-
overflow: 'hidden',
|
|
73
|
-
textOverflow: 'ellipsis',
|
|
74
|
-
whiteSpace: 'nowrap'
|
|
75
|
-
},
|
|
76
|
-
children: silence.comment ?? ''
|
|
77
|
-
})
|
|
78
|
-
});
|
|
79
|
-
case 'createdBy':
|
|
80
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
81
|
-
children: silence.createdBy
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function SilenceRow({ silence, columnDefs, allowedActions, onExpire }) {
|
|
86
|
-
const showActions = allowedActions.length > 0;
|
|
87
|
-
const isExpired = silence.state === 'expired';
|
|
88
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
|
|
89
|
-
hover: true,
|
|
90
|
-
children: [
|
|
91
|
-
columnDefs.map((col, colIdx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
92
|
-
children: renderSilenceCell(silence, col.name)
|
|
93
|
-
}, colIdx)),
|
|
94
|
-
showActions && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
95
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
96
|
-
direction: "row",
|
|
97
|
-
spacing: 0.5,
|
|
98
|
-
children: allowedActions.includes('expire') && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
|
|
99
|
-
title: isExpired ? 'Already expired' : 'Expire silence',
|
|
100
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
101
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
102
|
-
size: "small",
|
|
103
|
-
"aria-label": "Expire silence",
|
|
104
|
-
onClick: ()=>onExpire(silence),
|
|
105
|
-
disabled: isExpired,
|
|
106
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Delete.default, {
|
|
107
|
-
fontSize: "small"
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
})
|
|
111
|
-
})
|
|
112
|
-
})
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function SilenceTablePanel({ spec, queryResults, contentDimensions }) {
|
|
118
|
-
const datasourceSelector = (0, _react.useMemo)(()=>(0, _model.extractDatasourceSelector)(queryResults), [
|
|
119
|
-
queryResults
|
|
120
|
-
]);
|
|
121
|
-
const { data: amClient } = (0, _pluginsystem.useDatasourceClient)(datasourceSelector);
|
|
122
|
-
const queryClient = (0, _reactquery.useQueryClient)();
|
|
123
|
-
const [expireTarget, setExpireTarget] = (0, _react.useState)(null);
|
|
124
|
-
const [isExpiring, setIsExpiring] = (0, _react.useState)(false);
|
|
125
|
-
const { successSnackbar, exceptionSnackbar } = (0, _components.useSnackbar)();
|
|
126
|
-
const handleExpire = (0, _react.useCallback)(async ()=>{
|
|
127
|
-
if (!amClient || !expireTarget) return;
|
|
128
|
-
setIsExpiring(true);
|
|
129
|
-
try {
|
|
130
|
-
await amClient.deleteSilence(expireTarget.id);
|
|
131
|
-
setExpireTarget(null);
|
|
132
|
-
successSnackbar('Silence expired successfully');
|
|
133
|
-
queryClient.invalidateQueries({
|
|
134
|
-
queryKey: [
|
|
135
|
-
'query',
|
|
136
|
-
'AlertsQuery'
|
|
137
|
-
]
|
|
138
|
-
});
|
|
139
|
-
queryClient.invalidateQueries({
|
|
140
|
-
queryKey: [
|
|
141
|
-
'query',
|
|
142
|
-
'SilencesQuery'
|
|
143
|
-
]
|
|
144
|
-
});
|
|
145
|
-
} catch (err) {
|
|
146
|
-
exceptionSnackbar(err);
|
|
147
|
-
} finally{
|
|
148
|
-
setIsExpiring(false);
|
|
149
|
-
}
|
|
150
|
-
}, [
|
|
151
|
-
amClient,
|
|
152
|
-
expireTarget,
|
|
153
|
-
queryClient,
|
|
154
|
-
successSnackbar,
|
|
155
|
-
exceptionSnackbar
|
|
156
|
-
]);
|
|
157
|
-
const [search, setSearch] = (0, _react.useState)('');
|
|
158
|
-
const effectiveActions = (0, _react.useMemo)(()=>spec?.allowedActions ?? _silencetablemodel.ALL_SILENCE_ACTIONS, [
|
|
159
|
-
spec?.allowedActions
|
|
160
|
-
]);
|
|
161
|
-
const showActionsColumn = effectiveActions.length > 0;
|
|
162
|
-
const columnDefs = (0, _react.useMemo)(()=>{
|
|
163
|
-
if (!spec.columns || spec.columns.length === 0) return _silencetablemodel.DEFAULT_SILENCE_COLUMNS;
|
|
164
|
-
const defaultNames = new Set(_silencetablemodel.DEFAULT_SILENCE_COLUMNS.map((c)=>c.name));
|
|
165
|
-
const extra = spec.columns.filter((c)=>!defaultNames.has(c.name));
|
|
166
|
-
return [
|
|
167
|
-
..._silencetablemodel.DEFAULT_SILENCE_COLUMNS,
|
|
168
|
-
...extra
|
|
169
|
-
];
|
|
170
|
-
}, [
|
|
171
|
-
spec.columns
|
|
172
|
-
]);
|
|
173
|
-
const initialSort = (0, _react.useMemo)(()=>{
|
|
174
|
-
const col = columnDefs.find((c)=>c.sort && c.enableSorting !== false);
|
|
175
|
-
if (!col?.sort) return null;
|
|
176
|
-
return {
|
|
177
|
-
fieldName: col.name,
|
|
178
|
-
direction: col.sort,
|
|
179
|
-
mode: col.sortMode ?? (0, _silencetablemodel.inferSortMode)(col.name)
|
|
180
|
-
};
|
|
181
|
-
}, [
|
|
182
|
-
columnDefs
|
|
183
|
-
]);
|
|
184
|
-
const [sortState, setSortState] = (0, _react.useState)(initialSort);
|
|
185
|
-
const handleSortClick = (0, _react.useCallback)((col)=>{
|
|
186
|
-
setSortState((prev)=>{
|
|
187
|
-
if (prev?.fieldName === col.name) {
|
|
188
|
-
return prev.direction === 'asc' ? {
|
|
189
|
-
...prev,
|
|
190
|
-
direction: 'desc'
|
|
191
|
-
} : null;
|
|
192
|
-
}
|
|
193
|
-
return {
|
|
194
|
-
fieldName: col.name,
|
|
195
|
-
direction: 'asc',
|
|
196
|
-
mode: col.sortMode ?? (0, _silencetablemodel.inferSortMode)(col.name)
|
|
197
|
-
};
|
|
198
|
-
});
|
|
199
|
-
}, []);
|
|
200
|
-
// Flatten all silences from all query results
|
|
201
|
-
const allSilences = (0, _react.useMemo)(()=>{
|
|
202
|
-
return queryResults.flatMap((result)=>result.data?.silences ?? []);
|
|
203
|
-
}, [
|
|
204
|
-
queryResults
|
|
205
|
-
]);
|
|
206
|
-
const filteredSilences = (0, _react.useMemo)(()=>{
|
|
207
|
-
const term = search.trim().toLowerCase();
|
|
208
|
-
if (!term) return allSilences;
|
|
209
|
-
return allSilences.filter((s)=>{
|
|
210
|
-
if (s.state.toLowerCase().includes(term)) return true;
|
|
211
|
-
if (s.createdBy.toLowerCase().includes(term)) return true;
|
|
212
|
-
if (s.comment?.toLowerCase().includes(term)) return true;
|
|
213
|
-
return s.matchers.some((m)=>m.name.toLowerCase().includes(term) || m.value.toLowerCase().includes(term));
|
|
214
|
-
});
|
|
215
|
-
}, [
|
|
216
|
-
allSilences,
|
|
217
|
-
search
|
|
218
|
-
]);
|
|
219
|
-
const silences = (0, _react.useMemo)(()=>{
|
|
220
|
-
if (!sortState) return filteredSilences;
|
|
221
|
-
return [
|
|
222
|
-
...filteredSilences
|
|
223
|
-
].sort((a, b)=>(0, _silencetablesorting.compareSilencesByColumn)(a, b, sortState));
|
|
224
|
-
}, [
|
|
225
|
-
filteredSilences,
|
|
226
|
-
sortState
|
|
227
|
-
]);
|
|
228
|
-
if (allSilences.length === 0) {
|
|
229
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
230
|
-
sx: {
|
|
231
|
-
display: 'flex',
|
|
232
|
-
justifyContent: 'center',
|
|
233
|
-
alignItems: 'center',
|
|
234
|
-
height: contentDimensions?.height ?? '100%'
|
|
235
|
-
},
|
|
236
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
237
|
-
children: "No silences to display"
|
|
238
|
-
})
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableContainer, {
|
|
242
|
-
sx: {
|
|
243
|
-
height: contentDimensions?.height,
|
|
244
|
-
overflow: 'auto'
|
|
245
|
-
},
|
|
246
|
-
children: [
|
|
247
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
248
|
-
sx: {
|
|
249
|
-
px: 1,
|
|
250
|
-
py: 0.5
|
|
251
|
-
},
|
|
252
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
253
|
-
size: "small",
|
|
254
|
-
placeholder: "Search silences...",
|
|
255
|
-
value: search,
|
|
256
|
-
onChange: (e)=>setSearch(e.target.value),
|
|
257
|
-
fullWidth: true,
|
|
258
|
-
slotProps: {
|
|
259
|
-
htmlInput: {
|
|
260
|
-
'aria-label': 'Search silences'
|
|
261
|
-
},
|
|
262
|
-
input: {
|
|
263
|
-
startAdornment: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputAdornment, {
|
|
264
|
-
position: "start",
|
|
265
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Magnify.default, {
|
|
266
|
-
fontSize: "small"
|
|
267
|
-
})
|
|
268
|
-
})
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
})
|
|
272
|
-
}),
|
|
273
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Table, {
|
|
274
|
-
size: "small",
|
|
275
|
-
stickyHeader: true,
|
|
276
|
-
children: [
|
|
277
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableHead, {
|
|
278
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
|
|
279
|
-
children: [
|
|
280
|
-
columnDefs.map((col, colIdx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
281
|
-
sortDirection: sortState?.fieldName === col.name ? sortState.direction : false,
|
|
282
|
-
children: col.enableSorting !== false ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableSortLabel, {
|
|
283
|
-
active: sortState?.fieldName === col.name,
|
|
284
|
-
direction: sortState?.fieldName === col.name ? sortState.direction : 'asc',
|
|
285
|
-
onClick: ()=>handleSortClick(col),
|
|
286
|
-
children: col.header ?? _silencetablemodel.DEFAULT_COLUMN_HEADERS[col.name]
|
|
287
|
-
}) : col.header ?? _silencetablemodel.DEFAULT_COLUMN_HEADERS[col.name]
|
|
288
|
-
}, colIdx)),
|
|
289
|
-
showActionsColumn && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
290
|
-
children: "Actions"
|
|
291
|
-
})
|
|
292
|
-
]
|
|
293
|
-
})
|
|
294
|
-
}),
|
|
295
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableBody, {
|
|
296
|
-
children: silences.length === 0 ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableRow, {
|
|
297
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
298
|
-
colSpan: 99,
|
|
299
|
-
align: "center",
|
|
300
|
-
sx: {
|
|
301
|
-
py: 4
|
|
302
|
-
},
|
|
303
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
304
|
-
color: "text.secondary",
|
|
305
|
-
children: "No matching silences"
|
|
306
|
-
})
|
|
307
|
-
})
|
|
308
|
-
}) : silences.map((silence)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(SilenceRow, {
|
|
309
|
-
silence: silence,
|
|
310
|
-
columnDefs: columnDefs,
|
|
311
|
-
allowedActions: effectiveActions,
|
|
312
|
-
onExpire: setExpireTarget
|
|
313
|
-
}, silence.id))
|
|
314
|
-
})
|
|
315
|
-
]
|
|
316
|
-
}),
|
|
317
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.Dialog, {
|
|
318
|
-
open: !!expireTarget,
|
|
319
|
-
onClose: ()=>setExpireTarget(null),
|
|
320
|
-
children: [
|
|
321
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.Header, {
|
|
322
|
-
onClose: ()=>setExpireTarget(null),
|
|
323
|
-
children: "Expire Silence"
|
|
324
|
-
}),
|
|
325
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.Content, {
|
|
326
|
-
children: "Are you sure you want to expire this silence? Alerts matching its matchers will start firing again."
|
|
327
|
-
}),
|
|
328
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.Dialog.Actions, {
|
|
329
|
-
children: [
|
|
330
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.SecondaryButton, {
|
|
331
|
-
onClick: ()=>setExpireTarget(null),
|
|
332
|
-
children: "Cancel"
|
|
333
|
-
}),
|
|
334
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.PrimaryButton, {
|
|
335
|
-
onClick: handleExpire,
|
|
336
|
-
disabled: isExpiring,
|
|
337
|
-
children: isExpiring ? 'Expiring...' : 'Expire'
|
|
338
|
-
})
|
|
339
|
-
]
|
|
340
|
-
})
|
|
341
|
-
]
|
|
342
|
-
})
|
|
343
|
-
]
|
|
344
|
-
});
|
|
345
|
-
}
|
|
@@ -1,116 +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 ALL_SILENCE_ACTIONS () {
|
|
25
|
-
return ALL_SILENCE_ACTIONS;
|
|
26
|
-
},
|
|
27
|
-
get DEFAULT_COLUMN_HEADERS () {
|
|
28
|
-
return DEFAULT_COLUMN_HEADERS;
|
|
29
|
-
},
|
|
30
|
-
get DEFAULT_SILENCE_COLUMNS () {
|
|
31
|
-
return DEFAULT_SILENCE_COLUMNS;
|
|
32
|
-
},
|
|
33
|
-
get getSilenceDuration () {
|
|
34
|
-
return getSilenceDuration;
|
|
35
|
-
},
|
|
36
|
-
get getSilenceFieldValue () {
|
|
37
|
-
return getSilenceFieldValue;
|
|
38
|
-
},
|
|
39
|
-
get inferSortMode () {
|
|
40
|
-
return inferSortMode;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const ALL_SILENCE_ACTIONS = [
|
|
44
|
-
'expire'
|
|
45
|
-
];
|
|
46
|
-
const DEFAULT_COLUMN_HEADERS = {
|
|
47
|
-
status: 'Status',
|
|
48
|
-
matchers: 'Matchers',
|
|
49
|
-
createdBy: 'Creator',
|
|
50
|
-
startsAt: 'Starts At',
|
|
51
|
-
endsAt: 'Ends At',
|
|
52
|
-
duration: 'Duration',
|
|
53
|
-
comment: 'Comment',
|
|
54
|
-
updatedAt: 'Updated At'
|
|
55
|
-
};
|
|
56
|
-
const DEFAULT_SILENCE_COLUMNS = [
|
|
57
|
-
{
|
|
58
|
-
name: 'status',
|
|
59
|
-
sort: 'asc',
|
|
60
|
-
sortMode: 'status'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: 'matchers',
|
|
64
|
-
enableSorting: false
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: 'comment'
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
function inferSortMode(field) {
|
|
71
|
-
switch(field){
|
|
72
|
-
case 'status':
|
|
73
|
-
return 'status';
|
|
74
|
-
case 'startsAt':
|
|
75
|
-
case 'endsAt':
|
|
76
|
-
case 'updatedAt':
|
|
77
|
-
return 'date';
|
|
78
|
-
default:
|
|
79
|
-
return 'alphabetical';
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function getSilenceFieldValue(silence, field) {
|
|
83
|
-
switch(field){
|
|
84
|
-
case 'status':
|
|
85
|
-
return silence.state;
|
|
86
|
-
case 'matchers':
|
|
87
|
-
return silence.matchers.map((m)=>`${m.name}=${m.value}`).join(', ');
|
|
88
|
-
case 'createdBy':
|
|
89
|
-
return silence.createdBy;
|
|
90
|
-
case 'startsAt':
|
|
91
|
-
return silence.startsAt;
|
|
92
|
-
case 'endsAt':
|
|
93
|
-
return silence.endsAt;
|
|
94
|
-
case 'duration':
|
|
95
|
-
return getSilenceDuration(silence);
|
|
96
|
-
case 'comment':
|
|
97
|
-
return silence.comment ?? '';
|
|
98
|
-
case 'updatedAt':
|
|
99
|
-
return silence.updatedAt ?? '';
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function getSilenceDuration(silence) {
|
|
103
|
-
const startMs = new Date(silence.startsAt).getTime();
|
|
104
|
-
const endMs = new Date(silence.endsAt).getTime();
|
|
105
|
-
const diffMs = endMs - startMs;
|
|
106
|
-
if (diffMs <= 0) return '0m';
|
|
107
|
-
const totalMinutes = Math.floor(diffMs / (1000 * 60));
|
|
108
|
-
const days = Math.floor(totalMinutes / (60 * 24));
|
|
109
|
-
const hours = Math.floor(totalMinutes % (60 * 24) / 60);
|
|
110
|
-
const minutes = totalMinutes % 60;
|
|
111
|
-
const parts = [];
|
|
112
|
-
if (days > 0) parts.push(`${days}d`);
|
|
113
|
-
if (hours > 0) parts.push(`${hours}h`);
|
|
114
|
-
if (minutes > 0) parts.push(`${minutes}m`);
|
|
115
|
-
return parts.join(' ') || '0m';
|
|
116
|
-
}
|