@perses-dev/heatmap-chart-plugin 0.4.0-rc.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/{HeatMapChart.64173994.js → HeatMapChart.a5f52cc0.js} +3 -3
- package/__mf/js/async/12.4ae967ba.js +2 -0
- package/__mf/js/async/180.c67f24c4.js +71 -0
- package/__mf/js/async/392.81aab132.js +2 -0
- package/__mf/js/async/980.092bc51a.js +83 -0
- package/__mf/js/async/__federation_expose_HeatMapChart.c74c73d1.js +23 -0
- package/__mf/js/{main.73ddd86d.js → main.69b7f04b.js} +3 -3
- package/lib/HeatMapChart.js +1 -1
- package/lib/HeatMapChart.js.map +1 -1
- package/lib/bootstrap.js +1 -1
- package/lib/bootstrap.js.map +1 -1
- package/lib/cjs/HeatMapChart.js +1 -1
- package/lib/cjs/bootstrap.js +1 -1
- package/lib/cjs/components/HeatMapChart.js +97 -20
- package/lib/cjs/components/HeatMapChartOptionsEditorSettings.js +61 -6
- package/lib/cjs/components/HeatMapChartPanel.js +87 -38
- package/lib/cjs/components/HeatMapTooltip.js +6 -6
- package/lib/cjs/components/index.js +1 -1
- package/lib/cjs/env.d.js +1 -1
- package/lib/cjs/getPluginModule.js +12 -0
- package/lib/cjs/heat-map-chart-model.js +25 -1
- package/lib/cjs/index-federation.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/setup-tests.js +1 -1
- package/lib/cjs/utils/data-transform.js +12 -0
- package/lib/cjs/utils/get-formatted-axis-label.js +1 -1
- package/lib/cjs/utils/index.js +1 -1
- package/lib/cjs/utils/thresholds.js +12 -0
- package/lib/components/HeatMapChart.d.ts +6 -3
- package/lib/components/HeatMapChart.d.ts.map +1 -1
- package/lib/components/HeatMapChart.js +97 -20
- package/lib/components/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChartOptionsEditorSettings.d.ts.map +1 -1
- package/lib/components/HeatMapChartOptionsEditorSettings.js +64 -9
- package/lib/components/HeatMapChartOptionsEditorSettings.js.map +1 -1
- package/lib/components/HeatMapChartPanel.d.ts.map +1 -1
- package/lib/components/HeatMapChartPanel.js +87 -38
- package/lib/components/HeatMapChartPanel.js.map +1 -1
- package/lib/components/HeatMapTooltip.d.ts +1 -2
- package/lib/components/HeatMapTooltip.d.ts.map +1 -1
- package/lib/components/HeatMapTooltip.js +6 -6
- package/lib/components/HeatMapTooltip.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/env.d.js +1 -1
- package/lib/env.d.js.map +1 -1
- package/lib/getPluginModule.d.ts.map +1 -1
- package/lib/getPluginModule.js +12 -0
- package/lib/getPluginModule.js.map +1 -1
- package/lib/heat-map-chart-model.d.ts +13 -0
- package/lib/heat-map-chart-model.d.ts.map +1 -1
- package/lib/heat-map-chart-model.js +19 -1
- package/lib/heat-map-chart-model.js.map +1 -1
- package/lib/index-federation.js +1 -1
- package/lib/index-federation.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/setup-tests.js +1 -1
- package/lib/setup-tests.js.map +1 -1
- package/lib/utils/data-transform.d.ts.map +1 -1
- package/lib/utils/data-transform.js +12 -0
- package/lib/utils/data-transform.js.map +1 -1
- package/lib/utils/get-formatted-axis-label.js +1 -1
- package/lib/utils/get-formatted-axis-label.js.map +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/thresholds.d.ts.map +1 -1
- package/lib/utils/thresholds.js +12 -0
- package/lib/utils/thresholds.js.map +1 -1
- package/mf-manifest.json +13 -13
- package/mf-stats.json +13 -13
- package/package.json +4 -4
- package/__mf/js/async/12.4a0642db.js +0 -2
- package/__mf/js/async/277.34ae0ac5.js +0 -71
- package/__mf/js/async/392.de783cd4.js +0 -2
- package/__mf/js/async/700.a5530423.js +0 -83
- package/__mf/js/async/__federation_expose_HeatMapChart.5ef80ecb.js +0 -23
- /package/__mf/js/async/{12.4a0642db.js.LICENSE.txt → 12.4ae967ba.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{277.34ae0ac5.js.LICENSE.txt → 180.c67f24c4.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.de783cd4.js.LICENSE.txt → 392.81aab132.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{700.a5530423.js.LICENSE.txt → 980.092bc51a.js.LICENSE.txt} +0 -0
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";(self.chunk_HeatMapChart=self.chunk_HeatMapChart||[]).push([["21"],{4089:function(e,t,a){a.r(t),a.d(t,{HeatMapChart:()=>F});var o=a(2540),r=a(8003),i=a(7266),n=a(3945),l=a(5632),s=a.n(l);let d={unit:"decimal"};var u=a(315),h=a(8091),m=a(451),p=a(2810),c=a(4653),f=a(9356),x=a(6599),g=a(1785);(0,c.Y)([f.a]);let y=["#313695","#4575b4","#74add1","#abd9e9","#e0f3f8","#ffffbf","#fee090","#fdae61","#f46d43","#d73027","#a50026"];function v(e){let{width:t,height:a,data:r,xAxisCategories:n,yAxisCategories:l,yAxisFormat:s,countFormat:d,countMin:u,countMax:h,timeScale:c,showVisualMap:f}=e,v=(0,i.useChartsTheme)(),F=(0,x.A)(),{timeZone:M}=(0,i.useTimeZone)(),A=(0,m.useMemo)(()=>{var e;return{tooltip:{appendToBody:!0,formatter:e=>(function(e){let{data:t,label:a,marker:o,xAxisCategories:r,yAxisCategories:n,theme:l,yAxisFormat:s,countFormat:d}=e,[u,h]=t,m=r[u],{formattedDate:c,formattedTime:f}=(0,i.getDateAndTime)(m),x=(0,g.AH)`
|
|
2
|
-
border-bottom: 1px solid ${l.palette.grey[500]};
|
|
3
|
-
padding-bottom: 8px;
|
|
4
|
-
`,y=(0,g.AH)`
|
|
5
|
-
display: flex;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
padding-top: 8px;
|
|
8
|
-
`,v=(0,g.AH)`
|
|
9
|
-
margin-right: 16px;
|
|
10
|
-
`,F=parseFloat(n[h]),M=n[h+1]?parseFloat(n[h+1]):parseFloat(n[h])+parseFloat(n[h])-parseFloat(n[h-1]);return`
|
|
11
|
-
<div>
|
|
12
|
-
<div style="${x.styles}">${c} ${f}</div>
|
|
13
|
-
<div style="${y.styles}">
|
|
14
|
-
<div style="${v.styles}">
|
|
15
|
-
${o}
|
|
16
|
-
<strong>${(0,p.formatValue)(F,s)} - ${(0,p.formatValue)(M,s)}</strong>
|
|
17
|
-
</div>
|
|
18
|
-
<div>
|
|
19
|
-
${(0,p.formatValue)(parseFloat(a),d)}
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
`})({data:e.data.value,label:e.data.label,marker:e.marker,xAxisCategories:n,yAxisCategories:l,theme:F,yAxisFormat:s,countFormat:d})},xAxis:{type:"category",data:n,axisLabel:{hideOverlap:!0,formatter:(e=(null==c?void 0:c.rangeMs)??0,function(t){let a=new Date(Number(t));return e>15768e7?(0,i.formatWithTimeZone)(a,"yyy",M):e>63072e6?(0,i.formatWithTimeZone)(a,"MMM yyy",M):e>864e6&&e<1577664e4?(0,i.formatWithTimeZone)(a,"dd.MM",M):e>1728e5&&e<=864e6?(0,i.formatWithTimeZone)(a,"dd.MM HH:mm",M):(0,i.formatWithTimeZone)(a,"HH:mm",M)})}},yAxis:(0,i.getFormattedAxis)({type:"category",data:l},s),visualMap:{show:f??!1,type:"continuous",min:u,max:h,realtime:!1,itemHeight:a-30,itemWidth:10,orient:"vertical",left:"right",top:"center",inRange:{color:y},textStyle:{color:F.palette.text.primary,textBorderColor:F.palette.background.default,textBorderWidth:5}},series:[{name:"Gaussian",type:"heatmap",data:r,emphasis:{itemStyle:{borderColor:"#333",borderWidth:1}},progressive:1e3,animation:!1}]}},[n,null==c?void 0:c.rangeMs,M,l,s,f,u,h,a,F,r,d]),C=(0,m.useMemo)(()=>(0,o.jsx)(i.EChart,{style:{width:t,height:a},sx:{padding:`${v.container.padding.default}px`},option:A,theme:v.echartsTheme}),[v.container.padding.default,v.echartsTheme,a,A,t]);return(0,o.jsx)(o.Fragment,{children:C})}let F={PanelComponent:function(e){let{spec:t,contentDimensions:a,queryResults:r}=e,i=s()({},d,t.yAxisFormat),n=s()({},d,t.countFormat),{data:l,xAxisCategories:c,yAxisCategories:f,countMin:x,countMax:g,timeScale:y}=(0,m.useMemo)(()=>{let e;if(!r||0===r.length||1!=r.length||1!=r[0].data.series.length||void 0===r[0].data.series[0].histograms)return{data:[],xAxisCategories:[],yAxisCategories:[],countMin:0,countMax:0,timeScale:void 0};let t=r[0].data.series[0],o=(e=r.map(e=>e.data),(0,p.getCommonTimeScale)(e)),i=function(e){if(!e)return[];let{startMs:t,endMs:a,stepMs:o}=e,r=[];for(let e=t;e<=a;e+=o)r.push(e);return r}(o),n=1/0,l=-1/0,s=1/0,d=-1/0;for(let[e,a]of(null==t?void 0:t.histograms)??[])for(let e of(null==a?void 0:a.buckets)??[]){let[t,a,o,r]=e,i=parseFloat(a),u=parseFloat(o),h=parseFloat(r);i<n&&(n=i),u>l&&(l=u),h<s&&(s=h),h>d&&(d=h)}let u=(null==a?void 0:a.height)??200,h=(l-n)*2/u,m=Array.from({length:Math.ceil(u/2)},(e,t)=>(n+t*h).toFixed(3)),c=[];for(let[e,a]of(null==t?void 0:t.histograms)??[]){let t=i.findIndex(t=>t===1e3*e);for(let e of(null==a?void 0:a.buckets)??[]){let[a,o,r,i]=e,l=Math.floor((parseFloat(o)-n)/h),s=Math.ceil((parseFloat(r)-n)/h);for(let e=0;e<s-l;e++)c.push({value:[t,l+e,parseFloat(i)],label:i})}}return{data:c,xAxisCategories:i,yAxisCategories:m,countMin:s,countMax:d,timeScale:o}},[null==a?void 0:a.height,r]);return r.length>1?(0,o.jsx)(u.A,{justifyContent:"center",height:"100%",children:(0,o.jsx)(h.A,{variant:"body2",textAlign:"center",children:"Only one query at a time is supported for now"})}):0===l.length?(0,o.jsx)(u.A,{justifyContent:"center",height:"100%",children:(0,o.jsx)(h.A,{variant:"body2",textAlign:"center",children:"No data available (only native histograms are supported for now)"})}):void 0===a?null:(0,o.jsx)(u.A,{direction:"row",justifyContent:"center",alignItems:"center",children:(0,o.jsx)(v,{width:a.width,height:a.height,data:l,xAxisCategories:c,yAxisCategories:f,yAxisFormat:i,countFormat:n,countMin:x,countMax:g,timeScale:y,showVisualMap:t.showVisualMap})})},supportedQueryTypes:["TimeSeriesQuery"],queryOptions:{mode:"range"},panelOptionsEditorComponents:[{label:"Settings",content:function(e){let{onChange:t,value:a}=e,l=s()({},d,a.yAxisFormat),u=s()({},d,a.countFormat);return(0,o.jsxs)(i.OptionsEditorGrid,{children:[(0,o.jsx)(i.OptionsEditorColumn,{children:(0,o.jsxs)(i.OptionsEditorGroup,{title:"Bucket Count",children:[(0,o.jsx)(i.FormatControls,{value:u,onChange:e=>{t((0,n.produce)(a,t=>{t.countFormat=e}))}}),(0,o.jsx)(i.OptionsEditorControl,{label:"Show Visual Map",control:(0,o.jsx)(r.A,{checked:!!a.showVisualMap,onChange:(e,o)=>{t((0,n.produce)(a,e=>{e.showVisualMap=o}))}})})]})}),(0,o.jsx)(i.OptionsEditorColumn,{children:(0,o.jsx)(i.OptionsEditorGroup,{title:"Y Axis",children:(0,o.jsx)(i.FormatControls,{value:l,onChange:e=>{t((0,n.produce)(a,t=>{t.yAxisFormat=e}))}})})})]})}}],createInitialOptions:function(){return{yAxisFormat:d,countFormat:d,showVisualMap:!0}}}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|