0) { $colors = collect(['green', 'yellow', 'red']); $output = \App\Models\Service::query() ->where('device_id', $device['device_id']) ->orderBy('service_type') ->get(['service_type', 'service_status', 'service_message']) ->map(function ($service) use ($colors) { $message = str_replace(' ', ' ', $service->service_message); $color = $colors->get($service->service_status, 'grey'); $type = strtolower($service->service_type); return "$type"; })->implode(', '); $services = ObjectCache::serviceCounts(['total', 'ok', 'warning', 'critical'], $device['device_id']); ?>
'?> Services'?>