Merge branch 'ent-4996-no-funciona-el-select-multiple-de-agente-en-el-wizard-de-consolas-visuales' into 'develop'
Added hint See merge request artica/pandorafms!2904
This commit is contained in:
commit
997d1e46e5
|
@ -59,52 +59,36 @@ switch ($action) {
|
|||
$resultOperationDB = false;
|
||||
} else if (!empty($ids_serialize)) {
|
||||
$ids = explode('|', $ids_serialize);
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$items = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
break;
|
||||
}
|
||||
$items = db_get_all_rows_sql(
|
||||
'SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
|
||||
if ($items === false) {
|
||||
$items = [];
|
||||
}
|
||||
|
||||
|
||||
// Clean the repeated order values
|
||||
// Clean the repeated order values.
|
||||
$order_temp = 1;
|
||||
foreach ($items as $item) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => $order_temp],
|
||||
['id_gs' => $item['id_rc']]
|
||||
);
|
||||
break;
|
||||
}
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => $order_temp],
|
||||
['id_gs' => $item['id_rc']]
|
||||
);
|
||||
|
||||
$order_temp++;
|
||||
}
|
||||
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
$items = db_get_all_rows_sql(
|
||||
'
|
||||
SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
break;
|
||||
}
|
||||
$items = db_get_all_rows_sql(
|
||||
'SELECT id_gs, `field_order`
|
||||
FROM tgraph_source
|
||||
WHERE id_graph = '.$id_graph.'
|
||||
ORDER BY `field_order`'
|
||||
);
|
||||
|
||||
if ($items === false) {
|
||||
$items = [];
|
||||
|
@ -116,7 +100,7 @@ switch ($action) {
|
|||
|
||||
$temp = [];
|
||||
foreach ($items as $item) {
|
||||
// Remove the contents from the block to sort
|
||||
// Remove the contents from the block to sort.
|
||||
if (array_search($item['id_gs'], $ids) === false) {
|
||||
$temp[$item['field_order']] = $item['id_gs'];
|
||||
}
|
||||
|
@ -150,16 +134,11 @@ switch ($action) {
|
|||
|
||||
|
||||
foreach ($items as $order => $id) {
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => ($order + 1)],
|
||||
['id_gs' => $id]
|
||||
);
|
||||
break;
|
||||
}
|
||||
db_process_sql_update(
|
||||
'tgraph_source',
|
||||
['`field_order`' => ($order + 1)],
|
||||
['id_gs' => $id]
|
||||
);
|
||||
}
|
||||
|
||||
$resultOperationDB = true;
|
||||
|
@ -211,7 +190,7 @@ if ($editGraph) {
|
|||
$weights = implode(',', $weight_array);
|
||||
}
|
||||
|
||||
// Modules table
|
||||
// Modules table.
|
||||
if (count($module_array) > 0) {
|
||||
echo "<table width='100%' cellpadding=4 cellpadding=4 class='databox filters'>";
|
||||
echo '<tr>
|
||||
|
@ -224,7 +203,7 @@ if (count($module_array) > 0) {
|
|||
<th>'.__('Sort').'</th>';
|
||||
$color = 0;
|
||||
for ($a = 0; $a < count($module_array); $a++) {
|
||||
// Calculate table line color
|
||||
// Calculate table line color.
|
||||
if ($color == 1) {
|
||||
$tdcolor = 'datos';
|
||||
$color = 0;
|
||||
|
@ -332,7 +311,7 @@ echo '</form>';
|
|||
echo '<br>';
|
||||
|
||||
|
||||
// Configuration form
|
||||
// Configuration form.
|
||||
echo '<span id ="none_text" style="display: none;">'.__('None').'</span>';
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=".$id_graph."'>";
|
||||
|
||||
|
@ -352,7 +331,7 @@ echo "<td colspan='3'>".html_print_select_groups(
|
|||
true
|
||||
).'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo "<td style='vertical-align: top;'>".__('Agents').'</td>';
|
||||
echo "<td style='vertical-align: top;'>".__('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true).'</td>';
|
||||
echo '<td></td>';
|
||||
echo "<td style='vertical-align: top;'>".__('Modules').'</td>';
|
||||
echo '</tr><tr>';
|
||||
|
|
|
@ -15,7 +15,7 @@ global $config;
|
|||
|
||||
check_login();
|
||||
|
||||
// Visual console required
|
||||
// Visual console required.
|
||||
if (empty($visualConsole)) {
|
||||
db_pandora_audit(
|
||||
'ACL Violation',
|
||||
|
@ -425,7 +425,7 @@ $table->data['all_one_item_per_agent'][1] .= html_print_input_hidden(
|
|||
|
||||
|
||||
$table->rowstyle['all_4'] = 'display: none;';
|
||||
$table->data['all_4'][0] = __('Agents');
|
||||
$table->data['all_4'][0] = __('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true);
|
||||
|
||||
$agents_list = [];
|
||||
if (!is_metaconsole()) {
|
||||
|
@ -506,7 +506,7 @@ $table->data['all_8'][1] = html_print_select(
|
|||
VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||
true
|
||||
);
|
||||
$table->data['all_8'][2] = '<span id="parent_column_2_item_in_visual_map">'.__('Item in the map').'</span>'.'<span id="parent_column_2_relationship">'.ui_print_help_tip(
|
||||
$table->data['all_8'][2] = '<span id="parent_column_2_item_in_visual_map">'.__('Item in the map').'</span><span id="parent_column_2_relationship">'.ui_print_help_tip(
|
||||
__('The parenting relationships in %s will be drawn on the map.', get_product_name()),
|
||||
true
|
||||
).'</span>';
|
||||
|
|
Loading…
Reference in New Issue