refactor: improve readability of messages and code formatting in various components

This commit is contained in:
Nawaz Dhandala
2026-04-02 14:33:46 +01:00
parent 54a79a8100
commit 4e2ca87752
6 changed files with 25 additions and 21 deletions

View File

@@ -184,7 +184,8 @@ const DiffFlamegraph: FunctionComponent<DiffFlamegraphProps> = (
) {
return (
<div className="p-8 text-center text-gray-500">
No performance data found in the selected time ranges. Try adjusting the time periods.
No performance data found in the selected time ranges. Try adjusting the
time periods.
</div>
);
}

View File

@@ -211,7 +211,8 @@ const ProfileFlamegraph: FunctionComponent<ProfileFlamegraphProps> = (
if (samples.length === 0) {
return (
<div className="p-8 text-center text-gray-500">
No performance data found for this profile. This can happen if the profile was recently captured and data is still being processed.
No performance data found for this profile. This can happen if the
profile was recently captured and data is still being processed.
</div>
);
}
@@ -365,7 +366,9 @@ const ProfileFlamegraph: FunctionComponent<ProfileFlamegraphProps> = (
{tooltip.fileName && (
<div className="text-gray-300">{tooltip.fileName}</div>
)}
<div className="mt-1">Own Time: {tooltip.selfValue.toLocaleString()}</div>
<div className="mt-1">
Own Time: {tooltip.selfValue.toLocaleString()}
</div>
<div>Total Time: {tooltip.totalValue.toLocaleString()}</div>
</div>
)}

View File

@@ -64,7 +64,6 @@ export default class ProfileUtil {
}
}
public static getFrameTypeColor(frameType: string): string {
const type: string = frameType.toLowerCase();

View File

@@ -2,15 +2,12 @@ import Queue, { QueueName } from "Common/Server/Infrastructure/Queue";
export default class AppQueueService {
public static async getQueueSize(): Promise<number> {
const [workerSize, workflowSize, telemetrySize]: [
number,
number,
number,
] = await Promise.all([
Queue.getQueueSize(QueueName.Worker),
Queue.getQueueSize(QueueName.Workflow),
Queue.getQueueSize(QueueName.Telemetry),
]);
const [workerSize, workflowSize, telemetrySize]: [number, number, number] =
await Promise.all([
Queue.getQueueSize(QueueName.Worker),
Queue.getQueueSize(QueueName.Workflow),
Queue.getQueueSize(QueueName.Telemetry),
]);
return workerSize + workflowSize + telemetrySize;
}
}

View File

@@ -83,8 +83,10 @@ test.describe("Monitor Creation", () => {
timeout: 30000,
});
// Wait for the page to fully settle after project creation
// The app may perform internal redirects after project setup
/*
* Wait for the page to fully settle after project creation
* The app may perform internal redirects after project setup
*/
await page.waitForLoadState("networkidle");
// Extract the project ID from the URL

View File

@@ -137,15 +137,15 @@ async function main(): Promise<void> {
// Use GoReleaser for parallel cross-compilation (build only, no publish)
try {
await execAsync("which goreleaser");
await execAsync(
"goreleaser build --snapshot --clean",
);
await execAsync("goreleaser build --snapshot --clean");
Logger.info(
"✅ GoReleaser multi-platform build completed successfully",
);
// Move GoReleaser output to builds/ directory for compatibility
// GoReleaser puts binaries in dist/<target>/
/*
* Move GoReleaser output to builds/ directory for compatibility
* GoReleaser puts binaries in dist/<target>/
*/
await execAsync("mkdir -p ./builds");
const { stdout: distDirs } = await execAsync(
"find dist -name 'terraform-provider-oneuptime*' -type f",
@@ -173,7 +173,9 @@ async function main(): Promise<void> {
await execAsync("make release");
Logger.info("✅ Makefile multi-platform build completed");
} catch {
Logger.warn("⚠️ make not available, building for current platform only...");
Logger.warn(
"⚠️ make not available, building for current platform only...",
);
await execAsync("go build");
Logger.info("✅ Single-platform build completed");
}