5 <strong v-if="running > 0" class="notif running" title="Running">
8 <strong v-if="dead > 0" class="notif dead" title="Dead">
14 title="Other (creating, paused, exited, etc.)"
24 import service from "@/mixins/service.js";
25 import Generic from "./Generic.vue";
41 running: function () {
42 if (!this.containers) {
45 return this.containers.filter((container) => {
46 return container.State.toLowerCase() === "running";
50 if (!this.containers) {
53 return this.containers.filter((container) => {
54 return container.State.toLowerCase() === "dead";
58 if (!this.containers) {
61 return this.containers.filter((container) => {
63 container.State.toLowerCase() !== "running" &&
64 container.State.toLowerCase() !== "dead"
73 fetchStatus: async function () {
75 "X-Api-Key": this.item.apikey,
78 this.endpoints = await this.fetch("/api/endpoints", { headers }).catch(
85 for (let endpoint of this.endpoints) {
87 this.item.environments &&
88 !this.item.environments.includes(endpoint.Name)
92 const uri = `/api/endpoints/${endpoint.Id}/docker/containers/json?all=1`;
93 const endpointContainers = await this.fetch(uri, { headers }).catch(
99 if (endpointContainers) {
100 containers = containers.concat(endpointContainers);
104 this.containers = containers;
110 <style scoped lang="scss">
114 font-family: sans-serif;
119 display: inline-block;
120 padding: 0.2em 0.35em;
121 border-radius: 0.25em;
127 background-color: #4fd671;
131 background-color: #e51111;
135 background-color: #2ed0c8;