Repository: amir20/dozzle (language: go)

Issue:
Explain healthcheck better
              Would it be worth adding something explaining this within the app?  Perhaps in the about section in the settings page there could be a wee explainer? It's just I was looking at Dozzle today and was confused why some containers had green ticks and others didn't - I hovered over the icon but of course it just changed to show the 'pin as column' option. Had a search through the changelogs and came across this, then cross-referenced in Portainer to see it was indeed the ones with status 'healthy' rather than just 'running' that got the ticks!

(PS as ever thanks for such a nice app for viewing log files!!)

_Originally posted by @EDIflyer in https://github.com/amir20/dozzle/issues/2099#issuecomment-1491010340_
            


Discussion / hints:

Fix patch:
diff --git a/assets/components.d.ts b/assets/components.d.ts
index 8a79b43d09f7..69d50e31e505 100644
--- a/assets/components.d.ts
+++ b/assets/components.d.ts
@@ -11,8 +11,10 @@ declare module '@vue/runtime-core' {
   export interface GlobalComponents {
     'Carbon:caretDown': typeof import('~icons/carbon/caret-down')['default']
     'Cil:checkCircle': typeof import('~icons/cil/check-circle')['default']
+    'Cil:circle': typeof import('~icons/cil/circle')['default']
     'Cil:columns': typeof import('~icons/cil/columns')['default']
     'Cil:findInPage': typeof import('~icons/cil/find-in-page')['default']
+    'Cil:xCircle': typeof import('~icons/cil/x-circle')['default']
     ComplexLogItem: typeof import('./components/LogViewer/ComplexLogItem.vue')['default']
     ContainerStat: typeof import('./components/LogViewer/ContainerStat.vue')['default']
     ContainerTitle: typeof import('./components/LogViewer/ContainerTitle.vue')['default']
diff --git a/assets/components/LogViewer/ContainerTitle.vue b/assets/components/LogViewer/ContainerTitle.vue
index c5c4904f400a..3d8a82a681b4 100644
--- a/assets/components/LogViewer/ContainerTitle.vue
+++ b/assets/components/LogViewer/ContainerTitle.vue
@@ -1,6 +1,11 @@
 <template>
   <div class="columns is-marginless has-text-weight-bold is-family-monospace">
     <span class="column is-ellipsis">
+      <span class="icon is-small health" :health="container.health" v-if="container.health" :title="container.health">
+        <cil:check-circle v-if="container.health == 'healthy'" />
+        <cil:x-circle v-else-if="container.health == 'unhealthy'" />
+        <cil:circle v-else />
+      </span>
       {{ container.name }}
       <span class="tag is-dark">{{ container.image.replace(/@sha.*/, "") }}</span>
     </span>
@@ -14,4 +19,18 @@ import { type ComputedRef } from "vue";
 const container = inject("container") as ComputedRef<Container>;
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.icon {
+  vertical-align: middle;
+}
+
+.health {
+  &[health="unhealthy"] {
+    color: var(--red-color);
+  }
+
+  &[health="healthy"] {
+    color: var(--green-color);
+  }
+}
+</style>
diff --git a/assets/components/SideMenu.vue b/assets/components/SideMenu.vue
index 027ab2e6b8e1..a1c2638c55e8 100644
--- a/assets/components/SideMenu.vue
+++ b/assets/components/SideMenu.vue
@@ -67,18 +67,20 @@
               {{ item.name }}
             </div>
             <div class="is-flex-shrink-1 is-flex icons">
-              <span
+              <div
                 class="icon is-small pin"
                 @click.stop.prevent="store.appendActiveContainer(item)"
                 v-show="!activeContainersById[item.id]"
                 :title="$t('tooltip.pin-column')"
               >
                 <cil:columns />
-              </span>
+              </div>
 
-              <span class="icon is-small health" :health="item.health" v-if="item.health">
-                <cil:check-circle />
-              </span>
+              <div class="icon is-small health" :health="item.health" v-if="item.health" :title="item.health">
+                <cil:check-circle v-if="item.health == 'healthy'" />
+                <cil:x-circle v-else-if="item.health == 'unhealthy'" />
+                <cil:circle v-else />
+              </div>
             </div>
           </div>
         </router-link>
@@ -142,7 +144,10 @@ li.exited a {
     color: var(--green-color);
   }
 }
-
+.icons {
+  column-gap: 0.35em;
+  align-items: baseline;
+}
 a {
   .pin {
     display: none;
@@ -156,10 +161,6 @@ a {
     .pin {
       display: block;
     }
-
-    .health {
-      display: none;
-    }
   }
 }
 </style>


Test patch: