mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
feat: adds bar charts back to dashboard table (#2331)
This commit is contained in:
@@ -15,10 +15,17 @@ const minValue = computed(() => Math.min(value, 1));
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.bar {
|
.bar {
|
||||||
height: 100%;
|
height: 1.5em;
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
transform-origin: left;
|
transform-origin: left;
|
||||||
transform: scaleX(v-bind(minValue));
|
transform: scaleX(v-bind(minValue));
|
||||||
transition: transform 0.2s ease-out;
|
transition: transform 0.2s ease-out;
|
||||||
|
border-top-right-radius: 0.2em;
|
||||||
|
border-bottom-right-radius: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-overlay {
|
||||||
|
font-size: 0.9em;
|
||||||
|
padding: 0 0.5em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -33,10 +33,14 @@
|
|||||||
<distance-time :date="container.created" strict :suffix="false"></distance-time>
|
<distance-time :date="container.created" strict :suffix="false"></distance-time>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="isVisible('cpu')">
|
<td v-if="isVisible('cpu')">
|
||||||
|
<bar-chart :value="container.movingAverage.cpu / 100">
|
||||||
{{ (container.movingAverage.cpu / 100).toLocaleString(undefined, { style: "percent" }) }}
|
{{ (container.movingAverage.cpu / 100).toLocaleString(undefined, { style: "percent" }) }}
|
||||||
|
</bar-chart>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="isVisible('mem')">
|
<td v-if="isVisible('mem')">
|
||||||
|
<bar-chart :value="container.movingAverage.memory / 100">
|
||||||
{{ (container.movingAverage.memory / 100).toLocaleString(undefined, { style: "percent" }) }}
|
{{ (container.movingAverage.memory / 100).toLocaleString(undefined, { style: "percent" }) }}
|
||||||
|
</bar-chart>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user