diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php index 891ef524df..050ff2576d 100644 --- a/pandora_console/include/lib/Dashboard/Manager.php +++ b/pandora_console/include/lib/Dashboard/Manager.php @@ -997,6 +997,10 @@ class Manager // Header. if ($this->slides === 0) { + if ((bool) \is_metaconsole() === true) { + open_meta_frame(); + } + View::render( 'dashboard/header', [ @@ -1077,6 +1081,13 @@ class Manager 'dashboard/jsLayout', ['dashboardId' => $this->dashboardId] ); + + if ((bool) \is_metaconsole() === true + && $this->slides === 0 + ) { + close_meta_frame(); + } + return null; } diff --git a/pandora_console/include/lib/View.php b/pandora_console/include/lib/View.php index e3c21066d1..7182b43e6a 100644 --- a/pandora_console/include/lib/View.php +++ b/pandora_console/include/lib/View.php @@ -32,7 +32,6 @@ namespace PandoraFMS; global $config; require_once $config['homedir'].'/include/class/HTML.class.php'; -use \HTML as HTML; /** * View class. diff --git a/pandora_console/operation/dashboard/dashboard.php b/pandora_console/operation/dashboard/dashboard.php index 5dc1292367..3f4a924ff8 100644 --- a/pandora_console/operation/dashboard/dashboard.php +++ b/pandora_console/operation/dashboard/dashboard.php @@ -29,10 +29,14 @@ global $config; -require 'vendor/autoload.php'; +require $config['homedir'].'/vendor/autoload.php'; use PandoraFMS\Dashboard\Manager; +if ((bool) is_metaconsole() === true) { + ui_require_css_file('meta_dashboards.css'); +} + $ajaxPage = 'operation/dashboard/dashboard'; // Control call flow. diff --git a/pandora_console/views/dashboard/header.php b/pandora_console/views/dashboard/header.php index 0449e4dfb6..d476dcff2d 100644 --- a/pandora_console/views/dashboard/header.php +++ b/pandora_console/views/dashboard/header.php @@ -245,14 +245,22 @@ if ($config['public_dashboard'] === true) { } if ($publicLink === false) { - ui_print_page_header( - $dashboardName, - '', - false, - '', - false, - $buttons - ); + if ((bool) is_metaconsole() === true) { + ui_meta_print_header( + __('Dashboards').' ยป '.__('List'), + false, + $buttons + ); + } else { + ui_print_page_header( + $dashboardName, + '', + false, + '', + false, + $buttons + ); + } } else { $output = '
'; foreach ($buttons as $key => $value) { diff --git a/pandora_console/views/dashboard/layout.php b/pandora_console/views/dashboard/layout.php index 57dd228898..1d33c974cc 100644 --- a/pandora_console/views/dashboard/layout.php +++ b/pandora_console/views/dashboard/layout.php @@ -27,10 +27,18 @@ */ // Css Files. -\ui_require_css_file('bootstrap.min'); +if ((bool) \is_metaconsole() !== true) { + \ui_require_css_file('bootstrap.min'); +} + \ui_require_css_file('gridstack.min'); \ui_require_css_file('gridstack-extra.min'); -\ui_require_css_file('pandora'); +if ((bool) \is_metaconsole() === true) { + \ui_require_css_file('meta_pandora'); +} else { + \ui_require_css_file('pandora'); +} + \ui_require_css_file('dashboards'); // Js Files. diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php index be282e679b..bd956a578e 100644 --- a/pandora_console/views/dashboard/list.php +++ b/pandora_console/views/dashboard/list.php @@ -32,15 +32,20 @@ require_once $config['homedir'].'/include/class/HTML.class.php'; global $config; ui_require_css_file('dashboards'); +if ((bool) \is_metaconsole() === true) { + \ui_require_css_file('meta_dashboards'); +} // Header. -\ui_print_page_header( - __('Dashboards'), - '', - false, - '', - false -); +if ((bool) is_metaconsole() === false) { + \ui_print_page_header( + __('Dashboards'), + '', + false, + '', + false + ); +} if (isset($resultDelete) === true) { \ui_print_result_message(