app/DataTables/General/EventlogDataTable.php 1 location
|
@@ 41-50 (lines=10) @@
|
| 38 |
|
* |
| 39 |
|
* @return \Illuminate\Http\JsonResponse |
| 40 |
|
*/ |
| 41 |
|
public function ajax() |
| 42 |
|
{ |
| 43 |
|
return $this->datatables |
| 44 |
|
->eloquent($this->query()) |
| 45 |
|
->editColumn('device.hostname', function ($eventlog) { |
| 46 |
|
$hostname = is_null($eventlog->device) ? trans('devices.text.deleted') : $eventlog->device->hostname; |
| 47 |
|
return '<a href="'.url("devices/".$eventlog->device_id).'">'.$hostname.'</a>'; |
| 48 |
|
}) |
| 49 |
|
->make(true); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
/** |
| 53 |
|
* Get the query object to be processed by datatables. |
app/DataTables/General/InventoryDataTable.php 1 location
|
@@ 38-47 (lines=10) @@
|
| 35 |
|
* |
| 36 |
|
* @return \Illuminate\Http\JsonResponse |
| 37 |
|
*/ |
| 38 |
|
public function ajax() |
| 39 |
|
{ |
| 40 |
|
return $this->datatables |
| 41 |
|
->eloquent($this->query()) |
| 42 |
|
->editColumn('device.hostname', function ($inventory) { |
| 43 |
|
$hostname = is_null($inventory->device) ? trans('devices.text.deleted') : $inventory->device->hostname; |
| 44 |
|
return '<a href="'.url("devices/".$inventory->device_id).'">'.$hostname.'</a>'; |
| 45 |
|
}) |
| 46 |
|
->make(true); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
/** |
| 50 |
|
* Get the query object to be processed by datatables. |
app/DataTables/General/SyslogDataTable.php 1 location
|
@@ 38-47 (lines=10) @@
|
| 35 |
|
* |
| 36 |
|
* @return \Illuminate\Http\JsonResponse |
| 37 |
|
*/ |
| 38 |
|
public function ajax() |
| 39 |
|
{ |
| 40 |
|
return $this->datatables |
| 41 |
|
->eloquent($this->query()) |
| 42 |
|
->editColumn('device.hostname', function ($syslog) { |
| 43 |
|
$hostname = is_null($syslog->device) ? trans('devices.text.deleted') : $syslog->device->hostname; |
| 44 |
|
return '<a href="'.url("devices/".$syslog->device_id).'">'.$hostname.'</a>'; |
| 45 |
|
}) |
| 46 |
|
->make(true); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
/** |
| 50 |
|
* Get the query object to be processed by datatables. |