mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Replaced WorldMap zoom with text field to enable more fine grained zooming by steps of 0.1 (#10753)
* Reimplemented filtering of devices under maintenance when displaying only Down devices in the WorldMap * Replaced WorldMap zoom with text field to enable more fine grained zooming by steps of 0.1
This commit is contained in:
@@ -19,11 +19,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label for="init_zoom-{{ $id }}" class="control-label">@lang('Initial Zoom')</label>
|
||||
<select class="form-control" name="init_zoom" id="init_zoom-{{ $id }}">
|
||||
@foreach(range(0, 18) as $zoom)
|
||||
<option value="{{ $zoom }}" @if($zoom == $init_zoom) selected @endif>{{ $zoom }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input class="form-control" name="init_zoom" id="init_zoom-{{ $id }}" type="number" min="0" max="18" step="0.1" value="{{ $init_zoom }}" placeholder="@lang('ie. 5.8')">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@@ -40,11 +40,13 @@
|
||||
});
|
||||
|
||||
@foreach($devices as $device)
|
||||
var title = '<a href="{{ \LibreNMS\Util\Url::deviceUrl($device) }}"><img src="{{ $device->icon }}" width="32" height="32" alt=""> {{ $device->displayName() }}</a>';
|
||||
var tooltip = '{{ $device->displayName() }}';
|
||||
var marker = L.marker(new L.LatLng('{{ $device->location->lat }}', '{{ $device->location->lng }}'), {title: tooltip, icon: {{ $device->markerIcon }}, zIndexOffset: {{ $device->zOffset }}});
|
||||
marker.bindPopup(title);
|
||||
markers.addLayer(marker);
|
||||
@if($status != '0' or !$device->isUnderMaintenance())
|
||||
var title = '<a href="{{ \LibreNMS\Util\Url::deviceUrl($device) }}"><img src="{{ $device->icon }}" width="32" height="32" alt=""> {{ $device->displayName() }}</a>';
|
||||
var tooltip = '{{ $device->displayName() }}';
|
||||
var marker = L.marker(new L.LatLng('{{ $device->location->lat }}', '{{ $device->location->lng }}'), {title: tooltip, icon: {{ $device->markerIcon }}, zIndexOffset: {{ $device->zOffset }}});
|
||||
marker.bindPopup(title);
|
||||
markers.addLayer(marker);
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
map.addLayer(markers);
|
||||
|
Reference in New Issue
Block a user