@perses-dev/gauge-chart-plugin 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/GaugeChart.64278e7a.js +6 -0
- package/__mf/js/async/{964.eba21d42.js → 121.0385c285.js} +2 -2
- package/__mf/js/async/127.5ef482f0.js +29 -0
- package/__mf/js/async/{488.d3de7c62.js → 177.4d5022bb.js} +1 -1
- package/__mf/js/async/192.8bf7cec4.js +1 -0
- package/__mf/js/async/204.368d6115.js +10 -0
- package/__mf/js/async/235.675ef806.js +1 -0
- package/__mf/js/async/252.30692fba.js +22 -0
- package/__mf/js/async/274.07ee62ee.js +2 -0
- package/__mf/js/async/350.26d75fbf.js +1 -0
- package/__mf/js/async/356.a480b281.js +1 -0
- package/__mf/js/async/{930.1937c2c4.js → 377.9f5a442b.js} +1 -1
- package/__mf/js/async/392.f9d6a7ae.js +2 -0
- package/__mf/js/async/403.4dee4df3.js +2 -0
- package/__mf/js/async/410.3d37263a.js +1 -0
- package/__mf/js/async/{553.ac447ad8.js → 458.2a1e1dfe.js} +1 -1
- package/__mf/js/async/467.fcde6002.js +111 -0
- package/__mf/js/async/470.9855b786.js +2 -0
- package/__mf/js/async/{296.bdf413a6.js → 496.63537c05.js} +1 -1
- package/__mf/js/async/{214.a5a27e07.js → 587.e32d2906.js} +1 -1
- package/__mf/js/async/588.7dda8aa9.js +1 -0
- package/__mf/js/async/616.1b1bb2ba.js +1 -0
- package/__mf/js/async/71.773ab397.js +1 -0
- package/__mf/js/async/756.ae22d123.js +1 -0
- package/__mf/js/async/77.429aab8d.js +1 -0
- package/__mf/js/async/790.e67bc862.js +7 -0
- package/__mf/js/async/854.0822db86.js +1 -0
- package/__mf/js/async/873.b08548ee.js +1 -0
- package/__mf/js/async/941.9ebff559.js +2 -0
- package/__mf/js/async/963.c04e5fd0.js +1 -0
- package/__mf/js/async/{738.24d6cefe.js → 968.be22fbda.js} +1 -1
- package/__mf/js/async/978.26163709.js +1 -0
- package/__mf/js/async/__federation_expose_GaugeChart.54f4fa10.js +1 -0
- package/__mf/js/async/lib-router.c318fd9d.js +2 -0
- package/__mf/js/main.967c5d04.js +6 -0
- package/lib/GaugeChartBase.js +1 -1
- package/lib/GaugeChartBase.js.map +1 -1
- package/lib/GaugeChartOptionsEditorSettings.js +1 -1
- package/lib/GaugeChartOptionsEditorSettings.js.map +1 -1
- package/lib/GaugeChartPanel.js +1 -1
- package/lib/GaugeChartPanel.js.map +1 -1
- package/lib/bootstrap.js +1 -1
- package/lib/bootstrap.js.map +1 -1
- package/lib/cjs/GaugeChartPanel.js +3 -3
- package/lib/cjs/gauge-chart-model.js +5 -5
- package/lib/cjs/index-federation.js +12 -12
- package/lib/cjs/thresholds.js +3 -3
- package/mf-manifest.json +39 -39
- package/mf-stats.json +39 -39
- package/package.json +4 -4
- package/__mf/js/GaugeChart.83b324ad.js +0 -5
- package/__mf/js/async/173.9d9aaec5.js +0 -2
- package/__mf/js/async/177.651d64b7.js +0 -111
- package/__mf/js/async/224.b7775059.js +0 -1
- package/__mf/js/async/238.d2cb634f.js +0 -1
- package/__mf/js/async/292.0f2f97fb.js +0 -29
- package/__mf/js/async/301.7224e983.js +0 -1
- package/__mf/js/async/409.b3df73a9.js +0 -1
- package/__mf/js/async/413.1b99956f.js +0 -2
- package/__mf/js/async/422.088d32ca.js +0 -1
- package/__mf/js/async/623.7ff5fe72.js +0 -1
- package/__mf/js/async/656.e85be6c5.js +0 -1
- package/__mf/js/async/694.dd75606a.js +0 -1
- package/__mf/js/async/711.9605ad11.js +0 -22
- package/__mf/js/async/740.8d6cccb6.js +0 -1
- package/__mf/js/async/75.9648e446.js +0 -1
- package/__mf/js/async/770.ac5776da.js +0 -1
- package/__mf/js/async/774.fffc4f90.js +0 -1
- package/__mf/js/async/790.1575a3f0.js +0 -1
- package/__mf/js/async/85.9f00bd55.js +0 -7
- package/__mf/js/async/863.a5e334d8.js +0 -2
- package/__mf/js/async/929.904de1f6.js +0 -10
- package/__mf/js/async/960.f1e14dae.js +0 -2
- package/__mf/js/async/981.55bd66db.js +0 -2
- package/__mf/js/async/999.2b4fe1ef.js +0 -1
- package/__mf/js/async/__federation_expose_GaugeChart.0894679a.js +0 -1
- package/__mf/js/async/lib-router.34d74652.js +0 -2
- package/__mf/js/main.674f4b65.js +0 -5
- /package/__mf/css/async/{263.d3010b86.css → 442.d3010b86.css} +0 -0
- /package/__mf/css/async/{341.d3010b86.css → 61.d3010b86.css} +0 -0
- /package/__mf/css/async/{759.d3010b86.css → 823.d3010b86.css} +0 -0
- /package/__mf/js/async/{964.eba21d42.js.LICENSE.txt → 121.0385c285.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{929.904de1f6.js.LICENSE.txt → 204.368d6115.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{711.9605ad11.js.LICENSE.txt → 252.30692fba.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{960.f1e14dae.js.LICENSE.txt → 274.07ee62ee.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{981.55bd66db.js.LICENSE.txt → 392.f9d6a7ae.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{413.1b99956f.js.LICENSE.txt → 403.4dee4df3.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{177.651d64b7.js.LICENSE.txt → 467.fcde6002.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{173.9d9aaec5.js.LICENSE.txt → 470.9855b786.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{85.9f00bd55.js.LICENSE.txt → 790.e67bc862.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{863.a5e334d8.js.LICENSE.txt → 941.9ebff559.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.34d74652.js.LICENSE.txt → lib-router.c318fd9d.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/GaugeChartBase.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 { EChart, useChartsTheme, useDeepMemo } from '@perses-dev/components';\nimport { formatValue, FormatOptions } from '@perses-dev/core';\nimport { use, EChartsCoreOption } from 'echarts/core';\nimport { GaugeChart as EChartsGaugeChart, GaugeSeriesOption } from 'echarts/charts';\nimport { GridComponent, TitleComponent, TooltipComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { ReactElement } from 'react';\n\nuse([EChartsGaugeChart, GridComponent, TitleComponent, TooltipComponent, CanvasRenderer]);\n\n// adjusts when to show pointer icon\nconst GAUGE_SMALL_BREAKPOINT = 170;\n\nexport type GaugeChartValue = number | null | undefined;\n\nexport type GaugeSeries = {\n value: GaugeChartValue;\n label: string;\n};\n\nexport interface GaugeChartBaseProps {\n width: number;\n height: number;\n data: GaugeSeries;\n format: FormatOptions;\n axisLine: GaugeSeriesOption['axisLine'];\n max?: number;\n valueFontSize: string;\n progressWidth: number;\n titleFontSize: number;\n}\n\nexport function GaugeChartBase(props: GaugeChartBaseProps): ReactElement {\n const { width, height, data, format, axisLine, max, valueFontSize, progressWidth, titleFontSize } = props;\n const chartsTheme = useChartsTheme();\n\n // useDeepMemo ensures value size util does not rerun everytime you hover on the chart\n const option: EChartsCoreOption = useDeepMemo(() => {\n if (data.value === undefined) return chartsTheme.noDataOption;\n\n // Base configuration shared by both series (= progress & scale)\n const baseGaugeConfig = {\n type: 'gauge' as const,\n center: ['50%', '65%'] as [string, string],\n startAngle: 200,\n endAngle: -20,\n min: 0,\n max: max,\n axisTick: {\n show: false,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n show: false,\n },\n data: [\n {\n value: data.value,\n },\n ],\n };\n\n return {\n title: {\n show: false,\n },\n tooltip: {\n show: false,\n },\n series: [\n // Inner gauge (progress)\n {\n ...baseGaugeConfig,\n radius: '90%',\n silent: true,\n progress: {\n show: true,\n width: progressWidth,\n itemStyle: {\n color: 'auto',\n },\n },\n axisLine: {\n lineStyle: {\n color: [[1, 'rgba(127,127,127,0.35)']], // TODO (sjcobb): use future chart theme colors\n width: progressWidth,\n },\n },\n pointer: {\n show: false,\n },\n anchor: {\n show: false,\n },\n title: {\n show: false,\n },\n detail: {\n show: false,\n },\n },\n // Outer gauge (scale & display)\n {\n ...baseGaugeConfig,\n radius: '100%',\n pointer: {\n show: true,\n // pointer hidden for small panels, path taken from ex: https://echarts.apache.org/examples/en/editor.html?c=gauge-grade\n icon: width > GAUGE_SMALL_BREAKPOINT ? 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z' : 'none',\n length: 10,\n width: 5,\n offsetCenter: [0, '-49%'],\n itemStyle: {\n color: 'auto',\n },\n },\n axisLine: axisLine,\n // `detail` is the text displayed in the middle\n detail: {\n show: true,\n width: '60%',\n borderRadius: 8,\n offsetCenter: [0, '-9%'],\n color: 'inherit', // allows value color to match active threshold color\n fontSize: valueFontSize,\n formatter:\n data.value === null\n ? // We use a different function when we *know* the value is null\n // at this level because the `formatter` function argument is `NaN`\n // when the value is `null`, making it difficult to differentiate\n // `null` from a true `NaN` case.\n (): string => 'null'\n : (value: number): string | undefined => {\n return formatValue(value, format);\n },\n },\n data: [\n {\n value: data.value,\n name: data.label,\n // TODO: new UX for series names, create separate React component or reuse ListLegendItem\n // https://echarts.apache.org/en/option.html#series-gauge.data.title\n title: {\n show: true,\n color: chartsTheme.echartsTheme.textStyle?.color ?? 'inherit', // series name font color\n offsetCenter: [0, '55%'],\n overflow: 'truncate',\n fontSize: titleFontSize,\n width: width * 0.8,\n },\n },\n ],\n },\n ],\n };\n }, [data, width, height, chartsTheme, format, axisLine, max, valueFontSize, progressWidth, titleFontSize]);\n\n return (\n <EChart\n style={{\n width: width,\n height: height,\n }}\n sx={{\n padding: `${chartsTheme.container.padding.default}px`,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n );\n}\n"],"names":["EChart","useChartsTheme","useDeepMemo","formatValue","use","GaugeChart","EChartsGaugeChart","GridComponent","TitleComponent","TooltipComponent","CanvasRenderer","GAUGE_SMALL_BREAKPOINT","GaugeChartBase","props","width","height","data","format","axisLine","max","valueFontSize","progressWidth","titleFontSize","chartsTheme","option","value","undefined","noDataOption","baseGaugeConfig","type","center","startAngle","endAngle","min","axisTick","show","splitLine","axisLabel","title","tooltip","series","radius","silent","progress","itemStyle","color","lineStyle","pointer","anchor","detail","icon","length","offsetCenter","borderRadius","fontSize","formatter","name","label","echartsTheme","textStyle","overflow","style","sx","padding","container","default","theme"],"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
|
|
1
|
+
{"version":3,"sources":["../../src/GaugeChartBase.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 { EChart, useChartsTheme, useDeepMemo } from '@perses-dev/components';\nimport { formatValue, FormatOptions } from '@perses-dev/core';\nimport { use, EChartsCoreOption } from 'echarts/core';\nimport { GaugeChart as EChartsGaugeChart, GaugeSeriesOption } from 'echarts/charts';\nimport { GridComponent, TitleComponent, TooltipComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { ReactElement } from 'react';\n\nuse([EChartsGaugeChart, GridComponent, TitleComponent, TooltipComponent, CanvasRenderer]);\n\n// adjusts when to show pointer icon\nconst GAUGE_SMALL_BREAKPOINT = 170;\n\nexport type GaugeChartValue = number | null | undefined;\n\nexport type GaugeSeries = {\n value: GaugeChartValue;\n label: string;\n};\n\nexport interface GaugeChartBaseProps {\n width: number;\n height: number;\n data: GaugeSeries;\n format: FormatOptions;\n axisLine: GaugeSeriesOption['axisLine'];\n max?: number;\n valueFontSize: string;\n progressWidth: number;\n titleFontSize: number;\n}\n\nexport function GaugeChartBase(props: GaugeChartBaseProps): ReactElement {\n const { width, height, data, format, axisLine, max, valueFontSize, progressWidth, titleFontSize } = props;\n const chartsTheme = useChartsTheme();\n\n // useDeepMemo ensures value size util does not rerun everytime you hover on the chart\n const option: EChartsCoreOption = useDeepMemo(() => {\n if (data.value === undefined) return chartsTheme.noDataOption;\n\n // Base configuration shared by both series (= progress & scale)\n const baseGaugeConfig = {\n type: 'gauge' as const,\n center: ['50%', '65%'] as [string, string],\n startAngle: 200,\n endAngle: -20,\n min: 0,\n max: max,\n axisTick: {\n show: false,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n show: false,\n },\n data: [\n {\n value: data.value,\n },\n ],\n };\n\n return {\n title: {\n show: false,\n },\n tooltip: {\n show: false,\n },\n series: [\n // Inner gauge (progress)\n {\n ...baseGaugeConfig,\n radius: '90%',\n silent: true,\n progress: {\n show: true,\n width: progressWidth,\n itemStyle: {\n color: 'auto',\n },\n },\n axisLine: {\n lineStyle: {\n color: [[1, 'rgba(127,127,127,0.35)']], // TODO (sjcobb): use future chart theme colors\n width: progressWidth,\n },\n },\n pointer: {\n show: false,\n },\n anchor: {\n show: false,\n },\n title: {\n show: false,\n },\n detail: {\n show: false,\n },\n },\n // Outer gauge (scale & display)\n {\n ...baseGaugeConfig,\n radius: '100%',\n pointer: {\n show: true,\n // pointer hidden for small panels, path taken from ex: https://echarts.apache.org/examples/en/editor.html?c=gauge-grade\n icon: width > GAUGE_SMALL_BREAKPOINT ? 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z' : 'none',\n length: 10,\n width: 5,\n offsetCenter: [0, '-49%'],\n itemStyle: {\n color: 'auto',\n },\n },\n axisLine: axisLine,\n // `detail` is the text displayed in the middle\n detail: {\n show: true,\n width: '60%',\n borderRadius: 8,\n offsetCenter: [0, '-9%'],\n color: 'inherit', // allows value color to match active threshold color\n fontSize: valueFontSize,\n formatter:\n data.value === null\n ? // We use a different function when we *know* the value is null\n // at this level because the `formatter` function argument is `NaN`\n // when the value is `null`, making it difficult to differentiate\n // `null` from a true `NaN` case.\n (): string => 'null'\n : (value: number): string | undefined => {\n return formatValue(value, format);\n },\n },\n data: [\n {\n value: data.value,\n name: data.label,\n // TODO: new UX for series names, create separate React component or reuse ListLegendItem\n // https://echarts.apache.org/en/option.html#series-gauge.data.title\n title: {\n show: true,\n color: chartsTheme.echartsTheme.textStyle?.color ?? 'inherit', // series name font color\n offsetCenter: [0, '55%'],\n overflow: 'truncate',\n fontSize: titleFontSize,\n width: width * 0.8,\n },\n },\n ],\n },\n ],\n };\n }, [data, width, height, chartsTheme, format, axisLine, max, valueFontSize, progressWidth, titleFontSize]);\n\n return (\n <EChart\n style={{\n width: width,\n height: height,\n }}\n sx={{\n padding: `${chartsTheme.container.padding.default}px`,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n );\n}\n"],"names":["EChart","useChartsTheme","useDeepMemo","formatValue","use","GaugeChart","EChartsGaugeChart","GridComponent","TitleComponent","TooltipComponent","CanvasRenderer","GAUGE_SMALL_BREAKPOINT","GaugeChartBase","props","width","height","data","format","axisLine","max","valueFontSize","progressWidth","titleFontSize","chartsTheme","option","value","undefined","noDataOption","baseGaugeConfig","type","center","startAngle","endAngle","min","axisTick","show","splitLine","axisLabel","title","tooltip","series","radius","silent","progress","itemStyle","color","lineStyle","pointer","anchor","detail","icon","length","offsetCenter","borderRadius","fontSize","formatter","name","label","echartsTheme","textStyle","overflow","style","sx","padding","container","default","theme"],"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,SAASA,MAAM,EAAEC,cAAc,EAAEC,WAAW,QAAQ,yBAAyB;AAC7E,SAASC,WAAW,QAAuB,mBAAmB;AAC9D,SAASC,GAAG,QAA2B,eAAe;AACtD,SAASC,cAAcC,iBAAiB,QAA2B,iBAAiB;AACpF,SAASC,aAAa,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,qBAAqB;AACrF,SAASC,cAAc,QAAQ,oBAAoB;AAGnDN,IAAI;IAACE;IAAmBC;IAAeC;IAAgBC;IAAkBC;CAAe;AAExF,oCAAoC;AACpC,MAAMC,yBAAyB;AAqB/B,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,aAAa,EAAEC,aAAa,EAAEC,aAAa,EAAE,GAAGT;IACpG,MAAMU,cAActB;IAEpB,sFAAsF;IACtF,MAAMuB,SAA4BtB,YAAY;QAC5C,IAAIc,KAAKS,KAAK,KAAKC,WAAW,OAAOH,YAAYI,YAAY;QAE7D,gEAAgE;QAChE,MAAMC,kBAAkB;YACtBC,MAAM;YACNC,QAAQ;gBAAC;gBAAO;aAAM;YACtBC,YAAY;YACZC,UAAU,CAAC;YACXC,KAAK;YACLd,KAAKA;YACLe,UAAU;gBACRC,MAAM;YACR;YACAC,WAAW;gBACTD,MAAM;YACR;YACAE,WAAW;gBACTF,MAAM;YACR;YACAnB,MAAM;gBACJ;oBACES,OAAOT,KAAKS,KAAK;gBACnB;aACD;QACH;QAEA,OA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DO,cAAc;oCAAC;oCAAG;iCAAM;gCACxBQ,UAAU;gCACVN,UAAUhC;gCACVR,OAAOA,QAAQ;4BACjB;wBACF;qBACD;gBACH;aACD;QACH;IACF,GAAG;QAACE;QAAMF;QAAOC;QAAQQ;QAAaN;QAAQC;QAAUC;QAAKC;QAAeC;QAAeC;KAAc;IAEzG,qBACE,KAACtB;QACC6D,OAAO;YACL/C,OAAOA;YACPC,QAAQA;QACV;QACA+C,IAAI;YACFC,SAAS,GAAGxC,YAAYyC,SAAS,CAACD,OAAO,CAACE,OAAO,CAAC,EAAE,CAAC;QACvD;QACAzC,QAAQA;QACR0C,OAAO3C,YAAYmC,YAAY;;AAGrC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
// Copyright 2023 The Perses Authors
|
|
2
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -10,7 +11,6 @@
|
|
|
10
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
12
|
// See the License for the specific language governing permissions and
|
|
12
13
|
// limitations under the License.
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { Switch, TextField } from '@mui/material';
|
|
15
15
|
import { FormatControls, OptionsEditorColumn, OptionsEditorControl, OptionsEditorGrid, OptionsEditorGroup, ThresholdsEditor } from '@perses-dev/components';
|
|
16
16
|
import { CalculationSelector } from '@perses-dev/plugin-system';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/GaugeChartOptionsEditorSettings.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 { Switch, TextField } from '@mui/material';\nimport {\n FormatControls,\n FormatControlsProps,\n OptionsEditorColumn,\n OptionsEditorControl,\n OptionsEditorGrid,\n OptionsEditorGroup,\n ThresholdsEditor,\n} from '@perses-dev/components';\nimport { ThresholdOptions } from '@perses-dev/core';\nimport { CalculationSelector, CalculationSelectorProps } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport merge from 'lodash/merge';\nimport { ReactElement } from 'react';\nimport {\n DEFAULT_FORMAT,\n DEFAULT_MAX_PERCENT,\n DEFAULT_MAX_PERCENT_DECIMAL,\n GaugeChartOptions,\n GaugeChartOptionsEditorProps,\n} from './gauge-chart-model';\n\nexport function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorProps): ReactElement {\n const { onChange, value } = props;\n /* If legend setting doesn't exist (because it is optional), the legend should show by default \n This is for the records before the legend option was added\n */\n const showLegend = value?.legend?.show ?? true;\n\n const handleCalculationChange: CalculationSelectorProps['onChange'] = (newCalculation) => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.calculation = newCalculation;\n })\n );\n };\n\n const handleUnitChange: FormatControlsProps['onChange'] = (newFormat) => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.format = newFormat;\n })\n );\n };\n\n // ensures decimalPlaces defaults to correct value\n const format = merge({}, DEFAULT_FORMAT, value.format);\n\n // max only needs to be set explicitly for units other than percent and percent-decimal\n let maxPlaceholder = 'Enter value';\n if (format.unit === 'percent') {\n maxPlaceholder = DEFAULT_MAX_PERCENT.toString();\n } else if (format.unit === 'percent-decimal') {\n maxPlaceholder = DEFAULT_MAX_PERCENT_DECIMAL.toString();\n }\n\n const handleThresholdsChange = (thresholds: ThresholdOptions): void => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.thresholds = thresholds;\n })\n );\n };\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <OptionsEditorGroup title=\"Misc\">\n <FormatControls value={format} onChange={handleUnitChange} />\n <CalculationSelector value={value.calculation} onChange={handleCalculationChange} />\n <OptionsEditorControl\n label=\"Max\"\n control={\n <TextField\n type=\"number\"\n value={value.max ?? ''}\n onChange={(e) => {\n // ensure empty value resets to undef to allow chart to calculate max\n const newValue = e.target.value ? Number(e.target.value) : undefined;\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.max = newValue;\n })\n );\n }}\n placeholder={maxPlaceholder}\n />\n }\n />\n </OptionsEditorGroup>\n </OptionsEditorColumn>\n <OptionsEditorColumn>\n <ThresholdsEditor thresholds={value.thresholds} onChange={handleThresholdsChange} />\n <OptionsEditorControl\n label=\"Show legend\"\n control={\n <Switch\n onChange={(): void => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.legend = { ...draft.legend, show: !showLegend };\n })\n );\n }}\n checked={showLegend}\n />\n }\n />\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["Switch","TextField","FormatControls","OptionsEditorColumn","OptionsEditorControl","OptionsEditorGrid","OptionsEditorGroup","ThresholdsEditor","CalculationSelector","produce","merge","DEFAULT_FORMAT","DEFAULT_MAX_PERCENT","DEFAULT_MAX_PERCENT_DECIMAL","GaugeChartOptionsEditorSettings","props","onChange","value","showLegend","legend","show","handleCalculationChange","newCalculation","draft","calculation","handleUnitChange","newFormat","format","maxPlaceholder","unit","toString","handleThresholdsChange","thresholds","title","label","control","type","max","e","newValue","target","Number","undefined","placeholder","checked"],"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
|
|
1
|
+
{"version":3,"sources":["../../src/GaugeChartOptionsEditorSettings.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 { Switch, TextField } from '@mui/material';\nimport {\n FormatControls,\n FormatControlsProps,\n OptionsEditorColumn,\n OptionsEditorControl,\n OptionsEditorGrid,\n OptionsEditorGroup,\n ThresholdsEditor,\n} from '@perses-dev/components';\nimport { ThresholdOptions } from '@perses-dev/core';\nimport { CalculationSelector, CalculationSelectorProps } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport merge from 'lodash/merge';\nimport { ReactElement } from 'react';\nimport {\n DEFAULT_FORMAT,\n DEFAULT_MAX_PERCENT,\n DEFAULT_MAX_PERCENT_DECIMAL,\n GaugeChartOptions,\n GaugeChartOptionsEditorProps,\n} from './gauge-chart-model';\n\nexport function GaugeChartOptionsEditorSettings(props: GaugeChartOptionsEditorProps): ReactElement {\n const { onChange, value } = props;\n /* If legend setting doesn't exist (because it is optional), the legend should show by default \n This is for the records before the legend option was added\n */\n const showLegend = value?.legend?.show ?? true;\n\n const handleCalculationChange: CalculationSelectorProps['onChange'] = (newCalculation) => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.calculation = newCalculation;\n })\n );\n };\n\n const handleUnitChange: FormatControlsProps['onChange'] = (newFormat) => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.format = newFormat;\n })\n );\n };\n\n // ensures decimalPlaces defaults to correct value\n const format = merge({}, DEFAULT_FORMAT, value.format);\n\n // max only needs to be set explicitly for units other than percent and percent-decimal\n let maxPlaceholder = 'Enter value';\n if (format.unit === 'percent') {\n maxPlaceholder = DEFAULT_MAX_PERCENT.toString();\n } else if (format.unit === 'percent-decimal') {\n maxPlaceholder = DEFAULT_MAX_PERCENT_DECIMAL.toString();\n }\n\n const handleThresholdsChange = (thresholds: ThresholdOptions): void => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.thresholds = thresholds;\n })\n );\n };\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <OptionsEditorGroup title=\"Misc\">\n <FormatControls value={format} onChange={handleUnitChange} />\n <CalculationSelector value={value.calculation} onChange={handleCalculationChange} />\n <OptionsEditorControl\n label=\"Max\"\n control={\n <TextField\n type=\"number\"\n value={value.max ?? ''}\n onChange={(e) => {\n // ensure empty value resets to undef to allow chart to calculate max\n const newValue = e.target.value ? Number(e.target.value) : undefined;\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.max = newValue;\n })\n );\n }}\n placeholder={maxPlaceholder}\n />\n }\n />\n </OptionsEditorGroup>\n </OptionsEditorColumn>\n <OptionsEditorColumn>\n <ThresholdsEditor thresholds={value.thresholds} onChange={handleThresholdsChange} />\n <OptionsEditorControl\n label=\"Show legend\"\n control={\n <Switch\n onChange={(): void => {\n onChange(\n produce(value, (draft: GaugeChartOptions) => {\n draft.legend = { ...draft.legend, show: !showLegend };\n })\n );\n }}\n checked={showLegend}\n />\n }\n />\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["Switch","TextField","FormatControls","OptionsEditorColumn","OptionsEditorControl","OptionsEditorGrid","OptionsEditorGroup","ThresholdsEditor","CalculationSelector","produce","merge","DEFAULT_FORMAT","DEFAULT_MAX_PERCENT","DEFAULT_MAX_PERCENT_DECIMAL","GaugeChartOptionsEditorSettings","props","onChange","value","showLegend","legend","show","handleCalculationChange","newCalculation","draft","calculation","handleUnitChange","newFormat","format","maxPlaceholder","unit","toString","handleThresholdsChange","thresholds","title","label","control","type","max","e","newValue","target","Number","undefined","placeholder","checked"],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEA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BAAmB2B,OAAM;;sCACxB,KAAC/B;4BAAee,OAAOU;4BAAQX,UAAUS;;sCACzC,KAACjB;4BAAoBS,OAAOA,MAAMO,WAAW;4BAAER,UAAUK;;sCACzD,KAACjB;4BACC8B,OAAM;4BACNC,uBACE,KAAClC;gCACCmC,MAAK;gCACLnB,OAAOA,MAAMoB,GAAG,IAAI;gCACpBrB,UAAU,CAACsB;oCACT,qEAAqE;oCACrE,MAAMC,WAAWD,EAAEE,MAAM,CAACvB,KAAK,GAAGwB,OAAOH,EAAEE,MAAM,CAACvB,KAAK,IAAIyB;oCAC3D1B,SACEP,QAAQQ,OAAO,CAACM;wCACdA,MAAMc,GAAG,GAAGE;oCACd;gCAEJ;gCACAI,aAAaf;;;;;;0BAMvB,MAACzB;;kCACC,KAACI;wBAAiByB,YAAYf,MAAMe,UAAU;wBAAEhB,UAAUe;;kCAC1D,KAAC3B;wBACC8B,OAAM;wBACNC,uBACE,KAACnC;4BACCgB,UAAU;gCACRA,SACEP,QAAQQ,OAAO,CAACM;oCACdA,MAAMJ,MAAM,GAAG;wCAAE,GAAGI,MAAMJ,MAAM;wCAAEC,MAAM,CAACF;oCAAW;gCACtD;4BAEJ;4BACA0B,SAAS1B;;;;;;;AAOvB"}
|
package/lib/GaugeChartPanel.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// Copyright 2023 The Perses Authors
|
|
2
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -10,7 +11,6 @@
|
|
|
10
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
12
|
// See the License for the specific language governing permissions and
|
|
12
13
|
// limitations under the License.
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { Box, Skeleton, Stack } from '@mui/material';
|
|
15
15
|
import { useChartsTheme } from '@perses-dev/components';
|
|
16
16
|
import { CalculationsMap, DEFAULT_CALCULATION, formatValue } from '@perses-dev/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/GaugeChartPanel.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 { Box, Skeleton, Stack } from '@mui/material';\nimport { useChartsTheme } from '@perses-dev/components';\nimport { CalculationsMap, DEFAULT_CALCULATION, FormatOptions, formatValue, TimeSeriesData } from '@perses-dev/core';\nimport { PanelProps } from '@perses-dev/plugin-system';\nimport type { GaugeSeriesOption } from 'echarts';\nimport merge from 'lodash/merge';\nimport { ReactElement, useMemo } from 'react';\nimport {\n DEFAULT_FORMAT,\n DEFAULT_MAX_PERCENT,\n DEFAULT_MAX_PERCENT_DECIMAL,\n GaugeChartOptions,\n} from './gauge-chart-model';\nimport { convertThresholds, defaultThresholdInput } from './thresholds';\nimport { GaugeChartBase, GaugeSeries } from './GaugeChartBase';\n\nconst EMPTY_GAUGE_SERIES: GaugeSeries = { label: '', value: undefined };\nconst GAUGE_MIN_WIDTH = 90;\nconst PANEL_PADDING_OFFSET = 20;\n\n/**\n * Calculate responsive progress width based on panel dimensions\n */\nfunction getResponsiveProgressWidth(width: number, height: number): number {\n const MIN_WIDTH = 10;\n const MAX_WIDTH = 48;\n const RATIO = 0.1; // 10% of the smaller dimension\n\n const minSize = Math.min(width, height);\n // Use RATIO of the smaller dimension as base, with reasonable min/max bounds\n return Math.max(MIN_WIDTH, Math.min(MAX_WIDTH, Math.round(minSize * RATIO)));\n}\n\n/**\n * Responsive font size depending on number of characters and panel dimensions.\n * Uses clamp to ensure the text never overflows and scales appropriately with panel size.\n * (Value refers to the main number value displayed inside the gauge)\n */\nfunction getResponsiveValueFontSize(\n value: number | null,\n format: FormatOptions,\n width: number,\n height: number\n): string {\n const MIN_SIZE = 8;\n const MAX_SIZE = 64;\n const formattedValue = typeof value === 'number' ? formatValue(value, format) : `${value}`;\n\n const valueTextLength = Math.max(formattedValue.length, 6); // Ensure a minimum length to avoid overly large text for short values\n const availableSpace = Math.min(width, height);\n const fontSize = availableSpace / valueTextLength;\n\n return `clamp(${MIN_SIZE}px, ${fontSize}px, ${MAX_SIZE}px)`;\n}\n\n/**\n * Calculate responsive title font size based on panel dimensions\n * (Title refers to the text displayed below the gauge as a legend)\n */\nfunction getResponsiveTitleFontSize(width: number, height: number): number {\n const MIN_SIZE = 10;\n const MAX_SIZE = 16;\n const RATIO = 0.06; // Use 6% of the smaller dimension as base\n\n const size = Math.round(Math.min(width, height) * RATIO);\n // Scale based on panel size, with reasonable min/max bounds\n return Math.max(MIN_SIZE, Math.min(MAX_SIZE, size));\n}\n\nexport type GaugeChartPanelProps = PanelProps<GaugeChartOptions, TimeSeriesData>;\n\nexport function GaugeChartPanel(props: GaugeChartPanelProps): ReactElement | null {\n const { spec: pluginSpec, contentDimensions, queryResults } = props;\n const { calculation, max, legend } = pluginSpec;\n\n const { thresholds: thresholdsColors } = useChartsTheme();\n\n /* Legend setting just added to the cue schema\n This line assures that if legend setting doesn't exist (for old gauge setting records),\n The legend shows normally as before. If it exists, then it checks the show property.\n */\n const showLegend = legend?.show ?? true;\n\n // ensures all default format properties set if undef\n const format = merge({}, DEFAULT_FORMAT, pluginSpec.format);\n\n const thresholds = pluginSpec.thresholds ?? defaultThresholdInput;\n\n const gaugeData = useMemo((): GaugeSeries[] => {\n const seriesData: GaugeSeries[] = [];\n\n if (!queryResults[0]?.data?.series?.length) {\n return seriesData;\n }\n\n if (!CalculationsMap[calculation]) {\n console.warn(`Invalid GaugeChart panel calculation ${calculation}, fallback to ${DEFAULT_CALCULATION}`);\n }\n\n const calculate = CalculationsMap[calculation] ?? CalculationsMap[DEFAULT_CALCULATION];\n\n for (const timeSeries of queryResults[0].data.series) {\n seriesData.push({\n value: calculate(timeSeries.values),\n label: showLegend ? (timeSeries.formattedName ?? '') : '',\n });\n }\n return seriesData;\n }, [queryResults, calculation, showLegend]);\n\n if (!contentDimensions) return null;\n\n // needed for end value of last threshold color segment\n let thresholdMax = max;\n if (thresholdMax === undefined) {\n thresholdMax = format.unit === 'percent' ? DEFAULT_MAX_PERCENT : DEFAULT_MAX_PERCENT_DECIMAL;\n }\n const axisLineColors = convertThresholds(thresholds, format, thresholdMax, thresholdsColors);\n\n // accounts for showing a separate chart for each time series\n let chartWidth = contentDimensions.width / gaugeData.length - PANEL_PADDING_OFFSET;\n if (chartWidth < GAUGE_MIN_WIDTH && gaugeData.length > 1) {\n // enables horizontal scroll when charts overflow outside of panel\n chartWidth = GAUGE_MIN_WIDTH;\n }\n\n // Calculate responsive values based on chart dimensions\n const progressWidth = getResponsiveProgressWidth(chartWidth, contentDimensions.height);\n const axisLineWidth = Math.round(progressWidth * 0.2); // Axis line width is 20% of progress width\n const titleFontSize = getResponsiveTitleFontSize(chartWidth, contentDimensions.height);\n\n const axisLine: GaugeSeriesOption['axisLine'] = {\n show: true,\n lineStyle: {\n width: axisLineWidth,\n color: axisLineColors,\n },\n };\n\n // no data message handled inside chart component\n if (!gaugeData.length) {\n const emptyValueFontSize = getResponsiveValueFontSize(\n null,\n format,\n contentDimensions.width,\n contentDimensions.height\n );\n const emptyProgressWidth = getResponsiveProgressWidth(contentDimensions.width, contentDimensions.height);\n const emptyTitleFontSize = getResponsiveTitleFontSize(contentDimensions.width, contentDimensions.height);\n\n return (\n <GaugeChartBase\n width={contentDimensions.width}\n height={contentDimensions.height}\n data={EMPTY_GAUGE_SERIES}\n format={format}\n axisLine={axisLine}\n max={thresholdMax}\n valueFontSize={emptyValueFontSize}\n progressWidth={emptyProgressWidth}\n titleFontSize={emptyTitleFontSize}\n />\n );\n }\n\n const hasMultipleCharts = gaugeData.length > 1;\n\n return (\n <Stack\n direction=\"row\"\n spacing={hasMultipleCharts ? 2 : 0}\n justifyContent={hasMultipleCharts ? 'left' : 'center'}\n alignItems=\"center\"\n sx={{\n // so scrollbar only shows when necessary\n overflowX: gaugeData.length > 1 ? 'scroll' : 'auto',\n }}\n >\n {gaugeData.map((series, seriesIndex) => {\n const fontSize = getResponsiveValueFontSize(series.value ?? null, format, chartWidth, contentDimensions.height);\n\n return (\n <Box key={`gauge-series-${seriesIndex}`}>\n <GaugeChartBase\n width={chartWidth}\n height={contentDimensions.height}\n data={series}\n format={format}\n axisLine={axisLine}\n max={thresholdMax}\n valueFontSize={fontSize}\n progressWidth={progressWidth}\n titleFontSize={titleFontSize}\n />\n </Box>\n );\n })}\n </Stack>\n );\n}\n\nexport function GaugeChartLoading({ contentDimensions }: GaugeChartPanelProps): React.ReactElement | null {\n if (!contentDimensions) return null;\n return (\n <Skeleton\n sx={{ margin: '0 auto' }}\n variant=\"circular\"\n width={contentDimensions.width > contentDimensions.height ? contentDimensions.height : contentDimensions.width}\n height={contentDimensions.height}\n />\n );\n}\n"],"names":["Box","Skeleton","Stack","useChartsTheme","CalculationsMap","DEFAULT_CALCULATION","formatValue","merge","useMemo","DEFAULT_FORMAT","DEFAULT_MAX_PERCENT","DEFAULT_MAX_PERCENT_DECIMAL","convertThresholds","defaultThresholdInput","GaugeChartBase","EMPTY_GAUGE_SERIES","label","value","undefined","GAUGE_MIN_WIDTH","PANEL_PADDING_OFFSET","getResponsiveProgressWidth","width","height","MIN_WIDTH","MAX_WIDTH","RATIO","minSize","Math","min","max","round","getResponsiveValueFontSize","format","MIN_SIZE","MAX_SIZE","formattedValue","valueTextLength","length","availableSpace","fontSize","getResponsiveTitleFontSize","size","GaugeChartPanel","props","spec","pluginSpec","contentDimensions","queryResults","calculation","legend","thresholds","thresholdsColors","showLegend","show","gaugeData","seriesData","data","series","console","warn","calculate","timeSeries","push","values","formattedName","thresholdMax","unit","axisLineColors","chartWidth","progressWidth","axisLineWidth","titleFontSize","axisLine","lineStyle","color","emptyValueFontSize","emptyProgressWidth","emptyTitleFontSize","valueFontSize","hasMultipleCharts","direction","spacing","justifyContent","alignItems","sx","overflowX","map","seriesIndex","GaugeChartLoading","margin","variant"],"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,SAASA,GAAG,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,gBAAgB;AACrD,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,eAAe,EAAEC,mBAAmB,EAAiBC,WAAW,QAAwB,mBAAmB;AAGpH,OAAOC,WAAW,eAAe;AACjC,SAAuBC,OAAO,QAAQ,QAAQ;AAC9C,SACEC,cAAc,EACdC,mBAAmB,EACnBC,2BAA2B,QAEtB,sBAAsB;AAC7B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,eAAe;AACxE,SAASC,cAAc,QAAqB,mBAAmB;AAE/D,MAAMC,qBAAkC;IAAEC,OAAO;IAAIC,OAAOC;AAAU;AACtE,MAAMC,kBAAkB;AACxB,MAAMC,uBAAuB;AAE7B;;CAEC,GACD,SAASC,2BAA2BC,KAAa,EAAEC,MAAc;IAC/D,MAAMC,YAAY;IAClB,MAAMC,YAAY;IAClB,MAAMC,QAAQ,KAAK,+BAA+B;IAElD,MAAMC,UAAUC,KAAKC,GAAG,CAACP,OAAOC;IAChC,6EAA6E;IAC7E,OAAOK,KAAKE,GAAG,CAACN,WAAWI,KAAKC,GAAG,CAACJ,WAAWG,KAAKG,KAAK,CAACJ,UAAUD;AACtE;AAEA;;;;CAIC,GACD,SAASM,2BACPf,KAAoB,EACpBgB,MAAqB,EACrBX,KAAa,EACbC,MAAc;IAEd,MAAMW,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GAAGwB,kBAAkBzB,KAAK;QAC9GC,QAAQwB,kBAAkBxB,MAAM;;AAGtC"}
|
|
1
|
+
{"version":3,"sources":["../../src/GaugeChartPanel.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 { Box, Skeleton, Stack } from '@mui/material';\nimport { useChartsTheme } from '@perses-dev/components';\nimport { CalculationsMap, DEFAULT_CALCULATION, FormatOptions, formatValue, TimeSeriesData } from '@perses-dev/core';\nimport { PanelProps } from '@perses-dev/plugin-system';\nimport type { GaugeSeriesOption } from 'echarts';\nimport merge from 'lodash/merge';\nimport { ReactElement, useMemo } from 'react';\nimport {\n DEFAULT_FORMAT,\n DEFAULT_MAX_PERCENT,\n DEFAULT_MAX_PERCENT_DECIMAL,\n GaugeChartOptions,\n} from './gauge-chart-model';\nimport { convertThresholds, defaultThresholdInput } from './thresholds';\nimport { GaugeChartBase, GaugeSeries } from './GaugeChartBase';\n\nconst EMPTY_GAUGE_SERIES: GaugeSeries = { label: '', value: undefined };\nconst GAUGE_MIN_WIDTH = 90;\nconst PANEL_PADDING_OFFSET = 20;\n\n/**\n * Calculate responsive progress width based on panel dimensions\n */\nfunction getResponsiveProgressWidth(width: number, height: number): number {\n const MIN_WIDTH = 10;\n const MAX_WIDTH = 48;\n const RATIO = 0.1; // 10% of the smaller dimension\n\n const minSize = Math.min(width, height);\n // Use RATIO of the smaller dimension as base, with reasonable min/max bounds\n return Math.max(MIN_WIDTH, Math.min(MAX_WIDTH, Math.round(minSize * RATIO)));\n}\n\n/**\n * Responsive font size depending on number of characters and panel dimensions.\n * Uses clamp to ensure the text never overflows and scales appropriately with panel size.\n * (Value refers to the main number value displayed inside the gauge)\n */\nfunction getResponsiveValueFontSize(\n value: number | null,\n format: FormatOptions,\n width: number,\n height: number\n): string {\n const MIN_SIZE = 8;\n const MAX_SIZE = 64;\n const formattedValue = typeof value === 'number' ? formatValue(value, format) : `${value}`;\n\n const valueTextLength = Math.max(formattedValue.length, 6); // Ensure a minimum length to avoid overly large text for short values\n const availableSpace = Math.min(width, height);\n const fontSize = availableSpace / valueTextLength;\n\n return `clamp(${MIN_SIZE}px, ${fontSize}px, ${MAX_SIZE}px)`;\n}\n\n/**\n * Calculate responsive title font size based on panel dimensions\n * (Title refers to the text displayed below the gauge as a legend)\n */\nfunction getResponsiveTitleFontSize(width: number, height: number): number {\n const MIN_SIZE = 10;\n const MAX_SIZE = 16;\n const RATIO = 0.06; // Use 6% of the smaller dimension as base\n\n const size = Math.round(Math.min(width, height) * RATIO);\n // Scale based on panel size, with reasonable min/max bounds\n return Math.max(MIN_SIZE, Math.min(MAX_SIZE, size));\n}\n\nexport type GaugeChartPanelProps = PanelProps<GaugeChartOptions, TimeSeriesData>;\n\nexport function GaugeChartPanel(props: GaugeChartPanelProps): ReactElement | null {\n const { spec: pluginSpec, contentDimensions, queryResults } = props;\n const { calculation, max, legend } = pluginSpec;\n\n const { thresholds: thresholdsColors } = useChartsTheme();\n\n /* Legend setting just added to the cue schema\n This line assures that if legend setting doesn't exist (for old gauge setting records),\n The legend shows normally as before. If it exists, then it checks the show property.\n */\n const showLegend = legend?.show ?? true;\n\n // ensures all default format properties set if undef\n const format = merge({}, DEFAULT_FORMAT, pluginSpec.format);\n\n const thresholds = pluginSpec.thresholds ?? defaultThresholdInput;\n\n const gaugeData = useMemo((): GaugeSeries[] => {\n const seriesData: GaugeSeries[] = [];\n\n if (!queryResults[0]?.data?.series?.length) {\n return seriesData;\n }\n\n if (!CalculationsMap[calculation]) {\n console.warn(`Invalid GaugeChart panel calculation ${calculation}, fallback to ${DEFAULT_CALCULATION}`);\n }\n\n const calculate = CalculationsMap[calculation] ?? CalculationsMap[DEFAULT_CALCULATION];\n\n for (const timeSeries of queryResults[0].data.series) {\n seriesData.push({\n value: calculate(timeSeries.values),\n label: showLegend ? (timeSeries.formattedName ?? '') : '',\n });\n }\n return seriesData;\n }, [queryResults, calculation, showLegend]);\n\n if (!contentDimensions) return null;\n\n // needed for end value of last threshold color segment\n let thresholdMax = max;\n if (thresholdMax === undefined) {\n thresholdMax = format.unit === 'percent' ? DEFAULT_MAX_PERCENT : DEFAULT_MAX_PERCENT_DECIMAL;\n }\n const axisLineColors = convertThresholds(thresholds, format, thresholdMax, thresholdsColors);\n\n // accounts for showing a separate chart for each time series\n let chartWidth = contentDimensions.width / gaugeData.length - PANEL_PADDING_OFFSET;\n if (chartWidth < GAUGE_MIN_WIDTH && gaugeData.length > 1) {\n // enables horizontal scroll when charts overflow outside of panel\n chartWidth = GAUGE_MIN_WIDTH;\n }\n\n // Calculate responsive values based on chart dimensions\n const progressWidth = getResponsiveProgressWidth(chartWidth, contentDimensions.height);\n const axisLineWidth = Math.round(progressWidth * 0.2); // Axis line width is 20% of progress width\n const titleFontSize = getResponsiveTitleFontSize(chartWidth, contentDimensions.height);\n\n const axisLine: GaugeSeriesOption['axisLine'] = {\n show: true,\n lineStyle: {\n width: axisLineWidth,\n color: axisLineColors,\n },\n };\n\n // no data message handled inside chart component\n if (!gaugeData.length) {\n const emptyValueFontSize = getResponsiveValueFontSize(\n null,\n format,\n contentDimensions.width,\n contentDimensions.height\n );\n const emptyProgressWidth = getResponsiveProgressWidth(contentDimensions.width, contentDimensions.height);\n const emptyTitleFontSize = getResponsiveTitleFontSize(contentDimensions.width, contentDimensions.height);\n\n return (\n <GaugeChartBase\n width={contentDimensions.width}\n height={contentDimensions.height}\n data={EMPTY_GAUGE_SERIES}\n format={format}\n axisLine={axisLine}\n max={thresholdMax}\n valueFontSize={emptyValueFontSize}\n progressWidth={emptyProgressWidth}\n titleFontSize={emptyTitleFontSize}\n />\n );\n }\n\n const hasMultipleCharts = gaugeData.length > 1;\n\n return (\n <Stack\n direction=\"row\"\n spacing={hasMultipleCharts ? 2 : 0}\n justifyContent={hasMultipleCharts ? 'left' : 'center'}\n alignItems=\"center\"\n sx={{\n // so scrollbar only shows when necessary\n overflowX: gaugeData.length > 1 ? 'scroll' : 'auto',\n }}\n >\n {gaugeData.map((series, seriesIndex) => {\n const fontSize = getResponsiveValueFontSize(series.value ?? null, format, chartWidth, contentDimensions.height);\n\n return (\n <Box key={`gauge-series-${seriesIndex}`}>\n <GaugeChartBase\n width={chartWidth}\n height={contentDimensions.height}\n data={series}\n format={format}\n axisLine={axisLine}\n max={thresholdMax}\n valueFontSize={fontSize}\n progressWidth={progressWidth}\n titleFontSize={titleFontSize}\n />\n </Box>\n );\n })}\n </Stack>\n );\n}\n\nexport function GaugeChartLoading({ contentDimensions }: GaugeChartPanelProps): React.ReactElement | null {\n if (!contentDimensions) return null;\n return (\n <Skeleton\n sx={{ margin: '0 auto' }}\n variant=\"circular\"\n width={contentDimensions.width > contentDimensions.height ? contentDimensions.height : contentDimensions.width}\n height={contentDimensions.height}\n />\n );\n}\n"],"names":["Box","Skeleton","Stack","useChartsTheme","CalculationsMap","DEFAULT_CALCULATION","formatValue","merge","useMemo","DEFAULT_FORMAT","DEFAULT_MAX_PERCENT","DEFAULT_MAX_PERCENT_DECIMAL","convertThresholds","defaultThresholdInput","GaugeChartBase","EMPTY_GAUGE_SERIES","label","value","undefined","GAUGE_MIN_WIDTH","PANEL_PADDING_OFFSET","getResponsiveProgressWidth","width","height","MIN_WIDTH","MAX_WIDTH","RATIO","minSize","Math","min","max","round","getResponsiveValueFontSize","format","MIN_SIZE","MAX_SIZE","formattedValue","valueTextLength","length","availableSpace","fontSize","getResponsiveTitleFontSize","size","GaugeChartPanel","props","spec","pluginSpec","contentDimensions","queryResults","calculation","legend","thresholds","thresholdsColors","showLegend","show","gaugeData","seriesData","data","series","console","warn","calculate","timeSeries","push","values","formattedName","thresholdMax","unit","axisLineColors","chartWidth","progressWidth","axisLineWidth","titleFontSize","axisLine","lineStyle","color","emptyValueFontSize","emptyProgressWidth","emptyTitleFontSize","valueFontSize","hasMultipleCharts","direction","spacing","justifyContent","alignItems","sx","overflowX","map","seriesIndex","GaugeChartLoading","margin","variant"],"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,SAASA,GAAG,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,gBAAgB;AACrD,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,eAAe,EAAEC,mBAAmB,EAAiBC,WAAW,QAAwB,mBAAmB;AAGpH,OAAOC,WAAW,eAAe;AACjC,SAAuBC,OAAO,QAAQ,QAAQ;AAC9C,SACEC,cAAc,EACdC,mBAAmB,EACnBC,2BAA2B,QAEtB,sBAAsB;AAC7B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,eAAe;AACxE,SAASC,cAAc,QAAqB,mBAAmB;AAE/D,MAAMC,qBAAkC;IAAEC,OAAO;IAAIC,OAAOC;AAAU;AACtE,MAAMC,kBAAkB;AACxB,MAAMC,uBAAuB;AAE7B;;CAEC,GACD,SAASC,2BAA2BC,KAAa,EAAEC,MAAc;IAC/D,MAAMC,YAAY;IAClB,MAAMC,YAAY;IAClB,MAAMC,QAAQ,KAAK,+BAA+B;IAElD,MAAMC,UAAUC,KAAKC,GAAG,CAACP,OAAOC;IAChC,6EAA6E;IAC7E,OAAOK,KAAKE,GAAG,CAACN,WAAWI,KAAKC,GAAG,CAACJ,WAAWG,KAAKG,KAAK,CAACJ,UAAUD;AACtE;AAEA;;;;CAIC,GACD,SAASM,2BACPf,KAAoB,EACpBgB,MAAqB,EACrBX,KAAa,EACbC,MAAc;IAEd,MAAMW,WAAW;IACjB,MA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BzB,KAAK;QAC9GC,QAAQwB,kBAAkBxB,MAAM;;AAGtC"}
|
package/lib/bootstrap.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// Copyright 2024 The Perses Authors
|
|
2
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -10,7 +11,6 @@
|
|
|
10
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
12
|
// See the License for the specific language governing permissions and
|
|
12
13
|
// limitations under the License.
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import ReactDOM from 'react-dom/client';
|
|
16
16
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
package/lib/bootstrap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bootstrap.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.\n\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconst root = ReactDOM.createRoot(document.getElementById('root')!);\nroot.render(<React.StrictMode></React.StrictMode>);\n"],"names":["React","ReactDOM","root","createRoot","document","getElementById","render","StrictMode"],"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
|
|
1
|
+
{"version":3,"sources":["../../src/bootstrap.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.\n\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconst root = ReactDOM.createRoot(document.getElementById('root')!);\nroot.render(<React.StrictMode></React.StrictMode>);\n"],"names":["React","ReactDOM","root","createRoot","document","getElementById","render","StrictMode"],"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,OAAOA,WAAW,QAAQ;AAC1B,OAAOC,cAAc,mBAAmB;AAExC,MAAMC,OAAOD,SAASE,UAAU,CAACC,SAASC,cAAc,CAAC;AACzDH,KAAKI,MAAM,eAAC,KAACN,MAAMO,UAAU"}
|
|
@@ -17,14 +17,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
17
17
|
function _export(target, all) {
|
|
18
18
|
for(var name in all)Object.defineProperty(target, name, {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: all
|
|
20
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
GaugeChartLoading
|
|
24
|
+
get GaugeChartLoading () {
|
|
25
25
|
return GaugeChartLoading;
|
|
26
26
|
},
|
|
27
|
-
GaugeChartPanel
|
|
27
|
+
get GaugeChartPanel () {
|
|
28
28
|
return GaugeChartPanel;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -17,20 +17,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
17
17
|
function _export(target, all) {
|
|
18
18
|
for(var name in all)Object.defineProperty(target, name, {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: all
|
|
20
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
DEFAULT_FORMAT
|
|
24
|
+
get DEFAULT_FORMAT () {
|
|
25
25
|
return DEFAULT_FORMAT;
|
|
26
26
|
},
|
|
27
|
-
DEFAULT_MAX_PERCENT
|
|
27
|
+
get DEFAULT_MAX_PERCENT () {
|
|
28
28
|
return DEFAULT_MAX_PERCENT;
|
|
29
29
|
},
|
|
30
|
-
DEFAULT_MAX_PERCENT_DECIMAL
|
|
30
|
+
get DEFAULT_MAX_PERCENT_DECIMAL () {
|
|
31
31
|
return DEFAULT_MAX_PERCENT_DECIMAL;
|
|
32
32
|
},
|
|
33
|
-
createInitialGaugeChartOptions
|
|
33
|
+
get createInitialGaugeChartOptions () {
|
|
34
34
|
return createInitialGaugeChartOptions;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
// Copyright 2024 The Perses Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
1
|
"use strict";
|
|
14
2
|
function _getRequireWildcardCache(nodeInterop) {
|
|
15
3
|
if (typeof WeakMap !== "function") return null;
|
|
@@ -52,4 +40,16 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
52
40
|
}
|
|
53
41
|
return newObj;
|
|
54
42
|
}
|
|
43
|
+
// Copyright 2024 The Perses Authors
|
|
44
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
45
|
+
// you may not use this file except in compliance with the License.
|
|
46
|
+
// You may obtain a copy of the License at
|
|
47
|
+
//
|
|
48
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
+
//
|
|
50
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
51
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
52
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
53
|
+
// See the License for the specific language governing permissions and
|
|
54
|
+
// limitations under the License.
|
|
55
55
|
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./bootstrap")));
|
package/lib/cjs/thresholds.js
CHANGED
|
@@ -17,14 +17,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
17
17
|
function _export(target, all) {
|
|
18
18
|
for(var name in all)Object.defineProperty(target, name, {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: all
|
|
20
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
convertThresholds
|
|
24
|
+
get convertThresholds () {
|
|
25
25
|
return convertThresholds;
|
|
26
26
|
},
|
|
27
|
-
defaultThresholdInput
|
|
27
|
+
get defaultThresholdInput () {
|
|
28
28
|
return defaultThresholdInput;
|
|
29
29
|
}
|
|
30
30
|
});
|
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "GaugeChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.11.
|
|
8
|
+
"buildVersion": "0.11.1",
|
|
9
9
|
"buildName": "@perses-dev/gauge-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/GaugeChart.
|
|
12
|
+
"name": "__mf/js/GaugeChart.64278e7a.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"api": ""
|
|
21
21
|
},
|
|
22
22
|
"globalName": "GaugeChart",
|
|
23
|
-
"pluginVersion": "0.
|
|
23
|
+
"pluginVersion": "0.21.6",
|
|
24
24
|
"prefetchInterface": false,
|
|
25
25
|
"getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/GaugeChart/\"; }"
|
|
26
26
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"js": {
|
|
36
36
|
"async": [],
|
|
37
37
|
"sync": [
|
|
38
|
-
"__mf/js/async/
|
|
38
|
+
"__mf/js/async/274.07ee62ee.js"
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"css": {
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"js": {
|
|
55
55
|
"async": [],
|
|
56
56
|
"sync": [
|
|
57
|
-
"__mf/js/async/
|
|
58
|
-
"__mf/js/async/
|
|
59
|
-
"__mf/js/async/
|
|
57
|
+
"__mf/js/async/235.675ef806.js",
|
|
58
|
+
"__mf/js/async/616.1b1bb2ba.js",
|
|
59
|
+
"__mf/js/async/854.0822db86.js"
|
|
60
60
|
]
|
|
61
61
|
},
|
|
62
62
|
"css": {
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"js": {
|
|
76
76
|
"async": [],
|
|
77
77
|
"sync": [
|
|
78
|
-
"__mf/js/async/
|
|
79
|
-
"__mf/js/async/
|
|
78
|
+
"__mf/js/async/587.e32d2906.js",
|
|
79
|
+
"__mf/js/async/968.be22fbda.js"
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
"css": {
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
{
|
|
89
89
|
"id": "GaugeChart:@perses-dev/components",
|
|
90
90
|
"name": "@perses-dev/components",
|
|
91
|
-
"version": "0.53.0-beta.
|
|
91
|
+
"version": "0.53.0-beta.2",
|
|
92
92
|
"singleton": true,
|
|
93
|
-
"requiredVersion": "^0.53.0-beta.
|
|
93
|
+
"requiredVersion": "^0.53.0-beta.2",
|
|
94
94
|
"assets": {
|
|
95
95
|
"js": {
|
|
96
96
|
"async": [],
|
|
97
97
|
"sync": [
|
|
98
|
-
"__mf/js/async/
|
|
98
|
+
"__mf/js/async/790.e67bc862.js"
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
101
|
"css": {
|
|
@@ -107,14 +107,14 @@
|
|
|
107
107
|
{
|
|
108
108
|
"id": "GaugeChart:@perses-dev/plugin-system",
|
|
109
109
|
"name": "@perses-dev/plugin-system",
|
|
110
|
-
"version": "0.53.0-beta.
|
|
110
|
+
"version": "0.53.0-beta.2",
|
|
111
111
|
"singleton": true,
|
|
112
|
-
"requiredVersion": "^0.53.0-beta.
|
|
112
|
+
"requiredVersion": "^0.53.0-beta.2",
|
|
113
113
|
"assets": {
|
|
114
114
|
"js": {
|
|
115
115
|
"async": [],
|
|
116
116
|
"sync": [
|
|
117
|
-
"__mf/js/async/
|
|
117
|
+
"__mf/js/async/252.30692fba.js"
|
|
118
118
|
]
|
|
119
119
|
},
|
|
120
120
|
"css": {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"js": {
|
|
134
134
|
"async": [],
|
|
135
135
|
"sync": [
|
|
136
|
-
"__mf/js/async/
|
|
136
|
+
"__mf/js/async/192.8bf7cec4.js"
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
139
|
"css": {
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"js": {
|
|
153
153
|
"async": [],
|
|
154
154
|
"sync": [
|
|
155
|
-
"__mf/js/async/
|
|
155
|
+
"__mf/js/async/873.b08548ee.js"
|
|
156
156
|
]
|
|
157
157
|
},
|
|
158
158
|
"css": {
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"js": {
|
|
172
172
|
"async": [],
|
|
173
173
|
"sync": [
|
|
174
|
-
"__mf/js/async/
|
|
174
|
+
"__mf/js/async/963.c04e5fd0.js"
|
|
175
175
|
]
|
|
176
176
|
},
|
|
177
177
|
"css": {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"js": {
|
|
191
191
|
"async": [],
|
|
192
192
|
"sync": [
|
|
193
|
-
"__mf/js/async/
|
|
193
|
+
"__mf/js/async/392.f9d6a7ae.js"
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
196
|
"css": {
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"js": {
|
|
210
210
|
"async": [],
|
|
211
211
|
"sync": [
|
|
212
|
-
"__mf/js/async/
|
|
212
|
+
"__mf/js/async/496.63537c05.js"
|
|
213
213
|
]
|
|
214
214
|
},
|
|
215
215
|
"css": {
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
"js": {
|
|
229
229
|
"async": [],
|
|
230
230
|
"sync": [
|
|
231
|
-
"__mf/js/async/
|
|
231
|
+
"__mf/js/async/470.9855b786.js"
|
|
232
232
|
]
|
|
233
233
|
},
|
|
234
234
|
"css": {
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"js": {
|
|
248
248
|
"async": [],
|
|
249
249
|
"sync": [
|
|
250
|
-
"__mf/js/async/
|
|
250
|
+
"__mf/js/async/121.0385c285.js"
|
|
251
251
|
]
|
|
252
252
|
},
|
|
253
253
|
"css": {
|
|
@@ -266,8 +266,8 @@
|
|
|
266
266
|
"js": {
|
|
267
267
|
"async": [],
|
|
268
268
|
"sync": [
|
|
269
|
-
"__mf/js/async/
|
|
270
|
-
"__mf/js/async/
|
|
269
|
+
"__mf/js/async/458.2a1e1dfe.js",
|
|
270
|
+
"__mf/js/async/77.429aab8d.js"
|
|
271
271
|
]
|
|
272
272
|
},
|
|
273
273
|
"css": {
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
"js": {
|
|
287
287
|
"async": [],
|
|
288
288
|
"sync": [
|
|
289
|
-
"__mf/js/async/
|
|
289
|
+
"__mf/js/async/978.26163709.js"
|
|
290
290
|
]
|
|
291
291
|
},
|
|
292
292
|
"css": {
|
|
@@ -304,27 +304,27 @@
|
|
|
304
304
|
"assets": {
|
|
305
305
|
"js": {
|
|
306
306
|
"sync": [
|
|
307
|
-
"__mf/js/async/
|
|
308
|
-
"__mf/js/async/
|
|
309
|
-
"__mf/js/async/
|
|
310
|
-
"__mf/js/async/
|
|
311
|
-
"__mf/js/async/__federation_expose_GaugeChart.
|
|
307
|
+
"__mf/js/async/403.4dee4df3.js",
|
|
308
|
+
"__mf/js/async/204.368d6115.js",
|
|
309
|
+
"__mf/js/async/467.fcde6002.js",
|
|
310
|
+
"__mf/js/async/756.ae22d123.js",
|
|
311
|
+
"__mf/js/async/__federation_expose_GaugeChart.54f4fa10.js"
|
|
312
312
|
],
|
|
313
313
|
"async": [
|
|
314
|
-
"__mf/js/async/
|
|
315
|
-
"__mf/js/async/
|
|
316
|
-
"__mf/js/async/
|
|
317
|
-
"__mf/js/async/
|
|
318
|
-
"__mf/js/async/
|
|
319
|
-
"__mf/js/async/lib-router.
|
|
320
|
-
"__mf/js/async/
|
|
314
|
+
"__mf/js/async/588.7dda8aa9.js",
|
|
315
|
+
"__mf/js/async/71.773ab397.js",
|
|
316
|
+
"__mf/js/async/356.a480b281.js",
|
|
317
|
+
"__mf/js/async/410.3d37263a.js",
|
|
318
|
+
"__mf/js/async/127.5ef482f0.js",
|
|
319
|
+
"__mf/js/async/lib-router.c318fd9d.js",
|
|
320
|
+
"__mf/js/async/177.4d5022bb.js"
|
|
321
321
|
]
|
|
322
322
|
},
|
|
323
323
|
"css": {
|
|
324
324
|
"sync": [],
|
|
325
325
|
"async": [
|
|
326
|
-
"__mf/css/async/
|
|
327
|
-
"__mf/css/async/
|
|
326
|
+
"__mf/css/async/61.d3010b86.css",
|
|
327
|
+
"__mf/css/async/823.d3010b86.css"
|
|
328
328
|
]
|
|
329
329
|
}
|
|
330
330
|
},
|