mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-06-30 15:45:24 +00:00
feat: add a calculation to convert seconds to days (#135)
This commit is contained in:
parent
732b834749
commit
f5bcd5da2e
@ -36,6 +36,7 @@ export enum Calculations {
|
|||||||
Average = "average",
|
Average = "average",
|
||||||
PercentageAvg = "percentageAvg",
|
PercentageAvg = "percentageAvg",
|
||||||
ApdexAvg = "apdexAvg",
|
ApdexAvg = "apdexAvg",
|
||||||
|
SecondToDay = "secondToDay",
|
||||||
}
|
}
|
||||||
export enum sizeEnum {
|
export enum sizeEnum {
|
||||||
XS = "XS",
|
XS = "XS",
|
||||||
|
@ -398,6 +398,9 @@ export function aggregation(
|
|||||||
case Calculations.MsTos:
|
case Calculations.MsTos:
|
||||||
data = (val / 1000).toFixed(2);
|
data = (val / 1000).toFixed(2);
|
||||||
break;
|
break;
|
||||||
|
case Calculations.SecondToDay:
|
||||||
|
data = (val / 86400).toFixed(2);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
data;
|
data;
|
||||||
break;
|
break;
|
||||||
|
@ -284,4 +284,5 @@ export const CalculationOpts = [
|
|||||||
{ label: "Seconds to YYYY-MM-DD HH:mm:ss", value: "convertSeconds" },
|
{ label: "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" },
|
{ label: "Milliseconds to seconds", value: "msTos" },
|
||||||
|
{ label: "Seconds to days", value: "secondToDay" },
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user