$sub_state_statuses) { $graph_descr = ucfirst($state_type) . ' ' . ucfirst($sub_state_type) . ' State'; $graphs[$graph_name]['sub_states'][$sub_state_type]['desc'] = $graph_descr; } } return $graphs; } /** * Builds a graph array and outputs the graph. * * @param string $state_type * @param string $app_id * @param null|string $sub_state_type * @param string $graph_desc */ function systemd_graph_printer($state_type, $app_id, $sub_state_type, $graph_desc) { $graph_type = $state_type; $graph_array['height'] = '100'; $graph_array['width'] = '215'; $graph_array['to'] = time(); $graph_array['id'] = $app_id; $graph_array['type'] = 'application_' . $state_type; if (! is_null($sub_state_type)) { $graph_array['sub_state_type'] = $sub_state_type; } echo '