mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 18:43:02 +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",
|
||||
PercentageAvg = "percentageAvg",
|
||||
ApdexAvg = "apdexAvg",
|
||||
SecondToDay = "secondToDay",
|
||||
}
|
||||
export enum sizeEnum {
|
||||
XS = "XS",
|
||||
|
@ -398,6 +398,9 @@ export function aggregation(
|
||||
case Calculations.MsTos:
|
||||
data = (val / 1000).toFixed(2);
|
||||
break;
|
||||
case Calculations.SecondToDay:
|
||||
data = (val / 86400).toFixed(2);
|
||||
break;
|
||||
default:
|
||||
data;
|
||||
break;
|
||||
|
@ -284,4 +284,5 @@ export const CalculationOpts = [
|
||||
{ label: "Seconds to YYYY-MM-DD HH:mm:ss", value: "convertSeconds" },
|
||||
{ label: "Precision is 2", value: "precision" },
|
||||
{ label: "Milliseconds to seconds", value: "msTos" },
|
||||
{ label: "Seconds to days", value: "secondToDay" },
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user