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