@perses-dev/prometheus-plugin 0.57.0-beta.0 → 0.57.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.
Files changed (208) hide show
  1. package/__mf/js/{Prometheus.2bb892ab.js → Prometheus.9877d89e.js} +3 -3
  2. package/__mf/js/async/1728.531c96f9.js +1 -0
  3. package/__mf/js/async/3499.bef2e2e5.js +1 -0
  4. package/__mf/js/async/3652.6b591718.js +7 -0
  5. package/__mf/js/async/392.f1b4a590.js +2 -0
  6. package/__mf/js/async/425.1ec8867f.js +1 -0
  7. package/__mf/js/async/4657.f0c3ccd6.js +2 -0
  8. package/__mf/js/async/54.e6002704.js +22 -0
  9. package/__mf/js/async/5440.8ced5513.js +2 -0
  10. package/__mf/js/async/{5440.c13c3533.js.LICENSE.txt → 5440.8ced5513.js.LICENSE.txt} +3 -3
  11. package/__mf/js/async/9010.ca50fa9e.js +2 -0
  12. package/__mf/js/async/{9020.c19782f1.js → 9020.ebc1cad3.js} +1 -1
  13. package/__mf/js/async/{__federation_expose_PrometheusDatasource.6f63e147.js → __federation_expose_PrometheusDatasource.b97f9012.js} +1 -1
  14. package/__mf/js/async/{__federation_expose_PrometheusExplorer.584a073d.js → __federation_expose_PrometheusExplorer.eba3b416.js} +1 -1
  15. package/__mf/js/async/{__federation_expose_PrometheusLabelNamesVariable.40984a4d.js → __federation_expose_PrometheusLabelNamesVariable.bd38a89c.js} +1 -1
  16. package/__mf/js/async/{__federation_expose_PrometheusLabelValuesVariable.bd3eb00c.js → __federation_expose_PrometheusLabelValuesVariable.eb12e168.js} +1 -1
  17. package/__mf/js/async/{__federation_expose_PrometheusPromQLVariable.5cca8417.js → __federation_expose_PrometheusPromQLVariable.7ccb0601.js} +1 -1
  18. package/__mf/js/async/{__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js → __federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js} +1 -1
  19. package/__mf/js/{main.9617b605.js → main.78fc6444.js} +5 -5
  20. package/lib/bootstrap.js +1 -1
  21. package/lib/bootstrap.js.map +1 -1
  22. package/lib/cjs/bootstrap.js +1 -1
  23. package/lib/cjs/components/PromQLEditor.js +1 -1
  24. package/lib/cjs/components/TreeNode.js +1 -1
  25. package/lib/cjs/components/index.js +1 -1
  26. package/lib/cjs/components/promql/ast.js +1 -1
  27. package/lib/cjs/components/promql/format.js +1 -1
  28. package/lib/cjs/components/promql/functionSignatures.js +1 -1
  29. package/lib/cjs/components/promql/serialize.js +1 -1
  30. package/lib/cjs/components/promql/utils.js +1 -1
  31. package/lib/cjs/components/query.js +1 -1
  32. package/lib/cjs/env.d.js +1 -1
  33. package/lib/cjs/explore/PrometheusExplorer.js +1 -1
  34. package/lib/cjs/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.js +1 -1
  35. package/lib/cjs/explore/PrometheusMetricsFinder/display/MetricChip.js +1 -1
  36. package/lib/cjs/explore/PrometheusMetricsFinder/display/list/MetricList.js +1 -1
  37. package/lib/cjs/explore/PrometheusMetricsFinder/filter/FilterInputs.js +1 -1
  38. package/lib/cjs/explore/PrometheusMetricsFinder/filter/FinderFilters.js +1 -1
  39. package/lib/cjs/explore/PrometheusMetricsFinder/index.js +1 -1
  40. package/lib/cjs/explore/PrometheusMetricsFinder/overview/MetricOverview.js +1 -1
  41. package/lib/cjs/explore/PrometheusMetricsFinder/overview/tabs/JobTab.js +1 -1
  42. package/lib/cjs/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.js +1 -1
  43. package/lib/cjs/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.js +1 -1
  44. package/lib/cjs/explore/PrometheusMetricsFinder/types.js +1 -1
  45. package/lib/cjs/explore/PrometheusMetricsFinder/utils.js +1 -1
  46. package/lib/cjs/explore/index.js +12 -0
  47. package/lib/cjs/getPluginModule.js +12 -0
  48. package/lib/cjs/index-federation.js +1 -1
  49. package/lib/cjs/index.js +12 -0
  50. package/lib/cjs/model/api-types.js +1 -1
  51. package/lib/cjs/model/index.js +1 -1
  52. package/lib/cjs/model/parse-sample-values.js +1 -1
  53. package/lib/cjs/model/prometheus-client.js +1 -1
  54. package/lib/cjs/model/prometheus-selectors.js +1 -1
  55. package/lib/cjs/model/time.js +1 -1
  56. package/lib/cjs/plugins/MatcherEditor.js +1 -1
  57. package/lib/cjs/plugins/PrometheusDatasourceEditor.js +1 -1
  58. package/lib/cjs/plugins/PrometheusLabelNamesVariable.js +12 -0
  59. package/lib/cjs/plugins/PrometheusLabelValuesVariable.js +12 -0
  60. package/lib/cjs/plugins/PrometheusPromQLVariable.js +12 -0
  61. package/lib/cjs/plugins/index.js +12 -0
  62. package/lib/cjs/plugins/prometheus-datasource.js +1 -1
  63. package/lib/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +1 -1
  64. package/lib/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +1 -1
  65. package/lib/cjs/plugins/prometheus-time-series-query/get-time-series-data.js +1 -1
  66. package/lib/cjs/plugins/prometheus-time-series-query/index.js +1 -1
  67. package/lib/cjs/plugins/prometheus-time-series-query/query-editor-model.js +1 -1
  68. package/lib/cjs/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js +1 -1
  69. package/lib/cjs/plugins/prometheus-time-series-query/time-series-query-model.js +1 -1
  70. package/lib/cjs/plugins/prometheus-variables.js +1 -1
  71. package/lib/cjs/plugins/test/setup-tests.js +1 -1
  72. package/lib/cjs/plugins/types.js +1 -1
  73. package/lib/cjs/plugins/variable.js +1 -1
  74. package/lib/cjs/setup-tests.js +1 -1
  75. package/lib/cjs/utils/index.js +1 -1
  76. package/lib/cjs/utils/utils.js +1 -1
  77. package/lib/components/PromQLEditor.js +1 -1
  78. package/lib/components/PromQLEditor.js.map +1 -1
  79. package/lib/components/TreeNode.js +1 -1
  80. package/lib/components/TreeNode.js.map +1 -1
  81. package/lib/components/index.js +1 -1
  82. package/lib/components/index.js.map +1 -1
  83. package/lib/components/promql/ast.js +1 -1
  84. package/lib/components/promql/ast.js.map +1 -1
  85. package/lib/components/promql/format.js +1 -1
  86. package/lib/components/promql/format.js.map +1 -1
  87. package/lib/components/promql/functionSignatures.js +1 -1
  88. package/lib/components/promql/functionSignatures.js.map +1 -1
  89. package/lib/components/promql/serialize.js +1 -1
  90. package/lib/components/promql/serialize.js.map +1 -1
  91. package/lib/components/promql/utils.js +1 -1
  92. package/lib/components/promql/utils.js.map +1 -1
  93. package/lib/components/query.js +1 -1
  94. package/lib/components/query.js.map +1 -1
  95. package/lib/env.d.js +1 -1
  96. package/lib/env.d.js.map +1 -1
  97. package/lib/explore/PrometheusExplorer.js +1 -1
  98. package/lib/explore/PrometheusExplorer.js.map +1 -1
  99. package/lib/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.js +1 -1
  100. package/lib/explore/PrometheusMetricsFinder/PrometheusMetricsFinder.js.map +1 -1
  101. package/lib/explore/PrometheusMetricsFinder/display/MetricChip.js +1 -1
  102. package/lib/explore/PrometheusMetricsFinder/display/MetricChip.js.map +1 -1
  103. package/lib/explore/PrometheusMetricsFinder/display/list/MetricList.js +1 -1
  104. package/lib/explore/PrometheusMetricsFinder/display/list/MetricList.js.map +1 -1
  105. package/lib/explore/PrometheusMetricsFinder/filter/FilterInputs.js +1 -1
  106. package/lib/explore/PrometheusMetricsFinder/filter/FilterInputs.js.map +1 -1
  107. package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js +1 -1
  108. package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js.map +1 -1
  109. package/lib/explore/PrometheusMetricsFinder/index.js +1 -1
  110. package/lib/explore/PrometheusMetricsFinder/index.js.map +1 -1
  111. package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js +1 -1
  112. package/lib/explore/PrometheusMetricsFinder/overview/MetricOverview.js.map +1 -1
  113. package/lib/explore/PrometheusMetricsFinder/overview/tabs/JobTab.js +1 -1
  114. package/lib/explore/PrometheusMetricsFinder/overview/tabs/JobTab.js.map +1 -1
  115. package/lib/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.js +1 -1
  116. package/lib/explore/PrometheusMetricsFinder/overview/tabs/OverviewTab.js.map +1 -1
  117. package/lib/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.js +1 -1
  118. package/lib/explore/PrometheusMetricsFinder/overview/tabs/SimilarTab.js.map +1 -1
  119. package/lib/explore/PrometheusMetricsFinder/types.js +1 -1
  120. package/lib/explore/PrometheusMetricsFinder/types.js.map +1 -1
  121. package/lib/explore/PrometheusMetricsFinder/utils.js +1 -1
  122. package/lib/explore/PrometheusMetricsFinder/utils.js.map +1 -1
  123. package/lib/explore/index.d.ts.map +1 -1
  124. package/lib/explore/index.js +12 -0
  125. package/lib/explore/index.js.map +1 -1
  126. package/lib/getPluginModule.d.ts.map +1 -1
  127. package/lib/getPluginModule.js +12 -0
  128. package/lib/getPluginModule.js.map +1 -1
  129. package/lib/index-federation.js +1 -1
  130. package/lib/index-federation.js.map +1 -1
  131. package/lib/index.d.ts.map +1 -1
  132. package/lib/index.js +12 -0
  133. package/lib/index.js.map +1 -1
  134. package/lib/model/api-types.js +1 -1
  135. package/lib/model/api-types.js.map +1 -1
  136. package/lib/model/index.js +1 -1
  137. package/lib/model/index.js.map +1 -1
  138. package/lib/model/parse-sample-values.js +1 -1
  139. package/lib/model/parse-sample-values.js.map +1 -1
  140. package/lib/model/prometheus-client.js +1 -1
  141. package/lib/model/prometheus-client.js.map +1 -1
  142. package/lib/model/prometheus-selectors.js +1 -1
  143. package/lib/model/prometheus-selectors.js.map +1 -1
  144. package/lib/model/time.js +1 -1
  145. package/lib/model/time.js.map +1 -1
  146. package/lib/plugins/MatcherEditor.js +1 -1
  147. package/lib/plugins/MatcherEditor.js.map +1 -1
  148. package/lib/plugins/PrometheusDatasourceEditor.js +1 -1
  149. package/lib/plugins/PrometheusDatasourceEditor.js.map +1 -1
  150. package/lib/plugins/PrometheusLabelNamesVariable.d.ts.map +1 -1
  151. package/lib/plugins/PrometheusLabelNamesVariable.js +12 -0
  152. package/lib/plugins/PrometheusLabelNamesVariable.js.map +1 -1
  153. package/lib/plugins/PrometheusLabelValuesVariable.d.ts.map +1 -1
  154. package/lib/plugins/PrometheusLabelValuesVariable.js +12 -0
  155. package/lib/plugins/PrometheusLabelValuesVariable.js.map +1 -1
  156. package/lib/plugins/PrometheusPromQLVariable.d.ts.map +1 -1
  157. package/lib/plugins/PrometheusPromQLVariable.js +12 -0
  158. package/lib/plugins/PrometheusPromQLVariable.js.map +1 -1
  159. package/lib/plugins/index.d.ts.map +1 -1
  160. package/lib/plugins/index.js +12 -0
  161. package/lib/plugins/index.js.map +1 -1
  162. package/lib/plugins/prometheus-datasource.js +1 -1
  163. package/lib/plugins/prometheus-datasource.js.map +1 -1
  164. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +1 -1
  165. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js.map +1 -1
  166. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +1 -1
  167. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +1 -1
  168. package/lib/plugins/prometheus-time-series-query/get-time-series-data.js +1 -1
  169. package/lib/plugins/prometheus-time-series-query/get-time-series-data.js.map +1 -1
  170. package/lib/plugins/prometheus-time-series-query/index.js +1 -1
  171. package/lib/plugins/prometheus-time-series-query/index.js.map +1 -1
  172. package/lib/plugins/prometheus-time-series-query/query-editor-model.js +1 -1
  173. package/lib/plugins/prometheus-time-series-query/query-editor-model.js.map +1 -1
  174. package/lib/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js +1 -1
  175. package/lib/plugins/prometheus-time-series-query/replace-prom-builtin-variables.js.map +1 -1
  176. package/lib/plugins/prometheus-time-series-query/time-series-query-model.js +1 -1
  177. package/lib/plugins/prometheus-time-series-query/time-series-query-model.js.map +1 -1
  178. package/lib/plugins/prometheus-variables.js +1 -1
  179. package/lib/plugins/prometheus-variables.js.map +1 -1
  180. package/lib/plugins/test/setup-tests.js +1 -1
  181. package/lib/plugins/test/setup-tests.js.map +1 -1
  182. package/lib/plugins/types.js +1 -1
  183. package/lib/plugins/types.js.map +1 -1
  184. package/lib/plugins/variable.js +1 -1
  185. package/lib/plugins/variable.js.map +1 -1
  186. package/lib/setup-tests.js +1 -1
  187. package/lib/setup-tests.js.map +1 -1
  188. package/lib/utils/index.js +1 -1
  189. package/lib/utils/index.js.map +1 -1
  190. package/lib/utils/utils.js +1 -1
  191. package/lib/utils/utils.js.map +1 -1
  192. package/mf-manifest.json +73 -73
  193. package/mf-stats.json +73 -73
  194. package/package.json +6 -6
  195. package/__mf/js/async/1490.7e5068f1.js +0 -22
  196. package/__mf/js/async/1728.af16c4ec.js +0 -1
  197. package/__mf/js/async/2984.7182c2f5.js +0 -1
  198. package/__mf/js/async/2999.1d8347df.js +0 -1
  199. package/__mf/js/async/3664.ba8b26b6.js +0 -2
  200. package/__mf/js/async/392.7cda691a.js +0 -2
  201. package/__mf/js/async/5440.c13c3533.js +0 -2
  202. package/__mf/js/async/5501.6166367c.js +0 -2
  203. package/__mf/js/async/6149.19799c37.js +0 -7
  204. /package/__mf/js/async/{6149.19799c37.js.LICENSE.txt → 3652.6b591718.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{392.7cda691a.js.LICENSE.txt → 392.f1b4a590.js.LICENSE.txt} +0 -0
  206. /package/__mf/js/async/{3664.ba8b26b6.js.LICENSE.txt → 4657.f0c3ccd6.js.LICENSE.txt} +0 -0
  207. /package/__mf/js/async/{1490.7e5068f1.js.LICENSE.txt → 54.e6002704.js.LICENSE.txt} +0 -0
  208. /package/__mf/js/async/{5501.6166367c.js.LICENSE.txt → 9010.ca50fa9e.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/prometheus-time-series-query/time-series-query-model.ts"],"sourcesContent":["// Copyright 2023 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 { DurationString } from '@perses-dev/core';\nimport { DatasourceSelectValue } from '@perses-dev/plugin-system';\nimport { PrometheusDatasourceSelector } from '../../model';\n\n/**\n * The spec/options for the PrometheusTimeSeriesQuery plugin.\n */\nexport interface PrometheusTimeSeriesQuerySpec {\n query: string;\n seriesNameFormat?: string;\n minStep?: DurationString;\n resolution?: number;\n datasource?: DatasourceSelectValue<PrometheusDatasourceSelector>;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAMjC;;CAEC,GACD,WAMC"}
1
+ {"version":3,"sources":["../../../../src/plugins/prometheus-time-series-query/time-series-query-model.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 { DurationString } from '@perses-dev/core';\nimport { DatasourceSelectValue } from '@perses-dev/plugin-system';\nimport { PrometheusDatasourceSelector } from '../../model';\n\n/**\n * The spec/options for the PrometheusTimeSeriesQuery plugin.\n */\nexport interface PrometheusTimeSeriesQuerySpec {\n query: string;\n seriesNameFormat?: string;\n minStep?: DurationString;\n resolution?: number;\n datasource?: DatasourceSelectValue<PrometheusDatasourceSelector>;\n}\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;AAMjC;;CAEC,GACD,WAMC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // Copyright 2024 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/prometheus-variables.tsx"],"sourcesContent":["// Copyright 2024 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.\nimport { FormControl, Stack, TextField } from '@mui/material';\nimport {\n DatasourceSelect,\n DatasourceSelectProps,\n isVariableDatasource,\n OptionsEditorProps,\n useDatasourceClient,\n useDatasourceSelectValueToSelector,\n VariableOption,\n} from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport { ReactElement, useCallback, ChangeEvent, FocusEvent } from 'react';\nimport { PromQLEditor } from '../components';\nimport {\n DEFAULT_PROM,\n isDefaultPromSelector,\n isPrometheusDatasourceSelector,\n MatrixData,\n PROM_DATASOURCE_KIND,\n PrometheusClient,\n PrometheusDatasourceSelector,\n VectorData,\n} from '../model';\nimport { MatcherEditor } from './MatcherEditor';\nimport {\n PrometheusLabelNamesVariableOptions,\n PrometheusLabelValuesVariableOptions,\n PrometheusPromQLVariableOptions,\n} from './types';\n\nexport function PrometheusLabelValuesVariableEditor(\n props: OptionsEditorProps<PrometheusLabelValuesVariableOptions>\n): ReactElement {\n const {\n onChange,\n value,\n value: { datasource },\n } = props;\n const selectedDatasource = datasource ?? DEFAULT_PROM;\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback(\n (next) => {\n if (isVariableDatasource(next) || isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n },\n [onChange, value]\n );\n\n const handleLabelChange = useCallback(\n (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n onChange(\n produce(value, (draft) => {\n draft.labelName = e.target.value;\n })\n );\n },\n [onChange, value]\n );\n\n const handleMatchEditorsChange = useCallback(\n (matchers: string[]) => {\n onChange(\n produce(value, (draft) => {\n draft.matchers = matchers;\n })\n );\n },\n [onChange, value]\n );\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\">\n <DatasourceSelect\n datasourcePluginKind=\"PrometheusDatasource\"\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n readOnly={props.isReadonly}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n <TextField\n label=\"Label Name\"\n required\n value={props.value.labelName}\n onChange={handleLabelChange}\n slotProps={{\n input: {\n readOnly: props.isReadonly,\n },\n }}\n />\n <MatcherEditor\n matchers={props.value.matchers ?? []}\n onChange={handleMatchEditorsChange}\n isReadonly={props.isReadonly}\n />\n </Stack>\n );\n}\n\nexport function PrometheusLabelNamesVariableEditor(\n props: OptionsEditorProps<PrometheusLabelNamesVariableOptions>\n): ReactElement {\n const {\n onChange,\n value,\n value: { datasource },\n } = props;\n\n const selectedDatasource = datasource ?? DEFAULT_PROM;\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback(\n (next) => {\n if (isVariableDatasource(next) || isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n },\n [onChange, value]\n );\n\n const handleMatchEditorChange = useCallback(\n (matchers: string[]) => {\n onChange(\n produce(value, (draft) => {\n draft.matchers = matchers;\n })\n );\n },\n [onChange, value]\n );\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\">\n <DatasourceSelect\n datasourcePluginKind=\"PrometheusDatasource\"\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n disabled={props.isReadonly}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n <MatcherEditor\n matchers={props.value.matchers ?? []}\n isReadonly={props.isReadonly}\n onChange={handleMatchEditorChange}\n />\n </Stack>\n );\n}\n\nexport function PrometheusPromQLVariableEditor(\n props: OptionsEditorProps<PrometheusPromQLVariableOptions>\n): ReactElement {\n const {\n onChange,\n value,\n value: { datasource },\n } = props;\n const datasourceSelectValue = datasource ?? DEFAULT_PROM;\n const selectedDatasource = useDatasourceSelectValueToSelector(\n datasourceSelectValue,\n PROM_DATASOURCE_KIND\n ) as PrometheusDatasourceSelector;\n\n const { data: client } = useDatasourceClient<PrometheusClient>(selectedDatasource);\n const promURL = client?.options.datasourceUrl;\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback(\n (next) => {\n if (isVariableDatasource(next) || isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n },\n [value, onChange]\n );\n\n const handleOnBlurPromQlChange = useCallback(\n (e: FocusEvent<HTMLDivElement>) => {\n onChange(\n produce(value, (draft) => {\n draft.expr = e.target.textContent ?? '';\n })\n );\n },\n [onChange, value]\n );\n\n const handleLabelNameChange = useCallback(\n (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n onChange(\n produce(value, (draft) => {\n draft.labelName = e.target.value;\n })\n );\n },\n [onChange, value]\n );\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\">\n <DatasourceSelect\n datasourcePluginKind={PROM_DATASOURCE_KIND}\n value={datasourceSelectValue}\n onChange={handleDatasourceChange}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n disabled={props.isReadonly}\n />\n </FormControl>\n <PromQLEditor\n completeConfig={{ remote: { url: promURL } }}\n value={value.expr}\n datasource={selectedDatasource}\n onBlur={handleOnBlurPromQlChange}\n readOnly={props.isReadonly}\n width=\"100%\"\n />\n <TextField\n label=\"Label Name\"\n required\n value={props.value.labelName}\n slotProps={{\n input: {\n readOnly: props.isReadonly,\n },\n }}\n onChange={handleLabelNameChange}\n />\n </Stack>\n );\n}\n\nexport function capturingMatrix(matrix: MatrixData, labelName: string): string[] {\n const captured = new Set<string>();\n for (const sample of matrix.result) {\n const value = sample.metric[labelName];\n if (value !== undefined) {\n captured.add(value);\n }\n }\n return Array.from(captured.values());\n}\n\nexport function capturingVector(vector: VectorData, labelName: string): string[] {\n const captured = new Set<string>();\n for (const sample of vector.result) {\n const value = sample.metric[labelName];\n if (value !== undefined) {\n captured.add(value);\n }\n }\n return Array.from(captured.values());\n}\n\n/**\n * Takes a list of strings and returns a list of VariableOptions\n */\nexport const stringArrayToVariableOptions = (values?: string[]): VariableOption[] => {\n if (!values) return [];\n return values.map((value) => ({\n value,\n label: value,\n }));\n};\n"],"names":["FormControl","Stack","TextField","DatasourceSelect","isVariableDatasource","useDatasourceClient","useDatasourceSelectValueToSelector","produce","useCallback","PromQLEditor","DEFAULT_PROM","isDefaultPromSelector","isPrometheusDatasourceSelector","PROM_DATASOURCE_KIND","MatcherEditor","PrometheusLabelValuesVariableEditor","props","onChange","value","datasource","selectedDatasource","handleDatasourceChange","next","draft","undefined","Error","handleLabelChange","e","labelName","target","handleMatchEditorsChange","matchers","spacing","margin","datasourcePluginKind","readOnly","isReadonly","labelId","label","required","slotProps","input","PrometheusLabelNamesVariableEditor","handleMatchEditorChange","disabled","PrometheusPromQLVariableEditor","datasourceSelectValue","data","client","promURL","options","datasourceUrl","handleOnBlurPromQlChange","expr","textContent","handleLabelNameChange","completeConfig","remote","url","onBlur","width","capturingMatrix","matrix","captured","Set","sample","result","metric","add","Array","from","values","capturingVector","vector","stringArrayToVariableOptions","map"],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,SAASA,WAAW,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAC9D,SACEC,gBAAgB,EAEhBC,oBAAoB,EAEpBC,mBAAmB,EACnBC,kCAAkC,QAE7B,4BAA4B;AACnC,SAASC,OAAO,QAAQ,QAAQ;AAChC,SAAuBC,WAAW,QAAiC,QAAQ;AAC3E,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SACEC,YAAY,EACZC,qBAAqB,EACrBC,8BAA8B,EAE9BC,oBAAoB,QAIf,WAAW;AAClB,SAASC,aAAa,QAAQ,kBAAkB;AAOhD,OAAO,SAASC,oCACdC,KAA+D;IAE/D,MAAM,EACJC,QAAQ,EACRC,KAAK,EACLA,OAAO,EAAEC,UAAU,EAAE,EACtB,GAAGH;IACJ,MAAMI,qBAAqBD,cAAcT;IAEzC,MAAMW,yBAA4Db,YAChE,CAACc;QACC,IAAIlB,qBAAqBkB,S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,EAAE7C,SAAiB;IACnE,MAAMmC,WAAW,IAAIC;IACrB,KAAK,MAAMC,UAAUQ,OAAOP,MAAM,CAAE;QAClC,MAAMhD,QAAQ+C,OAAOE,MAAM,CAACvC,UAAU;QACtC,IAAIV,UAAUM,WAAW;YACvBuC,SAASK,GAAG,CAAClD;QACf;IACF;IACA,OAAOmD,MAAMC,IAAI,CAACP,SAASQ,MAAM;AACnC;AAEA;;CAEC,GACD,OAAO,MAAMG,+BAA+B,CAACH;IAC3C,IAAI,CAACA,QAAQ,OAAO,EAAE;IACtB,OAAOA,OAAOI,GAAG,CAAC,CAACzD,QAAW,CAAA;YAC5BA;YACAoB,OAAOpB;QACT,CAAA;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/plugins/prometheus-variables.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.\nimport { FormControl, Stack, TextField } from '@mui/material';\nimport {\n DatasourceSelect,\n DatasourceSelectProps,\n isVariableDatasource,\n OptionsEditorProps,\n useDatasourceClient,\n useDatasourceSelectValueToSelector,\n VariableOption,\n} from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport { ReactElement, useCallback, ChangeEvent, FocusEvent } from 'react';\nimport { PromQLEditor } from '../components';\nimport {\n DEFAULT_PROM,\n isDefaultPromSelector,\n isPrometheusDatasourceSelector,\n MatrixData,\n PROM_DATASOURCE_KIND,\n PrometheusClient,\n PrometheusDatasourceSelector,\n VectorData,\n} from '../model';\nimport { MatcherEditor } from './MatcherEditor';\nimport {\n PrometheusLabelNamesVariableOptions,\n PrometheusLabelValuesVariableOptions,\n PrometheusPromQLVariableOptions,\n} from './types';\n\nexport function PrometheusLabelValuesVariableEditor(\n props: OptionsEditorProps<PrometheusLabelValuesVariableOptions>\n): ReactElement {\n const {\n onChange,\n value,\n value: { datasource },\n } = props;\n const selectedDatasource = datasource ?? DEFAULT_PROM;\n\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback(\n (next) => {\n if (isVariableDatasource(next) || isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n },\n [onChange, value]\n );\n\n const handleLabelChange = useCallback(\n (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n onChange(\n produce(value, (draft) => {\n draft.labelName = e.target.value;\n })\n );\n },\n [onChange, value]\n );\n\n const handleMatchEditorsChange = useCallback(\n (matchers: string[]) => {\n onChange(\n produce(value, (draft) => {\n draft.matchers = matchers;\n })\n );\n },\n [onChange, value]\n );\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\">\n <DatasourceSelect\n datasourcePluginKind=\"PrometheusDatasource\"\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n readOnly={props.isReadonly}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n <TextField\n label=\"Label Name\"\n required\n value={props.value.labelName}\n onChange={handleLabelChange}\n slotProps={{\n input: {\n readOnly: props.isReadonly,\n },\n }}\n />\n <MatcherEditor\n matchers={props.value.matchers ?? []}\n onChange={handleMatchEditorsChange}\n isReadonly={props.isReadonly}\n />\n </Stack>\n );\n}\n\nexport function PrometheusLabelNamesVariableEditor(\n props: OptionsEditorProps<PrometheusLabelNamesVariableOptions>\n): ReactElement {\n const {\n onChange,\n value,\n value: { datasource },\n } = props;\n\n const selectedDatasource = datasource ?? DEFAULT_PROM;\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback(\n (next) => {\n if (isVariableDatasource(next) || isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n },\n [onChange, value]\n );\n\n const handleMatchEditorChange = useCallback(\n (matchers: string[]) => {\n onChange(\n produce(value, (draft) => {\n draft.matchers = matchers;\n })\n );\n },\n [onChange, value]\n );\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\">\n <DatasourceSelect\n datasourcePluginKind=\"PrometheusDatasource\"\n value={selectedDatasource}\n onChange={handleDatasourceChange}\n disabled={props.isReadonly}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n />\n </FormControl>\n <MatcherEditor\n matchers={props.value.matchers ?? []}\n isReadonly={props.isReadonly}\n onChange={handleMatchEditorChange}\n />\n </Stack>\n );\n}\n\nexport function PrometheusPromQLVariableEditor(\n props: OptionsEditorProps<PrometheusPromQLVariableOptions>\n): ReactElement {\n const {\n onChange,\n value,\n value: { datasource },\n } = props;\n const datasourceSelectValue = datasource ?? DEFAULT_PROM;\n const selectedDatasource = useDatasourceSelectValueToSelector(\n datasourceSelectValue,\n PROM_DATASOURCE_KIND\n ) as PrometheusDatasourceSelector;\n\n const { data: client } = useDatasourceClient<PrometheusClient>(selectedDatasource);\n const promURL = client?.options.datasourceUrl;\n const handleDatasourceChange: DatasourceSelectProps['onChange'] = useCallback(\n (next) => {\n if (isVariableDatasource(next) || isPrometheusDatasourceSelector(next)) {\n onChange(\n produce(value, (draft) => {\n // If they're using the default, just omit the datasource prop (i.e. set to undefined)\n draft.datasource = !isVariableDatasource(next) && isDefaultPromSelector(next) ? undefined : next;\n })\n );\n return;\n }\n\n throw new Error('Got unexpected non-Prometheus datasource selector');\n },\n [value, onChange]\n );\n\n const handleOnBlurPromQlChange = useCallback(\n (e: FocusEvent<HTMLDivElement>) => {\n onChange(\n produce(value, (draft) => {\n draft.expr = e.target.textContent ?? '';\n })\n );\n },\n [onChange, value]\n );\n\n const handleLabelNameChange = useCallback(\n (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n onChange(\n produce(value, (draft) => {\n draft.labelName = e.target.value;\n })\n );\n },\n [onChange, value]\n );\n\n return (\n <Stack spacing={2}>\n <FormControl margin=\"dense\">\n <DatasourceSelect\n datasourcePluginKind={PROM_DATASOURCE_KIND}\n value={datasourceSelectValue}\n onChange={handleDatasourceChange}\n labelId=\"prom-datasource-label\"\n label=\"Prometheus Datasource\"\n disabled={props.isReadonly}\n />\n </FormControl>\n <PromQLEditor\n completeConfig={{ remote: { url: promURL } }}\n value={value.expr}\n datasource={selectedDatasource}\n onBlur={handleOnBlurPromQlChange}\n readOnly={props.isReadonly}\n width=\"100%\"\n />\n <TextField\n label=\"Label Name\"\n required\n value={props.value.labelName}\n slotProps={{\n input: {\n readOnly: props.isReadonly,\n },\n }}\n onChange={handleLabelNameChange}\n />\n </Stack>\n );\n}\n\nexport function capturingMatrix(matrix: MatrixData, labelName: string): string[] {\n const captured = new Set<string>();\n for (const sample of matrix.result) {\n const value = sample.metric[labelName];\n if (value !== undefined) {\n captured.add(value);\n }\n }\n return Array.from(captured.values());\n}\n\nexport function capturingVector(vector: VectorData, labelName: string): string[] {\n const captured = new Set<string>();\n for (const sample of vector.result) {\n const value = sample.metric[labelName];\n if (value !== undefined) {\n captured.add(value);\n }\n }\n return Array.from(captured.values());\n}\n\n/**\n * Takes a list of strings and returns a list of VariableOptions\n */\nexport const stringArrayToVariableOptions = (values?: string[]): VariableOption[] => {\n if (!values) return [];\n return values.map((value) => ({\n value,\n label: value,\n }));\n};\n"],"names":["FormControl","Stack","TextField","DatasourceSelect","isVariableDatasource","useDatasourceClient","useDatasourceSelectValueToSelector","produce","useCallback","PromQLEditor","DEFAULT_PROM","isDefaultPromSelector","isPrometheusDatasourceSelector","PROM_DATASOURCE_KIND","MatcherEditor","PrometheusLabelValuesVariableEditor","props","onChange","value","datasource","selectedDatasource","handleDatasourceChange","next","draft","undefined","Error","handleLabelChange","e","labelName","target","handleMatchEditorsChange","matchers","spacing","margin","datasourcePluginKind","readOnly","isReadonly","labelId","label","required","slotProps","input","PrometheusLabelNamesVariableEditor","handleMatchEditorChange","disabled","PrometheusPromQLVariableEditor","datasourceSelectValue","data","client","promURL","options","datasourceUrl","handleOnBlurPromQlChange","expr","textContent","handleLabelNameChange","completeConfig","remote","url","onBlur","width","capturingMatrix","matrix","captured","Set","sample","result","metric","add","Array","from","values","capturingVector","vector","stringArrayToVariableOptions","map"],"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;AACjC,SAASA,WAAW,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAC9D,SACEC,gBAAgB,EAEhBC,oBAAoB,EAEpBC,mBAAmB,EACnBC,kCAAkC,QAE7B,4BAA4B;AACnC,SAASC,OAAO,QAAQ,QAAQ;AAChC,SAAuBC,WAAW,QAAiC,QAAQ;AAC3E,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SACEC,YAAY,EACZC,qBAAqB,EACrBC,8BAA8B,EAE9BC,oBAAoB,QAIf,WAAW;AAClB,SAASC,aAAa,QAAQ,kBAAkB;AAOhD,OAAO,SAASC,oCACdC,KAA+D;IAE/D,MAAM,EACJC,QAAQ,EACRC,KAAK,EACLA,OAAO,EAAEC,UAAU,EAAE,EACtB,GAAGH;IACJ,MAAMI,qBAAqBD,cAAcT;IAEzC,MAAMW,yBAA4Db,YAChE,CAACc;QACC,IAAIlB,qBAAqBkB,SAASV,+BAA+BU,OAAO;YACtEL,SACEV,QAAQW,OAAO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ACrB,KAAK,MAAMC,UAAUQ,OAAOP,MAAM,CAAE;QAClC,MAAMhD,QAAQ+C,OAAOE,MAAM,CAACvC,UAAU;QACtC,IAAIV,UAAUM,WAAW;YACvBuC,SAASK,GAAG,CAAClD;QACf;IACF;IACA,OAAOmD,MAAMC,IAAI,CAACP,SAASQ,MAAM;AACnC;AAEA;;CAEC,GACD,OAAO,MAAMG,+BAA+B,CAACH;IAC3C,IAAI,CAACA,QAAQ,OAAO,EAAE;IACtB,OAAOA,OAAOI,GAAG,CAAC,CAACzD,QAAW,CAAA;YAC5BA;YACAoB,OAAOpB;QACT,CAAA;AACF,EAAE"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/test/setup-tests.ts"],"sourcesContent":["// Copyright 2023 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 '@testing-library/jest-dom/extend-expect';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,0CAA0C"}
1
+ {"version":3,"sources":["../../../../src/plugins/test/setup-tests.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 '@testing-library/jest-dom/extend-expect';\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,OAAO,0CAA0C"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/types.ts"],"sourcesContent":["// Copyright 2023 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 { DurationString, HTTPProxy } from '@perses-dev/core';\nimport { DatasourceSelectValue } from '@perses-dev/plugin-system';\nimport { PrometheusDatasourceSelector } from '../model';\n\nexport const DEFAULT_SCRAPE_INTERVAL: DurationString = '1m';\n\nexport interface PrometheusDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\n scrapeInterval?: DurationString; // default to 1m\n queryParams?: Record<string, string>;\n}\n\nexport interface PrometheusVariableOptionsBase {\n datasource?: DatasourceSelectValue<PrometheusDatasourceSelector>;\n}\n\nexport type PrometheusLabelNamesVariableOptions = PrometheusVariableOptionsBase & {\n matchers?: string[];\n};\n\nexport type PrometheusLabelValuesVariableOptions = PrometheusVariableOptionsBase & {\n labelName: string;\n matchers?: string[];\n};\n\nexport type PrometheusPromQLVariableOptions = PrometheusVariableOptionsBase & {\n // expr is the PromQL expression.\n expr: string;\n // labelName is the name of the label that will be used after the PromQL query is performed to select the label value.\n // Note: This field is not part of the Prometheus API.\n labelName: string;\n};\n"],"names":["DEFAULT_SCRAPE_INTERVAL"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAMjC,OAAO,MAAMA,0BAA0C,KAAK"}
1
+ {"version":3,"sources":["../../../src/plugins/types.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 { DurationString, HTTPProxy } from '@perses-dev/core';\nimport { DatasourceSelectValue } from '@perses-dev/plugin-system';\nimport { PrometheusDatasourceSelector } from '../model';\n\nexport const DEFAULT_SCRAPE_INTERVAL: DurationString = '1m';\n\nexport interface PrometheusDatasourceSpec {\n directUrl?: string;\n proxy?: HTTPProxy;\n scrapeInterval?: DurationString; // default to 1m\n queryParams?: Record<string, string>;\n}\n\nexport interface PrometheusVariableOptionsBase {\n datasource?: DatasourceSelectValue<PrometheusDatasourceSelector>;\n}\n\nexport type PrometheusLabelNamesVariableOptions = PrometheusVariableOptionsBase & {\n matchers?: string[];\n};\n\nexport type PrometheusLabelValuesVariableOptions = PrometheusVariableOptionsBase & {\n labelName: string;\n matchers?: string[];\n};\n\nexport type PrometheusPromQLVariableOptions = PrometheusVariableOptionsBase & {\n // expr is the PromQL expression.\n expr: string;\n // labelName is the name of the label that will be used after the PromQL query is performed to select the label value.\n // Note: This field is not part of the Prometheus API.\n labelName: string;\n};\n"],"names":["DEFAULT_SCRAPE_INTERVAL"],"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;AAMjC,OAAO,MAAMA,0BAA0C,KAAK"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/variable.tsx"],"sourcesContent":["// Copyright 2023 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 { VariablePlugin, VariableOption, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Autocomplete, TextField } from '@mui/material';\nimport { ReactElement } from 'react';\n\ntype StaticListOption = string | VariableOption;\n\ntype StaticListVariableOptions = {\n values: StaticListOption[];\n};\n\nfunction StaticListVariableOptionEditor(props: OptionsEditorProps<StaticListVariableOptions>): ReactElement {\n const value = props.value.values.map((v) => {\n if (typeof v === 'string') {\n return v;\n } else {\n return v.value;\n }\n });\n\n const onChange = (__: unknown, value: string[]): void => {\n props.onChange({\n values: value.map((v) => {\n return { value: v, label: v };\n }),\n });\n };\n\n return (\n <div>\n <Autocomplete\n onPaste={(e) => {\n // Append new values on paste\n const v = e.clipboardData.getData('text/plain');\n if (v) {\n const values = v.split(',');\n onChange(null, value.concat(values));\n e.preventDefault();\n }\n }}\n multiple\n value={value}\n onChange={onChange}\n options={[]}\n freeSolo\n clearOnBlur\n readOnly={props.isReadonly}\n renderInput={(params) => (\n <TextField\n {...params}\n label=\"Values\"\n placeholder=\"Values\"\n helperText='Type new value then press \"Enter\" to add.'\n />\n )}\n />\n </div>\n );\n}\n\nexport const StaticListVariable: VariablePlugin<StaticListVariableOptions> = {\n getVariableOptions: async (spec) => {\n const values = spec.values?.map((v) => {\n if (typeof v === 'string') {\n return { label: v, value: v };\n }\n return v;\n });\n return {\n data: values,\n };\n },\n dependsOn: () => {\n return { variables: [] };\n },\n OptionsEditorComponent: StaticListVariableOptionEditor,\n createInitialOptions: () => ({ values: [] }),\n};\n"],"names":["Autocomplete","TextField","StaticListVariableOptionEditor","props","value","values","map","v","onChange","__","label","div","onPaste","e","clipboardData","getData","split","concat","preventDefault","multiple","options","freeSolo","clearOnBlur","readOnly","isReadonly","renderInput","params","placeholder","helperText","StaticListVariable","getVariableOptions","spec","data","dependsOn","variables","OptionsEditorComponent","createInitialOptions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,YAAY,EAAEC,SAAS,QAAQ,gBAAgB;AASxD,SAASC,+BAA+BC,KAAoD;IAC1F,MAAMC,QAAQD,MAAMC,KAAK,CAACC,MAAM,CAACC,GAAG,CAAC,CAACC;QACpC,IAAI,OAAOA,MAAM,UAAU;YACzB,OAAOA;QACT,OAAO;YACL,OAAOA,EAAEH,KAAK;QAChB;IACF;IAEA,MAAMI,WAAW,CAACC,IAAaL;QAC7BD,MAAMK,QAAQ,CAAC;YACbH,QAAQD,MAAME,GAAG,CAAC,CAACC;gBACjB,OAAO;oBAAEH,OAAOG;oBAAGG,OAAOH;gBAAE;YAC9B;QACF;IACF;IAEA,qBACE,KAACI;kBACC,cAAA,KAACX;YACCY,SAAS,CAACC;gBACR,6BAA6B;gBAC7B,MAAMN,IAAIM,EAAEC,aAAa,CAACC,OAAO,CAAC;gBAClC,IAAIR,GAAG;oBACL,MAAMF,SAASE,EAAES,KAAK,CAAC;oBACvBR,SAAS,MAAMJ,MAAMa,MAAM,CAACZ;oBAC5BQ,EAAEK,cAAc;gBAClB;YACF;YACAC,QAAQ;YACRf,OAAOA;YACPI,UAAUA;YACVY,SAAS,EAAE;YACXC,QAAQ;YACRC,WAAW;YACXC,UAAUpB,MAAMqB,UAAU;YAC1BC,aAAa,CAACC,uBACZ,KAACzB;oBACE,GAAGyB,MAAM;oBACVhB,OAAM;oBACNiB,aAAY;oBACZC,YAAW;;;;AAMvB;AAEA,OAAO,MAAMC,qBAAgE;IAC3EC,oBAAoB,OAAOC;QACzB,MAAM1B,SAAS0B,KAAK1B,MAAM,EAAEC,IAAI,CAACC;YAC/B,IAAI,OAAOA,MAAM,UAAU;gBACzB,OAAO;oBAAEG,OAAOH;oBAAGH,OAAOG;gBAAE;YAC9B;YACA,OAAOA;QACT;QACA,OAAO;YACLyB,MAAM3B;QACR;IACF;IACA4B,WAAW;QACT,OAAO;YAAEC,WAAW,EAAE;QAAC;IACzB;IACAC,wBAAwBjC;IACxBkC,sBAAsB,IAAO,CAAA;YAAE/B,QAAQ,EAAE;QAAC,CAAA;AAC5C,EAAE"}
1
+ {"version":3,"sources":["../../../src/plugins/variable.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 { VariablePlugin, VariableOption, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Autocomplete, TextField } from '@mui/material';\nimport { ReactElement } from 'react';\n\ntype StaticListOption = string | VariableOption;\n\ntype StaticListVariableOptions = {\n values: StaticListOption[];\n};\n\nfunction StaticListVariableOptionEditor(props: OptionsEditorProps<StaticListVariableOptions>): ReactElement {\n const value = props.value.values.map((v) => {\n if (typeof v === 'string') {\n return v;\n } else {\n return v.value;\n }\n });\n\n const onChange = (__: unknown, value: string[]): void => {\n props.onChange({\n values: value.map((v) => {\n return { value: v, label: v };\n }),\n });\n };\n\n return (\n <div>\n <Autocomplete\n onPaste={(e) => {\n // Append new values on paste\n const v = e.clipboardData.getData('text/plain');\n if (v) {\n const values = v.split(',');\n onChange(null, value.concat(values));\n e.preventDefault();\n }\n }}\n multiple\n value={value}\n onChange={onChange}\n options={[]}\n freeSolo\n clearOnBlur\n readOnly={props.isReadonly}\n renderInput={(params) => (\n <TextField\n {...params}\n label=\"Values\"\n placeholder=\"Values\"\n helperText='Type new value then press \"Enter\" to add.'\n />\n )}\n />\n </div>\n );\n}\n\nexport const StaticListVariable: VariablePlugin<StaticListVariableOptions> = {\n getVariableOptions: async (spec) => {\n const values = spec.values?.map((v) => {\n if (typeof v === 'string') {\n return { label: v, value: v };\n }\n return v;\n });\n return {\n data: values,\n };\n },\n dependsOn: () => {\n return { variables: [] };\n },\n OptionsEditorComponent: StaticListVariableOptionEditor,\n createInitialOptions: () => ({ values: [] }),\n};\n"],"names":["Autocomplete","TextField","StaticListVariableOptionEditor","props","value","values","map","v","onChange","__","label","div","onPaste","e","clipboardData","getData","split","concat","preventDefault","multiple","options","freeSolo","clearOnBlur","readOnly","isReadonly","renderInput","params","placeholder","helperText","StaticListVariable","getVariableOptions","spec","data","dependsOn","variables","OptionsEditorComponent","createInitialOptions"],"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,SAASA,YAAY,EAAEC,SAAS,QAAQ,gBAAgB;AASxD,SAASC,+BAA+BC,KAAoD;IAC1F,MAAMC,QAAQD,MAAMC,KAAK,CAACC,MAAM,CAACC,GAAG,CAAC,CAACC;QACpC,IAAI,OAAOA,MAAM,UAAU;YACzB,OAAOA;QACT,OAAO;YACL,OAAOA,EAAEH,KAAK;QAChB;IACF;IAEA,MAAMI,WAAW,CAACC,IAAaL;QAC7BD,MAAMK,QAAQ,CAAC;YACbH,QAAQD,MAAME,GAAG,CAAC,CAACC;gBACjB,OAAO;oBAAEH,OAAOG;oBAAGG,OAAOH;gBAAE;YAC9B;QACF;IACF;IAEA,qBACE,KAACI;kBACC,cAAA,KAACX;YACCY,SAAS,CAACC;gBACR,6BAA6B;gBAC7B,MAAMN,IAAIM,EAAEC,aAAa,CAACC,OAAO,CAAC;gBAClC,IAAIR,GAAG;oBACL,MAAMF,SAASE,EAAES,KAAK,CAAC;oBACvBR,SAAS,MAAMJ,MAAMa,MAAM,CAACZ;oBAC5BQ,EAAEK,cAAc;gBAClB;YACF;YACAC,QAAQ;YACRf,OAAOA;YACPI,UAAUA;YACVY,SAAS,EAAE;YACXC,QAAQ;YACRC,WAAW;YACXC,UAAUpB,MAAMqB,UAAU;YAC1BC,aAAa,CAACC,uBACZ,KAACzB;oBACE,GAAGyB,MAAM;oBACVhB,OAAM;oBACNiB,aAAY;oBACZC,YAAW;;;;AAMvB;AAEA,OAAO,MAAMC,qBAAgE;IAC3EC,oBAAoB,OAAOC;QACzB,MAAM1B,SAAS0B,KAAK1B,MAAM,EAAEC,IAAI,CAACC;YAC/B,IAAI,OAAOA,MAAM,UAAU;gBACzB,OAAO;oBAAEG,OAAOH;oBAAGH,OAAOG;gBAAE;YAC9B;YACA,OAAOA;QACT;QACA,OAAO;YACLyB,MAAM3B;QACR;IACF;IACA4B,WAAW;QACT,OAAO;YAAEC,WAAW,EAAE;QAAC;IACzB;IACAC,wBAAwBjC;IACxBkC,sBAAsB,IAAO,CAAA;YAAE/B,QAAQ,EAAE;QAAC,CAAA;AAC5C,EAAE"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/setup-tests.ts"],"sourcesContent":["// Copyright 2023 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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
1
+ {"version":3,"sources":["../../src/setup-tests.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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/index.ts"],"sourcesContent":["// Copyright 2023 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 * from './utils';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,UAAU"}
1
+ {"version":3,"sources":["../../../src/utils/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 * from './utils';\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,cAAc,UAAU"}
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/utils.ts"],"sourcesContent":["// Copyright 2023 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 { Metric } from '../model/api-types';\n\n/**\n * Types for metric labels, used in seriesNameFormat implementation\n */\nexport type SeriesLabels = Record<string, string>;\n\n/*\n * Formatter used for series name display in legends and tooltips.\n * Regex replaces label {{ name }} with resolved label value.\n * If no resolved value, return empty string instead of the token inside double curly braces.\n */\nexport function formatSeriesName(inputFormat: string, seriesLabels: SeriesLabels): string {\n const resolveLabelsRegex = /\\{\\{\\s*(.+?)\\s*\\}\\}/g;\n return inputFormat.replace(resolveLabelsRegex, (_match, token) => {\n const resolvedValue = seriesLabels[token] ?? '';\n return resolvedValue;\n });\n}\n\n/*\n * Stringifies object of labels into valid PromQL for querying metric by label\n */\nfunction stringifyPrometheusMetricLabels(labels: { [key: string]: unknown }, removeExprWrap?: boolean): string {\n const labelStrings: string[] = [];\n Object.keys(labels)\n .sort()\n .forEach((labelName) => {\n const labelValue = labels[labelName];\n if (labelValue !== undefined) {\n if (removeExprWrap) {\n labelStrings.push(`\"${labelName}\":\"${labelValue}\"`);\n } else {\n labelStrings.push(`${labelName}=\"${labelValue}\"`);\n }\n }\n });\n return `{${labelStrings.join(',')}}`;\n}\n\n/*\n * Metric labels formatter which checks for __name__ and outputs valid PromQL for series name\n */\nexport function getUniqueKeyForPrometheusResult(\n metricLabels: {\n [key: string]: string;\n },\n { removeExprWrap }: { removeExprWrap?: boolean } = {}\n): string {\n const metricNameKey = '__name__';\n if (Object.prototype.hasOwnProperty.call(metricLabels, metricNameKey)) {\n const stringifiedLabels = stringifyPrometheusMetricLabels(\n {\n ...metricLabels,\n [metricNameKey]: undefined,\n },\n removeExprWrap\n );\n if (removeExprWrap) {\n return `${stringifiedLabels}`;\n } else {\n return `${metricLabels[metricNameKey]}${stringifiedLabels}`;\n }\n }\n return stringifyPrometheusMetricLabels(metricLabels, removeExprWrap);\n}\n\n/*\n * Determine human-readable series name to be used in legend and tooltip\n */\nexport function getFormattedPrometheusSeriesName(\n query: string,\n metric: Metric,\n formatter?: string\n): {\n name: string;\n formattedName: string;\n} {\n // Name the series after the metric labels by default.\n const name = getUniqueKeyForPrometheusResult(metric);\n\n // Query editor allows you to define an optional seriesNameFormat property.\n // This controls the regex used to customize legend and tooltip display.\n const formattedName = formatter ? formatSeriesName(formatter, metric) : name;\n return { name, formattedName };\n}\n"],"names":["formatSeriesName","inputFormat","seriesLabels","resolveLabelsRegex","replace","_match","token","resolvedValue","stringifyPrometheusMetricLabels","labels","removeExprWrap","labelStrings","Object","keys","sort","forEach","labelName","labelValue","undefined","push","join","getUniqueKeyForPrometheusResult","metricLabels","metricNameKey","prototype","hasOwnProperty","call","stringifiedLabels","getFormattedPrometheusSeriesName","query","metric","formatter","name","formattedName"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AASjC;;;;CAIC,GACD,OAAO,SAASA,iBAAiBC,WAAmB,EAAEC,YAA0B;IAC9E,MAAMC,qBAAqB;IAC3B,OAAOF,YAAYG,OAAO,CAACD,oBAAoB,CAACE,QAAQC;QACtD,MAAMC,gBAAgBL,YAAY,CAACI,MAAM,IAAI;QAC7C,OAAOC;IACT;AACF;AAEA;;CAEC,GACD,SAASC,gCAAgCC,MAAkC,EAAEC,cAAwB;IACnG,MAAMC,eAAyB,EAAE;IACjCC,OAAOC,IAAI,CAACJ,QACTK,IAAI,GACJC,OAAO,CAAC,CAACC;QACR,MAAMC,aAAaR,MAAM,CAACO,UAAU;QACpC,IAAIC,eAAeC,WAAW;YAC5B,IAAIR,gBAAgB;gBAClBC,aAAaQ,IAAI,CAAC,CAAC,CAAC,EAAEH,UAAU,GAAG,EAAEC,WAAW,CAAC,CAAC;YACpD,OAAO;gBACLN,aAAaQ,IAAI,CAAC,GAAGH,UAAU,EAAE,EAAEC,WAAW,CAAC,CAAC;YAClD;QACF;IACF;IACF,OAAO,CAAC,CAAC,EAAEN,aAAaS,IAAI,CAAC,KAAK,CAAC,CAAC;AACtC;AAEA;;CAEC,GACD,OAAO,SAASC,gCACdC,YAEC,EACD,EAAEZ,cAAc,EAAgC,GAAG,CAAC,CAAC;IAErD,MAAMa,gBAAgB;IACtB,IAAIX,OAAOY,SAAS,CAACC,cAAc,CAACC,IAAI,CAACJ,cAAcC,gBAAgB;QACrE,MAAMI,oBAAoBnB,gCACxB;YACE,GAAGc,YAAY;YACf,CAACC,cAAc,EAAEL;QACnB,GACAR;QAEF,IAAIA,gBAAgB;YAClB,OAAO,GAAGiB,mBAAmB;QAC/B,OAAO;YACL,OAAO,GAAGL,YAAY,CAACC,cAAc,GAAGI,mBAAmB;QAC7D;IACF;IACA,OAAOnB,gCAAgCc,cAAcZ;AACvD;AAEA;;CAEC,GACD,OAAO,SAASkB,iCACdC,KAAa,EACbC,MAAc,EACdC,SAAkB;IAKlB,sDAAsD;IACtD,MAAMC,OAAOX,gCAAgCS;IAE7C,2EAA2E;IAC3E,wEAAwE;IACxE,MAAMG,gBAAgBF,YAAY/B,iBAAiB+B,WAAWD,UAAUE;IACxE,OAAO;QAAEA;QAAMC;IAAc;AAC/B"}
1
+ {"version":3,"sources":["../../../src/utils/utils.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 { Metric } from '../model/api-types';\n\n/**\n * Types for metric labels, used in seriesNameFormat implementation\n */\nexport type SeriesLabels = Record<string, string>;\n\n/*\n * Formatter used for series name display in legends and tooltips.\n * Regex replaces label {{ name }} with resolved label value.\n * If no resolved value, return empty string instead of the token inside double curly braces.\n */\nexport function formatSeriesName(inputFormat: string, seriesLabels: SeriesLabels): string {\n const resolveLabelsRegex = /\\{\\{\\s*(.+?)\\s*\\}\\}/g;\n return inputFormat.replace(resolveLabelsRegex, (_match, token) => {\n const resolvedValue = seriesLabels[token] ?? '';\n return resolvedValue;\n });\n}\n\n/*\n * Stringifies object of labels into valid PromQL for querying metric by label\n */\nfunction stringifyPrometheusMetricLabels(labels: { [key: string]: unknown }, removeExprWrap?: boolean): string {\n const labelStrings: string[] = [];\n Object.keys(labels)\n .sort()\n .forEach((labelName) => {\n const labelValue = labels[labelName];\n if (labelValue !== undefined) {\n if (removeExprWrap) {\n labelStrings.push(`\"${labelName}\":\"${labelValue}\"`);\n } else {\n labelStrings.push(`${labelName}=\"${labelValue}\"`);\n }\n }\n });\n return `{${labelStrings.join(',')}}`;\n}\n\n/*\n * Metric labels formatter which checks for __name__ and outputs valid PromQL for series name\n */\nexport function getUniqueKeyForPrometheusResult(\n metricLabels: {\n [key: string]: string;\n },\n { removeExprWrap }: { removeExprWrap?: boolean } = {}\n): string {\n const metricNameKey = '__name__';\n if (Object.prototype.hasOwnProperty.call(metricLabels, metricNameKey)) {\n const stringifiedLabels = stringifyPrometheusMetricLabels(\n {\n ...metricLabels,\n [metricNameKey]: undefined,\n },\n removeExprWrap\n );\n if (removeExprWrap) {\n return `${stringifiedLabels}`;\n } else {\n return `${metricLabels[metricNameKey]}${stringifiedLabels}`;\n }\n }\n return stringifyPrometheusMetricLabels(metricLabels, removeExprWrap);\n}\n\n/*\n * Determine human-readable series name to be used in legend and tooltip\n */\nexport function getFormattedPrometheusSeriesName(\n query: string,\n metric: Metric,\n formatter?: string\n): {\n name: string;\n formattedName: string;\n} {\n // Name the series after the metric labels by default.\n const name = getUniqueKeyForPrometheusResult(metric);\n\n // Query editor allows you to define an optional seriesNameFormat property.\n // This controls the regex used to customize legend and tooltip display.\n const formattedName = formatter ? formatSeriesName(formatter, metric) : name;\n return { name, formattedName };\n}\n"],"names":["formatSeriesName","inputFormat","seriesLabels","resolveLabelsRegex","replace","_match","token","resolvedValue","stringifyPrometheusMetricLabels","labels","removeExprWrap","labelStrings","Object","keys","sort","forEach","labelName","labelValue","undefined","push","join","getUniqueKeyForPrometheusResult","metricLabels","metricNameKey","prototype","hasOwnProperty","call","stringifiedLabels","getFormattedPrometheusSeriesName","query","metric","formatter","name","formattedName"],"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;AASjC;;;;CAIC,GACD,OAAO,SAASA,iBAAiBC,WAAmB,EAAEC,YAA0B;IAC9E,MAAMC,qBAAqB;IAC3B,OAAOF,YAAYG,OAAO,CAACD,oBAAoB,CAACE,QAAQC;QACtD,MAAMC,gBAAgBL,YAAY,CAACI,MAAM,IAAI;QAC7C,OAAOC;IACT;AACF;AAEA;;CAEC,GACD,SAASC,gCAAgCC,MAAkC,EAAEC,cAAwB;IACnG,MAAMC,eAAyB,EAAE;IACjCC,OAAOC,IAAI,CAACJ,QACTK,IAAI,GACJC,OAAO,CAAC,CAACC;QACR,MAAMC,aAAaR,MAAM,CAACO,UAAU;QACpC,IAAIC,eAAeC,WAAW;YAC5B,IAAIR,gBAAgB;gBAClBC,aAAaQ,IAAI,CAAC,CAAC,CAAC,EAAEH,UAAU,GAAG,EAAEC,WAAW,CAAC,CAAC;YACpD,OAAO;gBACLN,aAAaQ,IAAI,CAAC,GAAGH,UAAU,EAAE,EAAEC,WAAW,CAAC,CAAC;YAClD;QACF;IACF;IACF,OAAO,CAAC,CAAC,EAAEN,aAAaS,IAAI,CAAC,KAAK,CAAC,CAAC;AACtC;AAEA;;CAEC,GACD,OAAO,SAASC,gCACdC,YAEC,EACD,EAAEZ,cAAc,EAAgC,GAAG,CAAC,CAAC;IAErD,MAAMa,gBAAgB;IACtB,IAAIX,OAAOY,SAAS,CAACC,cAAc,CAACC,IAAI,CAACJ,cAAcC,gBAAgB;QACrE,MAAMI,oBAAoBnB,gCACxB;YACE,GAAGc,YAAY;YACf,CAACC,cAAc,EAAEL;QACnB,GACAR;QAEF,IAAIA,gBAAgB;YAClB,OAAO,GAAGiB,mBAAmB;QAC/B,OAAO;YACL,OAAO,GAAGL,YAAY,CAACC,cAAc,GAAGI,mBAAmB;QAC7D;IACF;IACA,OAAOnB,gCAAgCc,cAAcZ;AACvD;AAEA;;CAEC,GACD,OAAO,SAASkB,iCACdC,KAAa,EACbC,MAAc,EACdC,SAAkB;IAKlB,sDAAsD;IACtD,MAAMC,OAAOX,gCAAgCS;IAE7C,2EAA2E;IAC3E,wEAAwE;IACxE,MAAMG,gBAAgBF,YAAY/B,iBAAiB+B,WAAWD,UAAUE;IACxE,OAAO;QAAEA;QAAMC;IAAc;AAC/B"}
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "Prometheus",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.57.0-beta.0",
8
+ "buildVersion": "0.57.0",
9
9
  "buildName": "@perses-dev/prometheus-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/Prometheus.2bb892ab.js",
12
+ "name": "__mf/js/Prometheus.9877d89e.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -87,14 +87,14 @@
87
87
  {
88
88
  "id": "Prometheus:@perses-dev/components",
89
89
  "name": "@perses-dev/components",
90
- "version": "0.53.0-beta.4",
90
+ "version": "0.53.0",
91
91
  "singleton": true,
92
- "requiredVersion": "^0.53.0-beta.4",
92
+ "requiredVersion": "^0.53.0",
93
93
  "assets": {
94
94
  "js": {
95
95
  "async": [],
96
96
  "sync": [
97
- "__mf/js/async/6149.19799c37.js"
97
+ "__mf/js/async/3652.6b591718.js"
98
98
  ]
99
99
  },
100
100
  "css": {
@@ -106,14 +106,14 @@
106
106
  {
107
107
  "id": "Prometheus:@perses-dev/dashboards",
108
108
  "name": "@perses-dev/dashboards",
109
- "version": "0.53.0-beta.4",
109
+ "version": "0.53.0",
110
110
  "singleton": true,
111
- "requiredVersion": "^0.53.0-beta.4",
111
+ "requiredVersion": "^0.53.0",
112
112
  "assets": {
113
113
  "js": {
114
114
  "async": [],
115
115
  "sync": [
116
- "__mf/js/async/1490.7e5068f1.js"
116
+ "__mf/js/async/54.e6002704.js"
117
117
  ]
118
118
  },
119
119
  "css": {
@@ -125,14 +125,14 @@
125
125
  {
126
126
  "id": "Prometheus:@perses-dev/explore",
127
127
  "name": "@perses-dev/explore",
128
- "version": "0.53.0-beta.4",
128
+ "version": "0.53.0",
129
129
  "singleton": true,
130
- "requiredVersion": "^0.53.0-beta.4",
130
+ "requiredVersion": "^0.53.0",
131
131
  "assets": {
132
132
  "js": {
133
133
  "async": [],
134
134
  "sync": [
135
- "__mf/js/async/1728.af16c4ec.js"
135
+ "__mf/js/async/1728.531c96f9.js"
136
136
  ]
137
137
  },
138
138
  "css": {
@@ -144,14 +144,14 @@
144
144
  {
145
145
  "id": "Prometheus:@perses-dev/plugin-system",
146
146
  "name": "@perses-dev/plugin-system",
147
- "version": "0.53.0-beta.4",
147
+ "version": "0.53.0",
148
148
  "singleton": true,
149
- "requiredVersion": "^0.53.0-beta.4",
149
+ "requiredVersion": "^0.53.0",
150
150
  "assets": {
151
151
  "js": {
152
152
  "async": [],
153
153
  "sync": [
154
- "__mf/js/async/5501.6166367c.js"
154
+ "__mf/js/async/9010.ca50fa9e.js"
155
155
  ]
156
156
  },
157
157
  "css": {
@@ -220,14 +220,14 @@
220
220
  {
221
221
  "id": "Prometheus:lodash",
222
222
  "name": "lodash",
223
- "version": "4.17.21",
223
+ "version": "4.17.23",
224
224
  "singleton": true,
225
- "requiredVersion": "^4.17.21",
225
+ "requiredVersion": "^4.17.23",
226
226
  "assets": {
227
227
  "js": {
228
228
  "async": [],
229
229
  "sync": [
230
- "__mf/js/async/392.7cda691a.js"
230
+ "__mf/js/async/392.f1b4a590.js"
231
231
  ]
232
232
  },
233
233
  "css": {
@@ -277,14 +277,14 @@
277
277
  {
278
278
  "id": "Prometheus:react-router-dom",
279
279
  "name": "react-router-dom",
280
- "version": "6.30.0",
280
+ "version": "6.30.3",
281
281
  "singleton": true,
282
- "requiredVersion": "^6.30.0",
282
+ "requiredVersion": "^6.30.3",
283
283
  "assets": {
284
284
  "js": {
285
285
  "async": [],
286
286
  "sync": [
287
- "__mf/js/async/5440.c13c3533.js"
287
+ "__mf/js/async/5440.8ced5513.js"
288
288
  ]
289
289
  },
290
290
  "css": {
@@ -342,7 +342,7 @@
342
342
  "sync": [
343
343
  "__mf/js/async/529.2303b01b.js",
344
344
  "__mf/js/async/1605.dc180cb8.js",
345
- "__mf/js/async/__federation_expose_PrometheusDatasource.6f63e147.js"
345
+ "__mf/js/async/__federation_expose_PrometheusDatasource.b97f9012.js"
346
346
  ],
347
347
  "async": [
348
348
  "__mf/js/async/9588.9081c7de.js",
@@ -354,23 +354,23 @@
354
354
  "__mf/js/async/1432.0c3e4ed0.js",
355
355
  "__mf/js/async/4626.173e602a.js",
356
356
  "__mf/js/async/3996.69a9c1dc.js",
357
- "__mf/js/async/9020.c19782f1.js",
358
- "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js",
357
+ "__mf/js/async/9020.ebc1cad3.js",
358
+ "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js",
359
359
  "__mf/js/async/7894.9c5245d7.js",
360
- "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.bd3eb00c.js",
361
- "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.40984a4d.js",
362
- "__mf/js/async/__federation_expose_PrometheusPromQLVariable.5cca8417.js",
360
+ "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.eb12e168.js",
361
+ "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.bd38a89c.js",
362
+ "__mf/js/async/__federation_expose_PrometheusPromQLVariable.7ccb0601.js",
363
363
  "__mf/js/async/5922.d1619ac1.js",
364
364
  "__mf/js/async/9836.00da6086.js",
365
365
  "__mf/js/async/2186.e58838a5.js",
366
366
  "__mf/js/async/3184.6b4ad42e.js",
367
367
  "__mf/js/async/9605.a92ec9c1.js",
368
- "__mf/js/async/__federation_expose_PrometheusExplorer.584a073d.js",
369
- "__mf/js/async/2984.7182c2f5.js",
370
- "__mf/js/async/3664.ba8b26b6.js",
368
+ "__mf/js/async/__federation_expose_PrometheusExplorer.eba3b416.js",
369
+ "__mf/js/async/425.1ec8867f.js",
370
+ "__mf/js/async/4657.f0c3ccd6.js",
371
371
  "__mf/js/async/9184.43a8d927.js",
372
372
  "__mf/js/async/8888.59eb50a2.js",
373
- "__mf/js/async/2999.1d8347df.js",
373
+ "__mf/js/async/3499.bef2e2e5.js",
374
374
  "__mf/js/async/2043.d0fbb886.js",
375
375
  "__mf/js/async/9518.38e38a33.js",
376
376
  "__mf/js/async/7177.205c9aaf.js",
@@ -400,8 +400,8 @@
400
400
  "__mf/js/async/1432.0c3e4ed0.js",
401
401
  "__mf/js/async/4626.173e602a.js",
402
402
  "__mf/js/async/3996.69a9c1dc.js",
403
- "__mf/js/async/9020.c19782f1.js",
404
- "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js"
403
+ "__mf/js/async/9020.ebc1cad3.js",
404
+ "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js"
405
405
  ],
406
406
  "async": [
407
407
  "__mf/js/async/9588.9081c7de.js",
@@ -414,21 +414,21 @@
414
414
  "__mf/js/async/1432.0c3e4ed0.js",
415
415
  "__mf/js/async/4626.173e602a.js",
416
416
  "__mf/js/async/3996.69a9c1dc.js",
417
- "__mf/js/async/9020.c19782f1.js",
418
- "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.bd3eb00c.js",
419
- "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.40984a4d.js",
420
- "__mf/js/async/__federation_expose_PrometheusPromQLVariable.5cca8417.js",
417
+ "__mf/js/async/9020.ebc1cad3.js",
418
+ "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.eb12e168.js",
419
+ "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.bd38a89c.js",
420
+ "__mf/js/async/__federation_expose_PrometheusPromQLVariable.7ccb0601.js",
421
421
  "__mf/js/async/5922.d1619ac1.js",
422
422
  "__mf/js/async/9836.00da6086.js",
423
423
  "__mf/js/async/2186.e58838a5.js",
424
424
  "__mf/js/async/3184.6b4ad42e.js",
425
425
  "__mf/js/async/9605.a92ec9c1.js",
426
- "__mf/js/async/__federation_expose_PrometheusExplorer.584a073d.js",
427
- "__mf/js/async/2984.7182c2f5.js",
426
+ "__mf/js/async/__federation_expose_PrometheusExplorer.eba3b416.js",
427
+ "__mf/js/async/425.1ec8867f.js",
428
428
  "__mf/js/async/9184.43a8d927.js",
429
- "__mf/js/async/2999.1d8347df.js",
429
+ "__mf/js/async/3499.bef2e2e5.js",
430
430
  "__mf/js/async/1969.372d36b8.js",
431
- "__mf/js/async/3664.ba8b26b6.js",
431
+ "__mf/js/async/4657.f0c3ccd6.js",
432
432
  "__mf/js/async/2043.d0fbb886.js",
433
433
  "__mf/js/async/9518.38e38a33.js",
434
434
  "__mf/js/async/6969.b959b6f8.js",
@@ -461,8 +461,8 @@
461
461
  "__mf/js/async/1432.0c3e4ed0.js",
462
462
  "__mf/js/async/4626.173e602a.js",
463
463
  "__mf/js/async/3996.69a9c1dc.js",
464
- "__mf/js/async/9020.c19782f1.js",
465
- "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.bd3eb00c.js"
464
+ "__mf/js/async/9020.ebc1cad3.js",
465
+ "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.eb12e168.js"
466
466
  ],
467
467
  "async": [
468
468
  "__mf/js/async/9588.9081c7de.js",
@@ -477,17 +477,17 @@
477
477
  "__mf/js/async/2186.e58838a5.js",
478
478
  "__mf/js/async/3184.6b4ad42e.js",
479
479
  "__mf/js/async/9605.a92ec9c1.js",
480
- "__mf/js/async/__federation_expose_PrometheusExplorer.584a073d.js",
481
- "__mf/js/async/2984.7182c2f5.js",
482
- "__mf/js/async/3664.ba8b26b6.js",
480
+ "__mf/js/async/__federation_expose_PrometheusExplorer.eba3b416.js",
481
+ "__mf/js/async/425.1ec8867f.js",
482
+ "__mf/js/async/4657.f0c3ccd6.js",
483
483
  "__mf/js/async/9184.43a8d927.js",
484
484
  "__mf/js/async/3963.5fef6ffb.js",
485
485
  "__mf/js/async/4626.173e602a.js",
486
486
  "__mf/js/async/3996.69a9c1dc.js",
487
- "__mf/js/async/9020.c19782f1.js",
488
- "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js",
487
+ "__mf/js/async/9020.ebc1cad3.js",
488
+ "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js",
489
489
  "__mf/js/async/8888.59eb50a2.js",
490
- "__mf/js/async/2999.1d8347df.js",
490
+ "__mf/js/async/3499.bef2e2e5.js",
491
491
  "__mf/js/async/2043.d0fbb886.js",
492
492
  "__mf/js/async/9518.38e38a33.js",
493
493
  "__mf/js/async/7177.205c9aaf.js",
@@ -520,8 +520,8 @@
520
520
  "__mf/js/async/1432.0c3e4ed0.js",
521
521
  "__mf/js/async/4626.173e602a.js",
522
522
  "__mf/js/async/3996.69a9c1dc.js",
523
- "__mf/js/async/9020.c19782f1.js",
524
- "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.40984a4d.js"
523
+ "__mf/js/async/9020.ebc1cad3.js",
524
+ "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.bd38a89c.js"
525
525
  ],
526
526
  "async": [
527
527
  "__mf/js/async/9588.9081c7de.js",
@@ -536,17 +536,17 @@
536
536
  "__mf/js/async/2186.e58838a5.js",
537
537
  "__mf/js/async/3184.6b4ad42e.js",
538
538
  "__mf/js/async/9605.a92ec9c1.js",
539
- "__mf/js/async/__federation_expose_PrometheusExplorer.584a073d.js",
540
- "__mf/js/async/2984.7182c2f5.js",
541
- "__mf/js/async/3664.ba8b26b6.js",
539
+ "__mf/js/async/__federation_expose_PrometheusExplorer.eba3b416.js",
540
+ "__mf/js/async/425.1ec8867f.js",
541
+ "__mf/js/async/4657.f0c3ccd6.js",
542
542
  "__mf/js/async/9184.43a8d927.js",
543
543
  "__mf/js/async/3963.5fef6ffb.js",
544
544
  "__mf/js/async/4626.173e602a.js",
545
545
  "__mf/js/async/3996.69a9c1dc.js",
546
- "__mf/js/async/9020.c19782f1.js",
547
- "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js",
546
+ "__mf/js/async/9020.ebc1cad3.js",
547
+ "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js",
548
548
  "__mf/js/async/8888.59eb50a2.js",
549
- "__mf/js/async/2999.1d8347df.js",
549
+ "__mf/js/async/3499.bef2e2e5.js",
550
550
  "__mf/js/async/2043.d0fbb886.js",
551
551
  "__mf/js/async/9518.38e38a33.js",
552
552
  "__mf/js/async/7177.205c9aaf.js",
@@ -579,8 +579,8 @@
579
579
  "__mf/js/async/1432.0c3e4ed0.js",
580
580
  "__mf/js/async/4626.173e602a.js",
581
581
  "__mf/js/async/3996.69a9c1dc.js",
582
- "__mf/js/async/9020.c19782f1.js",
583
- "__mf/js/async/__federation_expose_PrometheusPromQLVariable.5cca8417.js"
582
+ "__mf/js/async/9020.ebc1cad3.js",
583
+ "__mf/js/async/__federation_expose_PrometheusPromQLVariable.7ccb0601.js"
584
584
  ],
585
585
  "async": [
586
586
  "__mf/js/async/9588.9081c7de.js",
@@ -595,17 +595,17 @@
595
595
  "__mf/js/async/2186.e58838a5.js",
596
596
  "__mf/js/async/3184.6b4ad42e.js",
597
597
  "__mf/js/async/9605.a92ec9c1.js",
598
- "__mf/js/async/__federation_expose_PrometheusExplorer.584a073d.js",
599
- "__mf/js/async/2984.7182c2f5.js",
600
- "__mf/js/async/3664.ba8b26b6.js",
598
+ "__mf/js/async/__federation_expose_PrometheusExplorer.eba3b416.js",
599
+ "__mf/js/async/425.1ec8867f.js",
600
+ "__mf/js/async/4657.f0c3ccd6.js",
601
601
  "__mf/js/async/9184.43a8d927.js",
602
602
  "__mf/js/async/3963.5fef6ffb.js",
603
603
  "__mf/js/async/4626.173e602a.js",
604
604
  "__mf/js/async/3996.69a9c1dc.js",
605
- "__mf/js/async/9020.c19782f1.js",
606
- "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js",
605
+ "__mf/js/async/9020.ebc1cad3.js",
606
+ "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js",
607
607
  "__mf/js/async/8888.59eb50a2.js",
608
- "__mf/js/async/2999.1d8347df.js",
608
+ "__mf/js/async/3499.bef2e2e5.js",
609
609
  "__mf/js/async/2043.d0fbb886.js",
610
610
  "__mf/js/async/9518.38e38a33.js",
611
611
  "__mf/js/async/7177.205c9aaf.js",
@@ -640,7 +640,7 @@
640
640
  "__mf/js/async/2186.e58838a5.js",
641
641
  "__mf/js/async/3184.6b4ad42e.js",
642
642
  "__mf/js/async/9605.a92ec9c1.js",
643
- "__mf/js/async/__federation_expose_PrometheusExplorer.584a073d.js"
643
+ "__mf/js/async/__federation_expose_PrometheusExplorer.eba3b416.js"
644
644
  ],
645
645
  "async": [
646
646
  "__mf/js/async/9588.9081c7de.js",
@@ -654,17 +654,17 @@
654
654
  "__mf/js/async/1432.0c3e4ed0.js",
655
655
  "__mf/js/async/4626.173e602a.js",
656
656
  "__mf/js/async/3996.69a9c1dc.js",
657
- "__mf/js/async/9020.c19782f1.js",
658
- "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.f59141f4.js",
657
+ "__mf/js/async/9020.ebc1cad3.js",
658
+ "__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.08f11ea9.js",
659
659
  "__mf/js/async/7894.9c5245d7.js",
660
- "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.bd3eb00c.js",
661
- "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.40984a4d.js",
662
- "__mf/js/async/__federation_expose_PrometheusPromQLVariable.5cca8417.js",
663
- "__mf/js/async/2984.7182c2f5.js",
664
- "__mf/js/async/3664.ba8b26b6.js",
660
+ "__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.eb12e168.js",
661
+ "__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.bd38a89c.js",
662
+ "__mf/js/async/__federation_expose_PrometheusPromQLVariable.7ccb0601.js",
663
+ "__mf/js/async/425.1ec8867f.js",
664
+ "__mf/js/async/4657.f0c3ccd6.js",
665
665
  "__mf/js/async/6969.b959b6f8.js",
666
666
  "__mf/js/async/2043.d0fbb886.js",
667
- "__mf/js/async/2999.1d8347df.js",
667
+ "__mf/js/async/3499.bef2e2e5.js",
668
668
  "__mf/js/async/9518.38e38a33.js",
669
669
  "__mf/js/async/1969.372d36b8.js",
670
670
  "__mf/js/async/8888.59eb50a2.js",