162162 background : # f8d7da ;
163163 color : # 721c24 ;
164164 }
165+
166+ .status .error {
167+ background : # f5c6cb ;
168+ color : # 721c24 ;
169+ }
165170
166171 .status .created {
167172 background : # d1ecf1 ;
168173 color : # 0c5460 ;
169174 }
175+
176+ .status .paused {
177+ background : # fff3cd ;
178+ color : # 856404 ;
179+ }
180+
181+ .status .restarting {
182+ background : # fde2c9 ;
183+ color : # 8a4b08 ;
184+ }
185+
186+ .status .dead {
187+ background : # e2e3e5 ;
188+ color : # 383d41 ;
189+ }
170190
171191 .btn {
172192 padding : 6px 14px ;
@@ -916,6 +936,7 @@ <h2>Docker Containers</h2>
916936 < option value =""> All Statuses</ option >
917937 < option value ="running "> Running</ option >
918938 < option value ="exited "> Exited</ option >
939+ < option value ="error "> Error</ option >
919940 < option value ="paused "> Paused</ option >
920941 < option value ="restarting "> Restarting</ option >
921942 < option value ="unhealthy "> Unhealthy</ option >
@@ -977,17 +998,20 @@ <h2>Docker Containers</h2>
977998 </ thead >
978999 < tbody >
9791000 {% for container in containers %}
980- < tr data-name ="{{ container.name|lower }} " data-status ="{{ container.status }} " data-health ="{{ container.health or '' }} " data-host ="{{ container.host_name }} " data-stack ="{{ container.stack }} " data-image ="{{ container.image_display }} " data-ip ="{{ container.ip_addresses }} " data-tags ="{% for tag in container.tags %}{{ tag.name }}{% if not loop.last %},{% endif %}{% endfor %} " data-cpu ="0 " data-memory ="0 ">
1001+ < tr data-name ="{{ container.name|lower }} " data-status ="{{ container.status }} " data-exit-code =" {{ container.exit_code if container.exit_code is not none else '' }} " data- health ="{{ container.health or '' }} " data-host ="{{ container.host_name }} " data-stack ="{{ container.stack }} " data-image ="{{ container.image_display }} " data-ip ="{{ container.ip_addresses }} " data-tags ="{% for tag in container.tags %}{{ tag.name }}{% if not loop.last %},{% endif %}{% endfor %} " data-cpu ="0 " data-memory ="0 ">
9811002 < td >
982- < input type ="checkbox " class ="container-select " data-id ="{{ container.id }} " data-name ="{{ container.name }} " data-host-id ="{{ container.host_id }} " data-status ="{{ container.status }} " onchange ="updateSelectionState() ">
1003+ < input type ="checkbox " class ="container-select " data-id ="{{ container.id }} " data-name ="{{ container.name }} " data-host-id ="{{ container.host_id }} " data-status ="{{ container.status }} " data-exit-code =" {{ container.exit_code if container.exit_code is not none else '' }} " onchange ="updateSelectionState() ">
9831004 </ td >
9841005 < td >
9851006 < div class ="tooltip-container ">
9861007 < strong > {{ container.name }}</ strong >
9871008 < span class ="tooltip-text ">
9881009 < div > < span class ="tooltip-label "> ID:</ span > {{ container.id }}</ div >
9891010 < div > < span class ="tooltip-label "> Image:</ span > {{ container.image }}</ div >
990- < div > < span class ="tooltip-label "> Status:</ span > {{ container.status }}</ div >
1011+ < div > < span class ="tooltip-label "> Status:</ span > {{ container.status_display }}</ div >
1012+ {% if container.exit_code is not none %}
1013+ < div > < span class ="tooltip-label "> Exit code:</ span > {{ container.exit_code }}</ div >
1014+ {% endif %}
9911015 < div > < span class ="tooltip-label "> Created:</ span > {{ container.created[:19].replace('T', ' ') }}</ div >
9921016 < div > < span class ="tooltip-label "> Version:</ span > {{ container.image_version }}</ div >
9931017 </ span >
@@ -1005,7 +1029,7 @@ <h2>Docker Containers</h2>
10051029 < td > < span style ="font-family: monospace; font-size: 12px; color: #555; "> {{ container.ip_addresses }}</ span > </ td >
10061030 < td class ="status-cell ">
10071031 < div class ="status-stack ">
1008- < span class ="status {{ container.status }} "> {{ container.status }}</ span >
1032+ < span class ="status {{ container.status_class }} "> {{ container.status_display }}</ span >
10091033 </ div >
10101034 {% if container.health %}
10111035 < span class ="tooltip-container " style ="position: absolute; top: 8px; right: 8px; ">
@@ -2218,6 +2242,7 @@ <h3>⌨️ Keyboard Shortcuts</h3>
22182242 rows . forEach ( row => {
22192243 const name = row . dataset . name || '' ;
22202244 const status = row . dataset . status || '' ;
2245+ const exitCode = row . dataset . exitCode || '' ;
22212246 const health = row . dataset . health || '' ;
22222247 const host = row . dataset . host || '' ;
22232248 const stack = row . dataset . stack || '' ;
@@ -2229,6 +2254,8 @@ <h3>⌨️ Keyboard Shortcuts</h3>
22292254 matchesStatus = true ;
22302255 } else if ( statusFilter === 'unhealthy' || statusFilter === 'starting' || statusFilter === 'healthy' ) {
22312256 matchesStatus = health === statusFilter ;
2257+ } else if ( statusFilter === 'error' ) {
2258+ matchesStatus = status === 'exited' && exitCode !== '' && exitCode !== '0' ;
22322259 } else {
22332260 matchesStatus = status === statusFilter ;
22342261 }
0 commit comments