1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-27 07:31:46 +01:00
Files
dozzle/assets/pages/Container.vue
Amir Raminfar 220722deaa Work in progress to show live stats (#671)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-06 15:32:27 -07:00

45 lines
893 B
Vue

<template>
<log-container :id="id" show-title :scrollable="activeContainers.length > 0"> </log-container>
</template>
<script>
import { mapActions, mapGetters, mapState } from "vuex";
import LogContainer from "../components/LogContainer";
import store from "../store";
export default {
props: ["id"],
name: "Container",
components: {
LogContainer,
},
data() {
return {
title: "loading",
};
},
metaInfo() {
return {
title: this.title,
};
},
mounted() {
if (this.allContainersById[this.id]) {
this.title = this.allContainersById[this.id].name;
}
},
computed: {
...mapGetters(["allContainersById", "activeContainers"]),
},
watch: {
id() {
this.title = this.allContainersById[this.id].name;
},
allContainersById() {
this.title = this.allContainersById[this.id].name;
},
},
};
</script>