fixed CV in console mobile metaconsole #8676
This commit is contained in:
parent
5b1353e493
commit
e1ab514757
|
@ -1197,7 +1197,12 @@ class Item extends CachedModel
|
|||
'operation/visual_console/view',
|
||||
['id' => $vcId],
|
||||
// No autologin from the public view.
|
||||
!$config['public_view']
|
||||
!$config['public_view'],
|
||||
$mobile_navigation,
|
||||
[
|
||||
'page' => 'visualmap',
|
||||
'id' => $vcId,
|
||||
]
|
||||
);
|
||||
} catch (\Throwable $ignored) {
|
||||
return null;
|
||||
|
@ -1244,15 +1249,15 @@ class Item extends CachedModel
|
|||
'sec2' => 'operation/agentes/status_monitor',
|
||||
'id_module' => $moduleId,
|
||||
];
|
||||
}
|
||||
|
||||
if ($mobile_navigation === true) {
|
||||
return $mobileUrl.'?'.http_build_query(
|
||||
[
|
||||
'page' => 'module_graph',
|
||||
'id' => $moduleId,
|
||||
]
|
||||
);
|
||||
if ($mobile_navigation === true) {
|
||||
return $mobileUrl.'?'.http_build_query(
|
||||
[
|
||||
'page' => 'module_graph',
|
||||
'id' => $moduleId,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $baseUrl.'?'.http_build_query($queryParams);
|
||||
|
@ -1308,7 +1313,12 @@ class Item extends CachedModel
|
|||
'operation/agentes/status_monitor',
|
||||
['id_module' => $moduleId],
|
||||
// No autologin from the public view.
|
||||
!$config['public_view']
|
||||
!$config['public_view'],
|
||||
$mobile_navigation,
|
||||
[
|
||||
'id' => $moduleId,
|
||||
'page' => 'module_graph',
|
||||
]
|
||||
);
|
||||
}
|
||||
} catch (\Throwable $ignored) {
|
||||
|
@ -1368,7 +1378,12 @@ class Item extends CachedModel
|
|||
'operation/agentes/ver_agente',
|
||||
['id_agente' => $agentId],
|
||||
// No autologin from the public view.
|
||||
!$config['public_view']
|
||||
!$config['public_view'],
|
||||
$mobile_navigation,
|
||||
[
|
||||
'id' => $agentId,
|
||||
'page' => 'agent',
|
||||
]
|
||||
);
|
||||
} catch (\Throwable $ignored) {
|
||||
return null;
|
||||
|
|
|
@ -81,6 +81,7 @@ class User
|
|||
|
||||
public function isLogged()
|
||||
{
|
||||
global $config;
|
||||
$system = System::getInstance();
|
||||
|
||||
$autologin = $system->getRequest('autologin', false);
|
||||
|
@ -89,6 +90,33 @@ class User
|
|||
$password = $system->getRequest('password', null);
|
||||
|
||||
$this->login($user, $password);
|
||||
} else {
|
||||
if (isset($_GET['loginhash']) === true) {
|
||||
// Hash login process.
|
||||
$loginhash_data = get_parameter('loginhash_data', '');
|
||||
$loginhash_user = str_rot13(get_parameter('loginhash_user', ''));
|
||||
if ($config['loginhash_pwd'] != ''
|
||||
&& $loginhash_data == md5(
|
||||
$loginhash_user.io_output_password(
|
||||
$config['loginhash_pwd']
|
||||
)
|
||||
)
|
||||
) {
|
||||
$this->login($loginhash_user, $config['loginhash_pwd']);
|
||||
} else {
|
||||
include_once 'general/login_page.php';
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_USER_REGISTRATION,
|
||||
'Loginhash failed',
|
||||
'system'
|
||||
);
|
||||
while (ob_get_length() > 0) {
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
exit('</html>');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->logged;
|
||||
|
|
|
@ -429,9 +429,9 @@ class Visualmap
|
|||
|
||||
$output .= '$( window ).on( "orientationchange", function( event )';
|
||||
$output .= ' { window.location.href = "';
|
||||
$output .= ui_get_full_url(
|
||||
'/mobile/index.php?page=visualmap&id='.$visualConsoleId
|
||||
);
|
||||
$output .= ui_get_full_url('/');
|
||||
$output .= (is_metaconsole() === true) ? '../../' : '';
|
||||
$output .= 'mobile/index.php?page=visualmap&id='.$visualConsoleId;
|
||||
$output .= '" });';
|
||||
|
||||
$output .= '</script>';
|
||||
|
|
Loading…
Reference in New Issue