mirror of
https://github.com/amir20/dozzle.git
synced 2026-06-23 04:10:12 +00:00
fix
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<ul class="containers menu w-full p-0 [&_li.menu-title]:px-0">
|
||||
<li v-for="{ label, containers, icon, isNamespaceGroup } in menuItems" :key="label">
|
||||
<li v-for="{ label, containers, icon } in menuItems" :key="label">
|
||||
<details :open="!collapsedGroups.has(label)" @toggle="updateCollapsedGroups($event, label)">
|
||||
<summary class="text-base-content/80 font-light">
|
||||
<component :is="icon" />
|
||||
@@ -93,7 +93,7 @@
|
||||
:data-state="item.state"
|
||||
></div>
|
||||
<div class="truncate">
|
||||
{{ isNamespaceGroup && item.serviceName ? item.serviceName : item.name }}
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<ContainerHealth :health="item.health" />
|
||||
<span
|
||||
@@ -195,14 +195,14 @@ const menuItems = computed(() => {
|
||||
|
||||
const items = [];
|
||||
if (pinned.length) {
|
||||
items.push({ label: "label.pinned", containers: pinned, icon: Pin, isNamespaceGroup: false });
|
||||
items.push({ label: "label.pinned", containers: pinned, icon: Pin });
|
||||
}
|
||||
for (const [label, containers] of Object.entries(namespaced).sort(([a], [b]) => a.localeCompare(b))) {
|
||||
const shouldGroup =
|
||||
groupContainers.value === "always" || (groupContainers.value === "at-least-2" && containers.length > 1);
|
||||
|
||||
if (shouldGroup) {
|
||||
items.push({ label, containers, icon: Stack, isNamespaceGroup: true });
|
||||
items.push({ label, containers, icon: Stack });
|
||||
} else {
|
||||
for (const container of containers) {
|
||||
singular.push(container);
|
||||
@@ -217,7 +217,6 @@ const menuItems = computed(() => {
|
||||
label: showAllContainers.value ? "label.all-containers" : "label.running-containers",
|
||||
containers: singular,
|
||||
icon: Containers,
|
||||
isNamespaceGroup: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -90,10 +90,6 @@ export class Container {
|
||||
);
|
||||
}
|
||||
|
||||
get serviceName() {
|
||||
return this.labels["com.docker.compose.service"];
|
||||
}
|
||||
|
||||
get customGroup() {
|
||||
return this.group;
|
||||
}
|
||||
@@ -104,10 +100,8 @@ export class Container {
|
||||
|
||||
get name() {
|
||||
return this.isSwarm
|
||||
? this.labels["com.docker.swarm.task.name"]
|
||||
.replace(`.${this.labels["com.docker.swarm.task.id"]}`, "")
|
||||
.replace(`.${this.labels["com.docker.swarm.node.id"]}`, "")
|
||||
: this._name;
|
||||
? this.labels["com.docker.swarm.service.name"]
|
||||
: this.labels["com.docker.compose.service"] || this._name;
|
||||
}
|
||||
|
||||
get swarmId() {
|
||||
|
||||
Reference in New Issue
Block a user