Skip to content

Commit

Permalink
Add an option to hide Location column in Alerts widget (#10482)
Browse files Browse the repository at this point in the history
* Update AlertsController.php

* Update alerts.blade.php

* Update alerts.blade.php
  • Loading branch information
dsgagi authored and murrant committed Aug 4, 2019
1 parent c6117f0 commit 326a4f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/Http/Controllers/Widgets/AlertsController.php
Expand Up @@ -40,6 +40,7 @@ class AlertsController extends WidgetController
'state' => null,
'group' => null,
'proc' => 0,
'location' => 1,
'sort' => 1,
];

Expand Down
2 changes: 1 addition & 1 deletion resources/views/widgets/alerts.blade.php
Expand Up @@ -12,7 +12,7 @@
<th data-column-id="rule">Rule</th>
<th data-column-id="details" data-sortable="false"></th>
<th data-column-id="hostname">Hostname</th>
<th data-column-id="location">Location</th>
<th data-column-id="location" data-visible="{{ $location ? 'true' : 'false' }}">Location</th>
<th data-column-id="ack_ico" data-sortable="false">ACK</th>
<th data-column-id="notes" data-sortable="false">Notes</th>
<th data-column-id="proc" data-sortable="false" data-visible="{{ $proc ? 'true' : 'false' }}">URL</th>
Expand Down
7 changes: 7 additions & 0 deletions resources/views/widgets/settings/alerts.blade.php
Expand Up @@ -53,6 +53,13 @@
<option value="0" @if($proc == 0) selected @endif>@lang('hide')</option>
</select>
</div>
<div class="form-group row">
<label for="location-{{ $id }}" class="control-label">@lang('Show Location field'):</label>
<select class="form-control" name="location" id="location-{{ $id }}">
<option value="1" @if($location == 1) selected @endif>@lang('show')</option>
<option value="0" @if($location == 0) selected @endif>@lang('hide')</option>
</select>
</div>
<div class="form-group row">
<label for="sort-{{ $id }}" class="control-label">@lang('Sort alerts by'):</label>
<select class="form-control" name="sort" id="sort-{{ $id }}">
Expand Down

0 comments on commit 326a4f4

Please sign in to comment.