mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Add new option in mobile version.
(cherry picked from commit 09671dcb1d83ab23d182ba97d5ce8bd7cd0b05b7)
This commit is contained in:
parent
62706b6729
commit
1f21b9ffee
@ -1576,7 +1576,11 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||||||
// Re-calculate the graph height with the legend height
|
// Re-calculate the graph height with the legend height
|
||||||
if (dashboard || vconsole) {
|
if (dashboard || vconsole) {
|
||||||
var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height();
|
var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height();
|
||||||
$('#'+graph_id).css('height', hDiff);
|
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#'+graph_id).css('height', hDiff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vconsole) {
|
if (vconsole) {
|
||||||
|
@ -1913,23 +1913,39 @@ div.ui-mobile-viewport { overflow-x: hidden; }
|
|||||||
.ui-grid-solo .ui-block-a { display: block; float: none; }
|
.ui-grid-solo .ui-block-a { display: block; float: none; }
|
||||||
/* Lower percentages for older browsers (i.e. IE7) to prevent wrapping. -.5px to fix BB5 wrap issue. */
|
/* Lower percentages for older browsers (i.e. IE7) to prevent wrapping. -.5px to fix BB5 wrap issue. */
|
||||||
/* grid a: 50/50 */
|
/* grid a: 50/50 */
|
||||||
|
/*
|
||||||
.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 49.95%; }
|
.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 49.95%; }
|
||||||
|
*/
|
||||||
|
/*
|
||||||
.ui-grid-a > :nth-child(n) { width: 50%; margin-right: -.5px; }
|
.ui-grid-a > :nth-child(n) { width: 50%; margin-right: -.5px; }
|
||||||
|
*/
|
||||||
.ui-grid-a .ui-block-a { clear: left; }
|
.ui-grid-a .ui-block-a { clear: left; }
|
||||||
/* grid b: 33/33/33 */
|
/* grid b: 33/33/33 */
|
||||||
|
/*
|
||||||
.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.25%; }
|
.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.25%; }
|
||||||
|
*/
|
||||||
|
/*
|
||||||
.ui-grid-b > :nth-child(n) { width: 33.333%; margin-right: -.5px; }
|
.ui-grid-b > :nth-child(n) { width: 33.333%; margin-right: -.5px; }
|
||||||
|
*/
|
||||||
.ui-grid-b .ui-block-a { clear: left; }
|
.ui-grid-b .ui-block-a { clear: left; }
|
||||||
/* grid c: 25/25/25/25 */
|
/* grid c: 25/25/25/25 */
|
||||||
|
/*
|
||||||
.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 24.925%; }
|
.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 24.925%; }
|
||||||
|
*/
|
||||||
|
/*
|
||||||
.ui-grid-c > :nth-child(n) { width: 25%; margin-right: -.5px; }
|
.ui-grid-c > :nth-child(n) { width: 25%; margin-right: -.5px; }
|
||||||
|
*/
|
||||||
.ui-grid-c .ui-block-a { clear: left; }
|
.ui-grid-c .ui-block-a { clear: left; }
|
||||||
/* grid d: 20/20/20/20/20 */
|
/* grid d: 20/20/20/20/20 */
|
||||||
|
/*
|
||||||
.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 19.925%; }
|
.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 19.925%; }
|
||||||
|
*/
|
||||||
|
/*
|
||||||
.ui-grid-d > :nth-child(n) { width: 20%; }
|
.ui-grid-d > :nth-child(n) { width: 20%; }
|
||||||
|
*/
|
||||||
.ui-grid-d .ui-block-a { clear: left; }
|
.ui-grid-d .ui-block-a { clear: left; }
|
||||||
/* preset breakpoint to switch to stacked grid styles below 25em (560px) */
|
/* preset breakpoint to switch to stacked grid styles below 25em (560px) */
|
||||||
@media all and (max-width: 25em) {
|
@media all {
|
||||||
.ui-responsive .ui-block-a,
|
.ui-responsive .ui-block-a,
|
||||||
.ui-responsive .ui-block-b,
|
.ui-responsive .ui-block-b,
|
||||||
.ui-responsive .ui-block-c,
|
.ui-responsive .ui-block-c,
|
||||||
|
@ -1123,10 +1123,15 @@ table.tactical_bars {
|
|||||||
background-image: url(../../../images/visual_console.menu.png) !important;
|
background-image: url(../../../images/visual_console.menu.png) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-icon-dashboard {
|
||||||
|
background-image: url(../../../images/dashboard.menu.png) !important;
|
||||||
|
}
|
||||||
|
|
||||||
.ui-icon-tactical_view, .ui-icon-events,
|
.ui-icon-tactical_view, .ui-icon-events,
|
||||||
.ui-icon-groups, .ui-icon-alerts,
|
.ui-icon-groups, .ui-icon-alerts,
|
||||||
.ui-icon-agents, .ui-icon-modules,
|
.ui-icon-agents, .ui-icon-modules,
|
||||||
.ui-icon-network_maps, .ui-icon-visual_console {
|
.ui-icon-network_maps, .ui-icon-visual_console,
|
||||||
|
.ui-icon-dashboard {
|
||||||
background-color: #333 !important;
|
background-color: #333 !important;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
border-radius: 15px !important;
|
border-radius: 15px !important;
|
||||||
@ -1145,7 +1150,8 @@ table.tactical_bars {
|
|||||||
.ui-icon-tactical_view, .ui-icon-events,
|
.ui-icon-tactical_view, .ui-icon-events,
|
||||||
.ui-icon-groups, .ui-icon-alerts,
|
.ui-icon-groups, .ui-icon-alerts,
|
||||||
.ui-icon-agents, .ui-icon-modules,
|
.ui-icon-agents, .ui-icon-modules,
|
||||||
.ui-icon-network_maps, .ui-icon-visual_console {
|
.ui-icon-network_maps, .ui-icon-visual_console,
|
||||||
|
.ui-icon-dashboard {
|
||||||
width: 22px !important;
|
width: 22px !important;
|
||||||
height: 22px !important;
|
height: 22px !important;
|
||||||
margin-top: -13px !important;
|
margin-top: -13px !important;
|
||||||
@ -1158,7 +1164,8 @@ table.tactical_bars {
|
|||||||
.ui-icon-tactical_view, .ui-icon-events,
|
.ui-icon-tactical_view, .ui-icon-events,
|
||||||
.ui-icon-groups, .ui-icon-alerts,
|
.ui-icon-groups, .ui-icon-alerts,
|
||||||
.ui-icon-agents, .ui-icon-modules,
|
.ui-icon-agents, .ui-icon-modules,
|
||||||
.ui-icon-network_maps, .ui-icon-visual_console {
|
.ui-icon-network_maps, .ui-icon-visual_console,
|
||||||
|
.ui-icon-dashboard {
|
||||||
width: 32px !important;
|
width: 32px !important;
|
||||||
height: 32px !important;
|
height: 32px !important;
|
||||||
margin-top: -17px !important;
|
margin-top: -17px !important;
|
||||||
|
@ -45,6 +45,8 @@ class System {
|
|||||||
private function loadConfig() {
|
private function loadConfig() {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
$config['mobile'] = true;
|
||||||
|
|
||||||
$this->config = &$config;
|
$this->config = &$config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ require_once('operation/networkmap.php');
|
|||||||
require_once('operation/visualmaps.php');
|
require_once('operation/visualmaps.php');
|
||||||
require_once('operation/visualmap.php');
|
require_once('operation/visualmap.php');
|
||||||
$enterpriseHook = enterprise_include('mobile/include/enterprise.class.php');
|
$enterpriseHook = enterprise_include('mobile/include/enterprise.class.php');
|
||||||
|
$enterpriseHook = enterprise_include('mobile/operation/dashboard.php');
|
||||||
$enterpriseHook = enterprise_include('mobile/operation/home.php');
|
$enterpriseHook = enterprise_include('mobile/operation/home.php');
|
||||||
|
|
||||||
if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
|
if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
|
||||||
@ -157,6 +158,11 @@ switch ($action) {
|
|||||||
$tactical = new Tactical();
|
$tactical = new Tactical();
|
||||||
$tactical->ajax($parameter2);
|
$tactical->ajax($parameter2);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
if (class_exists("Enterprise")) {
|
||||||
|
$enterprise->enterpriseAjax($parameter1, $parameter2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
@ -226,7 +232,6 @@ switch ($action) {
|
|||||||
default:
|
default:
|
||||||
if (class_exists("Enterprise")) {
|
if (class_exists("Enterprise")) {
|
||||||
$enterprise = Enterprise::getInstance();
|
$enterprise = Enterprise::getInstance();
|
||||||
|
|
||||||
if ($page != "home") {
|
if ($page != "home") {
|
||||||
$permission = $enterprise->checkEnterpriseACL($page);
|
$permission = $enterprise->checkEnterpriseACL($page);
|
||||||
|
|
||||||
@ -302,6 +307,32 @@ switch ($action) {
|
|||||||
$visualmap = new Visualmap();
|
$visualmap = new Visualmap();
|
||||||
$visualmap->show();
|
$visualmap->show();
|
||||||
break;
|
break;
|
||||||
|
case 'dashboard_list':
|
||||||
|
if (class_exists("Dashboards")) {
|
||||||
|
$dashboard = new Dashboards();
|
||||||
|
$dashboard->showDashboards();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (class_exists("HomeEnterprise"))
|
||||||
|
$home = new HomeEnterprise();
|
||||||
|
else
|
||||||
|
$home = new Home();
|
||||||
|
$home->show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'dashboard':
|
||||||
|
if (class_exists("Dashboards")) {
|
||||||
|
$dashboard = new Dashboards();
|
||||||
|
$dashboard->show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (class_exists("HomeEnterprise"))
|
||||||
|
$home = new HomeEnterprise();
|
||||||
|
else
|
||||||
|
$home = new Home();
|
||||||
|
$home->show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -54,12 +54,6 @@ class Home {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!$system->getConfig('metaconsole')) {
|
if (!$system->getConfig('metaconsole')) {
|
||||||
$items['alerts'] = array(
|
|
||||||
'name' => __('Alerts'),
|
|
||||||
'filename' => 'alerts.php',
|
|
||||||
'menu_item' => true,
|
|
||||||
'icon' => 'alerts'
|
|
||||||
);
|
|
||||||
$items['agents'] = array(
|
$items['agents'] = array(
|
||||||
'name' => __('Agents'),
|
'name' => __('Agents'),
|
||||||
'filename' => 'agents.php',
|
'filename' => 'agents.php',
|
||||||
@ -72,18 +66,6 @@ class Home {
|
|||||||
'menu_item' => true,
|
'menu_item' => true,
|
||||||
'icon' => 'modules'
|
'icon' => 'modules'
|
||||||
);
|
);
|
||||||
$items['networkmaps'] = array(
|
|
||||||
'name' => __('Networkmaps'),
|
|
||||||
'filename' => 'networkmaps.php',
|
|
||||||
'menu_item' => true,
|
|
||||||
'icon' => 'network_maps'
|
|
||||||
);
|
|
||||||
$items['visualmaps'] = array(
|
|
||||||
'name' => __('Visual consoles'),
|
|
||||||
'filename' => 'visualmaps.php',
|
|
||||||
'menu_item' => true,
|
|
||||||
'icon' => 'visual_console'
|
|
||||||
);
|
|
||||||
|
|
||||||
// Not in home
|
// Not in home
|
||||||
$items['agent'] = array(
|
$items['agent'] = array(
|
||||||
@ -98,18 +80,6 @@ class Home {
|
|||||||
'menu_item' => false,
|
'menu_item' => false,
|
||||||
'icon' => ''
|
'icon' => ''
|
||||||
);
|
);
|
||||||
$items['networkmap'] = array(
|
|
||||||
'name' => __('Networkmap'),
|
|
||||||
'filename' => 'networkmap.php',
|
|
||||||
'menu_item' => false,
|
|
||||||
'icon' => ''
|
|
||||||
);
|
|
||||||
$items['visualmap'] = array(
|
|
||||||
'name' => __('Visualmap'),
|
|
||||||
'filename' => 'visualmap.php',
|
|
||||||
'menu_item' => false,
|
|
||||||
'icon' => ''
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->pagesItems = $items;
|
$this->pagesItems = $items;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user