@perses-dev/alert-manager-plugin 0.1.0-rc.0
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/LICENSE +201 -0
- package/README.md +41 -0
- package/__mf/css/async/430.85c2cbf6.css +1 -0
- package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
- package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
- package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
- package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
- package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
- package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
- package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
- package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
- package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
- package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
- package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
- package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
- package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
- package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
- package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
- package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
- package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
- package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
- package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
- package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
- package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
- package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
- package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
- package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
- package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
- package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
- package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
- package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
- package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
- package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
- package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
- package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
- package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
- package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
- package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
- package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
- package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
- package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
- package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
- package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
- package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
- package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
- package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
- package/__mf/js/AlertManager.3d597fc0.js +7 -0
- package/__mf/js/async/1616.24f00c9d.js +1 -0
- package/__mf/js/async/1728.a509c63a.js +1 -0
- package/__mf/js/async/1871.23ff54b3.js +1 -0
- package/__mf/js/async/1969.a83b1b48.js +1 -0
- package/__mf/js/async/2218.7829c9d9.js +2 -0
- package/__mf/js/async/2218.7829c9d9.js.LICENSE.txt +9 -0
- package/__mf/js/async/2377.f8875a4e.js +1 -0
- package/__mf/js/async/2657.fe8dd44f.js +1 -0
- package/__mf/js/async/2842.7f15ae1d.js +1 -0
- package/__mf/js/async/3468.1679f87f.js +1 -0
- package/__mf/js/async/3540.96681482.js +2 -0
- package/__mf/js/async/3540.96681482.js.LICENSE.txt +37 -0
- package/__mf/js/async/392.7e11dd69.js +2 -0
- package/__mf/js/async/392.7e11dd69.js.LICENSE.txt +8 -0
- package/__mf/js/async/3963.fb6246d2.js +1 -0
- package/__mf/js/async/4121.ec666be2.js +2 -0
- package/__mf/js/async/4121.ec666be2.js.LICENSE.txt +9 -0
- package/__mf/js/async/4133.e94df4f8.js +28 -0
- package/__mf/js/async/4213.a0c4f2eb.js +1 -0
- package/__mf/js/async/430.74d85c4b.js +7 -0
- package/__mf/js/async/430.74d85c4b.js.LICENSE.txt +64 -0
- package/__mf/js/async/4466.a8145edd.js +74 -0
- package/__mf/js/async/4788.49ffeac3.js +1 -0
- package/__mf/js/async/5038.269393e3.js +2 -0
- package/__mf/js/async/5038.269393e3.js.LICENSE.txt +9 -0
- package/__mf/js/async/5481.cf6703fd.js +2 -0
- package/__mf/js/async/5481.cf6703fd.js.LICENSE.txt +9 -0
- package/__mf/js/async/5570.d4dd47e0.js +1 -0
- package/__mf/js/async/573.ce8ce2ef.js +2 -0
- package/__mf/js/async/6274.8c77cb1a.js +2 -0
- package/__mf/js/async/6274.8c77cb1a.js.LICENSE.txt +8 -0
- package/__mf/js/async/6390.3f6f279d.js +2 -0
- package/__mf/js/async/6390.3f6f279d.js.LICENSE.txt +9 -0
- package/__mf/js/async/6401.1a59dbad.js +1 -0
- package/__mf/js/async/6594.b02adfd9.js +2 -0
- package/__mf/js/async/6594.b02adfd9.js.LICENSE.txt +9 -0
- package/__mf/js/async/663.5445c7e0.js +1 -0
- package/__mf/js/async/6854.1d628838.js +1 -0
- package/__mf/js/async/7177.27c86137.js +1 -0
- package/__mf/js/async/7192.ede9860b.js +1 -0
- package/__mf/js/async/7283.8c1cb6ee.js +2 -0
- package/__mf/js/async/7283.8c1cb6ee.js.LICENSE.txt +9 -0
- package/__mf/js/async/7984.1f786d95.js +22 -0
- package/__mf/js/async/7984.1f786d95.js.LICENSE.txt +19 -0
- package/__mf/js/async/804.23da0d30.js +37 -0
- package/__mf/js/async/8470.2df0db71.js +2 -0
- package/__mf/js/async/8470.2df0db71.js.LICENSE.txt +19 -0
- package/__mf/js/async/8697.c13c6603.js +1 -0
- package/__mf/js/async/8711.c7dc09b8.js +2 -0
- package/__mf/js/async/8711.c7dc09b8.js.LICENSE.txt +9 -0
- package/__mf/js/async/8907.9e3edf43.js +1 -0
- package/__mf/js/async/9040.94717f28.js +10 -0
- package/__mf/js/async/9040.94717f28.js.LICENSE.txt +17 -0
- package/__mf/js/async/9184.27a439a4.js +1 -0
- package/__mf/js/async/9235.00f9412f.js +1 -0
- package/__mf/js/async/941.d3bc6208.js +2 -0
- package/__mf/js/async/941.d3bc6208.js.LICENSE.txt +9 -0
- package/__mf/js/async/9537.36ff6f15.js +1 -0
- package/__mf/js/async/9634.3a366799.js +1 -0
- package/__mf/js/async/9741.199e8033.js +4 -0
- package/__mf/js/async/9741.199e8033.js.LICENSE.txt +24 -0
- package/__mf/js/async/983.77219d7b.js +1 -0
- package/__mf/js/async/9836.cc839227.js +1 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.a0623742.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsExplorer.a0623742.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_AlertManagerAlertsQuery.aa08447d.js +1 -0
- package/__mf/js/async/__federation_expose_AlertManagerDatasource.fe5b34fb.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerDatasource.fe5b34fb.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.ff9617f8.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesExplorer.ff9617f8.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.c9a49171.js +2 -0
- package/__mf/js/async/__federation_expose_AlertManagerSilencesQuery.c9a49171.js.LICENSE.txt +9 -0
- package/__mf/js/async/__federation_expose_AlertTable.cac7598a.js +1 -0
- package/__mf/js/async/__federation_expose_SilenceTable.50ee1f33.js +2 -0
- package/__mf/js/async/__federation_expose_SilenceTable.50ee1f33.js.LICENSE.txt +9 -0
- package/__mf/js/async/lib-router.19f64904.js +2 -0
- package/__mf/js/async/lib-router.19f64904.js.LICENSE.txt +32 -0
- package/__mf/js/main.1ce74432.js +7 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/lib/cjs/components/ColumnsEditor.js +271 -0
- package/lib/cjs/components/LazyTextField.js +50 -0
- package/lib/cjs/components/MatcherEditor.js +153 -0
- package/lib/cjs/components/MatchersList.js +46 -0
- package/lib/cjs/components/SilenceForm.js +205 -0
- package/lib/cjs/components/StatusBadge.js +71 -0
- package/lib/cjs/components/index.js +44 -0
- package/lib/cjs/explore/AlertManagerAlertsExplorer.js +79 -0
- package/lib/cjs/explore/AlertManagerSilencesExplorer.js +153 -0
- package/lib/cjs/getPluginModule.js +39 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +39 -0
- package/lib/cjs/model/alertmanager-client.js +128 -0
- package/lib/cjs/model/alertmanager-selectors.js +66 -0
- package/lib/cjs/model/api-types.js +22 -0
- package/lib/cjs/model/index.js +32 -0
- package/lib/cjs/plugins/AlertManagerDatasourceEditor.js +71 -0
- package/lib/cjs/plugins/alert-table/AlertTable.js +56 -0
- package/lib/cjs/plugins/alert-table/AlertTableColumnsEditor.js +110 -0
- package/lib/cjs/plugins/alert-table/AlertTableDeduplicationEditor.js +138 -0
- package/lib/cjs/plugins/alert-table/AlertTableLabelsEditor.js +277 -0
- package/lib/cjs/plugins/alert-table/AlertTableOptionsEditor.js +128 -0
- package/lib/cjs/plugins/alert-table/AlertTablePanel.js +773 -0
- package/lib/cjs/plugins/alert-table/alert-table-model.js +142 -0
- package/lib/cjs/plugins/alert-table/alert-table-sorting.js +205 -0
- package/lib/cjs/plugins/alert-table/label-colors.js +170 -0
- package/lib/cjs/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js +51 -0
- package/lib/cjs/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js +138 -0
- package/lib/cjs/plugins/alertmanager-alerts-query/get-alerts-data.js +124 -0
- package/lib/cjs/plugins/alertmanager-datasource.js +69 -0
- package/lib/cjs/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js +45 -0
- package/lib/cjs/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js +78 -0
- package/lib/cjs/plugins/alertmanager-silences-query/get-silences-data.js +64 -0
- package/lib/cjs/plugins/index.js +74 -0
- package/lib/cjs/plugins/silence-table/SilenceTable.js +42 -0
- package/lib/cjs/plugins/silence-table/SilenceTableColumnsEditor.js +137 -0
- package/lib/cjs/plugins/silence-table/SilenceTableOptionsEditor.js +63 -0
- package/lib/cjs/plugins/silence-table/SilenceTablePanel.js +345 -0
- package/lib/cjs/plugins/silence-table/silence-table-model.js +116 -0
- package/lib/cjs/plugins/silence-table/silence-table-sorting.js +68 -0
- package/lib/cjs/plugins/types.js +16 -0
- package/lib/cjs/setup-tests.js +18 -0
- package/lib/components/ColumnsEditor.d.ts +25 -0
- package/lib/components/ColumnsEditor.d.ts.map +1 -0
- package/lib/components/ColumnsEditor.js +258 -0
- package/lib/components/ColumnsEditor.js.map +1 -0
- package/lib/components/LazyTextField.d.ts +12 -0
- package/lib/components/LazyTextField.d.ts.map +1 -0
- package/lib/components/LazyTextField.js +42 -0
- package/lib/components/LazyTextField.js.map +1 -0
- package/lib/components/MatcherEditor.d.ts +17 -0
- package/lib/components/MatcherEditor.d.ts.map +1 -0
- package/lib/components/MatcherEditor.js +142 -0
- package/lib/components/MatcherEditor.js.map +1 -0
- package/lib/components/MatchersList.d.ts +10 -0
- package/lib/components/MatchersList.d.ts.map +1 -0
- package/lib/components/MatchersList.js +40 -0
- package/lib/components/MatchersList.js.map +1 -0
- package/lib/components/SilenceForm.d.ts +13 -0
- package/lib/components/SilenceForm.d.ts.map +1 -0
- package/lib/components/SilenceForm.js +194 -0
- package/lib/components/SilenceForm.js.map +1 -0
- package/lib/components/StatusBadge.d.ts +10 -0
- package/lib/components/StatusBadge.d.ts.map +1 -0
- package/lib/components/StatusBadge.js +65 -0
- package/lib/components/StatusBadge.js.map +1 -0
- package/lib/components/index.d.ts +11 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +19 -0
- package/lib/components/index.js.map +1 -0
- package/lib/explore/AlertManagerAlertsExplorer.d.ts +3 -0
- package/lib/explore/AlertManagerAlertsExplorer.d.ts.map +1 -0
- package/lib/explore/AlertManagerAlertsExplorer.js +71 -0
- package/lib/explore/AlertManagerAlertsExplorer.js.map +1 -0
- package/lib/explore/AlertManagerSilencesExplorer.d.ts +3 -0
- package/lib/explore/AlertManagerSilencesExplorer.d.ts.map +1 -0
- package/lib/explore/AlertManagerSilencesExplorer.js +140 -0
- package/lib/explore/AlertManagerSilencesExplorer.js.map +1 -0
- package/lib/getPluginModule.d.ts +3 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +26 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/model/alertmanager-client.d.ts +27 -0
- package/lib/model/alertmanager-client.d.ts.map +1 -0
- package/lib/model/alertmanager-client.js +100 -0
- package/lib/model/alertmanager-client.js.map +1 -0
- package/lib/model/alertmanager-selectors.d.ts +13 -0
- package/lib/model/alertmanager-selectors.d.ts.map +1 -0
- package/lib/model/alertmanager-selectors.js +41 -0
- package/lib/model/alertmanager-selectors.js.map +1 -0
- package/lib/model/api-types.d.ts +120 -0
- package/lib/model/api-types.d.ts.map +1 -0
- package/lib/model/api-types.js +23 -0
- package/lib/model/api-types.js.map +1 -0
- package/lib/model/index.d.ts +4 -0
- package/lib/model/index.d.ts.map +1 -0
- package/lib/model/index.js +17 -0
- package/lib/model/index.js.map +1 -0
- package/lib/plugins/AlertManagerDatasourceEditor.d.ts +9 -0
- package/lib/plugins/AlertManagerDatasourceEditor.d.ts.map +1 -0
- package/lib/plugins/AlertManagerDatasourceEditor.js +63 -0
- package/lib/plugins/AlertManagerDatasourceEditor.js.map +1 -0
- package/lib/plugins/alert-table/AlertTable.d.ts +8 -0
- package/lib/plugins/alert-table/AlertTable.d.ts.map +1 -0
- package/lib/plugins/alert-table/AlertTable.js +50 -0
- package/lib/plugins/alert-table/AlertTable.js.map +1 -0
- package/lib/plugins/alert-table/AlertTableColumnsEditor.d.ts +5 -0
- package/lib/plugins/alert-table/AlertTableColumnsEditor.d.ts.map +1 -0
- package/lib/plugins/alert-table/AlertTableColumnsEditor.js +102 -0
- package/lib/plugins/alert-table/AlertTableColumnsEditor.js.map +1 -0
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.d.ts +5 -0
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.d.ts.map +1 -0
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.js +130 -0
- package/lib/plugins/alert-table/AlertTableDeduplicationEditor.js.map +1 -0
- package/lib/plugins/alert-table/AlertTableLabelsEditor.d.ts +5 -0
- package/lib/plugins/alert-table/AlertTableLabelsEditor.d.ts.map +1 -0
- package/lib/plugins/alert-table/AlertTableLabelsEditor.js +264 -0
- package/lib/plugins/alert-table/AlertTableLabelsEditor.js.map +1 -0
- package/lib/plugins/alert-table/AlertTableOptionsEditor.d.ts +5 -0
- package/lib/plugins/alert-table/AlertTableOptionsEditor.d.ts.map +1 -0
- package/lib/plugins/alert-table/AlertTableOptionsEditor.js +120 -0
- package/lib/plugins/alert-table/AlertTableOptionsEditor.js.map +1 -0
- package/lib/plugins/alert-table/AlertTablePanel.d.ts +11 -0
- package/lib/plugins/alert-table/AlertTablePanel.d.ts.map +1 -0
- package/lib/plugins/alert-table/AlertTablePanel.js +763 -0
- package/lib/plugins/alert-table/AlertTablePanel.js.map +1 -0
- package/lib/plugins/alert-table/alert-table-model.d.ts +73 -0
- package/lib/plugins/alert-table/alert-table-model.d.ts.map +1 -0
- package/lib/plugins/alert-table/alert-table-model.js +127 -0
- package/lib/plugins/alert-table/alert-table-model.js.map +1 -0
- package/lib/plugins/alert-table/alert-table-sorting.d.ts +13 -0
- package/lib/plugins/alert-table/alert-table-sorting.d.ts.map +1 -0
- package/lib/plugins/alert-table/alert-table-sorting.js +180 -0
- package/lib/plugins/alert-table/alert-table-sorting.js.map +1 -0
- package/lib/plugins/alert-table/label-colors.d.ts +6 -0
- package/lib/plugins/alert-table/label-colors.d.ts.map +1 -0
- package/lib/plugins/alert-table/label-colors.js +148 -0
- package/lib/plugins/alert-table/label-colors.js.map +1 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.d.ts +4 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.d.ts.map +1 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js +43 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQuery.js.map +1 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.d.ts +9 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.d.ts.map +1 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js +130 -0
- package/lib/plugins/alertmanager-alerts-query/AlertManagerAlertsQueryEditor.js.map +1 -0
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.d.ts +8 -0
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.d.ts.map +1 -0
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.js +118 -0
- package/lib/plugins/alertmanager-alerts-query/get-alerts-data.js.map +1 -0
- package/lib/plugins/alertmanager-datasource.d.ts +5 -0
- package/lib/plugins/alertmanager-datasource.d.ts.map +1 -0
- package/lib/plugins/alertmanager-datasource.js +61 -0
- package/lib/plugins/alertmanager-datasource.js.map +1 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.d.ts +4 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.d.ts.map +1 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js +37 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQuery.js.map +1 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.d.ts +9 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.d.ts.map +1 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js +70 -0
- package/lib/plugins/alertmanager-silences-query/AlertManagerSilencesQueryEditor.js.map +1 -0
- package/lib/plugins/alertmanager-silences-query/get-silences-data.d.ts +8 -0
- package/lib/plugins/alertmanager-silences-query/get-silences-data.d.ts.map +1 -0
- package/lib/plugins/alertmanager-silences-query/get-silences-data.js +58 -0
- package/lib/plugins/alertmanager-silences-query/get-silences-data.js.map +1 -0
- package/lib/plugins/index.d.ts +19 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/index.js +30 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/plugins/silence-table/SilenceTable.d.ts +7 -0
- package/lib/plugins/silence-table/SilenceTable.d.ts.map +1 -0
- package/lib/plugins/silence-table/SilenceTable.js +36 -0
- package/lib/plugins/silence-table/SilenceTable.js.map +1 -0
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.d.ts +5 -0
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.d.ts.map +1 -0
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.js +129 -0
- package/lib/plugins/silence-table/SilenceTableColumnsEditor.js.map +1 -0
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.d.ts +5 -0
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.d.ts.map +1 -0
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.js +55 -0
- package/lib/plugins/silence-table/SilenceTableOptionsEditor.js.map +1 -0
- package/lib/plugins/silence-table/SilenceTablePanel.d.ts +11 -0
- package/lib/plugins/silence-table/SilenceTablePanel.d.ts.map +1 -0
- package/lib/plugins/silence-table/SilenceTablePanel.js +335 -0
- package/lib/plugins/silence-table/SilenceTablePanel.js.map +1 -0
- package/lib/plugins/silence-table/silence-table-model.d.ts +29 -0
- package/lib/plugins/silence-table/silence-table-model.d.ts.map +1 -0
- package/lib/plugins/silence-table/silence-table-model.js +90 -0
- package/lib/plugins/silence-table/silence-table-model.js.map +1 -0
- package/lib/plugins/silence-table/silence-table-sorting.d.ts +9 -0
- package/lib/plugins/silence-table/silence-table-sorting.d.ts.map +1 -0
- package/lib/plugins/silence-table/silence-table-sorting.js +60 -0
- package/lib/plugins/silence-table/silence-table-sorting.js.map +1 -0
- package/lib/plugins/types.d.ts +30 -0
- package/lib/plugins/types.d.ts.map +1 -0
- package/lib/plugins/types.js +17 -0
- package/lib/plugins/types.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +16 -0
- package/lib/setup-tests.js.map +1 -0
- package/mf-manifest.json +663 -0
- package/mf-stats.json +784 -0
- package/package.json +116 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
// Copyright The Perses Authors
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
15
|
+
import { Box, Button, Stack } from '@mui/material';
|
|
16
|
+
import BellOffIcon from 'mdi-material-ui/BellOff';
|
|
17
|
+
import { DataQueriesProvider, MultiQueryEditor, useDatasourceClient } from '@perses-dev/plugin-system';
|
|
18
|
+
import { Panel } from '@perses-dev/dashboards';
|
|
19
|
+
import { useExplorerManagerContext } from '@perses-dev/explore';
|
|
20
|
+
import { useSnackbar } from '@perses-dev/components';
|
|
21
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
22
|
+
import { SilenceForm } from '../components/SilenceForm';
|
|
23
|
+
import { DEFAULT_ALERTMANAGER } from '../model';
|
|
24
|
+
const PANEL_PREVIEW_HEIGHT = 600;
|
|
25
|
+
function extractSelectorFromQueries(queries) {
|
|
26
|
+
const spec = queries[0]?.spec?.plugin?.spec;
|
|
27
|
+
if (spec && typeof spec === 'object' && 'datasource' in spec) {
|
|
28
|
+
const ds = spec.datasource;
|
|
29
|
+
if (ds && typeof ds === 'object' && 'kind' in ds) {
|
|
30
|
+
return ds;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return DEFAULT_ALERTMANAGER;
|
|
34
|
+
}
|
|
35
|
+
function CreateSilenceButton({ queries }) {
|
|
36
|
+
const datasourceSelector = useMemo(()=>extractSelectorFromQueries(queries), [
|
|
37
|
+
queries
|
|
38
|
+
]);
|
|
39
|
+
const { data: amClient } = useDatasourceClient(datasourceSelector);
|
|
40
|
+
const queryClient = useQueryClient();
|
|
41
|
+
const { successSnackbar, exceptionSnackbar } = useSnackbar();
|
|
42
|
+
const [open, setOpen] = useState(false);
|
|
43
|
+
const formKeyRef = useRef(0);
|
|
44
|
+
const handleOpen = useCallback(()=>{
|
|
45
|
+
formKeyRef.current++;
|
|
46
|
+
setOpen(true);
|
|
47
|
+
}, []);
|
|
48
|
+
const handleSubmit = useCallback(async (silence)=>{
|
|
49
|
+
if (!amClient) return;
|
|
50
|
+
try {
|
|
51
|
+
await amClient.createSilence(silence);
|
|
52
|
+
setOpen(false);
|
|
53
|
+
successSnackbar('Silence created successfully');
|
|
54
|
+
queryClient.invalidateQueries({
|
|
55
|
+
queryKey: [
|
|
56
|
+
'query',
|
|
57
|
+
'SilencesQuery'
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
} catch (err) {
|
|
61
|
+
exceptionSnackbar(err);
|
|
62
|
+
}
|
|
63
|
+
}, [
|
|
64
|
+
amClient,
|
|
65
|
+
queryClient,
|
|
66
|
+
successSnackbar,
|
|
67
|
+
exceptionSnackbar
|
|
68
|
+
]);
|
|
69
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
70
|
+
children: [
|
|
71
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
72
|
+
variant: "contained",
|
|
73
|
+
startIcon: /*#__PURE__*/ _jsx(BellOffIcon, {}),
|
|
74
|
+
onClick: handleOpen,
|
|
75
|
+
size: "small",
|
|
76
|
+
children: "Create Silence"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ _jsx(SilenceForm, {
|
|
79
|
+
open: open,
|
|
80
|
+
onClose: ()=>setOpen(false),
|
|
81
|
+
onSubmit: handleSubmit
|
|
82
|
+
}, formKeyRef.current)
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export function AlertManagerSilencesExplorer() {
|
|
87
|
+
const { data: { queries = [] }, setData } = useExplorerManagerContext();
|
|
88
|
+
const [queryDefinitions, setQueryDefinitions] = useState(queries);
|
|
89
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
90
|
+
gap: 2,
|
|
91
|
+
sx: {
|
|
92
|
+
width: '100%'
|
|
93
|
+
},
|
|
94
|
+
children: [
|
|
95
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
96
|
+
direction: "row",
|
|
97
|
+
justifyContent: "flex-end",
|
|
98
|
+
children: /*#__PURE__*/ _jsx(CreateSilenceButton, {
|
|
99
|
+
queries: queries
|
|
100
|
+
})
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ _jsx(MultiQueryEditor, {
|
|
103
|
+
queryTypes: [
|
|
104
|
+
'SilencesQuery'
|
|
105
|
+
],
|
|
106
|
+
onChange: (state)=>setQueryDefinitions(state),
|
|
107
|
+
queries: queryDefinitions,
|
|
108
|
+
onQueryRun: ()=>setData({
|
|
109
|
+
queries: queryDefinitions
|
|
110
|
+
})
|
|
111
|
+
}),
|
|
112
|
+
/*#__PURE__*/ _jsx(DataQueriesProvider, {
|
|
113
|
+
definitions: queries,
|
|
114
|
+
children: /*#__PURE__*/ _jsx(Box, {
|
|
115
|
+
height: PANEL_PREVIEW_HEIGHT,
|
|
116
|
+
children: /*#__PURE__*/ _jsx(Panel, {
|
|
117
|
+
panelOptions: {
|
|
118
|
+
hideHeader: true
|
|
119
|
+
},
|
|
120
|
+
definition: {
|
|
121
|
+
kind: 'Panel',
|
|
122
|
+
spec: {
|
|
123
|
+
queries,
|
|
124
|
+
display: {
|
|
125
|
+
name: ''
|
|
126
|
+
},
|
|
127
|
+
plugin: {
|
|
128
|
+
kind: 'SilenceTable',
|
|
129
|
+
spec: {}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=AlertManagerSilencesExplorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/explore/AlertManagerSilencesExplorer.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useCallback, useMemo, useRef, useState } from 'react';\nimport { Box, Button, Stack } from '@mui/material';\nimport BellOffIcon from 'mdi-material-ui/BellOff';\nimport { DataQueriesProvider, MultiQueryEditor, useDatasourceClient } from '@perses-dev/plugin-system';\nimport { Panel } from '@perses-dev/dashboards';\nimport { useExplorerManagerContext } from '@perses-dev/explore';\nimport { DatasourceSelector, QueryDefinition } from '@perses-dev/spec';\nimport { useSnackbar } from '@perses-dev/components';\nimport { useQueryClient } from '@tanstack/react-query';\nimport { SilenceForm } from '../components/SilenceForm';\nimport { AlertManagerClient, DEFAULT_ALERTMANAGER, PostableSilence } from '../model';\n\ninterface SilencesExplorerQueryParams {\n queries?: QueryDefinition[];\n}\n\nconst PANEL_PREVIEW_HEIGHT = 600;\n\nfunction extractSelectorFromQueries(queries: QueryDefinition[]): DatasourceSelector {\n const spec: unknown = queries[0]?.spec?.plugin?.spec;\n if (spec && typeof spec === 'object' && 'datasource' in spec) {\n const ds = (spec as Record<string, unknown>).datasource;\n if (ds && typeof ds === 'object' && 'kind' in ds) {\n return ds as DatasourceSelector;\n }\n }\n return DEFAULT_ALERTMANAGER;\n}\n\nfunction CreateSilenceButton({ queries }: { queries: QueryDefinition[] }): ReactElement {\n const datasourceSelector = useMemo(() => extractSelectorFromQueries(queries), [queries]);\n const { data: amClient } = useDatasourceClient<AlertManagerClient>(datasourceSelector);\n const queryClient = useQueryClient();\n const { successSnackbar, exceptionSnackbar } = useSnackbar();\n\n const [open, setOpen] = useState(false);\n const formKeyRef = useRef(0);\n\n const handleOpen = useCallback(() => {\n formKeyRef.current++;\n setOpen(true);\n }, []);\n\n const handleSubmit = useCallback(\n async (silence: PostableSilence) => {\n if (!amClient) return;\n try {\n await amClient.createSilence(silence);\n setOpen(false);\n successSnackbar('Silence created successfully');\n queryClient.invalidateQueries({ queryKey: ['query', 'SilencesQuery'] });\n } catch (err) {\n exceptionSnackbar(err);\n }\n },\n [amClient, queryClient, successSnackbar, exceptionSnackbar]\n );\n\n return (\n <>\n <Button variant=\"contained\" startIcon={<BellOffIcon />} onClick={handleOpen} size=\"small\">\n Create Silence\n </Button>\n <SilenceForm key={formKeyRef.current} open={open} onClose={() => setOpen(false)} onSubmit={handleSubmit} />\n </>\n );\n}\n\nexport function AlertManagerSilencesExplorer(): ReactElement {\n const {\n data: { queries = [] },\n setData,\n } = useExplorerManagerContext<SilencesExplorerQueryParams>();\n\n const [queryDefinitions, setQueryDefinitions] = useState<QueryDefinition[]>(queries);\n\n return (\n <Stack gap={2} sx={{ width: '100%' }}>\n <Stack direction=\"row\" justifyContent=\"flex-end\">\n <CreateSilenceButton queries={queries} />\n </Stack>\n <MultiQueryEditor\n queryTypes={['SilencesQuery']}\n onChange={(state) => setQueryDefinitions(state)}\n queries={queryDefinitions}\n onQueryRun={() => setData({ queries: queryDefinitions })}\n />\n <DataQueriesProvider definitions={queries}>\n <Box height={PANEL_PREVIEW_HEIGHT}>\n <Panel\n panelOptions={{ hideHeader: true }}\n definition={{\n kind: 'Panel',\n spec: {\n queries,\n display: { name: '' },\n plugin: { kind: 'SilenceTable', spec: {} },\n },\n }}\n />\n </Box>\n </DataQueriesProvider>\n </Stack>\n );\n}\n"],"names":["useCallback","useMemo","useRef","useState","Box","Button","Stack","BellOffIcon","DataQueriesProvider","MultiQueryEditor","useDatasourceClient","Panel","useExplorerManagerContext","useSnackbar","useQueryClient","SilenceForm","DEFAULT_ALERTMANAGER","PANEL_PREVIEW_HEIGHT","extractSelectorFromQueries","queries","spec","plugin","ds","datasource","CreateSilenceButton","datasourceSelector","data","amClient","queryClient","successSnackbar","exceptionSnackbar","open","setOpen","formKeyRef","handleOpen","current","handleSubmit","silence","createSilence","invalidateQueries","queryKey","err","variant","startIcon","onClick","size","onClose","onSubmit","AlertManagerSilencesExplorer","setData","queryDefinitions","setQueryDefinitions","gap","sx","width","direction","justifyContent","queryTypes","onChange","state","onQueryRun","definitions","height","panelOptions","hideHeader","definition","kind","display","name"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAuBA,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC7E,SAASC,GAAG,EAAEC,MAA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,MAAM,2BAA2B,CAAC;AAGnF,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
import packageJson from '../package.json';
|
|
14
|
+
export function getPluginModule() {
|
|
15
|
+
const { name, version, perses } = packageJson;
|
|
16
|
+
return {
|
|
17
|
+
kind: 'PluginModule',
|
|
18
|
+
metadata: {
|
|
19
|
+
name,
|
|
20
|
+
version
|
|
21
|
+
},
|
|
22
|
+
spec: perses
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=getPluginModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,OAAOA,iBAAiB,kBAAkB;AAE1C,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index-federation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-federation.d.ts","sourceRoot":"","sources":["../../src/index-federation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
import('./bootstrap');
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index-federation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index-federation.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport('./bootstrap');\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export { getPluginModule } from './getPluginModule';
|
|
14
|
+
export * from './model';
|
|
15
|
+
export * from './plugins';
|
|
16
|
+
export * from './components';
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { getPluginModule } from './getPluginModule';\nexport * from './model';\nexport * from './plugins';\nexport * from './components';\n"],"names":["getPluginModule"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAe,QAAQ,oBAAoB;AACpD,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,eAAe"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RequestHeaders } from '@perses-dev/client';
|
|
2
|
+
import { DatasourceClient } from '@perses-dev/plugin-system';
|
|
3
|
+
import { AlertManagerStatus, AlertsQueryParams, GettableAlert, GettableSilence, PostableSilence, SilencesQueryParams } from './api-types';
|
|
4
|
+
export interface AlertManagerQueryOptions {
|
|
5
|
+
datasourceUrl: string;
|
|
6
|
+
headers?: RequestHeaders;
|
|
7
|
+
}
|
|
8
|
+
export interface AlertManagerClient extends DatasourceClient {
|
|
9
|
+
options: AlertManagerQueryOptions;
|
|
10
|
+
getAlerts(params?: AlertsQueryParams, headers?: RequestHeaders): Promise<GettableAlert[]>;
|
|
11
|
+
getSilences(params?: SilencesQueryParams, headers?: RequestHeaders): Promise<GettableSilence[]>;
|
|
12
|
+
getSilence(id: string, headers?: RequestHeaders): Promise<GettableSilence>;
|
|
13
|
+
createSilence(silence: PostableSilence, headers?: RequestHeaders): Promise<{
|
|
14
|
+
silenceID: string;
|
|
15
|
+
}>;
|
|
16
|
+
deleteSilence(id: string, headers?: RequestHeaders): Promise<void>;
|
|
17
|
+
getStatus(headers?: RequestHeaders): Promise<AlertManagerStatus>;
|
|
18
|
+
}
|
|
19
|
+
export declare function getAlerts(params?: AlertsQueryParams, queryOptions?: AlertManagerQueryOptions): Promise<GettableAlert[]>;
|
|
20
|
+
export declare function getSilences(params?: SilencesQueryParams, queryOptions?: AlertManagerQueryOptions): Promise<GettableSilence[]>;
|
|
21
|
+
export declare function getSilence(id: string, queryOptions: AlertManagerQueryOptions): Promise<GettableSilence>;
|
|
22
|
+
export declare function createSilence(silence: PostableSilence, queryOptions: AlertManagerQueryOptions): Promise<{
|
|
23
|
+
silenceID: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function deleteSilence(id: string, queryOptions: AlertManagerQueryOptions): Promise<void>;
|
|
26
|
+
export declare function getStatus(queryOptions: AlertManagerQueryOptions): Promise<AlertManagerStatus>;
|
|
27
|
+
//# sourceMappingURL=alertmanager-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alertmanager-client.d.ts","sourceRoot":"","sources":["../../../src/model/alertmanager-client.ts"],"names":[],"mappings":"AAaA,OAAO,EAAS,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,eAAe,EACf,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAA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AM,CAAA;CAAE,CAAC,CAQhC;AAED,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CASrG;AAED,wBAAgB,SAAS,CAAC,YAAY,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE7F"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import { fetch } from '@perses-dev/client';
|
|
14
|
+
async function throwOnError(response) {
|
|
15
|
+
if (!response.ok) {
|
|
16
|
+
let message = response.statusText;
|
|
17
|
+
try {
|
|
18
|
+
const body = await response.json();
|
|
19
|
+
if (body?.message) message = body.message;
|
|
20
|
+
} catch {
|
|
21
|
+
// no JSON body
|
|
22
|
+
}
|
|
23
|
+
throw new Error(message);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const executeRequest = async (...args)=>{
|
|
27
|
+
const response = await fetch(...args);
|
|
28
|
+
await throwOnError(response);
|
|
29
|
+
try {
|
|
30
|
+
return await response.json();
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.error('Invalid response from server', e);
|
|
33
|
+
throw new Error('Invalid response from server');
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
function buildSearchParams(params) {
|
|
37
|
+
const urlSearchParams = new URLSearchParams();
|
|
38
|
+
Object.entries(params).forEach(([key, value])=>{
|
|
39
|
+
if (value === undefined) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (Array.isArray(value)) {
|
|
43
|
+
value.forEach((entry)=>urlSearchParams.append(key, String(entry)));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
urlSearchParams.append(key, String(value));
|
|
47
|
+
});
|
|
48
|
+
return urlSearchParams;
|
|
49
|
+
}
|
|
50
|
+
function fetchWithGet(apiURI, params, queryOptions) {
|
|
51
|
+
const { datasourceUrl, headers = {} } = queryOptions;
|
|
52
|
+
let url = `${datasourceUrl}${apiURI}`;
|
|
53
|
+
const urlParams = buildSearchParams(params).toString();
|
|
54
|
+
if (urlParams !== '') {
|
|
55
|
+
url += `?${urlParams}`;
|
|
56
|
+
}
|
|
57
|
+
return executeRequest(url, {
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export function getAlerts(params, queryOptions) {
|
|
63
|
+
const opts = queryOptions ?? {
|
|
64
|
+
datasourceUrl: ''
|
|
65
|
+
};
|
|
66
|
+
return fetchWithGet('/api/v2/alerts', params ?? {}, opts);
|
|
67
|
+
}
|
|
68
|
+
export function getSilences(params, queryOptions) {
|
|
69
|
+
const opts = queryOptions ?? {
|
|
70
|
+
datasourceUrl: ''
|
|
71
|
+
};
|
|
72
|
+
return fetchWithGet('/api/v2/silences', params ?? {}, opts);
|
|
73
|
+
}
|
|
74
|
+
export function getSilence(id, queryOptions) {
|
|
75
|
+
return fetchWithGet(`/api/v2/silence/${encodeURIComponent(id)}`, {}, queryOptions);
|
|
76
|
+
}
|
|
77
|
+
export function createSilence(silence, queryOptions) {
|
|
78
|
+
const { datasourceUrl, headers = {} } = queryOptions;
|
|
79
|
+
return executeRequest(`${datasourceUrl}/api/v2/silences`, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: {
|
|
82
|
+
...headers,
|
|
83
|
+
'Content-Type': 'application/json'
|
|
84
|
+
},
|
|
85
|
+
body: JSON.stringify(silence)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export async function deleteSilence(id, queryOptions) {
|
|
89
|
+
const { datasourceUrl, headers = {} } = queryOptions;
|
|
90
|
+
const response = await fetch(`${datasourceUrl}/api/v2/silence/${encodeURIComponent(id)}`, {
|
|
91
|
+
method: 'DELETE',
|
|
92
|
+
headers
|
|
93
|
+
});
|
|
94
|
+
await throwOnError(response);
|
|
95
|
+
}
|
|
96
|
+
export function getStatus(queryOptions) {
|
|
97
|
+
return fetchWithGet('/api/v2/status', {}, queryOptions);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
//# sourceMappingURL=alertmanager-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/alertmanager-client.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { fetch, RequestHeaders } from '@perses-dev/client';\nimport { DatasourceClient } from '@perses-dev/plugin-system';\nimport {\n AlertManagerStatus,\n AlertsQueryParams,\n GettableAlert,\n GettableSilence,\n PostableSilence,\n SilencesQueryParams,\n} from './api-types';\n\nexport interface AlertManagerQueryOptions {\n datasourceUrl: string;\n headers?: RequestHeaders;\n}\n\nexport interface AlertManagerClient extends DatasourceClient {\n options: AlertManagerQueryOptions;\n getAlerts(params?: AlertsQueryParams, headers?: RequestHeaders): Promise<GettableAlert[]>;\n getSilences(params?: SilencesQueryParams, headers?: RequestHeaders): Promise<GettableSilence[]>;\n getSilence(id: string, headers?: RequestHeaders): Promise<GettableSilence>;\n createSilence(silence: PostableSilence, headers?: RequestHeaders): Promise<{ silenceID: string }>;\n deleteSilence(id: string, headers?: RequestHeaders): Promise<void>;\n getStatus(headers?: RequestHeaders): Promise<AlertManagerStatus>;\n}\n\nasync function throwOnError(response: Response): Promise<void> {\n if (!response.ok) {\n let message = response.statusText;\n try {\n const body = await response.json();\n if (body?.message) message = body.message;\n } catch {\n // no JSON body\n }\n throw new Error(message);\n }\n}\n\nconst executeRequest = async <T>(...args: Parameters<typeof fetch>): Promise<T> => {\n const response = await fetch(...args);\n await throwOnError(response);\n try {\n return await response.json();\n } catch (e) {\n console.error('Invalid response from server', e);\n throw new Error('Invalid response from server');\n }\n};\n\nfunction buildSearchParams(params: Record<string, unknown> | object): URLSearchParams {\n const urlSearchParams = new URLSearchParams();\n Object.entries(params).forEach(([key, value]) => {\n if (value === undefined) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((entry) => urlSearchParams.append(key, String(entry)));\n return;\n }\n urlSearchParams.append(key, String(value));\n });\n return urlSearchParams;\n}\n\nfunction fetchWithGet<TResponse>(\n apiURI: string,\n params: Record<string, unknown> | object,\n queryOptions: AlertManagerQueryOptions\n): Promise<TResponse> {\n const { datasourceUrl, headers = {} } = queryOptions;\n\n let url = `${datasourceUrl}${apiURI}`;\n const urlParams = buildSearchParams(params).toString();\n if (urlParams !== '') {\n url += `?${urlParams}`;\n }\n\n return executeRequest<TResponse>(url, {\n method: 'GET',\n headers,\n });\n}\n\nexport function getAlerts(\n params?: AlertsQueryParams,\n queryOptions?: AlertManagerQueryOptions\n): Promise<GettableAlert[]> {\n const opts = queryOptions ?? { datasourceUrl: '' };\n return fetchWithGet<GettableAlert[]>('/api/v2/alerts', params ?? {}, opts);\n}\n\nexport function getSilences(\n params?: SilencesQueryParams,\n queryOptions?: AlertManagerQueryOptions\n): Promise<GettableSilence[]> {\n const opts = queryOptions ?? { datasourceUrl: '' };\n return fetchWithGet<GettableSilence[]>('/api/v2/silences', params ?? {}, opts);\n}\n\nexport function getSilence(id: string, queryOptions: AlertManagerQueryOptions): Promise<GettableSilence> {\n return fetchWithGet<GettableSilence>(`/api/v2/silence/${encodeURIComponent(id)}`, {}, queryOptions);\n}\n\nexport function createSilence(\n silence: PostableSilence,\n queryOptions: AlertManagerQueryOptions\n): Promise<{ silenceID: string }> {\n const { datasourceUrl, headers = {} } = queryOptions;\n\n return executeRequest<{ silenceID: string }>(`${datasourceUrl}/api/v2/silences`, {\n method: 'POST',\n headers: { ...headers, 'Content-Type': 'application/json' },\n body: JSON.stringify(silence),\n });\n}\n\nexport async function deleteSilence(id: string, queryOptions: AlertManagerQueryOptions): Promise<void> {\n const { datasourceUrl, headers = {} } = queryOptions;\n\n const response = await fetch(`${datasourceUrl}/api/v2/silence/${encodeURIComponent(id)}`, {\n method: 'DELETE',\n headers,\n });\n\n await throwOnError(response);\n}\n\nexport function getStatus(queryOptions: AlertManagerQueryOptions): Promise<AlertManagerStatus> {\n return fetchWithGet<AlertManagerStatus>('/api/v2/status', {}, queryOptions);\n}\n"],"names":["fetch","throwOnError","response","ok","message","statusText","body","json","Error","executeRequest","args","e","console","error","buildSearchParams","params","urlSearchParams","URLSearchParams","Object","entries","forEach","key","value","undefined","Array","isArray","entry","append","String","fetchWithGet","apiURI","queryOptions","datasourceUrl","headers","url","urlParams","toString","method","getAlerts","opts","getSilences","getSilence","id","encodeURIComponent","createSilence","silence","JSON","stringify","deleteSilence","getStatus"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,KAAK,QAAwB,qBAAqB;AA0B3D,eAAeC,aAAaC,QAAkB;IAC5C,IAAI,CAACA,SAASC,EAAE,EAAE;QAChB,IAAIC,UAAUF,SAASG,UAAU;QACjC,IAAI;YACF,MAAMC,OAAO,MAAMJ,SAASK,I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A4B,EAC5BgB,YAAuC;IAEvC,MAAMQ,OAAOR,gBAAgB;QAAEC,eAAe;IAAG;IACjD,OAAOH,aAAgC,oBAAoBd,UAAU,CAAC,GAAGwB;AAC3E;AAEA,OAAO,SAASE,WAAWC,EAAU,EAAEX,YAAsC;IAC3E,OAAOF,aAA8B,CAAC,gBAAgB,EAAEc,mBAAmBD,KAAK,EAAE,CAAC,GAAGX;AACxF;AAEA,OAAO,SAASa,cACdC,OAAwB,EACxBd,YAAsC;IAEtC,MAAM,EAAEC,aAAa,EAAEC,UAAU,CAAC,CAAC,EAAE,GAAGF;IAExC,OAAOtB,eAAsC,GAAGuB,cAAc,gBAAgB,CAAC,EAAE;QAC/EK,QAAQ;QACRJ,SAAS;YAAE,GAAGA,OAAO;YAAE,gBAAgB;QAAmB;QAC1D3B,MAAMwC,KAAKC,SAAS,CAACF;IACvB;AACF;AAEA,OAAO,eAAeG,cAAcN,EAAU,EAAEX,YAAsC;IACpF,MAAM,EAAEC,aAAa,EAAEC,UAAU,CAAC,CAAC,EAAE,GAAGF;IAExC,MAAM7B,WAAW,MAAMF,MAAM,GAAGgC,cAAc,gBAAgB,EAAEW,mBAAmBD,KAAK,EAAE;QACxFL,QAAQ;QACRJ;IACF;IAEA,MAAMhC,aAAaC;AACrB;AAEA,OAAO,SAAS+C,UAAUlB,YAAsC;IAC9D,OAAOF,aAAiC,kBAAkB,CAAC,GAAGE;AAChE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DatasourceSelector, QueryDefinition } from '@perses-dev/spec';
|
|
2
|
+
import { DatasourceSelectValue } from '@perses-dev/plugin-system';
|
|
3
|
+
export declare const ALERTMANAGER_DATASOURCE_KIND: "AlertManagerDatasource";
|
|
4
|
+
export interface AlertManagerDatasourceSelector extends DatasourceSelector {
|
|
5
|
+
kind: typeof ALERTMANAGER_DATASOURCE_KIND;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_ALERTMANAGER: AlertManagerDatasourceSelector;
|
|
8
|
+
export declare function isDefaultAlertManagerSelector(datasourceSelectValue: DatasourceSelectValue): boolean;
|
|
9
|
+
export declare function isAlertManagerDatasourceSelector(datasourceSelectValue: DatasourceSelectValue): datasourceSelectValue is AlertManagerDatasourceSelector;
|
|
10
|
+
export declare function extractDatasourceSelector(queryResults: Array<{
|
|
11
|
+
definition: QueryDefinition;
|
|
12
|
+
}>): DatasourceSelector;
|
|
13
|
+
//# sourceMappingURL=alertmanager-selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alertmanager-selectors.d.ts","sourceRoot":"","sources":["../../../src/model/alertmanager-selectors.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,2BAA2B,CAAC;AAExF,eAAO,MAAM,4BAA4B,EAAG,wBAAiC,CAAC;AAE9E,MAAM,WAAW,8BAA+B,SAAQ,kBAAkB;IACxE,IAAI,EAAE,OAAO,4BAA4B,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,EAAE,8BAAuE,CAAC;AAE3G,wBAAgB,6BAA6B,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAEnG;AAED,wBAAgB,gCAAgC,CAC9C,qBAAqB,EAAE,qBAAqB,GAC3C,qBAAqB,IAAI,8BAA8B,CAEzD;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,KAAK,CAAC;IAAE,UAAU,EAAE,eAAe,CAAA;CAAE,CAAC,GAAG,kBAAkB,CAelH"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
import { isVariableDatasource } from '@perses-dev/plugin-system';
|
|
14
|
+
export const ALERTMANAGER_DATASOURCE_KIND = 'AlertManagerDatasource';
|
|
15
|
+
export const DEFAULT_ALERTMANAGER = {
|
|
16
|
+
kind: ALERTMANAGER_DATASOURCE_KIND
|
|
17
|
+
};
|
|
18
|
+
export function isDefaultAlertManagerSelector(datasourceSelectValue) {
|
|
19
|
+
return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined;
|
|
20
|
+
}
|
|
21
|
+
export function isAlertManagerDatasourceSelector(datasourceSelectValue) {
|
|
22
|
+
return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === ALERTMANAGER_DATASOURCE_KIND;
|
|
23
|
+
}
|
|
24
|
+
export function extractDatasourceSelector(queryResults) {
|
|
25
|
+
const defSpec = queryResults[0]?.definition?.spec;
|
|
26
|
+
if (defSpec && typeof defSpec === 'object' && 'plugin' in defSpec) {
|
|
27
|
+
const plugin = defSpec.plugin;
|
|
28
|
+
if (plugin && typeof plugin === 'object' && 'spec' in plugin) {
|
|
29
|
+
const spec = plugin.spec;
|
|
30
|
+
if (spec && typeof spec === 'object' && 'datasource' in spec) {
|
|
31
|
+
const ds = spec.datasource;
|
|
32
|
+
if (ds && typeof ds === 'object' && 'kind' in ds) {
|
|
33
|
+
return ds;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return DEFAULT_ALERTMANAGER;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=alertmanager-selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/model/alertmanager-selectors.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { DatasourceSelector, QueryDefinition } from '@perses-dev/spec';\nimport { DatasourceSelectValue, isVariableDatasource } from '@perses-dev/plugin-system';\n\nexport const ALERTMANAGER_DATASOURCE_KIND = 'AlertManagerDatasource' as const;\n\nexport interface AlertManagerDatasourceSelector extends DatasourceSelector {\n kind: typeof ALERTMANAGER_DATASOURCE_KIND;\n}\n\nexport const DEFAULT_ALERTMANAGER: AlertManagerDatasourceSelector = { kind: ALERTMANAGER_DATASOURCE_KIND };\n\nexport function isDefaultAlertManagerSelector(datasourceSelectValue: DatasourceSelectValue): boolean {\n return !isVariableDatasource(datasourceSelectValue) && datasourceSelectValue.name === undefined;\n}\n\nexport function isAlertManagerDatasourceSelector(\n datasourceSelectValue: DatasourceSelectValue\n): datasourceSelectValue is AlertManagerDatasourceSelector {\n return isVariableDatasource(datasourceSelectValue) || datasourceSelectValue.kind === ALERTMANAGER_DATASOURCE_KIND;\n}\n\nexport function extractDatasourceSelector(queryResults: Array<{ definition: QueryDefinition }>): DatasourceSelector {\n const defSpec: unknown = queryResults[0]?.definition?.spec;\n if (defSpec && typeof defSpec === 'object' && 'plugin' in defSpec) {\n const plugin = (defSpec as Record<string, unknown>).plugin;\n if (plugin && typeof plugin === 'object' && 'spec' in plugin) {\n const spec = (plugin as Record<string, unknown>).spec;\n if (spec && typeof spec === 'object' && 'datasource' in spec) {\n const ds = (spec as Record<string, unknown>).datasource;\n if (ds && typeof ds === 'object' && 'kind' in ds) {\n return ds as DatasourceSelector;\n }\n }\n }\n }\n return DEFAULT_ALERTMANAGER;\n}\n"],"names":["isVariableDatasource","ALERTMANAGER_DATASOURCE_KIND","DEFAULT_ALERTMANAGER","kind","isDefaultAlertManagerSelector","datasourceSelectValue","name","undefined","isAlertManagerDatasourceSelector","extractDatasourceSelector","queryResults","defSpec","definition","spec","plugin","ds","datasource"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAAgCA,oBAAoB,QAAQ,4BAA4B;AAExF,OAAO,MAAMC,+BAA+B,yBAAkC;AAM9E,OAAO,MAAMC,uBAAuD;IAAEC,MAAMF;AAA6B,EAAE;AAE3G,OAAO,SAASG,8BAA8BC,qBAA4C;IACxF,OAAO,CAACL,qBAAqBK,0BAA0BA,sBAAsBC,IAAI,KAAKC;AACxF;AAEA,OAAO,SAASC,iCACdH,qBAA4C;IAE5C,OAAOL,qBAAqBK,0BAA0BA,sBAAsBF,IAAI,KAAKF;AACvF;AAEA,OAAO,SAASQ,0BAA0BC,YAAoD;IAC5F,MAAMC,UAAmBD,YAAY,CAAC,EAAE,EAAEE,YAAYC;IACtD,IAAIF,WAAW,OAAOA,YAAY,YAAY,YAAYA,SAAS;QACjE,MAAMG,SAAS,AAACH,QAAoCG,MAAM;QAC1D,IAAIA,UAAU,OAAOA,WAAW,YAAY,UAAUA,QAAQ;YAC5D,MAAMD,OAAO,AAACC,OAAmCD,IAAI;YACrD,IAAIA,QAAQ,OAAOA,SAAS,YAAY,gBAAgBA,MAAM;gBAC5D,MAAME,KAAK,AAACF,KAAiCG,UAAU;gBACvD,IAAID,MAAM,OAAOA,OAAO,YAAY,UAAUA,IAAI;oBAChD,OAAOA;gBACT;YACF;QACF;IACF;IACA,OAAOb;AACT"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert Manager v2 API response types.
|
|
3
|
+
* Based on the Alertmanager OpenAPI v2 spec.
|
|
4
|
+
* @see https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A matcher used by silences and alerts.
|
|
8
|
+
*/
|
|
9
|
+
export interface Matcher {
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
isRegex: boolean;
|
|
13
|
+
isEqual: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Alert status from the Alertmanager API.
|
|
17
|
+
*/
|
|
18
|
+
export interface AlertStatus {
|
|
19
|
+
state: 'unprocessed' | 'active' | 'suppressed';
|
|
20
|
+
silencedBy: string[];
|
|
21
|
+
inhibitedBy: string[];
|
|
22
|
+
mutedBy: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A gettable alert returned by the Alertmanager API.
|
|
26
|
+
*/
|
|
27
|
+
export interface GettableAlert {
|
|
28
|
+
annotations: Record<string, string>;
|
|
29
|
+
endsAt: string;
|
|
30
|
+
fingerprint: string;
|
|
31
|
+
receivers: Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
}>;
|
|
34
|
+
startsAt: string;
|
|
35
|
+
status: AlertStatus;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
generatorURL?: string;
|
|
38
|
+
labels: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Silence status from the Alertmanager API.
|
|
42
|
+
*/
|
|
43
|
+
export interface SilenceStatus {
|
|
44
|
+
state: 'expired' | 'active' | 'pending';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A gettable silence returned by the Alertmanager API.
|
|
48
|
+
*/
|
|
49
|
+
export interface GettableSilence {
|
|
50
|
+
id: string;
|
|
51
|
+
status: SilenceStatus;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
comment: string;
|
|
54
|
+
createdBy: string;
|
|
55
|
+
endsAt: string;
|
|
56
|
+
matchers: Matcher[];
|
|
57
|
+
startsAt: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A postable silence used for creating or updating silences.
|
|
61
|
+
*/
|
|
62
|
+
export interface PostableSilence {
|
|
63
|
+
id?: string;
|
|
64
|
+
comment: string;
|
|
65
|
+
createdBy: string;
|
|
66
|
+
endsAt: string;
|
|
67
|
+
matchers: Matcher[];
|
|
68
|
+
startsAt: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Cluster status from the Alertmanager API.
|
|
72
|
+
*/
|
|
73
|
+
export interface ClusterStatus {
|
|
74
|
+
name?: string;
|
|
75
|
+
status: string;
|
|
76
|
+
peers: Array<{
|
|
77
|
+
name: string;
|
|
78
|
+
address: string;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Version info from the Alertmanager API.
|
|
83
|
+
*/
|
|
84
|
+
export interface VersionInfo {
|
|
85
|
+
branch: string;
|
|
86
|
+
buildDate: string;
|
|
87
|
+
buildUser: string;
|
|
88
|
+
goVersion: string;
|
|
89
|
+
revision: string;
|
|
90
|
+
version: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Alertmanager status response.
|
|
94
|
+
*/
|
|
95
|
+
export interface AlertManagerStatus {
|
|
96
|
+
cluster: ClusterStatus;
|
|
97
|
+
config: {
|
|
98
|
+
original: string;
|
|
99
|
+
};
|
|
100
|
+
uptime: string;
|
|
101
|
+
versionInfo: VersionInfo;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Parameters for querying alerts.
|
|
105
|
+
*/
|
|
106
|
+
export interface AlertsQueryParams {
|
|
107
|
+
filter?: string[];
|
|
108
|
+
silenced?: boolean;
|
|
109
|
+
inhibited?: boolean;
|
|
110
|
+
active?: boolean;
|
|
111
|
+
unprocessed?: boolean;
|
|
112
|
+
receiver?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Parameters for querying silences.
|
|
116
|
+
*/
|
|
117
|
+
export interface SilencesQueryParams {
|
|
118
|
+
filter?: string[];
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=api-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-types.d.ts","sourceRoot":"","sources":["../../../src/model/api-types.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,aAAa,GAAG,QAAQ,GAAG,YAAY,CAAC;IAC/C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MA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,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
*/ /**
|
|
20
|
+
* Parameters for querying silences.
|
|
21
|
+
*/ export { };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=api-types.js.map
|