Templates view
This commit is contained in:
parent
70cf44cb8f
commit
8f2a2f12c6
|
@ -615,18 +615,6 @@ $url = ui_get_url_refresh(
|
|||
true,
|
||||
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();
|
||||
|
||||
|
@ -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,
|
||||
'search_id_group',
|
||||
$search_id_group,
|
||||
|
@ -665,45 +666,59 @@ $table->data[0][1] = html_print_select(
|
|||
0,
|
||||
true,
|
||||
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.'),
|
||||
true
|
||||
);
|
||||
$table->data[0][3] = html_print_input_text(
|
||||
|
||||
$table->data[0][] = html_print_label_input_block(
|
||||
__('Free Search'),
|
||||
html_print_input_text(
|
||||
'search_string',
|
||||
$search_string,
|
||||
'',
|
||||
25,
|
||||
255,
|
||||
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(
|
||||
__('Search'),
|
||||
$toggleFilters = '<form class="filters_form" method="POST" action="'.$url.'">';
|
||||
$toggleFilters .= html_print_table($table, true);
|
||||
$toggleFilters .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons-right-forced',
|
||||
'content' => html_print_submit_button(
|
||||
__('Filter'),
|
||||
'search',
|
||||
false,
|
||||
'class="sub search"',
|
||||
[
|
||||
'icon' => 'search',
|
||||
'mode' => 'mini',
|
||||
],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[0][4] .= '</div>';
|
||||
$toggleFilters .= '</form>';
|
||||
|
||||
if (is_metaconsole() === true) {
|
||||
$filter = '<form class="filters_form" method="post" action="'.$url.'">';
|
||||
$filter .= html_print_table($table, true);
|
||||
$filter .= '</form>';
|
||||
ui_toggle($filter, __('Show Options'));
|
||||
} else {
|
||||
echo '<form method="post" action="'.$url.'">';
|
||||
html_print_table($table);
|
||||
echo '</form>';
|
||||
}
|
||||
ui_toggle(
|
||||
$toggleFilters,
|
||||
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||
'filter_form',
|
||||
'',
|
||||
true,
|
||||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
||||
$filter = [];
|
||||
if ($search_id_group) {
|
||||
|
@ -721,7 +736,6 @@ $total_components = network_components_get_network_components(
|
|||
);
|
||||
$total_components = $total_components[0]['total'];
|
||||
$offset_delete = ($offset >= ($total_components - 1)) ? ($offset - $config['block_size']) : $offset;
|
||||
ui_pagination($total_components, $name_url);
|
||||
$filter['offset'] = (int) get_parameter('offset');
|
||||
$filter['limit'] = (int) $config['block_size'];
|
||||
$components = network_components_get_network_components(
|
||||
|
|
|
@ -893,7 +893,7 @@ class ModuleTemplates extends HTML
|
|||
);
|
||||
$data[3] .= html_print_input_image(
|
||||
'export_profile',
|
||||
'images/csv.png',
|
||||
'images/file-csv.svg',
|
||||
$row['id_np'],
|
||||
'',
|
||||
true,
|
||||
|
@ -914,7 +914,7 @@ class ModuleTemplates extends HTML
|
|||
$data[3] .= '</a>';
|
||||
$data[3] .= '<a href="'.$this->baseUrl.'&action=export&id_np='.$row['id_np'].'" onclick="blockResubmit($(this))">';
|
||||
$data[3] .= html_print_image(
|
||||
'images/csv.png',
|
||||
'images/file-csv.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Export to CSV'),
|
||||
|
|
|
@ -904,11 +904,11 @@ function ui_print_type_agent_icon(
|
|||
if ((int) $id_os === SATELLITE_OS_ID) {
|
||||
// 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) {
|
||||
// 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 {
|
||||
// Software.
|
||||
$options['title'] = __('Software');
|
||||
|
@ -7162,7 +7162,7 @@ function ui_print_servertype_icon(int $id)
|
|||
|
||||
case MODULE_NETWORK:
|
||||
$title = __('Network server');
|
||||
$image = 'images/network-server@svg.svg';
|
||||
$image = 'images/network-server@os.svg';
|
||||
break;
|
||||
|
||||
case MODULE_PLUGIN:
|
||||
|
|
Loading…
Reference in New Issue