'device', 'device' => $device['device_id'], 'tab' => 'apps', 'app' => 'pwrstatd', ]; $sn_list = []; foreach ($psu_list as $label) { $sn = $label; if ($vars['sn'] == $sn) { $label = '' . $label . ''; } array_push($sn_list, generate_link($label, $link_array, ['sn' => $sn])); } printf('%s | PSUs: %s', generate_link('All PSUs', $link_array), implode(', ', $sn_list)); print_optionbar_end(); $graphs = [ 'pwrstatd_minutes' => 'Battery Runtime Remaining', 'pwrstatd_percentage' => 'Percentage Readings', 'pwrstatd_voltage' => 'Voltage Readings', 'pwrstatd_wattage' => 'Power Readings', ]; foreach ($graphs as $key => $text) { $graph_type = $key; $graph_array['height'] = '100'; $graph_array['width'] = '215'; $graph_array['to'] = time(); $graph_array['id'] = $app['app_id']; $graph_array['type'] = 'application_' . $key; if (isset($vars['sn'])) { $graph_array['sn'] = $vars['sn']; } echo '

' . $text . '

'; include 'includes/html/print-graphrow.inc.php'; echo '
'; echo '
'; echo '
'; }