Completed
Pull Request — develop (#98)
by Neil
17:48
created
app/DataTables/AlertsDataTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
                                     @else
43 43
                                         <div class="label label-primary">UNKNOWN</div>
44 44
                                     @endif')
45
-            ->editColumn('rule.name', function ($this) {
46
-                return '<a href="' . url("alerting/rules/".$this['rule']['id']) . '">' . $this['rule']['name'] . '</a>';
45
+            ->editColumn('rule.name', function($this) {
46
+                return '<a href="'.url("alerting/rules/".$this['rule']['id']).'">'.$this['rule']['name'].'</a>';
47 47
             })
48
-            ->editColumn('device.hostname', function ($this) {
49
-                return '<a href="' . url("devices/".$this['device']['device_id']) . '">' . $this['device']['hostname'] . '</a>';
48
+            ->editColumn('device.hostname', function($this) {
49
+                return '<a href="'.url("devices/".$this['device']['device_id']).'">'.$this['device']['hostname'].'</a>';
50 50
             })
51
-            ->addColumn('actions', function ($this) {
51
+            ->addColumn('actions', function($this) {
52 52
                 return '';
53 53
             })
54 54
             ->make(true);
Please login to merge, or discard this patch.
app/Api/Transformers/AlertsTransformer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@
 block discarded – undo
39 39
     public function transform(Alerts $alerts)
40 40
     {
41 41
         return [
42
-            'id'        => (int)$alerts->id,
43
-            'device_id' => (int)$alerts->device_id,
44
-            'rule_id'   => (int)$alerts->rule_id,
45
-            'state'     => (int)$alerts->state,
46
-            'alerted'   => (int)$alerts->alerted,
47
-            'open'      => (int)$alerts->open,
42
+            'id'        => (int) $alerts->id,
43
+            'device_id' => (int) $alerts->device_id,
44
+            'rule_id'   => (int) $alerts->rule_id,
45
+            'state'     => (int) $alerts->state,
46
+            'alerted'   => (int) $alerts->alerted,
47
+            'open'      => (int) $alerts->open,
48 48
             'timestamp' => $alerts->timestamp,
49 49
         ];
50 50
     }
Please login to merge, or discard this patch.