mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 06:28:42 +01:00
52 lines
979 B
Vue
52 lines
979 B
Vue
<template>
|
|
<log-container
|
|
:id="id"
|
|
:title="title"
|
|
:show-title="activeContainers.length > 0"
|
|
: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: {
|
|
...mapState(["activeContainers"]),
|
|
...mapGetters(["allContainersById"]),
|
|
},
|
|
watch: {
|
|
id() {
|
|
this.title = this.allContainersById[this.id].name;
|
|
},
|
|
allContainersById() {
|
|
this.title = this.allContainersById[this.id].name;
|
|
},
|
|
},
|
|
};
|
|
</script>
|