From 060b8d85c94b59a726dc4be5f568a9fffc0efeac Mon Sep 17 00:00:00 2001 From: emma Date: Mon, 13 Nov 2023 19:37:15 -0500 Subject: [PATCH] rename pretty-ms import to be clear about units --- frontend/src/pages/org/dashboard.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/org/dashboard.ts b/frontend/src/pages/org/dashboard.ts index 99ffcb05..440c80a3 100644 --- a/frontend/src/pages/org/dashboard.ts +++ b/frontend/src/pages/org/dashboard.ts @@ -4,7 +4,7 @@ import { when } from "lit/directives/when.js"; import { ifDefined } from "lit/directives/if-defined.js"; import { msg, localized, str } from "@lit/localize"; import type { SlSelectEvent } from "@shoelace-style/shoelace"; -import humanizeDuration from "pretty-ms"; +import humanizeMilliseconds from "pretty-ms"; import LiteElement, { html } from "../../utils/LiteElement"; import type { AuthState } from "../../utils/AuthService"; @@ -80,7 +80,7 @@ export class Dashboard extends LiteElement { return html` ${compactFormatter.format(minutes)} - (${humanizeDuration(seconds * 1000)})`; + (${humanizeMilliseconds(seconds * 1000)})`; }; render() { @@ -401,7 +401,7 @@ export class Dashboard extends LiteElement {
${label}
- ${humanizeDuration(value * 1000)} | + ${humanizeMilliseconds(value * 1000)} | ${this.renderPercentage(value / quotaSeconds)}
@@ -590,7 +590,7 @@ export class Dashboard extends LiteElement { `, value ? this.humanizeExecutionSeconds(value) : "--", - humanizeDuration(crawlTime * 1000 || 0), + humanizeMilliseconds(crawlTime * 1000 || 0), ]; }); return html`