1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00
Files
dozzle/assets/components/LogViewer/ContainerTitle.vue
Amir Raminfar 8116868669 feat: makes swarm id lighter (#2145)
* feat: makes swarm id lighter

* fix: add swarm to title id
2023-04-25 14:41:45 -07:00

37 lines
1.0 KiB
Vue

<template>
<div class="columns is-marginless has-text-weight-bold is-family-monospace">
<span class="column is-ellipsis">
<span class="icon is-small health" :health="container.health" v-if="container.health" :title="container.health">
<cil:check-circle v-if="container.health == 'healthy'" />
<cil:x-circle v-else-if="container.health == 'unhealthy'" />
<cil:circle v-else />
</span>
{{ container.name }}<span v-if="container.isSwarm">.{{ container.swarmId }}</span>
<span class="tag is-dark">{{ container.image.replace(/@sha.*/, "") }}</span>
</span>
</div>
</template>
<script lang="ts" setup>
import { Container } from "@/models/Container";
import { type ComputedRef } from "vue";
const container = inject("container") as ComputedRef<Container>;
</script>
<style lang="scss" scoped>
.icon {
vertical-align: middle;
}
.health {
&[health="unhealthy"] {
color: var(--red-color);
}
&[health="healthy"] {
color: var(--green-color);
}
}
</style>