@perses-dev/prometheus-plugin 0.51.0 → 0.52.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/__mf/js/{622.81d47848.js → 622.a776ec11.js} +1 -1
- package/__mf/js/{Prometheus.ce1e9458.js → Prometheus.c57c8a9f.js} +3 -3
- package/__mf/js/async/{5345.2e531d76.js → 5345.1f4fc17b.js} +1 -1
- package/__mf/js/async/{5503.d391f0fc.js → 5503.daedd4dd.js} +1 -1
- package/__mf/js/async/{__federation_expose_PrometheusExplorer.3f83dfda.js → __federation_expose_PrometheusExplorer.171d04eb.js} +1 -1
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.fc3c5730.js +1 -0
- package/__mf/js/{main.02b2cf43.js → main.9866e9bf.js} +1 -1
- package/lib/cjs/components/PromQLEditor.js +1 -1
- package/lib/cjs/components/TreeNode.js +1 -2
- package/lib/cjs/explore/PrometheusMetricsFinder/filter/FinderFilters.js +1 -1
- package/lib/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +2 -2
- package/lib/cjs/plugins/prometheus-time-series-query/get-time-series-data.js +8 -0
- package/lib/components/PromQLEditor.js +1 -1
- package/lib/components/PromQLEditor.js.map +1 -1
- package/lib/components/TreeNode.js +1 -2
- package/lib/components/TreeNode.js.map +1 -1
- package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js +1 -1
- package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js.map +1 -1
- package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +2 -2
- package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +1 -1
- package/lib/plugins/prometheus-time-series-query/get-time-series-data.d.ts.map +1 -1
- package/lib/plugins/prometheus-time-series-query/get-time-series-data.js +8 -0
- package/lib/plugins/prometheus-time-series-query/get-time-series-data.js.map +1 -1
- package/lib/plugins/prometheus-time-series-query/query-editor-model.d.ts +1 -1
- package/lib/plugins/prometheus-time-series-query/query-editor-model.d.ts.map +1 -1
- package/lib/plugins/prometheus-time-series-query/query-editor-model.js.map +1 -1
- package/mf-manifest.json +28 -28
- package/mf-stats.json +31 -31
- package/package.json +1 -1
- package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.b4228802.js +0 -1
package/mf-stats.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "Prometheus",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.
|
|
8
|
+
"buildVersion": "0.52.0",
|
|
9
9
|
"buildName": "@perses-dev/prometheus-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/Prometheus.
|
|
12
|
+
"name": "__mf/js/Prometheus.c57c8a9f.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"__mf/js/async/738.aca54e25.js",
|
|
170
170
|
"__mf/js/async/3980.7cea5715.js",
|
|
171
171
|
"__mf/js/async/6377.ca974d89.js",
|
|
172
|
-
"__mf/js/async/5503.
|
|
172
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
173
173
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
174
174
|
"__mf/js/async/4421.42e889f6.js",
|
|
175
175
|
"__mf/js/async/4062.3ab7f987.js",
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
"__mf/js/async/738.aca54e25.js",
|
|
232
232
|
"__mf/js/async/3980.7cea5715.js",
|
|
233
233
|
"__mf/js/async/6377.ca974d89.js",
|
|
234
|
-
"__mf/js/async/5503.
|
|
234
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
235
235
|
"__mf/js/async/4062.3ab7f987.js",
|
|
236
236
|
"__mf/js/async/5913.4e5abd09.js",
|
|
237
237
|
"__mf/js/async/2285.15378f70.js",
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
"__mf/js/async/738.aca54e25.js",
|
|
285
285
|
"__mf/js/async/3980.7cea5715.js",
|
|
286
286
|
"__mf/js/async/6377.ca974d89.js",
|
|
287
|
-
"__mf/js/async/5503.
|
|
287
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
288
288
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
289
289
|
"__mf/js/async/4421.42e889f6.js",
|
|
290
290
|
"__mf/js/async/4062.3ab7f987.js",
|
|
@@ -306,12 +306,12 @@
|
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
"usedIn": [
|
|
309
|
-
"./
|
|
309
|
+
"./PrometheusTimeSeriesQuery",
|
|
310
310
|
"./PrometheusExplorer",
|
|
311
311
|
"./PrometheusLabelNamesVariable",
|
|
312
|
+
"./PrometheusLabelValuesVariable",
|
|
312
313
|
"./PrometheusPromQLVariable",
|
|
313
|
-
"./PrometheusDatasource"
|
|
314
|
-
"./PrometheusTimeSeriesQuery"
|
|
314
|
+
"./PrometheusDatasource"
|
|
315
315
|
]
|
|
316
316
|
},
|
|
317
317
|
{
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
"js": {
|
|
377
377
|
"async": [],
|
|
378
378
|
"sync": [
|
|
379
|
-
"__mf/js/async/5503.
|
|
379
|
+
"__mf/js/async/5503.daedd4dd.js"
|
|
380
380
|
]
|
|
381
381
|
},
|
|
382
382
|
"css": {
|
|
@@ -569,8 +569,8 @@
|
|
|
569
569
|
"__mf/js/async/2675.99cf926f.js",
|
|
570
570
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
571
571
|
"__mf/js/async/537.6911ea2e.js",
|
|
572
|
-
"__mf/js/async/5345.
|
|
573
|
-
"__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.
|
|
572
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
573
|
+
"__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.fc3c5730.js",
|
|
574
574
|
"__mf/js/async/7272.a763aa92.js",
|
|
575
575
|
"__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.a4085adb.js",
|
|
576
576
|
"__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.8551745e.js",
|
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
"__mf/js/async/7376.c7eb05b9.js",
|
|
580
580
|
"__mf/js/async/9550.e19763f8.js",
|
|
581
581
|
"__mf/js/async/3818.dde21d04.js",
|
|
582
|
-
"__mf/js/async/__federation_expose_PrometheusExplorer.
|
|
582
|
+
"__mf/js/async/__federation_expose_PrometheusExplorer.171d04eb.js",
|
|
583
583
|
"__mf/js/async/3871.6915e369.js",
|
|
584
584
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
585
585
|
"__mf/js/async/528.d364bb0e.js",
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
"__mf/js/async/738.aca54e25.js",
|
|
592
592
|
"__mf/js/async/3980.7cea5715.js",
|
|
593
593
|
"__mf/js/async/6377.ca974d89.js",
|
|
594
|
-
"__mf/js/async/5503.
|
|
594
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
595
595
|
"__mf/js/async/4421.42e889f6.js",
|
|
596
596
|
"__mf/js/async/4062.3ab7f987.js",
|
|
597
597
|
"__mf/js/async/212.bd5d617a.js",
|
|
@@ -631,8 +631,8 @@
|
|
|
631
631
|
"__mf/js/async/2675.99cf926f.js",
|
|
632
632
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
633
633
|
"__mf/js/async/537.6911ea2e.js",
|
|
634
|
-
"__mf/js/async/5345.
|
|
635
|
-
"__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.
|
|
634
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
635
|
+
"__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.fc3c5730.js"
|
|
636
636
|
],
|
|
637
637
|
"async": [
|
|
638
638
|
"__mf/js/async/1964.95da06f6.js",
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
"__mf/js/async/2675.99cf926f.js",
|
|
653
653
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
654
654
|
"__mf/js/async/537.6911ea2e.js",
|
|
655
|
-
"__mf/js/async/5345.
|
|
655
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
656
656
|
"__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.a4085adb.js",
|
|
657
657
|
"__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.8551745e.js",
|
|
658
658
|
"__mf/js/async/__federation_expose_PrometheusPromQLVariable.46f99477.js",
|
|
@@ -660,7 +660,7 @@
|
|
|
660
660
|
"__mf/js/async/7376.c7eb05b9.js",
|
|
661
661
|
"__mf/js/async/9550.e19763f8.js",
|
|
662
662
|
"__mf/js/async/3818.dde21d04.js",
|
|
663
|
-
"__mf/js/async/__federation_expose_PrometheusExplorer.
|
|
663
|
+
"__mf/js/async/__federation_expose_PrometheusExplorer.171d04eb.js",
|
|
664
664
|
"__mf/js/async/3871.6915e369.js",
|
|
665
665
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
666
666
|
"__mf/js/async/528.d364bb0e.js",
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
"__mf/js/async/6292.7b8efa78.js",
|
|
672
672
|
"__mf/js/async/738.aca54e25.js",
|
|
673
673
|
"__mf/js/async/6377.ca974d89.js",
|
|
674
|
-
"__mf/js/async/5503.
|
|
674
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
675
675
|
"__mf/js/async/4421.42e889f6.js",
|
|
676
676
|
"__mf/js/async/4062.3ab7f987.js",
|
|
677
677
|
"__mf/js/async/212.bd5d617a.js",
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
"__mf/js/async/2675.99cf926f.js",
|
|
711
711
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
712
712
|
"__mf/js/async/537.6911ea2e.js",
|
|
713
|
-
"__mf/js/async/5345.
|
|
713
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
714
714
|
"__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.a4085adb.js"
|
|
715
715
|
],
|
|
716
716
|
"async": [
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
"__mf/js/async/7376.c7eb05b9.js",
|
|
733
733
|
"__mf/js/async/9550.e19763f8.js",
|
|
734
734
|
"__mf/js/async/3818.dde21d04.js",
|
|
735
|
-
"__mf/js/async/__federation_expose_PrometheusExplorer.
|
|
735
|
+
"__mf/js/async/__federation_expose_PrometheusExplorer.171d04eb.js",
|
|
736
736
|
"__mf/js/async/3871.6915e369.js",
|
|
737
737
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
738
738
|
"__mf/js/async/528.d364bb0e.js",
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
"__mf/js/async/6292.7b8efa78.js",
|
|
744
744
|
"__mf/js/async/738.aca54e25.js",
|
|
745
745
|
"__mf/js/async/6377.ca974d89.js",
|
|
746
|
-
"__mf/js/async/5503.
|
|
746
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
747
747
|
"__mf/js/async/4421.42e889f6.js",
|
|
748
748
|
"__mf/js/async/4062.3ab7f987.js",
|
|
749
749
|
"__mf/js/async/212.bd5d617a.js",
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
"__mf/js/async/2675.99cf926f.js",
|
|
783
783
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
784
784
|
"__mf/js/async/537.6911ea2e.js",
|
|
785
|
-
"__mf/js/async/5345.
|
|
785
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
786
786
|
"__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.8551745e.js"
|
|
787
787
|
],
|
|
788
788
|
"async": [
|
|
@@ -804,7 +804,7 @@
|
|
|
804
804
|
"__mf/js/async/7376.c7eb05b9.js",
|
|
805
805
|
"__mf/js/async/9550.e19763f8.js",
|
|
806
806
|
"__mf/js/async/3818.dde21d04.js",
|
|
807
|
-
"__mf/js/async/__federation_expose_PrometheusExplorer.
|
|
807
|
+
"__mf/js/async/__federation_expose_PrometheusExplorer.171d04eb.js",
|
|
808
808
|
"__mf/js/async/3871.6915e369.js",
|
|
809
809
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
810
810
|
"__mf/js/async/528.d364bb0e.js",
|
|
@@ -815,7 +815,7 @@
|
|
|
815
815
|
"__mf/js/async/6292.7b8efa78.js",
|
|
816
816
|
"__mf/js/async/738.aca54e25.js",
|
|
817
817
|
"__mf/js/async/6377.ca974d89.js",
|
|
818
|
-
"__mf/js/async/5503.
|
|
818
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
819
819
|
"__mf/js/async/4421.42e889f6.js",
|
|
820
820
|
"__mf/js/async/4062.3ab7f987.js",
|
|
821
821
|
"__mf/js/async/212.bd5d617a.js",
|
|
@@ -854,7 +854,7 @@
|
|
|
854
854
|
"__mf/js/async/2675.99cf926f.js",
|
|
855
855
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
856
856
|
"__mf/js/async/537.6911ea2e.js",
|
|
857
|
-
"__mf/js/async/5345.
|
|
857
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
858
858
|
"__mf/js/async/__federation_expose_PrometheusPromQLVariable.46f99477.js"
|
|
859
859
|
],
|
|
860
860
|
"async": [
|
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
"__mf/js/async/7376.c7eb05b9.js",
|
|
877
877
|
"__mf/js/async/9550.e19763f8.js",
|
|
878
878
|
"__mf/js/async/3818.dde21d04.js",
|
|
879
|
-
"__mf/js/async/__federation_expose_PrometheusExplorer.
|
|
879
|
+
"__mf/js/async/__federation_expose_PrometheusExplorer.171d04eb.js",
|
|
880
880
|
"__mf/js/async/3871.6915e369.js",
|
|
881
881
|
"__mf/js/async/1465.3b5e12d5.js",
|
|
882
882
|
"__mf/js/async/528.d364bb0e.js",
|
|
@@ -887,7 +887,7 @@
|
|
|
887
887
|
"__mf/js/async/6292.7b8efa78.js",
|
|
888
888
|
"__mf/js/async/738.aca54e25.js",
|
|
889
889
|
"__mf/js/async/6377.ca974d89.js",
|
|
890
|
-
"__mf/js/async/5503.
|
|
890
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
891
891
|
"__mf/js/async/4421.42e889f6.js",
|
|
892
892
|
"__mf/js/async/4062.3ab7f987.js",
|
|
893
893
|
"__mf/js/async/212.bd5d617a.js",
|
|
@@ -933,7 +933,7 @@
|
|
|
933
933
|
"__mf/js/async/7376.c7eb05b9.js",
|
|
934
934
|
"__mf/js/async/9550.e19763f8.js",
|
|
935
935
|
"__mf/js/async/3818.dde21d04.js",
|
|
936
|
-
"__mf/js/async/__federation_expose_PrometheusExplorer.
|
|
936
|
+
"__mf/js/async/__federation_expose_PrometheusExplorer.171d04eb.js"
|
|
937
937
|
],
|
|
938
938
|
"async": [
|
|
939
939
|
"__mf/js/async/1964.95da06f6.js",
|
|
@@ -955,8 +955,8 @@
|
|
|
955
955
|
"__mf/js/async/2675.99cf926f.js",
|
|
956
956
|
"__mf/js/async/5724.6ee6ec51.js",
|
|
957
957
|
"__mf/js/async/537.6911ea2e.js",
|
|
958
|
-
"__mf/js/async/5345.
|
|
959
|
-
"__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.
|
|
958
|
+
"__mf/js/async/5345.1f4fc17b.js",
|
|
959
|
+
"__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.fc3c5730.js",
|
|
960
960
|
"__mf/js/async/7272.a763aa92.js",
|
|
961
961
|
"__mf/js/async/__federation_expose_PrometheusLabelValuesVariable.a4085adb.js",
|
|
962
962
|
"__mf/js/async/__federation_expose_PrometheusLabelNamesVariable.8551745e.js",
|
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
"__mf/js/async/6292.7b8efa78.js",
|
|
969
969
|
"__mf/js/async/6377.ca974d89.js",
|
|
970
970
|
"__mf/js/async/3090.9fb5fe73.js",
|
|
971
|
-
"__mf/js/async/5503.
|
|
971
|
+
"__mf/js/async/5503.daedd4dd.js",
|
|
972
972
|
"__mf/js/async/4323.4266fd6a.js",
|
|
973
973
|
"__mf/js/async/3057.e568f9b6.js",
|
|
974
974
|
"__mf/js/async/7740.0c5363fd.js",
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["9606"],{8702:function(e,t,a){a.r(t),a.d(t,{PrometheusTimeSeriesQuery:()=>y});var r=a(58891),s=a(29085),l=a(20461),n=a(87629);function u(e,t){let a=[];return Object.keys(e).sort().forEach(r=>{let s=e[r];void 0!==s&&(t?a.push(`"${r}":"${s}"`):a.push(`${r}="${s}"`))}),`{${a.join(",")}}`}function o(e,t,a){let r=function(e){let{removeExprWrap:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a="__name__";if(Object.prototype.hasOwnProperty.call(e,a)){let r=u({...e,[a]:void 0},t);return t?`${r}`:`${e[a]}${r}`}return u(e,t)}(t),s=a?a.replace(/\{\{\s*(.+?)\s*\}\}/g,(e,a)=>t[a]??""):r;return{name:r,formattedName:s}}var i=a(13690),c=a(6421);let d=async(e,t)=>{let a;if(void 0===e.query||null===e.query||""===e.query)return{series:[]};let u=await t.datasourceStore.listDatasourceSelectItems(n.nY),d=(0,r.datasourceSelectValueToSelector)(e.datasource??n.Mm,t.variableState,u)??n.Mm,m=await t.datasourceStore.getDatasource(d),p=Math.trunc((0,l.milliseconds)((0,s.Ib)(m.plugin.spec.scrapeInterval??i.v))/1e3),h=(0,n.k7)((0,r.replaceVariables)(e.minStep,t.variableState))??p,v=(0,n.Bf)(t.timeRange),g=(0,n.wd)(v,h,void 0,t.suggestedStepMs),{start:S,end:f}=v,b=60*new Date().getTimezoneOffset(),y=Math.floor((f+b)/g)*g-b;S=Math.floor((S+b)/g)*g-b,f=y;let w=(0,c.d)(e.query,1e3*h,1e3*g);w=(0,r.replaceVariables)(w,t.variableState);let q=e.seriesNameFormat;q&&(q=(0,r.replaceVariables)(q,t.variableState));let x=await t.datasourceStore.getDatasourceClient(d),C=(a="instant"===t.mode?await x.instantQuery({query:w,time:f}):await x.rangeQuery({query:w,start:S,end:f,step:g})).data,D=[];if("success"===a.status){let e=(a.warnings??[])[0]??"";""!==e&&D.push({type:"warning",message:e})}return{timeRange:{start:(0,l.fromUnixTime)(S),end:(0,l.fromUnixTime)(f)},stepMs:1e3*g,series:function(e,t,a){if(!t)return[];let r=t.resultType;switch(r){case"vector":return t.result.map(t=>{let{metric:r,value:s,histogram:l}=t,{name:u,formattedName:i}=o(e,r,a);return l?{name:u,formattedName:i,labels:r,values:[(0,n.qJ)([l[0],l[1].sum])],histograms:[l]}:{name:u,formattedName:i,labels:r,values:[(0,n.qJ)(s)]}});case"matrix":return t.result.map(t=>{let{metric:r,values:s,histograms:l}=t,{name:u,formattedName:i}=o(e,r,a);return l?{name:u,formattedName:i,labels:r,values:l.map(e=>(0,n.qJ)([e[0],e[1].sum])),histograms:l.map(e=>e)}:{name:u,formattedName:i,labels:r,values:s.map(n.qJ)}});case"scalar":return function(e,t,a){let{name:r,formattedName:s}=o(e,{},a);return[{name:r,values:[(0,n.qJ)(t.result)],formattedName:s}]}(e,t,a);default:return console.warn("Unknown result type",r,t),[]}}(w,C,q),metadata:{notices:D,executedQueryString:w}}};var m=a(24246),p=a(75586),h=a(72629),v=a(25283),g=a(90192),S=a(8695),f=a(82901),b=a(54538);let y={getTimeSeriesData:d,OptionsEditorComponent:function(e){let{onChange:t,value:a}=e,{datasource:s}=a,l=s??n.Mm,u=(0,h.useId)("prom-datasource-label"),o=(0,r.useDatasourceSelectValueToSelector)(l,n.nY),{data:c}=(0,r.useDatasourceClient)(o),d=null==c?void 0:c.options.datasourceUrl,{data:y}=(0,r.useDatasource)(o),{handleQueryChange:w,handleQueryBlur:q}=function(e){let{onChange:t,value:a}=e,[r,s]=(0,b.useState)(a.query),[l,n]=(0,b.useState)(a.query);return a.query!==l&&(s(a.query),n(a.query)),{query:r,handleQueryChange:e=>{s(e)},handleQueryBlur:()=>{n(r),t((0,p.Uy)(a,e=>{e.query=r}))}}}(e),{format:x,handleFormatChange:C,handleFormatBlur:D}=function(e){let{onChange:t,value:a}=e,[r,s]=(0,b.useState)(a.seriesNameFormat),[l,n]=(0,b.useState)(a.seriesNameFormat);return a.seriesNameFormat!==l&&(s(a.seriesNameFormat),n(a.seriesNameFormat)),{format:r,handleFormatChange:e=>{s(e)},handleFormatBlur:()=>{n(r),t((0,p.Uy)(a,e=>{e.seriesNameFormat=r}))}}}(e),{minStep:M,handleMinStepChange:T,handleMinStepBlur:j}=function(e){let{onChange:t,value:a}=e,[r,s]=(0,b.useState)(a.minStep),[l,n]=(0,b.useState)(a.minStep);return a.minStep!==l&&(s(a.minStep),n(a.minStep)),{minStep:r,handleMinStepChange:e=>{s(e)},handleMinStepBlur:()=>{n(r),t((0,p.Uy)(a,e=>{e.minStep=r}))}}}(e),F=M??(y&&(null==y?void 0:y.plugin.spec).scrapeInterval)??i.v;return(0,m.jsxs)(v.Z,{spacing:2,children:[(0,m.jsx)(g.Z,{margin:"dense",fullWidth:!1,children:(0,m.jsx)(r.DatasourceSelect,{datasourcePluginKind:n.nY,value:l,onChange:e=>{if((0,n.sv)(e)){t((0,p.Uy)(a,t=>{let a=(0,n.Rv)(e)?void 0:e;t.datasource=a}));return}throw Error("Got unexpected non-Prometheus datasource selector")},labelId:u,label:"Prometheus Datasource",notched:!0})}),(0,m.jsx)(f.P,{completeConfig:{remote:{url:d}},value:a.query,datasource:o,onChange:w,onBlur:q}),(0,m.jsxs)(v.Z,{direction:"row",spacing:2,children:[(0,m.jsx)(S.Z,{fullWidth:!0,label:"Legend",placeholder:"Example: '{{instance}}' will generate series names like 'webserver-123', 'webserver-456'...",helperText:"Text to be displayed in the legend and the tooltip. Use {{label_name}} to interpolate label values.",value:x??"",onChange:e=>C(e.target.value),onBlur:D}),(0,m.jsx)(S.Z,{label:"Min Step",placeholder:F,helperText:"Lower bound for the step. If not provided, the scrape interval of the datasource is used.",value:M,onChange:e=>T(e.target.value),onBlur:j,sx:{width:"250px"}})]})]})},createInitialOptions:()=>({query:"",datasource:void 0}),dependsOn:e=>{let t=(0,r.parseVariables)(e.query);return{variables:[...new Set([...t,...(0,r.parseVariables)(e.seriesNameFormat||""),...(0,r.isVariableDatasource)(e.datasource)?(0,r.parseVariables)(e.datasource??""):[]])]}}}},13690:function(e,t,a){a.d(t,{v:()=>r});let r="1m"}}]);
|