Network maps minor fixes

This commit is contained in:
Jose Gonzalez 2023-03-06 11:33:42 +01:00
parent 6a35eb9950
commit e4f63206eb
1 changed files with 142 additions and 117 deletions

View File

@ -3151,28 +3151,6 @@ class NetworkMap
['icon' => 'next'], ['icon' => 'next'],
true true
); );
/*
$table->data['fictional_node_networkmap_link'][0] = __('Networkmap to link');
$table->data['fictional_node_networkmap_link'][1] = html_print_select(
$list_networkmaps,
'edit_networkmap_to_link',
'',
'',
'',
0,
true
);
$table->data['fictional_node_update_button'][0] = '';
$table->data['fictional_node_update_button'][1] = html_print_button(
__('Update fictional node'),
'',
false,
'add_fictional_node();',
['icon' => 'next'],
true
);
*/
$buttons[] = html_print_button( $buttons[] = html_print_button(
__('Update node'), __('Update node'),
@ -3366,11 +3344,6 @@ class NetworkMap
$output .= __('Add node').'">'; $output .= __('Add node').'">';
$output .= '<div class="left w100p">'; $output .= '<div class="left w100p">';
$table = new StdClass();
$table->width = '100%';
$table->data = [];
$table->data[0][0] = __('Agent');
$params = []; $params = [];
$params['return'] = true; $params['return'] = true;
$params['show_helptip'] = true; $params['show_helptip'] = true;
@ -3379,29 +3352,48 @@ class NetworkMap
$params['print_hidden_input_idagent'] = true; $params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_name'] = 'id_agent'; $params['hidden_input_idagent_name'] = 'id_agent';
$params['disabled_javascript_on_blur_function'] = true; $params['disabled_javascript_on_blur_function'] = true;
$table->data[0][1] = ui_print_agent_autocomplete_input($params);
$table->data[1][0] = ''; $table = new StdClass();
$table->data[1][1] = html_print_button( $table->width = '100%';
__('Add agent node'), $table->id = 'add_agent_network_map';
'', $table->class = 'filter-table-adv';
false, $table->data = [];
'add_agent_node();',
'class="sub"', $table->data[0][] = html_print_label_input_block(
true __('Agent'),
).html_print_image( ui_print_agent_autocomplete_input($params)
'images/error_red.png',
true,
[
'id' => 'error_red',
'style' => 'vertical-align: bottom;display: none;',
'class' => 'forced_title',
'alt' => '',
'data-title' => 'data-use_title_for_force_title:1',
],
false
); );
$add_agent_node_html = html_print_table($table, true); $add_agent_node_html = html_print_table($table, true);
$add_agent_node_html .= html_print_div(
[
'class' => 'action-buttons-right-forced',
'content' => html_print_button(
__('Add agent node'),
'',
false,
'add_agent_node();',
[
'icon' => 'wand',
'mode' => 'mini',
],
true
).html_print_image(
'images/error_red.png',
true,
[
'id' => 'error_red',
'style' => 'vertical-align: bottom;display: none;',
'class' => 'forced_title',
'alt' => '',
'data-title' => 'data-use_title_for_force_title:1',
],
false
),
],
true
);
$output .= ui_toggle( $output .= ui_toggle(
$add_agent_node_html, $add_agent_node_html,
__('Add agent node'), __('Add agent node'),
@ -3413,57 +3405,74 @@ class NetworkMap
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';
$table->id = 'add_agent_by_group_network_map';
$table->class = 'filter-table-adv';
$table->data = []; $table->data = [];
$table->data[0][0] = __('Group'); $table->data[0][] = html_print_label_input_block(
$table->data[0][1] = html_print_select_groups( __('Group'),
false, html_print_select_groups(
'AR', false,
false, 'AR',
'group_for_show_agents', false,
-1, 'group_for_show_agents',
'choose_group_for_show_agents()', -1,
__('None'), 'choose_group_for_show_agents()',
-1, __('None'),
true -1,
true
)
); );
$table->data[0][2] = html_print_checkbox( $table->data[0][] = html_print_label_input_block(
'group_recursion', __('Recursion'),
0, html_print_checkbox_switch(
false, 'group_recursion',
true, 0,
false, false,
'choose_group_for_show_agents()' true,
).__('Recursion'); false,
'choose_group_for_show_agents()'
$table->data[1][0] = __('Agents'); )
$table->data[1][1] = html_print_select(
[-1 => __('None')],
'agents_filter_group',
-1,
'',
'',
0,
true,
true,
true,
'',
false,
'width: 170px;',
false,
5
); );
$table->data[2][0] = '';
$table->data[2][1] = html_print_button( $table->data[1][] = html_print_label_input_block(
__('Add agent node'), __('Agents'),
'', html_print_select(
false, [-1 => __('None')],
'add_agent_node_from_the_filter_group();', 'agents_filter_group',
'class="sub"', -1,
true '',
'',
0,
true,
true,
true,
'',
false,
'width: 170px;',
false,
5
)
); );
$add_agent_node_html = html_print_table($table, true); $add_agent_node_html = html_print_table($table, true);
$add_agent_node_html .= html_print_div(
[
'class' => 'action-buttons-right-forced',
'content' => html_print_button(
__('Add agent node'),
'',
false,
'add_agent_node_from_the_filter_group();',
[
'icon' => 'wand',
'mode' => 'mini',
],
true
),
],
true
);
$output .= ui_toggle( $output .= ui_toggle(
$add_agent_node_html, $add_agent_node_html,
__('Add agent node (filter by group)'), __('Add agent node (filter by group)'),
@ -3475,36 +3484,52 @@ class NetworkMap
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';
$table->id = 'add_fictional_network_map';
$table->class = 'filter-table-adv';
$table->data = []; $table->data = [];
$table->data[0][0] = __('Name'); $table->data[0][] = html_print_label_input_block(
$table->data[0][1] = html_print_input_text( __('Name'),
'name_fictional_node', html_print_input_text(
'', 'name_fictional_node',
__('name fictional node'), '',
'20', __('name fictional node'),
'50', '20',
true '50',
true
)
); );
$table->data[1][0] = __('Networkmap to link');
$table->data[1][1] = html_print_select( $table->data[1][] = html_print_label_input_block(
$list_networkmaps, __('Networkmap to link'),
'networkmap_to_link', html_print_select(
0, $list_networkmaps,
'', 'networkmap_to_link',
'', 0,
0, '',
true '',
); 0,
$table->data[2][0] = ''; true
$table->data[2][1] = html_print_button( )
__('Add fictional node'),
'',
false,
'add_fictional_node();',
['type' => 'link'],
true
); );
$add_agent_node_html = html_print_table($table, true); $add_agent_node_html = html_print_table($table, true);
$add_agent_node_html .= html_print_div(
[
'class' => 'action-buttons-right-forced',
'content' => html_print_button(
__('Add fictional node'),
'',
false,
'add_fictional_node();',
[
'icon' => 'wand',
'mode' => 'mini',
],
true
),
],
true
);
$output .= ui_toggle( $output .= ui_toggle(
$add_agent_node_html, $add_agent_node_html,
__('Add fictional point'), __('Add fictional point'),