Merge branch 'ent-10650-bugs-funcionales-en-consolas-visuales' into 'develop'
Ent 10650 bugs funcionales en consolas visuales See merge request artica/pandorafms!5601
This commit is contained in:
commit
5529c33f0c
|
@ -226,7 +226,7 @@ final class DonutGraph extends Item
|
|||
'module_input' => true,
|
||||
'module_name' => 'moduleId',
|
||||
'module_none' => false,
|
||||
'get_only_string_modules' => true,
|
||||
'get_only_string_modules' => false,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -235,14 +235,13 @@ final class DonutGraph extends Item
|
|||
'label' => __('Module'),
|
||||
'arguments' => [
|
||||
'type' => 'autocomplete_module',
|
||||
'fields' => $fields,
|
||||
'name' => 'moduleId',
|
||||
'selected' => $values['moduleId'],
|
||||
'return' => true,
|
||||
'sort' => false,
|
||||
'agent_id' => $values['agentId'],
|
||||
'metaconsole_id' => $values['metaconsoleId'],
|
||||
'get_only_string_modules' => true,
|
||||
'get_only_string_modules' => false,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -62,7 +62,13 @@ require_once 'include/functions_visual_map.php';
|
|||
|
||||
$hash = (string) get_parameter('hash');
|
||||
$visualConsoleId = (int) get_parameter('id_layout');
|
||||
$userAccessMaintenance = null;
|
||||
if (empty($config['id_user']) === true) {
|
||||
$config['id_user'] = (string) get_parameter('id_user');
|
||||
} else {
|
||||
$userAccessMaintenance = $config['id_user'];
|
||||
}
|
||||
|
||||
$refr = (int) get_parameter('refr', ($config['refr'] ?? null));
|
||||
|
||||
if (!isset($config['pure'])) {
|
||||
|
@ -179,6 +185,7 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
|
|||
|
||||
<script type="text/javascript">
|
||||
var container = document.getElementById("visual-console-container");
|
||||
var user = "<?php echo $userAccessMaintenance; ?>";
|
||||
var props = <?php echo (string) $visualConsole; ?>;
|
||||
var items = <?php echo '['.implode(',', $visualConsoleItems).']'; ?>;
|
||||
var baseUrl = "<?php echo ui_get_full_url('/', false, false, false); ?>";
|
||||
|
@ -282,8 +289,10 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
|
|||
);
|
||||
|
||||
if(props.maintenanceMode != null) {
|
||||
if(props.maintenanceMode.user !== user) {
|
||||
visualConsoleManager.visualConsole.enableMaintenanceMode();
|
||||
}
|
||||
}
|
||||
|
||||
var controls = document.getElementById('vc-controls');
|
||||
autoHideElement(controls, 1000);
|
||||
|
|
Loading…
Reference in New Issue