mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
refactor(web): round digits to 2 decimals
This commit is contained in:
1 parent
c7f4d35aa6
commit
55857e7f7d
4 files changed
+5
-5
No files matched your search
@@ -19,7 +19,7 @@
|
||||
|
||||
const route = meta();
|
||||
|
||||
const columns: ColumnDef<QueryData>[] = [
|
||||
const columns: ColumnDef<QueryData, number>[] = [
|
||||
{
|
||||
accessorKey: 'query',
|
||||
header: 'Query',
|
||||
@@ -29,7 +29,7 @@
|
||||
{
|
||||
accessorKey: 'executionTime',
|
||||
header: 'Time (ms)',
|
||||
cell: (info) => info.getValue(),
|
||||
cell: (info) => info.getValue().toFixed(2),
|
||||
enableSorting: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<p class="text-center text-lg">{route.params.resource}</p>
|
||||
<div class="text-end text-dark-100 flex flex-col text-xs">
|
||||
<p>Queries: {$resourceData.resourceQueriesCount}</p>
|
||||
<p>Time: {$resourceData.resourceTime} ms</p>
|
||||
<p>Time: {$resourceData.resourceTime.toFixed(2)} ms</p>
|
||||
<p class="text-yellow-500">Slow queries: {$resourceData.resourceSlowQueries}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="flex flex-col text-dark-50">
|
||||
<p>Queries: {$generalData.queries}</p>
|
||||
<p>Time querying: {$generalData.timeQuerying} ms</p>
|
||||
<p>Time querying: {$generalData.timeQuerying.toFixed(2)} ms</p>
|
||||
<p class="text-yellow-500">Slow queries: {$generalData.slowQueries}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
callbacks: {
|
||||
label: (context) => {
|
||||
// @ts-ignore
|
||||
return `Queries: ${context.raw.queries}, Time: ${context.raw.time} ms`;
|
||||
return `Queries: ${context.raw.queries}, Time: ${context.raw.time.toFixed(2)} ms`;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user