Minor patches
This commit is contained in:
parent
2f673487f5
commit
31f6c9a9d9
|
@ -41,12 +41,24 @@ if (is_metaconsole() === true) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sec = 'gmodules';
|
$sec = 'gmodules';
|
||||||
ui_print_page_header(
|
|
||||||
__('Module management').' » '.__('Inventory modules'),
|
ui_print_standard_header(
|
||||||
|
__('Inventory modules'),
|
||||||
'images/page_white_text.png',
|
'images/page_white_text.png',
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
true
|
true,
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Configuration'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Inventory modules'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($management_allowed === false) {
|
if ($management_allowed === false) {
|
||||||
|
@ -266,7 +278,7 @@ if ($create_module_inventory === true) {
|
||||||
$total_modules = db_get_sql('SELECT COUNT(*) FROM tmodule_inventory');
|
$total_modules = db_get_sql('SELECT COUNT(*) FROM tmodule_inventory');
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->styleTable = 'margin: 10px 10px 0; width: -webkit-fill-available';
|
||||||
$table->class = 'info_table';
|
$table->class = 'info_table';
|
||||||
$table->size = [];
|
$table->size = [];
|
||||||
$table->size[0] = '140px';
|
$table->size[0] = '140px';
|
||||||
|
@ -302,9 +314,15 @@ if ($result === false) {
|
||||||
|
|
||||||
$data[1] = $row['description'];
|
$data[1] = $row['description'];
|
||||||
if ($row['os_name'] == null) {
|
if ($row['os_name'] == null) {
|
||||||
$data[2] = html_print_image('images/agent.png', true, ['border' => '0', 'alt' => __('Agent'), 'title' => __('Agent'), 'height' => '18', 'class' => 'invert_filter']);
|
$data[2] = html_print_image('images/agents@svg.svg', true, ['border' => '0', 'alt' => __('Agent'), 'title' => __('Agent'), 'height' => '18', 'class' => 'invert_filter main_menu_icon']);
|
||||||
} else {
|
} else {
|
||||||
$data[2] = ui_print_os_icon($row['id_os'], false, true);
|
$data[2] = html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'invert_filter main_menu_icon',
|
||||||
|
'content' => ui_print_os_icon($row['id_os'], false, true),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['interpreter'] == '') {
|
if ($row['interpreter'] == '') {
|
||||||
|
@ -328,30 +346,34 @@ if ($result === false) {
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<form method='post' action='index.php?sec=".$sec."&sec2=godmode/modules/manage_inventory_modules'>";
|
echo '<form id="form_delete" method="POST" action="index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules">';
|
||||||
html_print_input_hidden('multiple_delete', 1);
|
html_print_input_hidden('multiple_delete', 1);
|
||||||
ui_pagination($total_modules, 'index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules', $offset);
|
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
ui_pagination($total_modules, 'index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules', $offset, 0, false, 'offset', true, 'pagination-bottom');
|
echo '</form>';
|
||||||
echo "<div class='pdd_l_5px float-right'>";
|
$tablePagination = ui_pagination($total_modules, 'index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules', $offset, 0, true, 'offset', false);
|
||||||
|
|
||||||
|
$actionButtons = [];
|
||||||
|
|
||||||
if ($management_allowed === true) {
|
if ($management_allowed === true) {
|
||||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
$actionButtons[] = html_print_submit_button(__('Delete'), 'delete_btn', false, ['icon' => 'delete', 'mode' => 'secondary', 'form' => 'form_delete'], true);
|
||||||
|
$actionButtons[] = html_print_submit_button(__('Create'), 'crt', false, ['icon' => 'wand', 'form' => 'form_create'], true);
|
||||||
|
|
||||||
|
$actionButtons[] = '<form id="form_create" method="post" action="index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules_form">';
|
||||||
|
$actionButtons[] = html_print_input_hidden('create_module_inventory', 1, true);
|
||||||
|
$actionButtons[] = '<form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>';
|
|
||||||
echo '</form>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($management_allowed === true) {
|
html_print_action_buttons(
|
||||||
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules_form">';
|
implode('', $actionButtons),
|
||||||
echo '<div class="float-right mrgn_btn_15px">';
|
[
|
||||||
html_print_input_hidden('create_module_inventory', 1);
|
'type' => 'form_action',
|
||||||
html_print_submit_button(__('Create'), 'crt', false, 'class="sub next"');
|
'right_content' => $tablePagination,
|
||||||
echo '</div>';
|
],
|
||||||
echo '</form>';
|
false
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
enterprise_hook('close_meta_frame');
|
enterprise_hook('close_meta_frame');
|
||||||
echo '<div id="deploy_messages" class="invisible">';
|
echo '<div id="deploy_messages" class="invisible">';
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
*
|
*
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
|
||||||
* Please see http://pandorafms.org for full contribution list
|
* Please see http://pandorafms.org for full contribution list
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -287,16 +287,25 @@ if (is_metaconsole() === true) {
|
||||||
$help_header = 'network_component_tab';
|
$help_header = 'network_component_tab';
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_print_page_header(
|
ui_print_standard_header(
|
||||||
__('Module management').' » '.__('Remote component management'),
|
__('Remote component management'),
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
$help_header,
|
$help_header,
|
||||||
true,
|
true,
|
||||||
'',
|
[],
|
||||||
false,
|
[
|
||||||
'modulemodal'
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Configuration'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Templates'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$sec = 'gmodules';
|
$sec = 'gmodules';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,7 +721,6 @@ $total_components = network_components_get_network_components(
|
||||||
'COUNT(*) AS total'
|
'COUNT(*) AS total'
|
||||||
);
|
);
|
||||||
$total_components = $total_components[0]['total'];
|
$total_components = $total_components[0]['total'];
|
||||||
ui_pagination($total_components, $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(
|
||||||
|
@ -735,7 +743,7 @@ if ($components === false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->styleTable = 'margin: 10px 10px 0; width: -webkit-fill-available';
|
||||||
$table->head = [];
|
$table->head = [];
|
||||||
$table->class = 'info_table';
|
$table->class = 'info_table';
|
||||||
if ($is_management_allowed === true) {
|
if ($is_management_allowed === true) {
|
||||||
|
@ -807,58 +815,60 @@ foreach ($components as $component) {
|
||||||
|
|
||||||
if ($is_management_allowed === true) {
|
if ($is_management_allowed === true) {
|
||||||
$table->cellclass[][6] = 'table_action_buttons';
|
$table->cellclass[][6] = 'table_action_buttons';
|
||||||
$data[6] = '<a class="inline_line float-left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image(
|
|
||||||
'images/copy.png',
|
$data[6] = html_print_anchor(
|
||||||
|
[
|
||||||
|
'href' => $url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'],
|
||||||
|
'content' => html_print_image(
|
||||||
|
'images/copy.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'alt' => __('Duplicate'),
|
|
||||||
'title' => __('Duplicate'),
|
'title' => __('Duplicate'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter main_menu_icon',
|
||||||
]
|
]
|
||||||
).'</a>';
|
),
|
||||||
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image(
|
],
|
||||||
'images/cross.png',
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$data[6] .= html_print_anchor(
|
||||||
|
[
|
||||||
|
'href' => $url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string,
|
||||||
|
'onClick' => 'if (! confirm (\''.__('Are you sure?').'\')) return false',
|
||||||
|
'content' => html_print_image(
|
||||||
|
'images/delete.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'alt' => __('Delete'),
|
|
||||||
'title' => __('Delete'),
|
'title' => __('Delete'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter main_menu_icon',
|
||||||
]
|
]
|
||||||
).'</a>';
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push($table->data, $data);
|
array_push($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data) === true) {
|
$tablePagination = ui_pagination(
|
||||||
if ($is_management_allowed === true) {
|
|
||||||
echo "<form method='post' action='index.php?sec=".$sec.'&sec2=godmode/modules/manage_network_components&search_id_group=0search_string=&pure='.$pure."'>";
|
|
||||||
html_print_input_hidden('multiple_delete', 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
html_print_table($table);
|
|
||||||
ui_pagination(
|
|
||||||
$total_components,
|
$total_components,
|
||||||
$url,
|
$url,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
false,
|
|
||||||
'offset',
|
|
||||||
true,
|
true,
|
||||||
'pagination-bottom'
|
'offset',
|
||||||
);
|
false
|
||||||
if ($is_management_allowed === true) {
|
);
|
||||||
echo "<div id='btn_delete_5' class='float-right'>";
|
|
||||||
html_print_submit_button(
|
echo '<form id="form_delete" method="POST" action="index.php?sec='.$sec.'&sec2=godmode/modules/manage_network_components&search_id_group=0search_string=&pure='.$pure.'">';
|
||||||
__('Delete'),
|
html_print_table($table);
|
||||||
'delete_btn',
|
html_print_input_hidden('multiple_delete', 1);
|
||||||
false,
|
echo '</form>';
|
||||||
'class="sub delete"'
|
|
||||||
);
|
$actionButtons = [];
|
||||||
echo '</div>';
|
|
||||||
echo '</form>';
|
if (isset($data) === false) {
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ui_print_info_message(
|
ui_print_info_message(
|
||||||
[
|
[
|
||||||
'no_close' => true,
|
'no_close' => true,
|
||||||
|
@ -868,10 +878,31 @@ if (isset($data) === true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_management_allowed === true) {
|
if ($is_management_allowed === true) {
|
||||||
echo '<form method="post" action="'.$url.'">';
|
$actionButtons[] = html_print_submit_button(
|
||||||
echo '<div class="right_align mrgn_btn_15px">';
|
__('Create'),
|
||||||
html_print_input_hidden('new_component', 1);
|
'crt',
|
||||||
html_print_select(
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'wand',
|
||||||
|
'form' => 'form_create',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$actionButtons[] = html_print_submit_button(
|
||||||
|
__('Delete'),
|
||||||
|
'delete_btn',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'icon' => 'delete',
|
||||||
|
'mode' => 'secondary',
|
||||||
|
'form' => 'form_delete',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
// Create.
|
||||||
|
$actionButtons[] = '<form style="z-index: 10" id="form_create" method="post" action="'.$url.'">';
|
||||||
|
$actionButtons[] = html_print_input_hidden('new_component', 1, true);
|
||||||
|
$actionButtons[] = html_print_select(
|
||||||
[
|
[
|
||||||
COMPONENT_TYPE_NETWORK => __('Create a new network component'),
|
COMPONENT_TYPE_NETWORK => __('Create a new network component'),
|
||||||
COMPONENT_TYPE_PLUGIN => __('Create a new plugin component'),
|
COMPONENT_TYPE_PLUGIN => __('Create a new plugin component'),
|
||||||
|
@ -883,18 +914,24 @@ if ($is_management_allowed === true) {
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
''
|
true,
|
||||||
);
|
|
||||||
html_print_submit_button(
|
|
||||||
__('Create'),
|
|
||||||
'crt',
|
|
||||||
false,
|
false,
|
||||||
'class="sub next mrgn_lft_5px"'
|
true,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
'z-index: 10'
|
||||||
);
|
);
|
||||||
echo '</div>';
|
$actionButtons[] = '</form>';
|
||||||
echo '</form>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html_print_action_buttons(
|
||||||
|
implode('', $actionButtons),
|
||||||
|
[
|
||||||
|
'type' => 'form_action',
|
||||||
|
'right_content' => $tablePagination,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
enterprise_hook('close_meta_frame');
|
enterprise_hook('close_meta_frame');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue