diff --git a/library/Icinga/File/Pdf.php b/library/Icinga/File/Pdf.php index 6faf5c4dc..771ec9dee 100644 --- a/library/Icinga/File/Pdf.php +++ b/library/Icinga/File/Pdf.php @@ -2,84 +2,75 @@ namespace Icinga\File; -use TCPDF; -use Icinga\Web\Url; -use Icinga\Application\Icinga; +use \DOMPDF; -define('K_TCPDF_EXTERNAL_CONFIG', true); -define('K_PATH_URL', (string) Url::fromPath('/')); -define('K_PATH_MAIN', dirname(ICINGA_LIBDIR) . '/public'); -define('K_PATH_FONTS', ICINGA_LIBDIR . '/vendor/tcpdf/fonts/'); -// define('K_PATH_CACHE', ICINGA_LIBDIR . '/vendor/tcpdf/cache/'); -// define('K_PATH_URL_CACHE', ICINGA_LIBDIR . '/vendor/tcpdf/cache/'); -define('K_PATH_CACHE', '/tmp/'); -define('K_PATH_URL_CACHE', '/tmp/'); -//define('K_PATH_IMAGES', K_PATH_MAIN . 'images/'); // ??? -define('K_PATH_IMAGES', dirname(ICINGA_LIBDIR) . '/public'); // ??? -define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png'); // COULD be anything? +require_once 'vendor/dompdf/dompdf_config.inc.php'; -// define('K_CELL_HEIGHT_RATIO', 1.25); -define('K_SMALL_RATIO', 2/3); -define('K_TCPDF_CALLS_IN_HTML', false); // SECURITY: is false better? -define('K_TCPDF_THROW_EXCEPTION_ERROR', true); -define('K_THAI_TOPCHARS', false); +spl_autoload_register("DOMPDF_autoload"); -require_once 'vendor/tcpdf/tcpdf.php'; - -class Pdf extends TCPDF +class Pdf extends DOMPDF { - protected $cell_height_ratio = 1.25; - public function __construct( - $orientation = 'P', - $unit = 'mm', - $format = 'A4', - $unicode = true, - $encoding = 'UTF-8', - $diskcache = false, - $pdfa = false - ) { - unset($_SERVER['DOCUMENT_ROOT']); - parent::__construct( - $orientation, - $unit, - $format, - $unicode, - $encoding, - $diskcache, - $pdfa - ); + public function __construct() { + $this->set_paper(DOMPDF_DEFAULT_PAPER_SIZE, "portrait"); + parent::__construct(); + } - $this->SetCreator('IcingaWeb'); - $this->SetAuthor('IcingaWeb Team'); - $this->SetTitle('IcingaWeb Sample PDF - Title'); - $this->SetSubject('IcingaWeb Sample PDF - Subject'); - $this->SetKeywords('IcingaWeb, Monitoring'); + /** + * @param $body + * @param $css + */ + public function renderPage($body, $css) + { + $html = + '' + . '' + . '' + . $body + . '' + . ''; + $this->load_html($html); + $this->render(); + } - // set default header data - // $pdf->SetHeaderData('tcpdf_logo.jpg', 30, 'Header title', - // 'Header string', array(0,64,255), array(0,64,128)); - // $pdf->setFooterData($tc=array(0,64,0), $lc=array(0,64,128)); + /** + * Prepare the given css for rendering with DOMPDF, by removing or hiding all incompatible + * styles + * + * @param $css The css-string + * + * @return string A css-string that is ready to use for DOMPDF + */ + public static function prepareCss($css) + { + $css = preg_replace('/\*:\s*before\s*,\s*/', '', $css); + $css = preg_replace('/\*\s*:\s*after\s*\{[^\}]*\}/', '', $css); - $this->setHeaderFont(array('helvetica', '', 10)); - $this->setFooterFont(array('helvetica', '', 8)); - $this->SetDefaultMonospacedFont('courier'); + // TODO: Move into own .css file that is loaded when requesting a pdf + return $css . "\n" + . 'form { display: none; }' . "\n" - $this->SetMargins(15, 27, 15); // left, top, right - $this->SetHeaderMargin(5); - $this->SetFooterMargin(10); + // Don't show any link outline + . 'a { outline: 0; }' . "\n" - $this->SetAutoPageBreak(true, 25); // margin bottom - $this->setImageScale(1.75); + // Fix badge positioning TODO: Badge should be at the right border + . 'span.badge { float: right; max-width: 5px; }' - $lang = array( - 'a_meta_charset' => 'UTF-8', - 'a_meta_dir' => 'ltr', - 'a_meta_language' => 'de', - 'w_page' => 'Seite', - ); - $this->setLanguageArray($lang); + // prevent table rows from growing too big on page breaks + . 'tr { max-height: 30px; height: 30px; } ' . "\n" - $this->setFontSubsetting(true); - $this->SetFont('dejavusans', '', 16, '', true); + // Hide buttons + . '*.button { display: none; }' . "\n" + . 'button > i { display: none; }' . "\n" + + // Hide navigation + . '*.nav {display: none; }' . "\n" + . '*.nav > li { display: none; }' . "\n" + . '*.nav > li > a { display: none; }' . "\n" + + // Hide pagination + . '*.pagination { display: none; }' . "\n" + . '*.pagination > li { display: none; }' . "\n" + . '*.pagination > li > a { display: none; }' . "\n" + . '*.pagination > li > span { display: none; }' . "\n"; } } diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index e08be3778..49814f7f3 100755 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -39,6 +39,8 @@ use Icinga\Application\Benchmark; use Icinga\Util\Translator; use Icinga\Web\Widget\Tabs; use Icinga\Web\Url; +use Icinga\Application\Logger; +use Icinga\Web\Request; use Icinga\File\Pdf; use \DOMDocument; @@ -243,32 +245,20 @@ class ActionController extends Zend_Controller_Action $this->_request->getControllerName() . '/' . $this->_request->getActionName() . '.phtml' ); $this->sendAsPdf($html); + die(); } } protected function sendAsPdf($body) { - $css = $this->view->getHelper('action')->action('stylesheet', 'static', 'application'); - $css = <<' . $body . ''; - $pdf = new PDF(); - $pdf->AddPage(); - $pdf->writeHTML($html); - $pdf->Output($this->getRequest()->getActionName() . '.pdf', 'I'); - } - - /** - * @param DOMDocument $doc - * @param $tag - */ - private function removeNodeByTagName(DOMDocument $doc, $tag) - { - $forms = $doc->getElementsByTagName($tag); - foreach ($forms as $form) { - $form->parentNode->removeChild($form);; + if (!headers_sent()) { + $css = $this->view->getHelper('action')->action('stylesheet', 'static', 'application'); + $pdf = new PDF(); + $pdf->renderPage($body, $css); + $pdf->stream($this->_request->getControllerName() . '-' . $this->_request->getActionName() . '.pdf'); + } else { + Logger::error('Could not send pdf-response, content already written to output.'); + die(); } } diff --git a/library/Icinga/Web/Widget/Tabextension/OutputFormat.php b/library/Icinga/Web/Widget/Tabextension/OutputFormat.php index 000895ae1..595bf6c07 100644 --- a/library/Icinga/Web/Widget/Tabextension/OutputFormat.php +++ b/library/Icinga/Web/Widget/Tabextension/OutputFormat.php @@ -65,19 +65,21 @@ class OutputFormat implements Tabextension private $supportedTypes = array( self::TYPE_PDF => array( 'name' => 'pdf', - 'title' => '{{PDF_ICON}} PDF', - 'urlParams' => array('filetype' => 'pdf') + 'title' => ' PDF', + 'urlParams' => array('format' => 'pdf') ), + /* self::TYPE_CSV => array( 'name' => 'csv', - 'title' => '{{CSV_ICON}} CSV', - 'urlParams' => array('filetype' => 'csv') + 'title' => ' CSV', + 'urlParams' => array('format' => 'csv') ), self::TYPE_JSON => array( 'name' => 'json', - 'title' => '{{JSON_ICON}} JSON', - 'urlParams' => array('filetype' => 'json') + 'title' => ' JSON', + 'urlParams' => array('format' => 'json') ) + */ ); /** diff --git a/library/vendor/dompdf/.gitignore b/library/vendor/dompdf/.gitignore new file mode 100644 index 000000000..dadce71ef --- /dev/null +++ b/library/vendor/dompdf/.gitignore @@ -0,0 +1 @@ +lib/fonts/log.htm diff --git a/library/vendor/dompdf/lib/fonts/log.htm b/library/vendor/dompdf/lib/fonts/log.htm deleted file mode 100644 index 305902d0a..000000000 --- a/library/vendor/dompdf/lib/fonts/log.htm +++ /dev/null @@ -1,308 +0,0 @@ -1202 frames 65,024 KB 10,563.66 ms ON

- - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.204954013264Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.204954013264Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.207654030032Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.207654030032Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.204954013264Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.204954013264Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.267054375888Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.267054375888Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.285454449984Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.285454449984Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.293154480056Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.293154480056Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
2010.295854496472Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
2110.295854496472Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.293154480056Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.293154480056Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
2010.321154572232Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
2110.321154572232Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.332054605712Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.332054605712Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
2010.334754620280Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
2110.334854620280Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.332054605712Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.332054605712Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
2010.354154695584Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
2110.354154695584Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.366254735936Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.366254735936Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
2010.368654751240Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
2110.368654751240Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.366254735936Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.366254735936Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
2010.390054826912Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
2110.390054826912Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1610.281354433624Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1710.281354433624Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1810.402954872336Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1910.402954872336Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1612.162363175200Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1712.162363175200Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1812.164263189160Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1912.164263189160Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
-
- - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Notice: Undefined offset: 1 in /vagrant/library/vendor/dompdf/include/table_frame_reflower.cls.php on line 396
Call Stack
#TimeMemoryFunctionLocation
10.0027634712{main}( )../index.php:0
20.36089455264Icinga\Application\Web->dispatch( )../index.php:17
30.36089455264Zend_Controller_Front->dispatch( )../Web.php:195
40.36579639648Zend_Controller_Dispatcher_Standard->dispatch( )../Front.php:954
50.411610644296Zend_Controller_Action->dispatch( )../Standard.php:308
60.812311303424Icinga\Web\Controller\ActionController->postDispatch( )../Action.php:521
71.132314523112Icinga\Web\Controller\ActionController->sendAsPdf( )../ActionController.php:246
82.182822215480Icinga\File\Pdf->renderPage( )../ActionController.php:256
92.261822625376DOMPDF->render( )../Pdf.php:32
1010.200653995224Frame_Decorator->reflow( )../dompdf.cls.php:817
1110.200653995272Page_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1210.201653997600Frame_Decorator->reflow( )../page_frame_reflower.cls.php:138
1310.201653997648Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1410.276454411344Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1510.276454411344Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1612.162363175200Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1712.162363175200Block_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
1812.171063217872Frame_Decorator->reflow( )../block_frame_reflower.cls.php:722
1912.171063217872Table_Frame_Reflower->reflow( )../frame_decorator.cls.php:556
diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index fdf2ba134..d9ca84c8b 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -438,8 +438,8 @@ class Monitoring_ListController extends MonitoringController private function createTabs() { $tabs = $this->getTabs(); - $tabs//->extend(new OutputFormat()) - ->extend(new DashboardAction()); + $tabs->extend(new OutputFormat()) + ->extend(new DashboardAction()); } } // @codingStandardsIgnoreEnd diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index abbb137fc..aa937307a 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -199,7 +199,7 @@ class Monitoring_ShowController extends MonitoringController ) ); $tabs->extend(new OutputFormat()) - ->extend(new DashboardAction()); + ->extend(new DashboardAction()); } } // @codingStandardsIgnoreEnd