mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
* WIP for using json all the time * Updates to render * adds a new component for json * Updates styles * Adds nesting * Adds field list * Adds expanding * Adds new composable for event source * Creates an add button * Removes unused code * Adds and removes fields with defaults * Fixes jumping when adding new fields * Returns JSON correctly * Fixes little bugs * Fixes js tests * Adds vscode * Fixes json buffer error * Fixes extra line * Fixes tests * Fixes tests and adds support for search * Refactors visible payload keys to a composable * Fixes typescript errors and refactors * Fixes visible keys by ComputedRef<Ref> * Fixes search bugs * Updates tests * Fixes go tests * Fixes scroll view * Fixes vue tsc errors * Fixes EOF error * Fixes build error * Uses application/ld+json * Fixes arrays and records * Marks for json too
35 lines
1.0 KiB
Vue
35 lines
1.0 KiB
Vue
<template>
|
|
<div class="is-size-7 is-uppercase columns is-marginless is-mobile" v-if="container.stat">
|
|
<div class="column is-narrow has-text-weight-bold">
|
|
{{ container.state }}
|
|
</div>
|
|
<div class="column is-narrow" v-if="container.stat.memoryUsage !== null">
|
|
<span class="has-text-weight-light has-spacer">mem</span>
|
|
<span class="has-text-weight-bold">
|
|
{{ formatBytes(container.stat.memoryUsage) }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="column is-narrow" v-if="container.stat.cpu !== null">
|
|
<span class="has-text-weight-light has-spacer">load</span>
|
|
<span class="has-text-weight-bold"> {{ container.stat.cpu }}% </span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { Container } from "@/types/Container";
|
|
import { ComputedRef, inject } from "vue";
|
|
import { formatBytes } from "@/utils";
|
|
|
|
const container = inject("container") as ComputedRef<Container>;
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.has-spacer {
|
|
&::after {
|
|
content: " ";
|
|
}
|
|
}
|
|
</style>
|