Ejemplo n.º 1
0
 /**
     Creates a new Markdown row.
     @param string $message contains the body.
     @param string $header  could contain the headline.
     @return object
     **/
 public static function genRow($message, $mode = \histou\grafana\TextPanel::TEXT, $header = '')
 {
     $panel = new \histou\grafana\TextPanel('');
     $panel->setMode($mode);
     $panel->setContent($message);
     $row = new \histou\grafana\Row($header);
     $row->addPanel($panel);
     return $row;
 }
Ejemplo n.º 2
0
 public function testErrorMarkdownDashboard()
 {
     $this->init();
     $panel = new \histou\grafana\TextPanel('', 1);
     $panel->setMode(\histou\grafana\TextPanel::MARKDOWN);
     $panel->setContent("foo");
     $row = new \histou\grafana\Row("ERROR");
     $row->addPanel($panel);
     $dashboard = new \histou\grafana\dashboard\dashboardInfluxdb('Error');
     $dashboard->addRow($row);
     $this->assertEquals($dashboard, \histou\Debug::errorMarkdownDashboard("foo"));
 }