@@ -105,7 +105,7 @@ |
||
| 105 | 105 | */ |
| 106 | 106 | public function getAjax() |
| 107 | 107 | { |
| 108 | - return url('eventlog?device_id=' . $this->device_id); |
|
| 108 | + return url('eventlog?device_id='.$this->device_id); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | public function forDevice($device_id) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } elseif ($format == 'csv') { |
| 68 | 68 | return $this->csvSerialize(); |
| 69 | 69 | } |
| 70 | - return null; // shouldn't get here |
|
| 70 | + return null; // shouldn't get here |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | private function getOutput() |
| 79 | 79 | { |
| 80 | - return Cache::tags('graphs')->remember($this->key, 5, function () { |
|
| 80 | + return Cache::tags('graphs')->remember($this->key, 5, function() { |
|
| 81 | 81 | $output = $this->run(); |
| 82 | 82 | $output = preg_replace('/\'/', '"', $output); |
| 83 | 83 | $output = preg_replace('/about\:/', '"meta":', $output); |
@@ -191,8 +191,8 @@ discard block |
||
| 191 | 191 | public static function escape($string, $length = null) |
| 192 | 192 | { |
| 193 | 193 | $result = shorten_interface_type($string); |
| 194 | - $result = str_replace("'", '', $result); # remove quotes |
|
| 195 | - $result = str_replace('%', '%%', $result); # double percent signs |
|
| 194 | + $result = str_replace("'", '', $result); # remove quotes |
|
| 195 | + $result = str_replace('%', '%%', $result); # double percent signs |
|
| 196 | 196 | if (is_numeric($length) && strlen($string) > $length) { |
| 197 | 197 | $extra = substr_count($string, ':', 0, $length); |
| 198 | 198 | $result = substr(str_pad($result, $length), 0, ($length + $extra)); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - $result = str_replace(':', '\:', $result); # escape colons |
|
| 204 | + $result = str_replace(':', '\:', $result); # escape colons |
|
| 205 | 205 | return $result.' '; |
| 206 | 206 | } |
| 207 | 207 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $this->checkFormatSupported($format); |
| 59 | 59 | |
| 60 | - return Cache::tags('graphs')->remember($this->key, 5, function () { |
|
| 60 | + return Cache::tags('graphs')->remember($this->key, 5, function() { |
|
| 61 | 61 | return base64_encode($this->run()); |
| 62 | 62 | }); |
| 63 | 63 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | if ($this->hasIDs()) { |
| 35 | 35 | return [ |
| 36 | - 'storage' => function (Builder $query) { |
|
| 36 | + 'storage' => function(Builder $query) { |
|
| 37 | 37 | $query->whereIn('storage_id', $this->getIDs()); |
| 38 | 38 | }, |
| 39 | 39 | ]; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | if ($this->hasIDs()) { |
| 35 | 35 | return [ |
| 36 | - 'processors' => function (Builder $query) { |
|
| 36 | + 'processors' => function(Builder $query) { |
|
| 37 | 37 | $query->whereIn('processor_id', $this->getIDs()); |
| 38 | 38 | }, |
| 39 | 39 | ]; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | if ($this->hasIDs()) { |
| 35 | 35 | return [ |
| 36 | - 'ports' => function (Builder $query) { |
|
| 36 | + 'ports' => function(Builder $query) { |
|
| 37 | 37 | $query->whereIn('port_id', $this->getIDs()); |
| 38 | 38 | }, |
| 39 | 39 | ]; |
@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View |
| 19 | 19 | */ |
| 20 | - public function index(DeviceDataTable $dataTable, $group_id=-1) |
|
| 20 | + public function index(DeviceDataTable $dataTable, $group_id = -1) |
|
| 21 | 21 | { |
| 22 | 22 | $group_name = ""; |
| 23 | - if($group_id >= 0) { |
|
| 23 | + if ($group_id >= 0) { |
|
| 24 | 24 | $dataTable->addScope(new \App\DataTables\Scopes\DeviceGroup($group_id)); |
| 25 | 25 | $group_name = DeviceGroup::find($group_id)->name; |
| 26 | 26 | } |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | $page_setup['navbar'] = [ |
| 81 | 81 | 'Overview' => $device_url, |
| 82 | - 'Graphs' => $device_url . '/graphs', |
|
| 83 | - 'Health' => $device_url . '/health', |
|
| 82 | + 'Graphs' => $device_url.'/graphs', |
|
| 83 | + 'Health' => $device_url.'/health', |
|
| 84 | 84 | ]; |
| 85 | 85 | return view('devices.show', compact(['device', 'page_setup', 'request', 'page'])); |
| 86 | 86 | } |