@perses-dev/histogram-chart-plugin 0.12.0-beta.2 → 0.12.0-rc.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/{HistogramChart.7392c881.js → HistogramChart.b4f86f84.js} +2 -2
- package/__mf/js/async/{17.9ef3526a.js → 892.aac557c6.js} +13 -13
- package/__mf/js/async/__federation_expose_HistogramChart.b6942c55.js +1 -0
- package/__mf/js/{main.246e6111.js → main.664b45f6.js} +2 -2
- package/mf-manifest.json +10 -10
- package/mf-stats.json +10 -10
- package/package.json +4 -4
- package/__mf/js/async/__federation_expose_HistogramChart.b3613fda.js +0 -1
- /package/__mf/css/async/{17.85c2cbf6.css → 892.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{17.9ef3526a.js.LICENSE.txt → 892.aac557c6.js.LICENSE.txt} +0 -0
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "HistogramChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.12.0-
|
|
8
|
+
"buildVersion": "0.12.0-rc.1",
|
|
9
9
|
"buildName": "@perses-dev/histogram-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/HistogramChart.
|
|
12
|
+
"name": "__mf/js/HistogramChart.b4f86f84.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
{
|
|
28
28
|
"id": "HistogramChart:@perses-dev/components",
|
|
29
29
|
"name": "@perses-dev/components",
|
|
30
|
-
"version": "0.54.0-
|
|
30
|
+
"version": "0.54.0-rc.1",
|
|
31
31
|
"singleton": true,
|
|
32
|
-
"requiredVersion": "^0.54.0-
|
|
32
|
+
"requiredVersion": "^0.54.0-rc.1",
|
|
33
33
|
"assets": {
|
|
34
34
|
"js": {
|
|
35
35
|
"async": [],
|
|
36
36
|
"sync": [
|
|
37
|
-
"__mf/js/async/
|
|
37
|
+
"__mf/js/async/892.aac557c6.js"
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"css": {
|
|
41
41
|
"async": [],
|
|
42
42
|
"sync": [
|
|
43
|
-
"__mf/css/async/
|
|
43
|
+
"__mf/css/async/892.85c2cbf6.css"
|
|
44
44
|
]
|
|
45
45
|
}
|
|
46
46
|
},
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
{
|
|
50
50
|
"id": "HistogramChart:@perses-dev/spec",
|
|
51
51
|
"name": "@perses-dev/spec",
|
|
52
|
-
"version": "0.2.0-
|
|
52
|
+
"version": "0.2.0-rc.0",
|
|
53
53
|
"singleton": true,
|
|
54
|
-
"requiredVersion": "^0.2.0-
|
|
54
|
+
"requiredVersion": "^0.2.0-rc.0",
|
|
55
55
|
"assets": {
|
|
56
56
|
"js": {
|
|
57
57
|
"async": [],
|
|
@@ -156,14 +156,14 @@
|
|
|
156
156
|
"js": {
|
|
157
157
|
"sync": [
|
|
158
158
|
"__mf/js/async/953.5b6a6f54.js",
|
|
159
|
-
"__mf/js/async/__federation_expose_HistogramChart.
|
|
159
|
+
"__mf/js/async/__federation_expose_HistogramChart.b6942c55.js"
|
|
160
160
|
],
|
|
161
161
|
"async": []
|
|
162
162
|
},
|
|
163
163
|
"css": {
|
|
164
164
|
"sync": [],
|
|
165
165
|
"async": [
|
|
166
|
-
"__mf/css/async/
|
|
166
|
+
"__mf/css/async/892.85c2cbf6.css"
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
},
|
package/mf-stats.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "HistogramChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.12.0-
|
|
8
|
+
"buildVersion": "0.12.0-rc.1",
|
|
9
9
|
"buildName": "@perses-dev/histogram-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/HistogramChart.
|
|
12
|
+
"name": "__mf/js/HistogramChart.b4f86f84.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"shared": [
|
|
27
27
|
{
|
|
28
28
|
"singleton": true,
|
|
29
|
-
"requiredVersion": "^0.54.0-
|
|
29
|
+
"requiredVersion": "^0.54.0-rc.1",
|
|
30
30
|
"shareScope": "default",
|
|
31
31
|
"name": "@perses-dev/components",
|
|
32
|
-
"version": "0.54.0-
|
|
32
|
+
"version": "0.54.0-rc.1",
|
|
33
33
|
"eager": false,
|
|
34
34
|
"id": "HistogramChart:@perses-dev/components",
|
|
35
35
|
"assets": {
|
|
36
36
|
"js": {
|
|
37
37
|
"async": [],
|
|
38
38
|
"sync": [
|
|
39
|
-
"__mf/js/async/
|
|
39
|
+
"__mf/js/async/892.aac557c6.js"
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"css": {
|
|
43
43
|
"async": [],
|
|
44
44
|
"sync": [
|
|
45
|
-
"__mf/css/async/
|
|
45
|
+
"__mf/css/async/892.85c2cbf6.css"
|
|
46
46
|
]
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"singleton": true,
|
|
57
|
-
"requiredVersion": "^0.2.0-
|
|
57
|
+
"requiredVersion": "^0.2.0-rc.0",
|
|
58
58
|
"shareScope": "default",
|
|
59
59
|
"name": "@perses-dev/spec",
|
|
60
|
-
"version": "0.2.0-
|
|
60
|
+
"version": "0.2.0-rc.0",
|
|
61
61
|
"eager": false,
|
|
62
62
|
"id": "HistogramChart:@perses-dev/spec",
|
|
63
63
|
"assets": {
|
|
@@ -193,14 +193,14 @@
|
|
|
193
193
|
"js": {
|
|
194
194
|
"sync": [
|
|
195
195
|
"__mf/js/async/953.5b6a6f54.js",
|
|
196
|
-
"__mf/js/async/__federation_expose_HistogramChart.
|
|
196
|
+
"__mf/js/async/__federation_expose_HistogramChart.b6942c55.js"
|
|
197
197
|
],
|
|
198
198
|
"async": []
|
|
199
199
|
},
|
|
200
200
|
"css": {
|
|
201
201
|
"sync": [],
|
|
202
202
|
"async": [
|
|
203
|
-
"__mf/css/async/
|
|
203
|
+
"__mf/css/async/892.85c2cbf6.css"
|
|
204
204
|
]
|
|
205
205
|
}
|
|
206
206
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/histogram-chart-plugin",
|
|
3
|
-
"version": "0.12.0-
|
|
3
|
+
"version": "0.12.0-rc.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://github.com/perses/plugins/blob/main/README.md",
|
|
6
6
|
"repository": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"module": "lib/index.js",
|
|
26
26
|
"types": "lib/index.d.ts",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@perses-dev/components": "^0.54.0-
|
|
29
|
-
"@perses-dev/plugin-system": "^0.54.0-
|
|
30
|
-
"@perses-dev/spec": "^0.2.0-
|
|
28
|
+
"@perses-dev/components": "^0.54.0-rc.1",
|
|
29
|
+
"@perses-dev/plugin-system": "^0.54.0-rc.1",
|
|
30
|
+
"@perses-dev/spec": "^0.2.0-rc.0",
|
|
31
31
|
"echarts": "5.5.0",
|
|
32
32
|
"lodash": "^4.17.21",
|
|
33
33
|
"react": "^17.0.2 || ^18.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.chunk_HistogramChart=self.chunk_HistogramChart||[]).push([["759"],{64278(e,t,o){o.r(t),o.d(t,{HistogramChart:()=>C});var l=o(62540),n=o(93648),r=o(4239),i=o(43945),a=o(25632),s=o.n(a);let u={unit:"decimal"},d={defaultColor:"#56b4e9"},h={none:{label:"None",log:void 0},2:{label:"2",log:2},10:{label:"10",log:10}},c=Object.entries(h).map(e=>{let[t,o]=e;return{id:t,...o}});var m=o(315),p=o(88091),g=o(74628),v=o(70451),f=o(74653),x=o(96331);function b(e){let{width:t,height:o,data:n,format:i,min:a,max:s,thresholds:u,logBase:d}=e,h=(0,r.useChartsTheme)(),c=(0,v.useMemo)(()=>n.buckets.map(e=>{let[t,o,l,n]=e,r=parseFloat(o),i=parseFloat(l),a=parseFloat(n);if(void 0!==d&&r<=0){if(i<=0)return null;r=.001*i}return{value:[r,i,a,t],itemStyle:{color:function(e,t,o,l){if(null==t?void 0:t.steps){let n=t.steps.map((n,r)=>e>=n.value?n.color??o.thresholds.palette[r]??t.defaultColor??l:null).filter(e=>null!==e);return n[n.length-1]??t.defaultColor??l}return(null==t?void 0:t.defaultColor)??l}(parseFloat(o),u,h,h.echartsTheme[0])}}}).filter(e=>null!==e),[h,n.buckets,d,u]),m=(0,v.useMemo)(()=>{if(void 0===d){if(a)return a;if(c&&c[0]){var e;return Math.min(0,Math.floor((null==(e=c[0])?void 0:e.value[0])??0))}}},[d,a,c]),p=(0,v.useMemo)(()=>{if(s)return s;if(c&&c[c.length-1]){var e;return Math.ceil((null==(e=c[c.length-1])?void 0:e.value[1])??1)}},[s,c]),g=(0,v.useMemo)(()=>{if(!c)return h.noDataOption;let e={scale:!1,min:m,max:p};return void 0!==d&&(e.type="log",e.logBase=d),{title:{show:!1},tooltip:{},xAxis:e,yAxis:(0,r.getFormattedAxis)({},i),series:[{type:"custom",renderItem:function(e,t){var o;let l=t.value(0),n=t.value(1),r=t.value(2),i=t.coord([l,r]),a=t.coord([n,0]),s=null==i?void 0:i[0],u=null==i?void 0:i[1],d=null==a?void 0:a[0],h=null==a?void 0:a[1];if(void 0===s||void 0===u||void 0===d||void 0===h)return null;let c=d-s,m=h-u,p=null==(o=t.style)?void 0:o.call(t);return Number.isFinite(s)&&Number.isFinite(u)&&Number.isFinite(c)&&Number.isFinite(m)?{type:"rect",shape:{x:s,y:u,width:c,height:m},style:p}:null},label:{show:!1},dimensions:["from","to"],encode:{x:[0,1],y:2,tooltip:[0,1],itemName:2},data:c}]}},[h.noDataOption,i,d,p,m,c]);return(0,l.jsx)(r.EChart,{style:{width:t,height:o},sx:{padding:`${h.container.padding.default}px`},option:g,theme:h.echartsTheme})}(0,f.Y)([x.a]);let C={PanelComponent:function(e){let{spec:t,contentDimensions:o,queryResults:n}=e,{min:i,max:a}=t,h=(0,r.useChartsTheme)(),c=s()({},u,t.format),f=s()({},d,t.thresholds),x=(0,v.useMemo)(()=>{let e=[];for(let t of n)for(let o of t.data.series){if(!o.histograms||0===o.histograms.length)continue;let[,t]=o.histograms[0];t&&t.buckets&&e.push({buckets:t.buckets})}return e},[n]);if(0===x.length)return(0,l.jsx)(m.A,{justifyContent:"center",height:"100%",children:(0,l.jsx)(p.A,{variant:"body2",textAlign:"center",children:"No data available (only native histograms are supported for now)"})});if(void 0===o)return null;let C=o.width/x.length-h.container.padding.default;return C<90&&x.length>1&&(C=90),(0,l.jsx)(m.A,{direction:"row",justifyContent:"center",alignItems:"center",sx:{overflowX:x.length>1?"scroll":"auto"},children:x.map((e,n)=>(0,l.jsx)(g.A,{children:(0,l.jsx)(b,{width:C,height:o.height,data:e,format:c,min:i,max:a,thresholds:f,logBase:t.logBase})},`histogram-series-${n}`))})},supportedQueryTypes:["TimeSeriesQuery"],queryOptions:{mode:"instant"},panelOptionsEditorComponents:[{label:"Settings",content:function(e){let{onChange:t,value:o}=e,a=s()({},u,o.format),m=s()({},d,o.thresholds),p=o.logBase?h[o.logBase]:h.none,g="Enter value";"percent"===a.unit?g="0":"percent-decimal"===a.unit&&(g="0");let v="Enter value";return"percent"===a.unit?v="100":"percent-decimal"===a.unit&&(v="1"),(0,l.jsxs)(r.OptionsEditorGrid,{children:[(0,l.jsx)(r.OptionsEditorColumn,{children:(0,l.jsxs)(r.OptionsEditorGroup,{title:"Misc",children:[(0,l.jsx)(r.FormatControls,{value:a,onChange:e=>{t((0,i.produce)(o,t=>{t.format=e}))}}),(0,l.jsx)(r.OptionsEditorControl,{label:"Min",control:(0,l.jsx)(n.A,{type:"number",value:o.min??"",onChange:e=>{let l=e.target.value?Number(e.target.value):void 0;t((0,i.produce)(o,e=>{e.min=l}))},placeholder:g,sx:{width:"100%"}})}),(0,l.jsx)(r.OptionsEditorControl,{label:"Max",control:(0,l.jsx)(n.A,{type:"number",value:o.max??"",onChange:e=>{let l=e.target.value?Number(e.target.value):void 0;t((0,i.produce)(o,e=>{e.max=l}))},placeholder:v,sx:{width:"100%"}})}),(0,l.jsx)(r.OptionsEditorControl,{label:"Log Base",control:(0,l.jsx)(r.SettingsAutocomplete,{value:{...p,id:(null==p?void 0:p.label)??"None"},options:c,onChange:(e,l)=>{t((0,i.produce)(o,e=>{e.logBase=l.log}))},disableClearable:!0})})]})}),(0,l.jsx)(r.OptionsEditorColumn,{children:(0,l.jsx)(r.ThresholdsEditor,{thresholds:m,onChange:e=>{t((0,i.produce)(o,t=>{t.thresholds=e}))}})})]})}}],createInitialOptions:function(){return{format:u}}}}}]);
|
|
File without changes
|
|
File without changes
|