mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 21:15:25 +00:00
add calculation
This commit is contained in:
parent
b854b86ab4
commit
b817ed5825
@ -32,6 +32,7 @@ export enum Calculations {
|
|||||||
Precision = "precision",
|
Precision = "precision",
|
||||||
ConvertSeconds = "convertSeconds",
|
ConvertSeconds = "convertSeconds",
|
||||||
ConvertMilliseconds = "convertMilliseconds",
|
ConvertMilliseconds = "convertMilliseconds",
|
||||||
|
MsTos = "msTos",
|
||||||
}
|
}
|
||||||
export enum sizeEnum {
|
export enum sizeEnum {
|
||||||
XS = "XS",
|
XS = "XS",
|
||||||
|
@ -351,6 +351,9 @@ export function aggregation(val: number, config: any): number | string {
|
|||||||
case Calculations.Precision:
|
case Calculations.Precision:
|
||||||
data = data.toFixed(2);
|
data = data.toFixed(2);
|
||||||
break;
|
break;
|
||||||
|
case Calculations.MsTos:
|
||||||
|
data = val / 1000;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
data;
|
data;
|
||||||
break;
|
break;
|
||||||
|
@ -272,4 +272,5 @@ export const CalculationOpts = [
|
|||||||
},
|
},
|
||||||
{ label: "Convert seconds to YYYY-MM-DD HH:mm:ss", value: "convertSeconds" },
|
{ label: "Convert seconds to YYYY-MM-DD HH:mm:ss", value: "convertSeconds" },
|
||||||
{ label: "Precision is 2", value: "precision" },
|
{ label: "Precision is 2", value: "precision" },
|
||||||
|
{ label: "Milliseconds to seconds", value: "msTos" },
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user