Files
dozzle-monitoring/assets/components/mixins/container.js
Amir Raminfar 04f3f56aa3 Reconnects if container starts running again (#1250)
* Cleans up code a little

* Tries to reconnect if container starts again
2021-05-25 14:53:26 -07:00

20 lines
449 B
JavaScript

import { mapGetters } from "vuex";
export default {
computed: {
...mapGetters(["allContainersById"]),
container() {
return this.allContainersById[this.id];
},
},
watch: {
["container.state"](newValue, oldValue) {
if (newValue == "running" && newValue != oldValue) {
this.onContainerStateChange(newValue, oldValue);
}
},
},
methods: {
onContainerStateChange(newValue, oldValue) {},
},
};