@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function query() |
| 54 | 54 | { |
| 55 | - $syslog = Syslog::with(['device' => function ($query) { |
|
| 55 | + $syslog = Syslog::with(['device' => function($query) { |
|
| 56 | 56 | return $query->addSelect(['device_id', 'hostname']); |
| 57 | 57 | }])->select('syslog.*'); |
| 58 | 58 | return $this->applyScopes($syslog); |
@@ -41,21 +41,21 @@ |
||
| 41 | 41 | { |
| 42 | 42 | return $this->datatables |
| 43 | 43 | ->eloquent($this->query()) |
| 44 | - ->editColumn('hostname', function ($data) { |
|
| 44 | + ->editColumn('hostname', function($data) { |
|
| 45 | 45 | $hostname = is_null($data->device) ? trans('devices.text.deleted') : $data->device->hostname; |
| 46 | 46 | return '<a href="'.url("devices/".$data->device_id).'">'.$hostname.'</a>'; |
| 47 | 47 | }) |
| 48 | - ->editColumn('ifName', function ($data) { |
|
| 48 | + ->editColumn('ifName', function($data) { |
|
| 49 | 49 | $ifName = is_null($data->ifName) ? trans('devices.text.deleted') : $data->ifName; |
| 50 | 50 | return '<a href="'.url("devices/".$data->device_id."/ports/".$data->port_id).'">'.$ifName.'</a>'; |
| 51 | 51 | }) |
| 52 | - ->addColumn('remote_device', function ($data) { |
|
| 52 | + ->addColumn('remote_device', function($data) { |
|
| 53 | 53 | $remote_device = IPv4::where('ipv4_addresses.ipv4_address', $data->ipv4_address)->with('port.device')->first(); |
| 54 | 54 | $remote_id = empty($remote_device->port->device->device_id) ? '' : $remote_device->port->device->device_id; |
| 55 | 55 | $remote_hostname = empty($remote_device->port->device->hostname) ? '' : $remote_device->port->device->hostname; |
| 56 | 56 | return '<a href="'.url("devices/".$remote_id).'">'.$remote_hostname.'</a>'; |
| 57 | 57 | }) |
| 58 | - ->addColumn('remote_interface', function ($data) { |
|
| 58 | + ->addColumn('remote_interface', function($data) { |
|
| 59 | 59 | $remote_device = IPv4::where('ipv4_addresses.ipv4_address', $data->ipv4_address)->with('port.device')->first(); |
| 60 | 60 | $remote_id = empty($remote_device->port->device->device_id) ? '' : $remote_device->port->device->device_id; |
| 61 | 61 | $remote_port_id = empty($remote_device->port->port_id) ? '' : $remote_device->port->port_id; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | { |
| 40 | 40 | return $this->datatables |
| 41 | 41 | ->eloquent($this->query()) |
| 42 | - ->editColumn('level', function ($user) { |
|
| 42 | + ->editColumn('level', function($user) { |
|
| 43 | 43 | return trans('user.level.'.$user->level); |
| 44 | 44 | }) |
| 45 | 45 | ->editColumn('actions', 'datatables.user.actions') |