Fix alignment of arrow index and values
This commit is contained in:
@@ -9,14 +9,14 @@ class ComponentTransformer extends TransformerAbstract {
|
||||
|
||||
public function transform(Component $component) {
|
||||
return [
|
||||
'id' => (int) $component->id,
|
||||
'name' => $component->name,
|
||||
'description' => $component->description,
|
||||
'status_id' => (int) $component->status,
|
||||
'status' => $component->humanStatus,
|
||||
'incident_count' => $component->incidents()->count(),
|
||||
'created_at' => $component->created_at->timestamp,
|
||||
'updated_at' => $component->updated_at->timestamp,
|
||||
'id' => (int) $component->id,
|
||||
'name' => $component->name,
|
||||
'description' => $component->description,
|
||||
'status_id' => (int) $component->status,
|
||||
'status' => $component->humanStatus,
|
||||
'incident_count' => $component->incidents()->count(),
|
||||
'created_at' => $component->created_at->timestamp,
|
||||
'updated_at' => $component->updated_at->timestamp,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ class IncidentTransformer extends TransformerAbstract {
|
||||
$transformer = $component->getTransformer();
|
||||
|
||||
return [
|
||||
'id' => (int) $incident->id,
|
||||
'name' => $incident->name,
|
||||
'message' => $incident->message,
|
||||
'status_id' => (int) $incident->status,
|
||||
'status' => $incident->getHumanStatusAttribute(),
|
||||
'component' => $transformer->transform($component),
|
||||
'created_at' => $incident->created_at->timestamp,
|
||||
'updated_at' => $incident->updated_at->timestamp,
|
||||
'id' => (int) $incident->id,
|
||||
'name' => $incident->name,
|
||||
'message' => $incident->message,
|
||||
'status_id' => (int) $incident->status,
|
||||
'status' => $incident->getHumanStatusAttribute(),
|
||||
'component' => $transformer->transform($component),
|
||||
'created_at' => $incident->created_at->timestamp,
|
||||
'updated_at' => $incident->updated_at->timestamp,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@ class MetricTransformer extends TransformerAbstract {
|
||||
|
||||
public function transform(Metric $metric) {
|
||||
return [
|
||||
'id' => (int) $metric->id,
|
||||
'name' => $metric->name,
|
||||
'description' => $metric->description,
|
||||
'suffix' => $metric->suffix,
|
||||
'display' => $metric->shouldDisplay,
|
||||
'created_at' => $metric->created_at->timestamp,
|
||||
'updated_at' => $metric->updated_at->timestamp,
|
||||
'id' => (int) $metric->id,
|
||||
'name' => $metric->name,
|
||||
'description' => $metric->description,
|
||||
'suffix' => $metric->suffix,
|
||||
'display' => $metric->shouldDisplay,
|
||||
'created_at' => $metric->created_at->timestamp,
|
||||
'updated_at' => $metric->updated_at->timestamp,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user