Templates view
This commit is contained in:
parent
70cf44cb8f
commit
8f2a2f12c6
|
@ -615,18 +615,6 @@ $url = ui_get_url_refresh(
|
||||||
true,
|
true,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
$name_url = 'index.php?sec=templates&sec2=godmode/modules/manage_network_components';
|
|
||||||
$table = new stdClass();
|
|
||||||
$table->width = '100%';
|
|
||||||
$table->class = 'databox filters';
|
|
||||||
|
|
||||||
$table->style = [];
|
|
||||||
$table->style[0] = 'font-weight: bold';
|
|
||||||
$table->style[2] = 'font-weight: bold';
|
|
||||||
|
|
||||||
$table->data = [];
|
|
||||||
|
|
||||||
$table->data[0][0] = __('Group');
|
|
||||||
|
|
||||||
$component_groups = network_components_get_groups();
|
$component_groups = network_components_get_groups();
|
||||||
|
|
||||||
|
@ -656,7 +644,20 @@ foreach ($component_groups as $component_group_key => $component_group_val) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[0][1] = html_print_select(
|
$name_url = 'index.php?sec=templates&sec2=godmode/modules/manage_network_components';
|
||||||
|
$table = new stdClass();
|
||||||
|
$table->width = '100%';
|
||||||
|
$table->class = 'filter-table-adv';
|
||||||
|
|
||||||
|
$table->style = [];
|
||||||
|
$table->style[0] = 'font-weight: bold';
|
||||||
|
$table->style[2] = 'font-weight: bold';
|
||||||
|
|
||||||
|
$table->data = [];
|
||||||
|
|
||||||
|
$table->data[0][] = html_print_label_input_block(
|
||||||
|
__('Group'),
|
||||||
|
html_print_select(
|
||||||
$component_groups,
|
$component_groups,
|
||||||
'search_id_group',
|
'search_id_group',
|
||||||
$search_id_group,
|
$search_id_group,
|
||||||
|
@ -665,45 +666,59 @@ $table->data[0][1] = html_print_select(
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'width: 100%'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
$table->data[0][2] = __('Free Search').ui_print_help_tip(
|
|
||||||
__('Search by name, description, tcp send or tcp rcv, list matches.'),
|
$table->data[0][] = html_print_label_input_block(
|
||||||
true
|
__('Free Search'),
|
||||||
);
|
html_print_input_text(
|
||||||
$table->data[0][3] = html_print_input_text(
|
|
||||||
'search_string',
|
'search_string',
|
||||||
$search_string,
|
$search_string,
|
||||||
'',
|
'',
|
||||||
25,
|
25,
|
||||||
255,
|
255,
|
||||||
true
|
true
|
||||||
|
).ui_print_input_placeholder(
|
||||||
|
__('Search by name, description, tcp send or tcp rcv, list matches.'),
|
||||||
|
true
|
||||||
|
)
|
||||||
);
|
);
|
||||||
if (is_metaconsole() === true) {
|
|
||||||
$table->data[0][4] = '<div>';
|
|
||||||
} else {
|
|
||||||
$table->data[0][4] = '<div class="action-buttons">';
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->data[0][4] .= html_print_submit_button(
|
$toggleFilters = '<form class="filters_form" method="POST" action="'.$url.'">';
|
||||||
__('Search'),
|
$toggleFilters .= html_print_table($table, true);
|
||||||
|
$toggleFilters .= html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'action-buttons-right-forced',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('Filter'),
|
||||||
'search',
|
'search',
|
||||||
false,
|
false,
|
||||||
'class="sub search"',
|
[
|
||||||
|
'icon' => 'search',
|
||||||
|
'mode' => 'mini',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$table->data[0][4] .= '</div>';
|
$toggleFilters .= '</form>';
|
||||||
|
|
||||||
if (is_metaconsole() === true) {
|
ui_toggle(
|
||||||
$filter = '<form class="filters_form" method="post" action="'.$url.'">';
|
$toggleFilters,
|
||||||
$filter .= html_print_table($table, true);
|
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||||
$filter .= '</form>';
|
'filter_form',
|
||||||
ui_toggle($filter, __('Show Options'));
|
'',
|
||||||
} else {
|
true,
|
||||||
echo '<form method="post" action="'.$url.'">';
|
false,
|
||||||
html_print_table($table);
|
'',
|
||||||
echo '</form>';
|
'white-box-content',
|
||||||
}
|
'box-flat white_table_graph fixed_filter_bar'
|
||||||
|
);
|
||||||
|
|
||||||
$filter = [];
|
$filter = [];
|
||||||
if ($search_id_group) {
|
if ($search_id_group) {
|
||||||
|
@ -721,7 +736,6 @@ $total_components = network_components_get_network_components(
|
||||||
);
|
);
|
||||||
$total_components = $total_components[0]['total'];
|
$total_components = $total_components[0]['total'];
|
||||||
$offset_delete = ($offset >= ($total_components - 1)) ? ($offset - $config['block_size']) : $offset;
|
$offset_delete = ($offset >= ($total_components - 1)) ? ($offset - $config['block_size']) : $offset;
|
||||||
ui_pagination($total_components, $name_url);
|
|
||||||
$filter['offset'] = (int) get_parameter('offset');
|
$filter['offset'] = (int) get_parameter('offset');
|
||||||
$filter['limit'] = (int) $config['block_size'];
|
$filter['limit'] = (int) $config['block_size'];
|
||||||
$components = network_components_get_network_components(
|
$components = network_components_get_network_components(
|
||||||
|
|
|
@ -893,7 +893,7 @@ class ModuleTemplates extends HTML
|
||||||
);
|
);
|
||||||
$data[3] .= html_print_input_image(
|
$data[3] .= html_print_input_image(
|
||||||
'export_profile',
|
'export_profile',
|
||||||
'images/csv.png',
|
'images/file-csv.svg',
|
||||||
$row['id_np'],
|
$row['id_np'],
|
||||||
'',
|
'',
|
||||||
true,
|
true,
|
||||||
|
@ -914,7 +914,7 @@ class ModuleTemplates extends HTML
|
||||||
$data[3] .= '</a>';
|
$data[3] .= '</a>';
|
||||||
$data[3] .= '<a href="'.$this->baseUrl.'&action=export&id_np='.$row['id_np'].'" onclick="blockResubmit($(this))">';
|
$data[3] .= '<a href="'.$this->baseUrl.'&action=export&id_np='.$row['id_np'].'" onclick="blockResubmit($(this))">';
|
||||||
$data[3] .= html_print_image(
|
$data[3] .= html_print_image(
|
||||||
'images/csv.png',
|
'images/file-csv.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('Export to CSV'),
|
'title' => __('Export to CSV'),
|
||||||
|
|
|
@ -904,11 +904,11 @@ function ui_print_type_agent_icon(
|
||||||
if ((int) $id_os === SATELLITE_OS_ID) {
|
if ((int) $id_os === SATELLITE_OS_ID) {
|
||||||
// Satellite.
|
// Satellite.
|
||||||
$options['title'] = __('Satellite');
|
$options['title'] = __('Satellite');
|
||||||
$output = html_print_image('images/satellite@svg.svg', true, ['class' => 'main_menu_icon invert_filter'], false, false, false, true);
|
$output = html_print_image('images/satellite@os.svg', true, ['class' => 'main_menu_icon invert_filter'], false, false, false, true);
|
||||||
} else if ($remote_contact === $contact && $remote === 0 && empty($version) === true) {
|
} else if ($remote_contact === $contact && $remote === 0 && empty($version) === true) {
|
||||||
// Network.
|
// Network.
|
||||||
$options['title'] = __('Network');
|
$options['title'] = __('Network');
|
||||||
$output = html_print_image('images/network-server@svg.svg', true, ['class' => 'main_menu_icon invert_filter'], false, false, false, true);
|
$output = html_print_image('images/network-server@os.svg', true, ['class' => 'main_menu_icon invert_filter'], false, false, false, true);
|
||||||
} else {
|
} else {
|
||||||
// Software.
|
// Software.
|
||||||
$options['title'] = __('Software');
|
$options['title'] = __('Software');
|
||||||
|
@ -7162,7 +7162,7 @@ function ui_print_servertype_icon(int $id)
|
||||||
|
|
||||||
case MODULE_NETWORK:
|
case MODULE_NETWORK:
|
||||||
$title = __('Network server');
|
$title = __('Network server');
|
||||||
$image = 'images/network-server@svg.svg';
|
$image = 'images/network-server@os.svg';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODULE_PLUGIN:
|
case MODULE_PLUGIN:
|
||||||
|
|
Loading…
Reference in New Issue