Skip to content

Commit 8613e05

Browse files
committed
Fix display issue if node has no assigned servers
1 parent c701aa0 commit 8613e05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/views/admin/nodes/view.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</tr>
5656
<tr>
5757
<td>Memory Allocated</td>
58-
<td><strong class="{{ ($stats->memory < ($node->memory * .8)) ? 'text-success' : 'text-danger' }}">{{ $stats->memory }} MB</strong> of
58+
<td><strong class="{{ ($stats->memory < ($node->memory * .8)) ? 'text-success' : 'text-danger' }}">{{ is_numeric($stats->memory) ? $stats->memory : 0 }} MB</strong> of
5959
@if(!is_null($node->memory_overallocate))
6060
<abbr data-toggle="tooltip" data-placement="top" title="Allows up to {{ ($node->memory * (1 + ($node->memory_overallocate / 100)) - $node->memory) }} MB over">{{ $node->memory }}</abbr>
6161
@else
@@ -66,7 +66,7 @@
6666
</tr>
6767
<tr>
6868
<td>Disk Allocated</td>
69-
<td><strong class="{{ ($stats->disk < ($node->disk * .8)) ? 'text-success' : 'text-danger' }}">{{ $stats->disk }} MB</strong> of
69+
<td><strong class="{{ ($stats->disk < ($node->disk * .8)) ? 'text-success' : 'text-danger' }}">{{ is_numeric($stats->disk) ? $stats->disk : 0 }} MB</strong> of
7070
@if(!is_null($node->disk_overallocate))
7171
<abbr data-toggle="tooltip" data-placement="top" title="Allows up to {{ ($node->disk * (1 + ($node->disk_overallocate / 100)) - $node->disk) }} MB over">{{ $node->disk }}</abbr>
7272
@else

0 commit comments

Comments
 (0)