@perses-dev/alert-manager-plugin 0.1.0 → 0.2.0-beta.1
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.f762e62c.js → AlertManager.c78c7631.js} +4 -4
- package/__mf/js/async/1299.b3dc5c89.js +1 -0
- package/__mf/js/async/1522.c41bc562.js +22 -0
- package/__mf/js/async/1616.e680a07f.js +1 -0
- package/__mf/js/async/1871.fe54ab4e.js +1 -0
- package/__mf/js/async/1969.d946615b.js +1 -0
- package/__mf/js/async/2218.51c7742c.js +2 -0
- package/__mf/js/async/2377.14dda722.js +1 -0
- package/__mf/js/async/2657.0066c1f3.js +1 -0
- package/__mf/js/async/3222.20ec9ee4.js +1 -0
- package/__mf/js/async/3910.b5d5ed03.js +1 -0
- package/__mf/js/async/392.11937443.js +2 -0
- package/__mf/js/async/3963.54b09d75.js +1 -0
- package/__mf/js/async/4121.cfc092b2.js +2 -0
- package/__mf/js/async/4133.2466cfcc.js +28 -0
- package/__mf/js/async/4213.9de2ae83.js +1 -0
- package/__mf/js/async/{4466.a8145edd.js → 4466.be399be0.js} +3 -3
- package/__mf/js/async/4481.a8fabc1a.js +2 -0
- package/__mf/js/async/4957.62663311.js +1 -0
- package/__mf/js/async/4978.a229b85b.js +1 -0
- package/__mf/js/async/5038.9c3ee144.js +2 -0
- package/__mf/js/async/5623.8c06770a.js +1 -0
- package/__mf/js/async/5968.fb0e7bc9.js +7 -0
- package/__mf/js/async/{7790.a75199e6.js.LICENSE.txt → 5968.fb0e7bc9.js.LICENSE.txt} +38 -0
- package/__mf/js/async/6274.45d7dcb4.js +2 -0
- package/__mf/js/async/6390.d5b9d294.js +2 -0
- package/__mf/js/async/6401.d44c37e4.js +1 -0
- package/__mf/js/async/6594.430d845a.js +2 -0
- package/__mf/js/async/663.8ae70b57.js +1 -0
- package/__mf/js/async/6911.1e492669.js +37 -0
- package/__mf/js/async/7177.e17b1f66.js +1 -0
- package/__mf/js/async/7192.e14724bd.js +1 -0
- package/__mf/js/async/7283.8f93ba0a.js +2 -0
- package/__mf/js/async/7862.fe1ed3c8.js +2 -0
- package/__mf/js/async/8470.9713c0c1.js +2 -0
- package/__mf/js/async/8697.9578c83e.js +1 -0
- package/__mf/js/async/8711.f5dcfad1.js +2 -0
- package/__mf/js/async/8816.6639efe5.js +1 -0
- package/__mf/js/async/8907.f08d5712.js +1 -0
- package/__mf/js/async/{9040.94717f28.js → 9040.b16cad40.js} +4 -4
- package/__mf/js/async/9184.c50ca9d4.js +1 -0
- package/__mf/js/async/9235.8d9a31b6.js +1 -0
- package/__mf/js/async/941.f680467a.js +2 -0
- package/__mf/js/async/9603.b2aeca71.js +1 -0
- package/__mf/js/async/9700.e1cf74e6.js +3 -0
- package/__mf/js/async/983.7e4d67d6.js +1 -0
- package/__mf/js/async/9836.c697c034.js +1 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.702ab2db.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.0e832f57.js +1 -0
- package/__mf/js/async/__federation_expose_AlertManagerDatasource.9acf1c1d.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.537f52dd.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.5c356656.js +2 -0
- package/__mf/js/async/__federation_expose_AlertTable.22c6f725.js +1 -0
- package/__mf/js/async/__federation_expose_SilenceTable.f7a7955f.js +2 -0
- package/__mf/js/async/__federation_expose_SilenceTable.f7a7955f.js.LICENSE.txt +9 -0
- package/__mf/js/async/lib-router.07082537.js +2 -0
- package/__mf/js/{main.a1362788.js → main.886f07a7.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 +283 -276
- package/mf-stats.json +289 -282
- package/package.json +14 -13
- package/__mf/js/async/1616.24f00c9d.js +0 -1
- package/__mf/js/async/1728.83bb9a7c.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/2954.3ac1f636.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/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/4397.d399eecb.js +0 -2
- package/__mf/js/async/4397.d399eecb.js.LICENSE.txt +0 -37
- package/__mf/js/async/4732.e866a740.js +0 -1
- package/__mf/js/async/4788.49ffeac3.js +0 -1
- package/__mf/js/async/5038.269393e3.js +0 -2
- package/__mf/js/async/573.214f2003.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/6593.acc8b704.js +0 -4
- package/__mf/js/async/6593.acc8b704.js.LICENSE.txt +0 -24
- 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/733.22ab2a8a.js +0 -1
- package/__mf/js/async/7422.33d76364.js +0 -2
- package/__mf/js/async/7790.a75199e6.js +0 -7
- package/__mf/js/async/7862.556c038f.js +0 -2
- package/__mf/js/async/7984.49fa1156.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/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/9634.3a366799.js +0 -1
- package/__mf/js/async/9836.cc839227.js +0 -1
- package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.d4fb76c0.js +0 -2
- package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.9ea3093c.js +0 -1
- package/__mf/js/async/__federation_expose_AlertManagerDatasource.2fbf067c.js +0 -2
- package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.d2527c12.js +0 -2
- package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.7aca31d3.js +0 -2
- package/__mf/js/async/__federation_expose_AlertTable.4a636b80.js +0 -1
- package/__mf/js/async/__federation_expose_SilenceTable.11259028.js +0 -1
- 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/{7790.85c2cbf6.css → 5968.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{7984.49fa1156.js.LICENSE.txt → 1522.c41bc562.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2218.7829c9d9.js.LICENSE.txt → 2218.51c7742c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.7e11dd69.js.LICENSE.txt → 392.11937443.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4121.ec666be2.js.LICENSE.txt → 4121.cfc092b2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{5038.269393e3.js.LICENSE.txt → 5038.9c3ee144.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6274.8c77cb1a.js.LICENSE.txt → 6274.45d7dcb4.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{573.214f2003.js.LICENSE.txt → 6390.d5b9d294.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6390.3f6f279d.js.LICENSE.txt → 6594.430d845a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{6594.b02adfd9.js.LICENSE.txt → 7283.8f93ba0a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7862.556c038f.js.LICENSE.txt → 7862.fe1ed3c8.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{8470.2df0db71.js.LICENSE.txt → 8470.9713c0c1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{7422.33d76364.js.LICENSE.txt → 8711.f5dcfad1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{9040.94717f28.js.LICENSE.txt → 9040.b16cad40.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.d3bc6208.js.LICENSE.txt → 941.f680467a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerAlertsExplorer.d4fb76c0.js.LICENSE.txt → __federation_expose_AlertManagerAlertsExplorer.702ab2db.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerDatasource.2fbf067c.js.LICENSE.txt → __federation_expose_AlertManagerDatasource.9acf1c1d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerSilencesExplorer.d2527c12.js.LICENSE.txt → __federation_expose_AlertManagerSilencesExplorer.537f52dd.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_AlertManagerSilencesQuery.7aca31d3.js.LICENSE.txt → __federation_expose_AlertManagerSilencesQuery.5c356656.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.19f64904.js.LICENSE.txt → lib-router.07082537.js.LICENSE.txt} +0 -0
|
@@ -1,153 +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, "AlertManagerSilencesExplorer", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return AlertManagerSilencesExplorer;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _react = require("react");
|
|
25
|
-
const _material = require("@mui/material");
|
|
26
|
-
const _BellOff = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/BellOff"));
|
|
27
|
-
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
28
|
-
const _dashboards = require("@perses-dev/dashboards");
|
|
29
|
-
const _explore = require("@perses-dev/explore");
|
|
30
|
-
const _components = require("@perses-dev/components");
|
|
31
|
-
const _reactquery = require("@tanstack/react-query");
|
|
32
|
-
const _SilenceForm = require("../components/SilenceForm");
|
|
33
|
-
const _model = require("../model");
|
|
34
|
-
function _interop_require_default(obj) {
|
|
35
|
-
return obj && obj.__esModule ? obj : {
|
|
36
|
-
default: obj
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
const PANEL_PREVIEW_HEIGHT = 600;
|
|
40
|
-
function extractSelectorFromQueries(queries) {
|
|
41
|
-
const spec = queries[0]?.spec?.plugin?.spec;
|
|
42
|
-
if (spec && typeof spec === 'object' && 'datasource' in spec) {
|
|
43
|
-
const ds = spec.datasource;
|
|
44
|
-
if (ds && typeof ds === 'object' && 'kind' in ds) {
|
|
45
|
-
return ds;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return _model.DEFAULT_ALERTMANAGER;
|
|
49
|
-
}
|
|
50
|
-
function CreateSilenceButton({ queries }) {
|
|
51
|
-
const datasourceSelector = (0, _react.useMemo)(()=>extractSelectorFromQueries(queries), [
|
|
52
|
-
queries
|
|
53
|
-
]);
|
|
54
|
-
const { data: amClient } = (0, _pluginsystem.useDatasourceClient)(datasourceSelector);
|
|
55
|
-
const queryClient = (0, _reactquery.useQueryClient)();
|
|
56
|
-
const { successSnackbar, exceptionSnackbar } = (0, _components.useSnackbar)();
|
|
57
|
-
const [open, setOpen] = (0, _react.useState)(false);
|
|
58
|
-
const formKeyRef = (0, _react.useRef)(0);
|
|
59
|
-
const handleOpen = (0, _react.useCallback)(()=>{
|
|
60
|
-
formKeyRef.current++;
|
|
61
|
-
setOpen(true);
|
|
62
|
-
}, []);
|
|
63
|
-
const handleSubmit = (0, _react.useCallback)(async (silence)=>{
|
|
64
|
-
if (!amClient) return;
|
|
65
|
-
try {
|
|
66
|
-
await amClient.createSilence(silence);
|
|
67
|
-
setOpen(false);
|
|
68
|
-
successSnackbar('Silence created successfully');
|
|
69
|
-
queryClient.invalidateQueries({
|
|
70
|
-
queryKey: [
|
|
71
|
-
'query',
|
|
72
|
-
'SilencesQuery'
|
|
73
|
-
]
|
|
74
|
-
});
|
|
75
|
-
} catch (err) {
|
|
76
|
-
exceptionSnackbar(err);
|
|
77
|
-
}
|
|
78
|
-
}, [
|
|
79
|
-
amClient,
|
|
80
|
-
queryClient,
|
|
81
|
-
successSnackbar,
|
|
82
|
-
exceptionSnackbar
|
|
83
|
-
]);
|
|
84
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
85
|
-
children: [
|
|
86
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
87
|
-
variant: "contained",
|
|
88
|
-
startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_BellOff.default, {}),
|
|
89
|
-
onClick: handleOpen,
|
|
90
|
-
size: "small",
|
|
91
|
-
children: "Create Silence"
|
|
92
|
-
}),
|
|
93
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_SilenceForm.SilenceForm, {
|
|
94
|
-
open: open,
|
|
95
|
-
onClose: ()=>setOpen(false),
|
|
96
|
-
onSubmit: handleSubmit
|
|
97
|
-
}, formKeyRef.current)
|
|
98
|
-
]
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function AlertManagerSilencesExplorer() {
|
|
102
|
-
const { data: { queries = [] }, setData } = (0, _explore.useExplorerManagerContext)();
|
|
103
|
-
const [queryDefinitions, setQueryDefinitions] = (0, _react.useState)(queries);
|
|
104
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
105
|
-
gap: 2,
|
|
106
|
-
sx: {
|
|
107
|
-
width: '100%'
|
|
108
|
-
},
|
|
109
|
-
children: [
|
|
110
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
111
|
-
direction: "row",
|
|
112
|
-
justifyContent: "flex-end",
|
|
113
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(CreateSilenceButton, {
|
|
114
|
-
queries: queries
|
|
115
|
-
})
|
|
116
|
-
}),
|
|
117
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.MultiQueryEditor, {
|
|
118
|
-
queryTypes: [
|
|
119
|
-
'SilencesQuery'
|
|
120
|
-
],
|
|
121
|
-
onChange: (state)=>setQueryDefinitions(state),
|
|
122
|
-
queries: queryDefinitions,
|
|
123
|
-
onQueryRun: ()=>setData({
|
|
124
|
-
queries: queryDefinitions
|
|
125
|
-
})
|
|
126
|
-
}),
|
|
127
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DataQueriesProvider, {
|
|
128
|
-
definitions: queries,
|
|
129
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
130
|
-
height: PANEL_PREVIEW_HEIGHT,
|
|
131
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_dashboards.Panel, {
|
|
132
|
-
panelOptions: {
|
|
133
|
-
hideHeader: true
|
|
134
|
-
},
|
|
135
|
-
definition: {
|
|
136
|
-
kind: 'Panel',
|
|
137
|
-
spec: {
|
|
138
|
-
queries,
|
|
139
|
-
display: {
|
|
140
|
-
name: ''
|
|
141
|
-
},
|
|
142
|
-
plugin: {
|
|
143
|
-
kind: 'SilenceTable',
|
|
144
|
-
spec: {}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
})
|
|
149
|
-
})
|
|
150
|
-
})
|
|
151
|
-
]
|
|
152
|
-
});
|
|
153
|
-
}
|
|
@@ -1,39 +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, "getPluginModule", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return getPluginModule;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _packagejson = /*#__PURE__*/ _interop_require_default(require("../package.json"));
|
|
24
|
-
function _interop_require_default(obj) {
|
|
25
|
-
return obj && obj.__esModule ? obj : {
|
|
26
|
-
default: obj
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function getPluginModule() {
|
|
30
|
-
const { name, version, perses } = _packagejson.default;
|
|
31
|
-
return {
|
|
32
|
-
kind: 'PluginModule',
|
|
33
|
-
metadata: {
|
|
34
|
-
name,
|
|
35
|
-
version
|
|
36
|
-
},
|
|
37
|
-
spec: perses
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
3
|
-
if (typeof WeakMap !== "function") return null;
|
|
4
|
-
var cacheBabelInterop = new WeakMap();
|
|
5
|
-
var cacheNodeInterop = new WeakMap();
|
|
6
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
7
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
8
|
-
})(nodeInterop);
|
|
9
|
-
}
|
|
10
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
11
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
15
|
-
return {
|
|
16
|
-
default: obj
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
20
|
-
if (cache && cache.has(obj)) {
|
|
21
|
-
return cache.get(obj);
|
|
22
|
-
}
|
|
23
|
-
var newObj = {
|
|
24
|
-
__proto__: null
|
|
25
|
-
};
|
|
26
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
27
|
-
for(var key in obj){
|
|
28
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
29
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
30
|
-
if (desc && (desc.get || desc.set)) {
|
|
31
|
-
Object.defineProperty(newObj, key, desc);
|
|
32
|
-
} else {
|
|
33
|
-
newObj[key] = obj[key];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
newObj.default = obj;
|
|
38
|
-
if (cache) {
|
|
39
|
-
cache.set(obj, newObj);
|
|
40
|
-
}
|
|
41
|
-
return newObj;
|
|
42
|
-
}
|
|
43
|
-
// Copyright The Perses Authors
|
|
44
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
45
|
-
// you may not use this file except in compliance with the License.
|
|
46
|
-
// You may obtain a copy of the License at
|
|
47
|
-
//
|
|
48
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
-
//
|
|
50
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
51
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
52
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
53
|
-
// See the License for the specific language governing permissions and
|
|
54
|
-
// limitations under the License.
|
|
55
|
-
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
|
package/lib/cjs/index.js
DELETED
|
@@ -1,39 +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, "getPluginModule", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return _getPluginModule.getPluginModule;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const _getPluginModule = require("./getPluginModule");
|
|
24
|
-
_export_star(require("./model"), exports);
|
|
25
|
-
_export_star(require("./plugins"), exports);
|
|
26
|
-
_export_star(require("./components"), exports);
|
|
27
|
-
function _export_star(from, to) {
|
|
28
|
-
Object.keys(from).forEach(function(k) {
|
|
29
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
30
|
-
Object.defineProperty(to, k, {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function() {
|
|
33
|
-
return from[k];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return from;
|
|
39
|
-
}
|
|
@@ -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 _core = require("@perses-dev/core");
|
|
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, _core.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, _core.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
|
-
});
|
package/lib/cjs/model/index.js
DELETED
|
@@ -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
|
-
};
|