From wraggzeh, 3 Years ago, written in PHP.
Embed
  1. <?php
  2. $graphs = array(
  3.         'cabinet_climate_temperature' => 'Cabinet Temperature',
  4.         'cabinet_climate_humidity' => 'Cabinet Humidity',
  5. );
  6.  
  7. foreach ($graphs as $key => $text) {
  8.     $graph_type            = $key;
  9.     $graph_array['height'] = '100';
  10.     $graph_array['width']  = '215';
  11.     $graph_array['to'] = \LibreNMS\Config::get('time.now');
  12.     $graph_array['id']     = $app['app_id'];
  13.     $graph_array['type']   = 'application_'.$key;
  14.  
  15.     echo '<div class="panel panel-default">
  16.    <div class="panel-heading">
  17.        <h3 class="panel-title">'.$text.'</h3>
  18.    </div>
  19.    <div class="panel-body">
  20.    <div class="row">';
  21.     include 'includes/html/print-graphrow.inc.php';
  22.     echo '</div>';
  23.     echo '</div>';
  24.     echo '</div>';
  25. }
  26.