1<?php 2 3$domain_list = Rrd::getRrdApplicationArrays($device, $app['app_id'], 'certificate'); 4 5print_optionbar_start(); 6 7$link_array = [ 8 'page' => 'device', 9 'device' => $device['device_id'], 10 'tab' => 'apps', 11 'app' => 'certificate', 12]; 13 14$cert_name_list = []; 15 16foreach ($domain_list as $label) { 17 $cert_name = $label; 18 19 if ($vars['cert_name'] == $cert_name) { 20 $label = sprintf('⚫ %s', $label); 21 } 22 23 array_push($cert_name_list, generate_link($label, $link_array, ['cert_name' => $cert_name])); 24} 25 26printf('%s | certificates: %s', generate_link('All Certificates', $link_array), implode(', ', $cert_name_list)); 27 28print_optionbar_end(); 29 30$graphs = [ 31 'certificate_age' => 'Age', 32 'certificate_remaining_days' => 'Remaining days', 33]; 34 35foreach ($graphs as $key => $text) { 36 $graph_type = $key; 37 $graph_array['height'] = '100'; 38 $graph_array['width'] = '215'; 39 $graph_array['to'] = time(); 40 $graph_array['id'] = $app['app_id']; 41 $graph_array['type'] = 'application_' . $key; 42 43 if (isset($vars['cert_name'])) { 44 $graph_array['cert_name'] = $vars['cert_name']; 45 } 46 47 echo '<div class="panel panel-default"> 48 <div class="panel-heading"> 49 <h3 class="panel-title">' . $text . '</h3> 50 </div> 51 <div class="panel-body"> 52 <div class="row">'; 53 include 'includes/html/print-graphrow.inc.php'; 54 echo '</div>'; 55 echo '</div>'; 56 echo '</div>'; 57} 58