5 <strong v-if="running > 0" class="notif running" title="Running">
8 <strong v-if="dead > 0" class="notif dead" title="Dead">
11 <strong v-if="misc > 0" class="notif misc" title="Other (creating, paused, exited, etc.)">
20 import service from "@/mixins/service.js";
21 import Generic from "./Generic.vue";
37 running: function () {
38 if (!this.containers) {
41 return this.containers.filter((container) => {
42 return container.State.toLowerCase() === "running";
46 if (!this.containers) {
49 return this.containers.filter((container) => {
50 return container.State.toLowerCase() === "dead";
54 if (!this.containers) {
57 return this.containers.filter((container) => {
58 return container.State.toLowerCase() !== "running" && container.State.toLowerCase() !== "dead";
66 fetchStatus: async function () {
68 "X-Api-Key": this.item.apikey,
71 this.endpoints = await this.fetch("/api/endpoints", { headers })
77 for (let endpoint of this.endpoints) {
78 const uri = `/api/endpoints/${endpoint.Id}/docker/containers/json?all=1`;
79 const endpointContainers = await this.fetch(uri, { headers })
84 containers = containers.concat(endpointContainers);
87 this.containers = containers;
93 <style scoped lang="scss">
97 font-family: sans-serif;
102 display: inline-block;
103 padding: 0.2em 0.35em;
104 border-radius: 0.25em;
110 background-color: #4fd671;
114 background-color: #e51111;
118 background-color: #2ed0c8;