mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Added hint
This commit is contained in:
parent
775289fc20
commit
e4ba7ccde0
@ -59,52 +59,36 @@ switch ($action) {
|
|||||||
$resultOperationDB = false;
|
$resultOperationDB = false;
|
||||||
} else if (!empty($ids_serialize)) {
|
} else if (!empty($ids_serialize)) {
|
||||||
$ids = explode('|', $ids_serialize);
|
$ids = explode('|', $ids_serialize);
|
||||||
|
$items = db_get_all_rows_sql(
|
||||||
switch ($config['dbtype']) {
|
'SELECT id_gs, `field_order`
|
||||||
case 'mysql':
|
FROM tgraph_source
|
||||||
$items = db_get_all_rows_sql(
|
WHERE id_graph = '.$id_graph.'
|
||||||
'
|
ORDER BY `field_order`'
|
||||||
SELECT id_gs, `field_order`
|
);
|
||||||
FROM tgraph_source
|
|
||||||
WHERE id_graph = '.$id_graph.'
|
|
||||||
ORDER BY `field_order`'
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($items === false) {
|
if ($items === false) {
|
||||||
$items = [];
|
$items = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Clean the repeated order values
|
// Clean the repeated order values.
|
||||||
$order_temp = 1;
|
$order_temp = 1;
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
switch ($config['dbtype']) {
|
db_process_sql_update(
|
||||||
case 'mysql':
|
'tgraph_source',
|
||||||
db_process_sql_update(
|
['`field_order`' => $order_temp],
|
||||||
'tgraph_source',
|
['id_gs' => $item['id_rc']]
|
||||||
['`field_order`' => $order_temp],
|
);
|
||||||
['id_gs' => $item['id_rc']]
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$order_temp++;
|
$order_temp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$items = db_get_all_rows_sql(
|
||||||
switch ($config['dbtype']) {
|
'SELECT id_gs, `field_order`
|
||||||
case 'mysql':
|
FROM tgraph_source
|
||||||
$items = db_get_all_rows_sql(
|
WHERE id_graph = '.$id_graph.'
|
||||||
'
|
ORDER BY `field_order`'
|
||||||
SELECT id_gs, `field_order`
|
);
|
||||||
FROM tgraph_source
|
|
||||||
WHERE id_graph = '.$id_graph.'
|
|
||||||
ORDER BY `field_order`'
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($items === false) {
|
if ($items === false) {
|
||||||
$items = [];
|
$items = [];
|
||||||
@ -116,7 +100,7 @@ switch ($action) {
|
|||||||
|
|
||||||
$temp = [];
|
$temp = [];
|
||||||
foreach ($items as $item) {
|
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) {
|
if (array_search($item['id_gs'], $ids) === false) {
|
||||||
$temp[$item['field_order']] = $item['id_gs'];
|
$temp[$item['field_order']] = $item['id_gs'];
|
||||||
}
|
}
|
||||||
@ -150,16 +134,11 @@ switch ($action) {
|
|||||||
|
|
||||||
|
|
||||||
foreach ($items as $order => $id) {
|
foreach ($items as $order => $id) {
|
||||||
switch ($config['dbtype']) {
|
db_process_sql_update(
|
||||||
case 'mysql':
|
'tgraph_source',
|
||||||
|
['`field_order`' => ($order + 1)],
|
||||||
db_process_sql_update(
|
['id_gs' => $id]
|
||||||
'tgraph_source',
|
);
|
||||||
['`field_order`' => ($order + 1)],
|
|
||||||
['id_gs' => $id]
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$resultOperationDB = true;
|
$resultOperationDB = true;
|
||||||
@ -211,7 +190,7 @@ if ($editGraph) {
|
|||||||
$weights = implode(',', $weight_array);
|
$weights = implode(',', $weight_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modules table
|
// Modules table.
|
||||||
if (count($module_array) > 0) {
|
if (count($module_array) > 0) {
|
||||||
echo "<table width='100%' cellpadding=4 cellpadding=4 class='databox filters'>";
|
echo "<table width='100%' cellpadding=4 cellpadding=4 class='databox filters'>";
|
||||||
echo '<tr>
|
echo '<tr>
|
||||||
@ -224,7 +203,7 @@ if (count($module_array) > 0) {
|
|||||||
<th>'.__('Sort').'</th>';
|
<th>'.__('Sort').'</th>';
|
||||||
$color = 0;
|
$color = 0;
|
||||||
for ($a = 0; $a < count($module_array); $a++) {
|
for ($a = 0; $a < count($module_array); $a++) {
|
||||||
// Calculate table line color
|
// Calculate table line color.
|
||||||
if ($color == 1) {
|
if ($color == 1) {
|
||||||
$tdcolor = 'datos';
|
$tdcolor = 'datos';
|
||||||
$color = 0;
|
$color = 0;
|
||||||
@ -332,7 +311,7 @@ echo '</form>';
|
|||||||
echo '<br>';
|
echo '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Configuration form
|
// Configuration form.
|
||||||
echo '<span id ="none_text" style="display: none;">'.__('None').'</span>';
|
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."'>";
|
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
|
true
|
||||||
).'</td>';
|
).'</td>';
|
||||||
echo '</tr><tr>';
|
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></td>';
|
||||||
echo "<td style='vertical-align: top;'>".__('Modules').'</td>';
|
echo "<td style='vertical-align: top;'>".__('Modules').'</td>';
|
||||||
echo '</tr><tr>';
|
echo '</tr><tr>';
|
||||||
|
@ -15,7 +15,7 @@ global $config;
|
|||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
// Visual console required
|
// Visual console required.
|
||||||
if (empty($visualConsole)) {
|
if (empty($visualConsole)) {
|
||||||
db_pandora_audit(
|
db_pandora_audit(
|
||||||
'ACL Violation',
|
'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->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 = [];
|
$agents_list = [];
|
||||||
if (!is_metaconsole()) {
|
if (!is_metaconsole()) {
|
||||||
@ -506,7 +506,7 @@ $table->data['all_8'][1] = html_print_select(
|
|||||||
VISUAL_MAP_WIZARD_PARENTS_NONE,
|
VISUAL_MAP_WIZARD_PARENTS_NONE,
|
||||||
true
|
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()),
|
__('The parenting relationships in %s will be drawn on the map.', get_product_name()),
|
||||||
true
|
true
|
||||||
).'</span>';
|
).'</span>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user