@perses-dev/status-history-chart-plugin 0.10.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/css/async/442.d3010b86.css +1 -0
- package/__mf/css/async/61.d3010b86.css +1 -0
- package/__mf/css/async/823.d3010b86.css +1 -0
- package/__mf/js/StatusHistoryChart.5b8469b5.js +6 -0
- package/__mf/js/async/{964.69ec877e.js → 121.17e95c0f.js} +2 -2
- package/__mf/js/async/153.a05b947a.js +2 -0
- package/__mf/js/async/{488.f8727193.js → 177.8e51631b.js} +1 -1
- package/__mf/js/async/{882.d579a0a9.js → 189.fb5828be.js} +2 -2
- package/__mf/js/async/192.8fa94a82.js +1 -0
- package/__mf/js/async/2.7f4594b1.js +1 -0
- package/__mf/js/async/235.59e4cd91.js +1 -0
- package/__mf/js/async/274.6a9f4c88.js +2 -0
- package/__mf/js/async/283.94f964e7.js +1 -0
- package/__mf/js/async/356.dfb4c773.js +1 -0
- package/__mf/js/async/392.0b29b077.js +2 -0
- package/__mf/js/async/470.a6095e83.js +2 -0
- package/__mf/js/async/490.74645007.js +39 -0
- package/__mf/js/async/501.1e94e650.js +22 -0
- package/__mf/js/async/525.9b8b1f1d.js +2 -0
- package/__mf/js/async/{62.bfb773d9.js → 558.df5de61b.js} +1 -1
- package/__mf/js/async/{214.b0f929ef.js → 587.4f01f05a.js} +1 -1
- package/__mf/js/async/588.3d58e41b.js +1 -0
- package/__mf/js/async/616.1c080169.js +1 -0
- package/__mf/js/async/623.a8ebcf5c.js +1 -0
- package/__mf/js/async/644.cbae4105.js +110 -0
- package/__mf/js/async/71.a42c00bc.js +1 -0
- package/__mf/js/async/790.6a647c6c.js +7 -0
- package/__mf/js/async/873.937a61ba.js +1 -0
- package/__mf/js/async/941.2e8dd304.js +2 -0
- package/__mf/js/async/{738.4ab65b65.js → 968.c21f2475.js} +1 -1
- package/__mf/js/async/978.563a3078.js +1 -0
- package/__mf/js/async/__federation_expose_StatusHistoryChart.8d3d006b.js +23 -0
- package/__mf/js/async/lib-router.9ccc993b.js +2 -0
- package/__mf/js/main.e25dd75c.js +6 -0
- package/lib/StatusHistoryChartBase.d.ts.map +1 -1
- package/lib/StatusHistoryChartBase.js +14 -5
- package/lib/StatusHistoryChartBase.js.map +1 -1
- package/lib/StatusHistoryChartOptionsEditorSettings.js +1 -1
- package/lib/StatusHistoryChartOptionsEditorSettings.js.map +1 -1
- package/lib/StatusHistoryPanel.d.ts.map +1 -1
- package/lib/StatusHistoryPanel.js +2 -5
- package/lib/StatusHistoryPanel.js.map +1 -1
- package/lib/bootstrap.js +1 -1
- package/lib/bootstrap.js.map +1 -1
- package/lib/cjs/StatusHistoryChartBase.js +12 -3
- package/lib/cjs/StatusHistoryPanel.js +1 -4
- package/lib/cjs/index-federation.js +12 -12
- package/lib/cjs/utils/get-color.js +6 -6
- package/mf-manifest.json +34 -34
- package/mf-stats.json +34 -34
- package/package.json +4 -4
- package/__mf/css/async/263.17332bd7.css +0 -1
- package/__mf/css/async/341.17332bd7.css +0 -1
- package/__mf/css/async/759.17332bd7.css +0 -1
- package/__mf/js/StatusHistoryChart.52fb22ae.js +0 -5
- package/__mf/js/async/168.acdd5953.js +0 -2
- package/__mf/js/async/173.2ad23420.js +0 -2
- package/__mf/js/async/224.e11df4e6.js +0 -1
- package/__mf/js/async/238.ddc212bc.js +0 -1
- package/__mf/js/async/288.bb4c227c.js +0 -7
- package/__mf/js/async/292.e14321fa.js +0 -1
- package/__mf/js/async/368.a46eac7c.js +0 -73
- package/__mf/js/async/409.ada82acc.js +0 -1
- package/__mf/js/async/491.a1482b95.js +0 -110
- package/__mf/js/async/651.2ea2eabf.js +0 -1
- package/__mf/js/async/679.04e9e73d.js +0 -1
- package/__mf/js/async/694.901f7598.js +0 -1
- package/__mf/js/async/740.d6f90a72.js +0 -1
- package/__mf/js/async/75.37b2ae0f.js +0 -1
- package/__mf/js/async/750.03619521.js +0 -2
- package/__mf/js/async/770.2717fe6a.js +0 -1
- package/__mf/js/async/832.58223f7b.js +0 -39
- package/__mf/js/async/863.a96e3b8c.js +0 -2
- package/__mf/js/async/960.fb944311.js +0 -2
- package/__mf/js/async/980.d85dbf86.js +0 -1
- package/__mf/js/async/981.f9bb8f5d.js +0 -2
- package/__mf/js/async/__federation_expose_StatusHistoryChart.eaa43159.js +0 -23
- package/__mf/js/async/lib-router.c60b631c.js +0 -2
- package/__mf/js/main.0a7b5b5d.js +0 -5
- /package/__mf/js/async/{964.69ec877e.js.LICENSE.txt → 121.17e95c0f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{168.acdd5953.js.LICENSE.txt → 153.a05b947a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{882.d579a0a9.js.LICENSE.txt → 189.fb5828be.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{960.fb944311.js.LICENSE.txt → 274.6a9f4c88.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{981.f9bb8f5d.js.LICENSE.txt → 392.0b29b077.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{173.2ad23420.js.LICENSE.txt → 470.a6095e83.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{832.58223f7b.js.LICENSE.txt → 490.74645007.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{368.a46eac7c.js.LICENSE.txt → 501.1e94e650.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{750.03619521.js.LICENSE.txt → 525.9b8b1f1d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{491.a1482b95.js.LICENSE.txt → 644.cbae4105.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{288.bb4c227c.js.LICENSE.txt → 790.6a647c6c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{863.a96e3b8c.js.LICENSE.txt → 941.2e8dd304.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.c60b631c.js.LICENSE.txt → lib-router.9ccc993b.js.LICENSE.txt} +0 -0
|
@@ -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,8 +11,7 @@
|
|
|
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 {
|
|
14
|
-
import { Box, useTheme } from '@mui/material';
|
|
14
|
+
import { Box, Typography, useTheme } from '@mui/material';
|
|
15
15
|
import { HeatmapChart as EChartsHeatmapChart } from 'echarts/charts';
|
|
16
16
|
import { GridComponent, DatasetComponent, TitleComponent, TooltipComponent, VisualMapComponent } from 'echarts/components';
|
|
17
17
|
import { use } from 'echarts/core';
|
|
@@ -33,6 +33,7 @@ export const StatusHistoryChartBase = (props)=>{
|
|
|
33
33
|
const { timeZone } = useTimeZone();
|
|
34
34
|
const chartsTheme = useChartsTheme();
|
|
35
35
|
const theme = useTheme();
|
|
36
|
+
const noDataTextStyle = chartsTheme.noDataOption.title.textStyle;
|
|
36
37
|
const option = {
|
|
37
38
|
tooltip: {
|
|
38
39
|
appendToBody: true,
|
|
@@ -114,15 +115,23 @@ export const StatusHistoryChartBase = (props)=>{
|
|
|
114
115
|
height: height
|
|
115
116
|
},
|
|
116
117
|
sx: {
|
|
117
|
-
overflow: 'auto'
|
|
118
|
+
overflow: 'auto',
|
|
119
|
+
display: 'flex',
|
|
120
|
+
justifyContent: 'center',
|
|
121
|
+
alignItems: 'center'
|
|
118
122
|
},
|
|
119
|
-
children: /*#__PURE__*/ _jsx(EChart, {
|
|
120
|
-
|
|
123
|
+
children: data.length ? /*#__PURE__*/ _jsx(EChart, {
|
|
124
|
+
style: {
|
|
121
125
|
width: '100%',
|
|
122
126
|
height: height
|
|
123
127
|
},
|
|
124
128
|
option: option,
|
|
125
129
|
theme: chartsTheme.echartsTheme
|
|
130
|
+
}) : /*#__PURE__*/ _jsx(Typography, {
|
|
131
|
+
sx: {
|
|
132
|
+
...noDataTextStyle
|
|
133
|
+
},
|
|
134
|
+
children: "No data"
|
|
126
135
|
})
|
|
127
136
|
});
|
|
128
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/StatusHistoryChartBase.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 { Box, useTheme } from '@mui/material';\nimport { HeatmapChart as EChartsHeatmapChart } from 'echarts/charts';\nimport {\n GridComponent,\n DatasetComponent,\n TitleComponent,\n TooltipComponent,\n VisualMapComponent,\n LegendComponentOption,\n} from 'echarts/components';\nimport { use } from 'echarts/core';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { TimeScale } from '@perses-dev/core';\nimport { EChartsCoreOption } from 'echarts';\nimport { FC } from 'react';\nimport { EChart, useChartsTheme, useTimeZone } from '@perses-dev/components';\nimport { getFormattedStatusHistoryAxisLabel } from './utils/get-formatted-axis-label';\nimport { generateTooltipHTML } from './StatusHistoryTooltip';\n\nuse([\n EChartsHeatmapChart,\n VisualMapComponent,\n GridComponent,\n DatasetComponent,\n TitleComponent,\n TooltipComponent,\n CanvasRenderer,\n]);\n\nexport type StatusHistoryData = [number, number, number | undefined];\n\nexport interface StatusHistoryDataItem {\n value: StatusHistoryData;\n label?: string;\n itemStyle?: {\n color?: string;\n borderColor?: string;\n borderWidth?: number;\n };\n}\n\nexport interface StatusHistoryChartBaseProps {\n height: number;\n data: StatusHistoryDataItem[];\n xAxisCategories: number[];\n yAxisCategories: string[];\n legend?: LegendComponentOption;\n timeScale?: TimeScale;\n colors?: Array<{ value: number | string; color: string }>;\n}\n\nexport const StatusHistoryChartBase: FC<StatusHistoryChartBaseProps> = (props) => {\n const { height, data, xAxisCategories, yAxisCategories, timeScale, colors } = props;\n const { timeZone } = useTimeZone();\n const chartsTheme = useChartsTheme();\n const theme = useTheme();\n\n const option: EChartsCoreOption = {\n tooltip: {\n appendToBody: true,\n formatter: (params: { data: StatusHistoryDataItem; marker: string }) => {\n return generateTooltipHTML({\n data: params.data.value,\n label: params.data.label,\n marker: params.marker,\n xAxisCategories,\n yAxisCategories,\n theme,\n });\n },\n },\n grid: {\n top: '5%',\n bottom: '5%',\n },\n xAxis: {\n type: 'category',\n data: xAxisCategories,\n axisLine: {\n show: false,\n },\n splitArea: {\n show: false,\n },\n axisLabel: {\n hideOverlap: true,\n formatter: getFormattedStatusHistoryAxisLabel(timeScale?.rangeMs ?? 0, timeZone),\n },\n },\n yAxis: {\n type: 'category',\n data: yAxisCategories,\n axisLine: {\n show: false,\n },\n splitArea: {\n show: false,\n interval: 0,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n interval: 0,\n },\n },\n visualMap: {\n show: false,\n type: 'piecewise',\n pieces: colors,\n },\n series: [\n {\n name: 'Status history',\n type: 'heatmap',\n coordinateSystem: 'cartesian2d',\n data: data,\n label: {\n show: false,\n },\n itemStyle: {\n borderWidth: 1,\n borderType: 'solid',\n borderColor: '#ffffff',\n },\n emphasis: {\n itemStyle: {\n opacity: 0.5,\n },\n },\n },\n ],\n };\n\n return (\n <Box
|
|
1
|
+
{"version":3,"sources":["../../src/StatusHistoryChartBase.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 { Box, SxProps, Typography, useTheme } from '@mui/material';\nimport { HeatmapChart as EChartsHeatmapChart } from 'echarts/charts';\nimport {\n GridComponent,\n DatasetComponent,\n TitleComponent,\n TooltipComponent,\n VisualMapComponent,\n LegendComponentOption,\n} from 'echarts/components';\nimport { use } from 'echarts/core';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { TimeScale } from '@perses-dev/core';\nimport { EChartsCoreOption, TitleComponentOption } from 'echarts';\nimport { FC } from 'react';\nimport { EChart, useChartsTheme, useTimeZone } from '@perses-dev/components';\nimport { getFormattedStatusHistoryAxisLabel } from './utils/get-formatted-axis-label';\nimport { generateTooltipHTML } from './StatusHistoryTooltip';\n\nuse([\n EChartsHeatmapChart,\n VisualMapComponent,\n GridComponent,\n DatasetComponent,\n TitleComponent,\n TooltipComponent,\n CanvasRenderer,\n]);\n\nexport type StatusHistoryData = [number, number, number | undefined];\n\nexport interface StatusHistoryDataItem {\n value: StatusHistoryData;\n label?: string;\n itemStyle?: {\n color?: string;\n borderColor?: string;\n borderWidth?: number;\n };\n}\n\nexport interface StatusHistoryChartBaseProps {\n height: number;\n data: StatusHistoryDataItem[];\n xAxisCategories: number[];\n yAxisCategories: string[];\n legend?: LegendComponentOption;\n timeScale?: TimeScale;\n colors?: Array<{ value: number | string; color: string }>;\n}\n\nexport const StatusHistoryChartBase: FC<StatusHistoryChartBaseProps> = (props) => {\n const { height, data, xAxisCategories, yAxisCategories, timeScale, colors } = props;\n\n const { timeZone } = useTimeZone();\n const chartsTheme = useChartsTheme();\n const theme = useTheme();\n\n const noDataTextStyle = (chartsTheme.noDataOption.title as TitleComponentOption).textStyle as SxProps;\n\n const option: EChartsCoreOption = {\n tooltip: {\n appendToBody: true,\n formatter: (params: { data: StatusHistoryDataItem; marker: string }) => {\n return generateTooltipHTML({\n data: params.data.value,\n label: params.data.label,\n marker: params.marker,\n xAxisCategories,\n yAxisCategories,\n theme,\n });\n },\n },\n grid: {\n top: '5%',\n bottom: '5%',\n },\n xAxis: {\n type: 'category',\n data: xAxisCategories,\n axisLine: {\n show: false,\n },\n splitArea: {\n show: false,\n },\n axisLabel: {\n hideOverlap: true,\n formatter: getFormattedStatusHistoryAxisLabel(timeScale?.rangeMs ?? 0, timeZone),\n },\n },\n yAxis: {\n type: 'category',\n data: yAxisCategories,\n axisLine: {\n show: false,\n },\n splitArea: {\n show: false,\n interval: 0,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n interval: 0,\n },\n },\n visualMap: {\n show: false,\n type: 'piecewise',\n pieces: colors,\n },\n series: [\n {\n name: 'Status history',\n type: 'heatmap',\n coordinateSystem: 'cartesian2d',\n data: data,\n label: {\n show: false,\n },\n itemStyle: {\n borderWidth: 1,\n borderType: 'solid',\n borderColor: '#ffffff',\n },\n emphasis: {\n itemStyle: {\n opacity: 0.5,\n },\n },\n },\n ],\n };\n\n return (\n <Box\n style={{ height: height }}\n sx={{\n overflow: 'auto',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n {data.length ? (\n <EChart\n style={{\n width: '100%',\n height: height,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n ) : (\n <Typography sx={{ ...noDataTextStyle }}>No data</Typography>\n )}\n </Box>\n );\n};\n"],"names":["Box","Typography","useTheme","HeatmapChart","EChartsHeatmapChart","GridComponent","DatasetComponent","TitleComponent","TooltipComponent","VisualMapComponent","use","CanvasRenderer","EChart","useChartsTheme","useTimeZone","getFormattedStatusHistoryAxisLabel","generateTooltipHTML","StatusHistoryChartBase","props","height","data","xAxisCategories","yAxisCategories","timeScale","colors","timeZone","chartsTheme","theme","noDataTextStyle","noDataOption","title","textStyle","option","tooltip","appendToBody","formatter","params","value","label","marker","grid","top","bottom","xAxis","type","axisLine","show","splitArea","axisLabel","hideOverlap","rangeMs","yAxis","interval","splitLine","visualMap","pieces","series","name","coordinateSystem","itemStyle","borderWidth","borderType","borderColor","emphasis","opacity","style","sx","overflow","display","justifyContent","alignItems","length","width","echartsTheme"],"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,EAAWC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AACnE,SAASC,gBAAgBC,mBAAmB,QAAQ,iBAAiB;AACrE,SACEC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,gBAAgB,EAChBC,kBAAkB,QAEb,qBAAqB;AAC5B,SAASC,GAAG,QAAQ,eAAe;AACnC,SAASC,cAAc,QAAQ,oBAAoB;AAInD,SAASC,MAAM,EAAEC,cAAc,EAAEC,WAAW,QAAQ,yBAAyB;AAC7E,SAASC,kCAAkC,QAAQ,mCAAmC;AACtF,SAASC,mBAAmB,QAAQ,yBAAyB;AAE7DN,IAAI;IACFN;IACAK;IACAJ;IACAC;IACAC;IACAC;IACAG;CACD;AAwBD,OAAO,MAAMM,yBAA0D,CAACC;IACtE,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAEC,eAAe,EAAEC,eAAe,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGN;IAE9E,MAAM,EAAEO,QAAQ,EAAE,GAAGX;IACrB,MAAMY,cAAcb;IACpB,MAAMc,QAAQzB;IAEd,MAAM0B,kBAAkB,AAACF,YAAYG,YAAY,CAACC,KAAK,CAA0BC,SAAS;IAE1F,MAAMC,SAA4B;QAChCC,SAAS;YACPC,cAAc;YACdC,WAAW,CAACC;gBACV,OAAOpB,oBAAoB;oBACzBI,MAAMgB,OAAOhB,IAAI,CAACiB,KAAK;oBACvBC,OAAOF,OAAOhB,IAAI,CAACkB,KAAK;oBACxBC,QAAQH,OAAOG,MAAM;oBACrBlB;oBACAC;oBACAK;gBACF;YACF;QACF;QACAa,MAAM;YACJC,KAAK;YACLC,QAAQ;QACV;QACAC,OAAO;YACLC,MAAM;YACNxB,MAAMC;YACNwB,UAAU;gBACRC,MAAM;YACR;YACAC,WAAW;gBACTD,MAAM;YACR;YACAE,WAAW;gBACTC,aAAa;gBACbd,WAAWpB,mCAAmCQ,WAAW2B,WAAW,GAAGzB;YACzE;QACF;QACA0B,OAAO;YACLP,MAAM;YACNxB,MAAME;YACNuB,UAAU;gBACRC,MAAM;YACR;YACAC,WAAW;gBACTD,MAAM;gBACNM,UAAU;YACZ;YACAC,WAAW;gBACTP,MAAM;YACR;YACAE,WAAW;gBACTI,UAAU;YACZ;QACF;QACAE,WAAW;YACTR,MAAM;YACNF,MAAM;YACNW,QAAQ/B;QACV;QACAgC,QAAQ;YACN;gBACEC,MAAM;gBACNb,MAAM;gBACNc,kBAAkB;gBAClBtC,MAAMA;gBACNkB,OAAO;oBACLQ,MAAM;gBACR;gBACAa,WAAW;oBACTC,aAAa;oBACbC,YAAY;oBACZC,aAAa;gBACf;gBACAC,UAAU;oBACRJ,WAAW;wBACTK,SAAS;oBACX;gBACF;YACF;SACD;IACH;IAEA,qBACE,KAAChE;QACCiE,OAAO;YAAE9C,QAAQA;QAAO;QACxB+C,IAAI;YACFC,UAAU;YACVC,SAAS;YACTC,gBAAgB;YAChBC,YAAY;QACd;kBAEClD,KAAKmD,MAAM,iBACV,KAAC3D;YACCqD,OAAO;gBACLO,OAAO;gBACPrD,QAAQA;YACV;YACAa,QAAQA;YACRL,OAAOD,YAAY+C,YAAY;2BAGjC,KAACxE;YAAWiE,IAAI;gBAAE,GAAGtC,eAAe;YAAC;sBAAG;;;AAIhD,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { LegendOptionsEditor } from '@perses-dev/plugin-system';
|
|
15
15
|
import { produce } from 'immer';
|
|
16
16
|
import { OptionsEditorGroup, OptionsEditorGrid, OptionsEditorColumn } from '@perses-dev/components';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/StatusHistoryChartOptionsEditorSettings.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 { LegendOptionsEditor, LegendOptionsEditorProps } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport { OptionsEditorGroup, OptionsEditorGrid, OptionsEditorColumn } from '@perses-dev/components';\nimport { Button } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { StatusHistoryChartOptions, StatusHistroyChartEditorProps } from './status-history-model.js';\n\nexport function StatusHistoryChartOptionsEditorSettings(props: StatusHistroyChartEditorProps): ReactElement {\n const { onChange, value } = props;\n\n const handleLegendChange: LegendOptionsEditorProps['onChange'] = (newLegend) => {\n // TODO (sjcobb): fix type, add position, fix glitch\n onChange(\n produce(value, (draft: StatusHistoryChartOptions) => {\n draft.legend = newLegend;\n })\n );\n };\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <LegendOptionsEditor\n calculation=\"aggregation\"\n showValuesEditor={false}\n value={value.legend}\n onChange={handleLegendChange}\n />\n </OptionsEditorColumn>\n <OptionsEditorColumn>\n <OptionsEditorGroup title=\"Reset Settings\">\n <Button\n variant=\"outlined\"\n color=\"secondary\"\n onClick={() => {\n onChange(\n produce(value, (draft: StatusHistoryChartOptions) => {\n // reset button removes all optional panel options\n draft.legend = undefined;\n })\n );\n }}\n >\n Reset To Defaults\n </Button>\n </OptionsEditorGroup>\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["LegendOptionsEditor","produce","OptionsEditorGroup","OptionsEditorGrid","OptionsEditorColumn","Button","StatusHistoryChartOptionsEditorSettings","props","onChange","value","handleLegendChange","newLegend","draft","legend","calculation","showValuesEditor","title","variant","color","onClick","undefined"],"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/StatusHistoryChartOptionsEditorSettings.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 { LegendOptionsEditor, LegendOptionsEditorProps } from '@perses-dev/plugin-system';\nimport { produce } from 'immer';\nimport { OptionsEditorGroup, OptionsEditorGrid, OptionsEditorColumn } from '@perses-dev/components';\nimport { Button } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { StatusHistoryChartOptions, StatusHistroyChartEditorProps } from './status-history-model.js';\n\nexport function StatusHistoryChartOptionsEditorSettings(props: StatusHistroyChartEditorProps): ReactElement {\n const { onChange, value } = props;\n\n const handleLegendChange: LegendOptionsEditorProps['onChange'] = (newLegend) => {\n // TODO (sjcobb): fix type, add position, fix glitch\n onChange(\n produce(value, (draft: StatusHistoryChartOptions) => {\n draft.legend = newLegend;\n })\n );\n };\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <LegendOptionsEditor\n calculation=\"aggregation\"\n showValuesEditor={false}\n value={value.legend}\n onChange={handleLegendChange}\n />\n </OptionsEditorColumn>\n <OptionsEditorColumn>\n <OptionsEditorGroup title=\"Reset Settings\">\n <Button\n variant=\"outlined\"\n color=\"secondary\"\n onClick={() => {\n onChange(\n produce(value, (draft: StatusHistoryChartOptions) => {\n // reset button removes all optional panel options\n draft.legend = undefined;\n })\n );\n }}\n >\n Reset To Defaults\n </Button>\n </OptionsEditorGroup>\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["LegendOptionsEditor","produce","OptionsEditorGroup","OptionsEditorGrid","OptionsEditorColumn","Button","StatusHistoryChartOptionsEditorSettings","props","onChange","value","handleLegendChange","newLegend","draft","legend","calculation","showValuesEditor","title","variant","color","onClick","undefined"],"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,mBAAmB,QAAkC,4BAA4B;AAC1F,SAASC,OAAO,QAAQ,QAAQ;AAChC,SAASC,kBAAkB,EAAEC,iBAAiB,EAAEC,mBAAmB,QAAQ,yBAAyB;AACpG,SAASC,MAAM,QAAQ,gBAAgB;AAIvC,OAAO,SAASC,wCAAwCC,KAAoC;IAC1F,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAE5B,MAAMG,qBAA2D,CAACC;QAChE,oDAAoD;QACpDH,SACEP,QAAQQ,OAAO,CAACG;YACdA,MAAMC,MAAM,GAAGF;QACjB;IAEJ;IAEA,qBACE,MAACR;;0BACC,KAACC;0BACC,cAAA,KAACJ;oBACCc,aAAY;oBACZC,kBAAkB;oBAClBN,OAAOA,MAAMI,MAAM;oBACnBL,UAAUE;;;0BAGd,KAACN;0BACC,cAAA,KAACF;oBAAmBc,OAAM;8BACxB,cAAA,KAACX;wBACCY,SAAQ;wBACRC,OAAM;wBACNC,SAAS;4BACPX,SACEP,QAAQQ,OAAO,CAACG;gCACd,kDAAkD;gCAClDA,MAAMC,MAAM,GAAGO;4BACjB;wBAEJ;kCACD;;;;;;AAOX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusHistoryPanel.d.ts","sourceRoot":"","sources":["../../src/StatusHistoryPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAsB,MAAM,2BAA2B,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAGtE,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,yBAAyB,EAAE,cAAc,CAAC,CAAC;AAEjG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,4BAA4B,GAAG,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"StatusHistoryPanel.d.ts","sourceRoot":"","sources":["../../src/StatusHistoryPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAsB,MAAM,2BAA2B,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAGtE,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,yBAAyB,EAAE,cAAc,CAAC,CAAC;AAEjG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,4BAA4B,GAAG,YAAY,GAAG,IAAI,CAoD3F"}
|
|
@@ -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 { Box } from '@mui/material';
|
|
15
15
|
import { ContentWithLegend, useChartsTheme } from '@perses-dev/components';
|
|
16
16
|
import { validateLegendSpec } from '@perses-dev/plugin-system';
|
|
@@ -32,9 +32,6 @@ export function StatusHistoryPanel(props) {
|
|
|
32
32
|
width: contentDimensions.width - PADDING * 2,
|
|
33
33
|
height: contentDimensions.height - PADDING * 2
|
|
34
34
|
} : undefined;
|
|
35
|
-
if (!statusHistoryData || statusHistoryData.length === 0) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
35
|
return /*#__PURE__*/ _jsx(Box, {
|
|
39
36
|
sx: {
|
|
40
37
|
padding: `${PADDING}px`
|
|
@@ -58,7 +55,7 @@ export function StatusHistoryPanel(props) {
|
|
|
58
55
|
children: /*#__PURE__*/ _jsx(StatusHistoryChartBase, {
|
|
59
56
|
xAxisCategories: xAxisCategories,
|
|
60
57
|
yAxisCategories: yAxisCategories,
|
|
61
|
-
data: statusHistoryData,
|
|
58
|
+
data: statusHistoryData ?? [],
|
|
62
59
|
timeScale: timeScale,
|
|
63
60
|
height: height,
|
|
64
61
|
colors: colors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/StatusHistoryPanel.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 { Box } from '@mui/material';\nimport { ContentWithLegend, useChartsTheme } from '@perses-dev/components';\nimport { PanelProps, validateLegendSpec } from '@perses-dev/plugin-system';\nimport { merge } from 'lodash';\nimport { ReactElement, useMemo } from 'react';\nimport { TimeSeriesData } from '@perses-dev/core';\nimport { useStatusHistoryDataModel } from './utils/data-transform';\nimport { StatusHistoryChartOptions } from './status-history-model.js';\nimport { StatusHistoryChartBase } from './StatusHistoryChartBase';\n\nexport type StatusHistoryChartPanelProps = PanelProps<StatusHistoryChartOptions, TimeSeriesData>;\n\nexport function StatusHistoryPanel(props: StatusHistoryChartPanelProps): ReactElement | null {\n const { spec, contentDimensions, queryResults } = props;\n\n const legend = useMemo(() => {\n return spec.legend && validateLegendSpec(spec.legend) ? merge({}, spec.legend) : undefined;\n }, [spec.legend]);\n\n const chartsTheme = useChartsTheme();\n const PADDING = chartsTheme.container.padding.default;\n\n const { statusHistoryData, yAxisCategories, xAxisCategories, legendItems, timeScale, colors } =\n useStatusHistoryDataModel(queryResults, chartsTheme.echartsTheme.color as string[], spec);\n\n const adjustedContentDimensions: typeof contentDimensions = contentDimensions\n ? {\n width: contentDimensions.width - PADDING * 2,\n height: contentDimensions.height - PADDING * 2,\n }\n : undefined;\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/StatusHistoryPanel.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 { Box } from '@mui/material';\nimport { ContentWithLegend, useChartsTheme } from '@perses-dev/components';\nimport { PanelProps, validateLegendSpec } from '@perses-dev/plugin-system';\nimport { merge } from 'lodash';\nimport { ReactElement, useMemo } from 'react';\nimport { TimeSeriesData } from '@perses-dev/core';\nimport { useStatusHistoryDataModel } from './utils/data-transform';\nimport { StatusHistoryChartOptions } from './status-history-model.js';\nimport { StatusHistoryChartBase } from './StatusHistoryChartBase';\n\nexport type StatusHistoryChartPanelProps = PanelProps<StatusHistoryChartOptions, TimeSeriesData>;\n\nexport function StatusHistoryPanel(props: StatusHistoryChartPanelProps): ReactElement | null {\n const { spec, contentDimensions, queryResults } = props;\n\n const legend = useMemo(() => {\n return spec.legend && validateLegendSpec(spec.legend) ? merge({}, spec.legend) : undefined;\n }, [spec.legend]);\n\n const chartsTheme = useChartsTheme();\n const PADDING = chartsTheme.container.padding.default;\n\n const { statusHistoryData, yAxisCategories, xAxisCategories, legendItems, timeScale, colors } =\n useStatusHistoryDataModel(queryResults, chartsTheme.echartsTheme.color as string[], spec);\n\n const adjustedContentDimensions: typeof contentDimensions = contentDimensions\n ? {\n width: contentDimensions.width - PADDING * 2,\n height: contentDimensions.height - PADDING * 2,\n }\n : undefined;\n\n return (\n <Box sx={{ padding: `${PADDING}px` }}>\n <ContentWithLegend\n width={adjustedContentDimensions?.width ?? 400}\n height={adjustedContentDimensions?.height ?? 1000}\n legendSize={legend?.size}\n legendProps={\n legend && {\n options: legend,\n data: legendItems || [],\n selectedItems: 'ALL',\n onSelectedItemsChange: () => null,\n }\n }\n >\n {({ height, width }) => {\n return (\n <Box sx={{ height, width }}>\n <StatusHistoryChartBase\n xAxisCategories={xAxisCategories}\n yAxisCategories={yAxisCategories}\n data={statusHistoryData ?? []}\n timeScale={timeScale}\n height={height}\n colors={colors}\n />\n </Box>\n );\n }}\n </ContentWithLegend>\n </Box>\n );\n}\n"],"names":["Box","ContentWithLegend","useChartsTheme","validateLegendSpec","merge","useMemo","useStatusHistoryDataModel","StatusHistoryChartBase","StatusHistoryPanel","props","spec","contentDimensions","queryResults","legend","undefined","chartsTheme","PADDING","container","padding","default","statusHistoryData","yAxisCategories","xAxisCategories","legendItems","timeScale","colors","echartsTheme","color","adjustedContentDimensions","width","height","sx","legendSize","size","legendProps","options","data","selectedItems","onSelectedItemsChange"],"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,QAAQ,gBAAgB;AACpC,SAASC,iBAAiB,EAAEC,cAAc,QAAQ,yBAAyB;AAC3E,SAAqBC,kBAAkB,QAAQ,4BAA4B;AAC3E,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAAuBC,OAAO,QAAQ,QAAQ;AAE9C,SAASC,yBAAyB,QAAQ,yBAAyB;AAEnE,SAASC,sBAAsB,QAAQ,2BAA2B;AAIlE,OAAO,SAASC,mBAAmBC,KAAmC;IACpE,MAAM,EAAEC,IAAI,EAAEC,iBAAiB,EAAEC,YAAY,EAAE,GAAGH;IAElD,MAAMI,SAASR,QAAQ;QACrB,OAAOK,KAAKG,MAAM,IAAIV,mBAAmBO,KAAKG,MAAM,IAAIT,MAAM,CAAC,GAAGM,KAAKG,MAAM,IAAIC;IACnF,GAAG;QAACJ,KAAKG,MAAM;KAAC;IAEhB,MAAME,cAAcb;IACpB,MAAMc,UAAUD,YAAYE,SAAS,CAACC,OAAO,CAACC,OAAO;IAErD,MAAM,EAAEC,iBAAiB,EAAEC,eAAe,EAAEC,eAAe,EAAEC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAC3FnB,0BAA0BM,cAAcG,YAAYW,YAAY,CAACC,KAAK,EAAcjB;IAEtF,MAAMkB,4BAAsDjB,oBACxD;QACEkB,OAAOlB,kBAAkBkB,KAAK,GAAGb,UAAU;QAC3Cc,QAAQnB,kBAAkBmB,MAAM,GAAGd,UAAU;IAC/C,IACAF;IAEJ,qBACE,KAACd;QAAI+B,IAAI;YAAEb,SAAS,GAAGF,QAAQ,EAAE,CAAC;QAAC;kBACjC,cAAA,KAACf;YACC4B,OAAOD,2BAA2BC,SAAS;YAC3CC,QAAQF,2BAA2BE,UAAU;YAC7CE,YAAYnB,QAAQoB;YACpBC,aACErB,UAAU;gBACRsB,SAAStB;gBACTuB,MAAMb,eAAe,EAAE;gBACvBc,eAAe;gBACfC,uBAAuB,IAAM;YAC/B;sBAGD,CAAC,EAAER,MAAM,EAAED,KAAK,EAAE;gBACjB,qBACE,KAAC7B;oBAAI+B,IAAI;wBAAED;wBAAQD;oBAAM;8BACvB,cAAA,KAACtB;wBACCe,iBAAiBA;wBACjBD,iBAAiBA;wBACjBe,MAAMhB,qBAAqB,EAAE;wBAC7BI,WAAWA;wBACXM,QAAQA;wBACRL,QAAQA;;;YAIhB;;;AAIR"}
|
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"}
|
|
@@ -43,6 +43,7 @@ const StatusHistoryChartBase = (props)=>{
|
|
|
43
43
|
const { timeZone } = (0, _components1.useTimeZone)();
|
|
44
44
|
const chartsTheme = (0, _components1.useChartsTheme)();
|
|
45
45
|
const theme = (0, _material.useTheme)();
|
|
46
|
+
const noDataTextStyle = chartsTheme.noDataOption.title.textStyle;
|
|
46
47
|
const option = {
|
|
47
48
|
tooltip: {
|
|
48
49
|
appendToBody: true,
|
|
@@ -124,15 +125,23 @@ const StatusHistoryChartBase = (props)=>{
|
|
|
124
125
|
height: height
|
|
125
126
|
},
|
|
126
127
|
sx: {
|
|
127
|
-
overflow: 'auto'
|
|
128
|
+
overflow: 'auto',
|
|
129
|
+
display: 'flex',
|
|
130
|
+
justifyContent: 'center',
|
|
131
|
+
alignItems: 'center'
|
|
128
132
|
},
|
|
129
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.EChart, {
|
|
130
|
-
|
|
133
|
+
children: data.length ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_components1.EChart, {
|
|
134
|
+
style: {
|
|
131
135
|
width: '100%',
|
|
132
136
|
height: height
|
|
133
137
|
},
|
|
134
138
|
option: option,
|
|
135
139
|
theme: chartsTheme.echartsTheme
|
|
140
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
141
|
+
sx: {
|
|
142
|
+
...noDataTextStyle
|
|
143
|
+
},
|
|
144
|
+
children: "No data"
|
|
136
145
|
})
|
|
137
146
|
});
|
|
138
147
|
};
|
|
@@ -42,9 +42,6 @@ function StatusHistoryPanel(props) {
|
|
|
42
42
|
width: contentDimensions.width - PADDING * 2,
|
|
43
43
|
height: contentDimensions.height - PADDING * 2
|
|
44
44
|
} : undefined;
|
|
45
|
-
if (!statusHistoryData || statusHistoryData.length === 0) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
45
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
49
46
|
sx: {
|
|
50
47
|
padding: `${PADDING}px`
|
|
@@ -68,7 +65,7 @@ function StatusHistoryPanel(props) {
|
|
|
68
65
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_StatusHistoryChartBase.StatusHistoryChartBase, {
|
|
69
66
|
xAxisCategories: xAxisCategories,
|
|
70
67
|
yAxisCategories: yAxisCategories,
|
|
71
|
-
data: statusHistoryData,
|
|
68
|
+
data: statusHistoryData ?? [],
|
|
72
69
|
timeScale: timeScale,
|
|
73
70
|
height: height,
|
|
74
71
|
colors: colors
|
|
@@ -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")));
|
|
@@ -17,23 +17,23 @@ 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
|
-
FALLBACK_COLOR
|
|
24
|
+
get FALLBACK_COLOR () {
|
|
25
25
|
return FALLBACK_COLOR;
|
|
26
26
|
},
|
|
27
|
-
getColorForValue
|
|
27
|
+
get getColorForValue () {
|
|
28
28
|
return getColorForValue;
|
|
29
29
|
},
|
|
30
|
-
getColorsForValues
|
|
30
|
+
get getColorsForValues () {
|
|
31
31
|
return getColorsForValues;
|
|
32
32
|
},
|
|
33
|
-
hexToHSL
|
|
33
|
+
get hexToHSL () {
|
|
34
34
|
return hexToHSL;
|
|
35
35
|
},
|
|
36
|
-
hslToHex
|
|
36
|
+
get hslToHex () {
|
|
37
37
|
return hslToHex;
|
|
38
38
|
}
|
|
39
39
|
});
|
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "StatusHistoryChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.
|
|
8
|
+
"buildVersion": "0.11.1",
|
|
9
9
|
"buildName": "@perses-dev/status-history-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/StatusHistoryChart.
|
|
12
|
+
"name": "__mf/js/StatusHistoryChart.5b8469b5.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"api": ""
|
|
21
21
|
},
|
|
22
22
|
"globalName": "StatusHistoryChart",
|
|
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/StatusHistoryChart/\"; }"
|
|
26
26
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"js": {
|
|
36
36
|
"async": [],
|
|
37
37
|
"sync": [
|
|
38
|
-
"__mf/js/async/
|
|
38
|
+
"__mf/js/async/274.6a9f4c88.js"
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"css": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"js": {
|
|
55
55
|
"async": [],
|
|
56
56
|
"sync": [
|
|
57
|
-
"__mf/js/async/
|
|
58
|
-
"__mf/js/async/
|
|
57
|
+
"__mf/js/async/235.59e4cd91.js",
|
|
58
|
+
"__mf/js/async/616.1c080169.js"
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
"css": {
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"js": {
|
|
75
75
|
"async": [],
|
|
76
76
|
"sync": [
|
|
77
|
-
"__mf/js/async/
|
|
78
|
-
"__mf/js/async/
|
|
77
|
+
"__mf/js/async/587.4f01f05a.js",
|
|
78
|
+
"__mf/js/async/968.c21f2475.js"
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
81
|
"css": {
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
{
|
|
88
88
|
"id": "StatusHistoryChart:@perses-dev/components",
|
|
89
89
|
"name": "@perses-dev/components",
|
|
90
|
-
"version": "0.
|
|
90
|
+
"version": "0.53.0-beta.2",
|
|
91
91
|
"singleton": true,
|
|
92
|
-
"requiredVersion": "^0.
|
|
92
|
+
"requiredVersion": "^0.53.0-beta.2",
|
|
93
93
|
"assets": {
|
|
94
94
|
"js": {
|
|
95
95
|
"async": [],
|
|
96
96
|
"sync": [
|
|
97
|
-
"__mf/js/async/
|
|
97
|
+
"__mf/js/async/790.6a647c6c.js"
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
100
|
"css": {
|
|
@@ -106,14 +106,14 @@
|
|
|
106
106
|
{
|
|
107
107
|
"id": "StatusHistoryChart:@perses-dev/plugin-system",
|
|
108
108
|
"name": "@perses-dev/plugin-system",
|
|
109
|
-
"version": "0.
|
|
109
|
+
"version": "0.53.0-beta.2",
|
|
110
110
|
"singleton": true,
|
|
111
|
-
"requiredVersion": "^0.
|
|
111
|
+
"requiredVersion": "^0.53.0-beta.2",
|
|
112
112
|
"assets": {
|
|
113
113
|
"js": {
|
|
114
114
|
"async": [],
|
|
115
115
|
"sync": [
|
|
116
|
-
"__mf/js/async/
|
|
116
|
+
"__mf/js/async/501.1e94e650.js"
|
|
117
117
|
]
|
|
118
118
|
},
|
|
119
119
|
"css": {
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"js": {
|
|
133
133
|
"async": [],
|
|
134
134
|
"sync": [
|
|
135
|
-
"__mf/js/async/
|
|
135
|
+
"__mf/js/async/283.94f964e7.js"
|
|
136
136
|
]
|
|
137
137
|
},
|
|
138
138
|
"css": {
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"js": {
|
|
152
152
|
"async": [],
|
|
153
153
|
"sync": [
|
|
154
|
-
"__mf/js/async/
|
|
154
|
+
"__mf/js/async/192.8fa94a82.js"
|
|
155
155
|
]
|
|
156
156
|
},
|
|
157
157
|
"css": {
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"js": {
|
|
171
171
|
"async": [],
|
|
172
172
|
"sync": [
|
|
173
|
-
"__mf/js/async/
|
|
173
|
+
"__mf/js/async/873.937a61ba.js"
|
|
174
174
|
]
|
|
175
175
|
},
|
|
176
176
|
"css": {
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"js": {
|
|
190
190
|
"async": [],
|
|
191
191
|
"sync": [
|
|
192
|
-
"__mf/js/async/
|
|
192
|
+
"__mf/js/async/392.0b29b077.js"
|
|
193
193
|
]
|
|
194
194
|
},
|
|
195
195
|
"css": {
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"js": {
|
|
209
209
|
"async": [],
|
|
210
210
|
"sync": [
|
|
211
|
-
"__mf/js/async/
|
|
211
|
+
"__mf/js/async/470.a6095e83.js"
|
|
212
212
|
]
|
|
213
213
|
},
|
|
214
214
|
"css": {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"js": {
|
|
228
228
|
"async": [],
|
|
229
229
|
"sync": [
|
|
230
|
-
"__mf/js/async/
|
|
230
|
+
"__mf/js/async/356.dfb4c773.js"
|
|
231
231
|
]
|
|
232
232
|
},
|
|
233
233
|
"css": {
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"js": {
|
|
247
247
|
"async": [],
|
|
248
248
|
"sync": [
|
|
249
|
-
"__mf/js/async/
|
|
249
|
+
"__mf/js/async/121.17e95c0f.js"
|
|
250
250
|
]
|
|
251
251
|
},
|
|
252
252
|
"css": {
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
"js": {
|
|
266
266
|
"async": [],
|
|
267
267
|
"sync": [
|
|
268
|
-
"__mf/js/async/
|
|
268
|
+
"__mf/js/async/978.563a3078.js"
|
|
269
269
|
]
|
|
270
270
|
},
|
|
271
271
|
"css": {
|
|
@@ -283,25 +283,25 @@
|
|
|
283
283
|
"assets": {
|
|
284
284
|
"js": {
|
|
285
285
|
"sync": [
|
|
286
|
-
"__mf/js/async/
|
|
287
|
-
"__mf/js/async/
|
|
288
|
-
"__mf/js/async/
|
|
289
|
-
"__mf/js/async/__federation_expose_StatusHistoryChart.
|
|
286
|
+
"__mf/js/async/525.9b8b1f1d.js",
|
|
287
|
+
"__mf/js/async/644.cbae4105.js",
|
|
288
|
+
"__mf/js/async/153.a05b947a.js",
|
|
289
|
+
"__mf/js/async/__federation_expose_StatusHistoryChart.8d3d006b.js"
|
|
290
290
|
],
|
|
291
291
|
"async": [
|
|
292
|
-
"__mf/js/async/lib-router.
|
|
293
|
-
"__mf/js/async/
|
|
294
|
-
"__mf/js/async/
|
|
295
|
-
"__mf/js/async/
|
|
296
|
-
"__mf/js/async/
|
|
297
|
-
"__mf/js/async/
|
|
292
|
+
"__mf/js/async/lib-router.9ccc993b.js",
|
|
293
|
+
"__mf/js/async/490.74645007.js",
|
|
294
|
+
"__mf/js/async/177.8e51631b.js",
|
|
295
|
+
"__mf/js/async/588.3d58e41b.js",
|
|
296
|
+
"__mf/js/async/71.a42c00bc.js",
|
|
297
|
+
"__mf/js/async/623.a8ebcf5c.js"
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
300
|
"css": {
|
|
301
301
|
"sync": [],
|
|
302
302
|
"async": [
|
|
303
|
-
"__mf/css/async/
|
|
304
|
-
"__mf/css/async/
|
|
303
|
+
"__mf/css/async/823.d3010b86.css",
|
|
304
|
+
"__mf/css/async/61.d3010b86.css"
|
|
305
305
|
]
|
|
306
306
|
}
|
|
307
307
|
},
|