Dashboard Widget Availability - show Hostname (#11208)

This commit is contained in:
SourceDoctor
2020-02-27 00:42:04 +01:00
committed by GitHub
parent f8c43ee90f
commit cf023b936b
2 changed files with 9 additions and 4 deletions

View File

@ -28,11 +28,15 @@
@foreach($devices as $device)
<a href="@deviceUrl($device)" title="{{ $device->displayName() }}@if($device->formatUptime(true)) - @endif{{ $device->formatUptime(true) }}">
@if($type == 0)
@if($color_only_select)
@if($color_only_select == 1)
<span class="label {{ $device->labelClass }} widget-availability-fixed widget-availability label-font-border"> </span>
@else
@if($color_only_select == 2)
<span class="label {{ $device->labelClass }} widget-availability label-font-border">@lang($device->hostname)</span>
@else
<span class="label {{ $device->labelClass }} widget-availability label-font-border">@lang($device->stateName)</span>
@endif
@endif
@else
<div class="availability-map-oldview-box-{{ $device->stateName }}" style="width:{{ $tile_size }}px;height:{{ $tile_size }}px;"></div>
@endif

View File

@ -15,10 +15,11 @@
</div>
<div class="form-group" id="color_only_select-group-{{ $id }}" style="display: {{ $type == 0 ? 'block' : 'none' }};">
<label for="color_only_select-{{ $id }}" class="control-label">@lang('Uniform Tiles')</label>
<label for="color_only_select-{{ $id }}" class="control-label">@lang('Display Text')</label>
<select class="form-control" name="color_only_select" id="color_only_select-{{ $id }}">
<option value="1" @if($color_only_select) selected @endif>@lang('yes')</option>
<option value="0" @unless($color_only_select) selected @endunless>@lang('no')</option>
<option value="1" @if($color_only_select == 1) selected @endif>@lang('empty')</option>
<option value="2" @if($color_only_select == 2) selected @endunless>@lang('Hostname')</option>
<option value="0" @unless($color_only_select) selected @endunless>@lang('Device Status')</option>
</select>
</div>