mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Minor comment/code cleanups
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
de1cb93cb1
commit
89d18bf681
|
@ -304,7 +304,6 @@ const getOptions = (
|
||||||
): uPlot.Options => ({
|
): uPlot.Options => ({
|
||||||
width: width - 30,
|
width: width - 30,
|
||||||
height: 550,
|
height: 550,
|
||||||
// padding: [null, autoPadRight, null, null],
|
|
||||||
cursor: {
|
cursor: {
|
||||||
focus: {
|
focus: {
|
||||||
prox: 1000,
|
prox: 1000,
|
||||||
|
@ -312,7 +311,8 @@ const getOptions = (
|
||||||
// Whether dragging on the chart should select a zoom area.
|
// Whether dragging on the chart should select a zoom area.
|
||||||
drag: {
|
drag: {
|
||||||
x: true,
|
x: true,
|
||||||
// Don't zoom into the existing via uPlot, we want to load new (finger-grained) data instead.
|
// Don't zoom into the existing data via uPlot. We want to load new
|
||||||
|
// (finer-grained) data instead, which we do via a setSelect hook.
|
||||||
setScale: false,
|
setScale: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -399,7 +399,7 @@ const getOptions = (
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const normalizeData = (
|
const normalizeData = (
|
||||||
inputData: RangeSamples[],
|
inputData: RangeSamples[],
|
||||||
startTime: number,
|
startTime: number,
|
||||||
endTime: number,
|
endTime: number,
|
||||||
|
@ -492,10 +492,6 @@ const UPlotChart: FC<UPlotChartProps> = ({
|
||||||
endTime,
|
endTime,
|
||||||
resolution
|
resolution
|
||||||
);
|
);
|
||||||
// data[0].values?.map((v) => v[0]),
|
|
||||||
// ...data.map((r) => r.values?.map((v) => parseFloat(v[1]))),
|
|
||||||
// ...normalizeData(data, startTime, endTime, resolution),
|
|
||||||
// ];
|
|
||||||
|
|
||||||
if (options === null) {
|
if (options === null) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue