Merge branch 'ent-9662-second-round' into 'develop'

Ent 9662 second round

See merge request artica/pandorafms!5629
This commit is contained in:
daniel 2023-03-27 19:25:20 +00:00
commit 8f77ecc064
49 changed files with 565 additions and 366 deletions

View File

@ -966,9 +966,9 @@ foreach ($fields as $field) {
$link_url = ''; $link_url = '';
} }
$data_field[1] = '<span style="line-height: 3.5;">'.__('Link text:').'</span>'; $customContent = '<span style="line-height: 3.5;">'.__('Link text:').'</span>';
$data_field[1] .= '<br>'; $customContent .= '<br>';
$data_field[1] .= html_print_textarea( $customContent .= html_print_textarea(
'customvalue_'.$field['id_field'].'[]', 'customvalue_'.$field['id_field'].'[]',
2, 2,
1000, 1000,
@ -976,10 +976,10 @@ foreach ($fields as $field) {
'class="min-height-30px w100p"', 'class="min-height-30px w100p"',
true true
); );
$data_field[1] .= '<br>'; $customContent .= '<br>';
$data_field[1] .= '<span style="line-height: 3.5;">'.__('Link URL:').'</span>'; $customContent .= '<span style="line-height: 3.5;">'.__('Link URL:').'</span>';
$data_field[1] .= '<br>'; $customContent .= '<br>';
$data_field[1] .= html_print_textarea( $customContent .= html_print_textarea(
'customvalue_'.$field['id_field'].'[]', 'customvalue_'.$field['id_field'].'[]',
2, 2,
1000, 1000,

View File

@ -229,7 +229,6 @@ echo '</form>';
<script> <script>
$(document).ready (function () { $(document).ready (function () {
if($('input[type=hidden][name=update_field]').val() == 1 && $('#textarea_combo_values').val() != ''){ if($('input[type=hidden][name=update_field]').val() == 1 && $('#textarea_combo_values').val() != ''){
console.log('entra2');
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true); $('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
$('#configure_field-3').show(); $('#configure_field-3').show();
@ -250,7 +249,6 @@ $(document).ready (function () {
} }
}); });
} else { } else {
console.log('entra');
$('#configure_field-3').hide(); $('#configure_field-3').hide();
} }
@ -261,17 +259,19 @@ $(document).ready (function () {
} }
$('input[type=checkbox][name=is_link_enabled]').change(function () { $('input[type=checkbox][name=is_link_enabled]').change(function () {
if( $(this).is(":checked") ){ if( $('input[type=checkbox][name=is_link_enabled]').prop('checked') ){
$('#configure_field-2').hide(); $('#configure_field-2').hide();
$('#configure_field-3').hide(); $('#configure_field-3').hide();
} else{ } else{
$('#configure_field-2').show(); $('#configure_field-2').show();
$('#configure_field-3').show(); if($('input[type=checkbox][name=is_combo_enable]').prop('checked') === true) {
$('#configure_field-3').show();
}
} }
}); });
$('input[type=checkbox][name=is_combo_enable]').change(function () { $('input[type=checkbox][name=is_combo_enable]').change(function () {
if( $(this).is(":checked") ){ if( $('input[type=checkbox][name=is_combo_enable]').prop('checked') ){
$('#configure_field-3').show(); $('#configure_field-3').show();
dialog_message("#message_no_set_password"); dialog_message("#message_no_set_password");
$('#configure_field-1').hide(); $('#configure_field-1').hide();
@ -282,12 +282,14 @@ $(document).ready (function () {
} }
}); });
$('input[type=checkbox][name=is_password_type]').change(function () { $('input[type=checkbox][name=is_password_type]').change(function () {
if( $(this).is(":checked")){ if( $('input[type=checkbox][name=is_password_type]').prop('checked')){
dialog_message("#message_no_set_combo"); dialog_message("#message_no_set_combo");
$('#configure_field-3').hide(); $('#configure_field-3').hide();
} }
else{ else{
$('#configure_field-3').show(); if($('input[type=checkbox][name=is_combo_enable]').prop('checked') === true) {
$('#configure_field-3').show();
}
} }
}); });
}); });

View File

@ -741,8 +741,8 @@ $outputForm .= ui_toggle(
false, false,
true, true,
'', '',
'', 'white-box-content no_border',
'box-flat white_table_flex white_table_graph_fixed' 'filter-datatable-main box-flat white_table_graph'
); );
$outputForm .= ui_toggle( $outputForm .= ui_toggle(
@ -753,8 +753,8 @@ $outputForm .= ui_toggle(
true, true,
true, true,
'', '',
'', 'white-box-content no_border',
'box-flat white_table_flex white_table_graph_fixed' 'filter-datatable-main box-flat white_table_graph'
); );
$outputForm .= ui_toggle( $outputForm .= ui_toggle(
@ -765,8 +765,8 @@ $outputForm .= ui_toggle(
true, true,
true, true,
'', '',
'', 'white-box-content no_border',
'box-flat white_table_flex white_table_graph_fixed' 'filter-datatable-main box-flat white_table_graph'
); );
if ((int) $moduletype !== 13) { if ((int) $moduletype !== 13) {
@ -784,8 +784,8 @@ if ((int) $moduletype !== 13) {
true, true,
true, true,
'', '',
'', 'white-box-content no_border',
'box-flat white_table_flex white_table_graph_fixed' 'filter-datatable-main box-flat white_table_graph'
); );
} }

View File

@ -615,6 +615,7 @@ if (modules_is_string_type($id_module_type) === false || (bool) $edit === true)
$table_simple->data['thresholds_table'][1] = '<svg id="svg_dinamic" width="500" height="300"> </svg>'; $table_simple->data['thresholds_table'][1] = '<svg id="svg_dinamic" width="500" height="300"> </svg>';
} }
$table_simple->rowclass['caption_historical_data'] = 'mrgn_top_10px';
$table_simple->data['caption_historical_data'][0] = __('Historical data'); $table_simple->data['caption_historical_data'][0] = __('Historical data');
if ($disabledBecauseInPolicy) { if ($disabledBecauseInPolicy) {
// If is disabled, we send a hidden in his place and print a false // If is disabled, we send a hidden in his place and print a false
@ -1454,17 +1455,14 @@ html_print_input_hidden('module_macro_count', $macro_count);
$table_new_relations = new stdClass(); $table_new_relations = new stdClass();
$table_new_relations->id = 'module_new_relations'; $table_new_relations->id = 'module_new_relations';
$table_new_relations->width = '100%'; $table_new_relations->width = '100%';
$table_new_relations->class = 'no-class'; $table_new_relations->class = 'no-class filter-table-adv';
$table_new_relations->data = []; $table_new_relations->data = [];
$table_new_relations->style = []; $table_new_relations->style = [];
$table_new_relations->style[0] = 'width: 10%; font-weight: bold;'; $table_new_relations->size[0] = '25%';
$table_new_relations->style[1] = 'width: 25%; text-align: center;'; $table_new_relations->size[1] = '25%';
$table_new_relations->style[2] = 'width: 10%; font-weight: bold;'; $table_new_relations->size[2] = '25%';
$table_new_relations->style[3] = 'width: 25%; text-align: center;'; $table_new_relations->size[3] = '25%';
$table_new_relations->style[4] = 'width: 10%; font-weight: bold;';
$table_new_relations->style[5] = 'width: 25%; text-align: center;';
$table_new_relations->data[0][0] = __('Agent');
$params = []; $params = [];
$params['return'] = true; $params['return'] = true;
$params['show_helptip'] = true; $params['show_helptip'] = true;
@ -1473,36 +1471,50 @@ $params['use_hidden_input_idagent'] = true;
$params['print_hidden_input_idagent'] = true; $params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent'; $params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
$params['javascript_function_action_after_select_js_call'] = 'change_modules_autocomplete_input();'; $params['javascript_function_action_after_select_js_call'] = 'change_modules_autocomplete_input();';
$table_new_relations->data[0][1] = ui_print_agent_autocomplete_input($params); $table_new_relations->data[0][0] = html_print_label_input_block(
$table_new_relations->data[0][2] = __('Module'); __('Agent'),
$table_new_relations->data[0][3] = "<div id='module_autocomplete'></div>"; ui_print_agent_autocomplete_input($params)
);
$table_new_relations->data[0][1] = html_print_label_input_block(
__('Module'),
"<div id='module_autocomplete'></div>"
);
$array_rel_type = []; $array_rel_type = [];
$array_rel_type['direct'] = __('Direct'); $array_rel_type['direct'] = __('Direct');
$array_rel_type['failover'] = __('Failover'); $array_rel_type['failover'] = __('Failover');
$table_new_relations->data[0][4] = __('Rel. type');
$table_new_relations->data[0][5] = html_print_select( $table_new_relations->data[0][2] = html_print_label_input_block(
$array_rel_type, __('Rel. type'),
'relation_type', html_print_select(
'', $array_rel_type,
'', 'relation_type',
'', '',
0, '',
true, '',
false, 0,
true, true,
'' false,
true,
''
)
); );
$table_new_relations->data[0][6] = html_print_button( $table_new_relations->data[0][3] = html_print_label_input_block(
__('Add relationship'), '&nbsp;',
'add_relation', '<div class="inline_line">'.html_print_button(
false, __('Add relationship'),
'javascript: add_new_relation();', 'add_relation',
'class="sub add"', false,
true 'javascript: add_new_relation();',
[
'class' => 'w150px secondary',
'icon' => 'plus',
],
true
)."<div id='add_relation_status' class='inline_line'></div></div>"
); );
$table_new_relations->data[0][6] .= "&nbsp;&nbsp;<div id='add_relation_status' class='inline_line'></div>";
// Relationship list. // Relationship list.
$table_relations = new stdClass(); $table_relations = new stdClass();

View File

@ -152,9 +152,7 @@ foreach ($password_fields as $k => $p) {
load_plugin_macros_fields('simple-macro'); load_plugin_macros_fields('simple-macro');
forced_title_callback(); forced_title_callback();
}
$(document).ready(function () { $('select#id_plugin').select2('close');
observerInputPassword(); }
});
</script> </script>

View File

@ -42,8 +42,6 @@ if (empty($edit_module)) {
} }
$data = []; $data = [];
$data[0] = __('Target IP').' '.ui_print_help_icon('wmi_module_tab', true);
if ($page == 'enterprise/godmode/policies/policy_modules') { if ($page == 'enterprise/godmode/policies/policy_modules') {
if ($ip_target != 'auto' && $ip_target != '') { if ($ip_target != 'auto' && $ip_target != '') {
$custom_ip_target = $ip_target; $custom_ip_target = $ip_target;
@ -60,7 +58,7 @@ if ($page == 'enterprise/godmode/policies/policy_modules') {
$target_ip_values['force_pri'] = __('Force primary key'); $target_ip_values['force_pri'] = __('Force primary key');
$target_ip_values['custom'] = __('Custom'); $target_ip_values['custom'] = __('Custom');
$data[1] = html_print_select( $inputs = html_print_select(
$target_ip_values, $target_ip_values,
'ip_target', 'ip_target',
$ip_target, $ip_target,
@ -72,109 +70,171 @@ if ($page == 'enterprise/godmode/policies/policy_modules') {
false, false,
'', '',
false, false,
'width:200px;' 'width: 100%; margin-top: 10px;'
); );
$data[1] .= html_print_input_text('custom_ip_target', $custom_ip_target, '', 15, 60, true); $inputs .= html_print_input_text('custom_ip_target', $custom_ip_target, '', 15, 60, true);
} else { } else {
if ($ip_target == 'auto') { if ($ip_target == 'auto') {
$ip_target = agents_get_address($id_agente); $ip_target = agents_get_address($id_agente);
} }
$data[1] = html_print_input_text('ip_target', $ip_target, '', 15, 60, true); $inputs = html_print_input_text(
'ip_target',
$ip_target,
'',
15,
60,
true,
false,
false,
'',
'mrgn_top_10px w100p'
);
} }
$data[2] = __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true); $data[0] = html_print_label_input_block(
$data[3] = html_print_input_text( __('Target IP').' <span class="help_icon_15px">'.ui_print_help_icon('wmi_module_tab', true),
'tcp_send', $inputs,
$tcp_send, [
'', 'label_class' => 'font-title-font',
5, 'div_class' => 'w100p mrgn_right_20px',
20, ]
true, );
$disabledBecauseInPolicy,
false, $data[2] = html_print_label_input_block(
'', __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true),
$classdisabledBecauseInPolicy html_print_input_text(
'tcp_send',
$tcp_send,
'',
5,
20,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy.' mrgn_top_10px w100p'
),
[
'label_class' => 'font-title-font',
'div_class' => 'w100p mrgn_right_20px',
]
); );
push_table_simple($data, 'target_ip'); push_table_simple($data, 'target_ip');
$data = []; $data = [];
$data[0] = __('Username'); $data[0] = html_print_label_input_block(
$data[1] = html_print_input_text( __('Username'),
'plugin_user', html_print_input_text(
$plugin_user, 'plugin_user',
'', $plugin_user,
15, '',
60, 15,
true, 60,
$disabledBecauseInPolicy, true,
false, $disabledBecauseInPolicy,
'', false,
$classdisabledBecauseInPolicy '',
$classdisabledBecauseInPolicy.' w100p'
),
[
'label_class' => 'font-title-font',
'div_class' => 'w100p display-grid mrgn_right_20px',
]
); );
$data[2] = __('Password');
$data[3] = html_print_input_password( $data[2] = html_print_label_input_block(
'plugin_pass', __('Password'),
'', html_print_input_password(
'', 'plugin_pass',
15, '',
60, '',
true, 15,
$disabledBecauseInPolicy, 60,
false, true,
$classdisabledBecauseInPolicy, $disabledBecauseInPolicy,
'new-password' false,
$classdisabledBecauseInPolicy.' w100p',
'new-password',
true
),
[
'label_class' => 'font-title-font',
'div_class' => 'w100p display-grid mrgn_right_20px',
]
); );
$table_simple->rowclass['user_pass'] = 'w100p mrgn_top_10px';
push_table_simple($data, 'user_pass'); push_table_simple($data, 'user_pass');
$data = []; $data = [];
$data[0] = __('WMI query'); $data[0] = html_print_label_input_block(
$data[1] = html_print_input_text( __('WMI query'),
'snmp_oid', html_print_input_text(
$snmp_oid, 'snmp_oid',
'', $snmp_oid,
35, '',
255, 35,
true, 255,
$disabledBecauseInPolicy, true,
false, $disabledBecauseInPolicy,
'', false,
$classdisabledBecauseInPolicy '',
$classdisabledBecauseInPolicy
),
[
'label_class' => 'font-title-font',
'div_class' => 'w100p display-grid mrgn_right_20px',
]
); );
$table_simple->colspan['wmi_query'][1] = 3;
$data[2] = html_print_label_input_block(
__('Key string').ui_print_help_tip(__('Optional. Substring to look for in the WQL query result. The module returns 1 if found, 0 if not.'), true),
html_print_input_text(
'snmp_community',
$snmp_community,
'',
20,
60,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
),
[
'label_class' => 'font-title-font',
'div_class' => 'w100p display-grid mrgn_right_20px',
]
);
$table_simple->rowclass['wmi_query'] = 'w100p mrgn_top_10px';
push_table_simple($data, 'wmi_query'); push_table_simple($data, 'wmi_query');
$data = []; $data = [];
$data[0] = __('Key string').ui_print_help_tip(__('Optional. Substring to look for in the WQL query result. The module returns 1 if found, 0 if not.'), true); $data[0] = html_print_label_input_block(
$data[1] = html_print_input_text( __('Field number').ui_print_help_tip(__('Column number to retrieve from the WQL query result (starting from zero).'), true),
'snmp_community', html_print_input_text(
$snmp_community, 'tcp_port',
'', $tcp_port,
20, '',
60, 5,
true, 15,
$disabledBecauseInPolicy, true,
false, $disabledBecauseInPolicy,
'', false,
$classdisabledBecauseInPolicy '',
); $classdisabledBecauseInPolicy.' mrgn_right_20px'
$data[2] = __('Field number').ui_print_help_tip(__('Column number to retrieve from the WQL query result (starting from zero).'), true); ),
$data[3] = html_print_input_text( [
'tcp_port', 'label_class' => 'font-title-font',
$tcp_port, 'div_class' => 'w50p display-grid',
'', ]
5,
15,
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
); );
$table_simple->rowclass['key_field'] = 'w100p mrgn_top_10px';
push_table_simple($data, 'key_field'); push_table_simple($data, 'key_field');
?> ?>
<script type="text/javascript"> <script type="text/javascript">
@ -191,11 +251,6 @@ $(document).ready (function () {
$("#text-custom_ip_target").hide(); $("#text-custom_ip_target").hide();
} }
}); });
// Add input password values with js to hide it in browser inspector.
$('#password-plugin_pass').val('<?php echo $plugin_pass; ?>');
observerInputPassword();
}); });
</script> </script>

View File

@ -187,7 +187,7 @@ $table->data[2][0] = html_print_label_input_block(
); );
if (isset($step) === false) { if (isset($step) === false) {
echo '<form class="add_alert_form max_floating_element_size" method="post">'; echo '<form id="form_alerts" class="add_alert_form max_floating_element_size" method="post">';
html_print_table($table); html_print_table($table);
} }
@ -216,6 +216,26 @@ if (isset($step) === false) {
true true
); );
if ($_GET['sec2'] === 'operation/cluster/cluster') {
html_print_div(
[
'content' => html_print_submit_button(
__('Add alert'),
'add',
false,
[
'icon' => 'wand',
'form' => 'form_alerts',
'mode' => 'secondary',
],
true
),
'style' => 'display:none',
'id' => 'add_alert_div',
]
);
}
html_print_action_buttons($actionButtons, ['right_content' => $pagination]); html_print_action_buttons($actionButtons, ['right_content' => $pagination]);
html_print_input_hidden('create_alert', 1); html_print_input_hidden('create_alert', 1);

View File

@ -497,45 +497,47 @@ if (is_metaconsole() === false) {
$buttons = ''; $buttons = '';
} }
if ($tab !== 'alert') { if ($_GET['sec2'] !== 'operation/cluster/cluster') {
if ($tab === 'list') { if ($tab !== 'alert') {
ui_print_standard_header( if ($tab === 'list') {
__('Alerts'), ui_print_standard_header(
'images/gm_alerts.png', __('Alerts'),
false, 'images/gm_alerts.png',
'', false,
true, '',
$buttons, true,
[ $buttons,
[ [
'link' => '', [
'label' => __('Manage alerts'), 'link' => '',
], 'label' => __('Manage alerts'),
],
[
'link' => '',
'label' => __('List'),
],
]
);
} else {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
$buttons,
[ [
'link' => '', [
'label' => __('List'), 'link' => '',
], 'label' => __('Manage alerts'),
] ],
); [
} else { 'link' => '',
ui_print_standard_header( 'label' => __('Create'),
__('Alerts'), ],
'images/gm_alerts.png', ]
false, );
'', }
true,
$buttons,
[
[
'link' => '',
'label' => __('Manage alerts'),
],
[
'link' => '',
'label' => __('Create'),
],
]
);
} }
} }
} else { } else {

View File

@ -84,7 +84,7 @@ $buttons['gis_maps_list'] = [
true, true,
[ [
'title' => __('GIS Maps list'), 'title' => __('GIS Maps list'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
]; ];
@ -96,19 +96,30 @@ if ($idMap) {
true, true,
[ [
'title' => __('View GIS'), 'title' => __('View GIS'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
]; ];
} }
ui_print_page_header( // Header.
ui_print_standard_header(
__('GIS Maps builder'), __('GIS Maps builder'),
'images/gm_gis.png', 'images/gm_gis.png',
false, false,
'configure_gis_map_edit', 'configure_gis_map_edit',
true, false,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('GIS Maps'),
],
]
); );
switch ($action) { switch ($action) {
@ -480,7 +491,7 @@ $table->data[1][1] = "<table class='no-class' border='0' id='map_connection'>
<a href='javascript: addConnectionMap();'>".html_print_image( <a href='javascript: addConnectionMap();'>".html_print_image(
'images/add.png', 'images/add.png',
true, true,
['class' => 'invert_filter'] ['class' => 'invert_filter main_menu_icon']
)."</a> )."</a>
<input type='hidden' name='map_connection_list' value='' id='map_connection_list' /> <input type='hidden' name='map_connection_list' value='' id='map_connection_list' />
<input type='hidden' name='layer_list' value='' id='layer_list' /> <input type='hidden' name='layer_list' value='' id='layer_list' />
@ -583,7 +594,7 @@ $table->data[1][1] = '<div id="form_layer" class="invisible">
$table->data[1][1] .= html_print_button(__('Add agent'), 'add_agent', true, '', 'class="sub add"', true); $table->data[1][1] .= html_print_button(__('Add agent'), 'add_agent', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
$params = []; $params = [];
$params['return'] = true; $params['return'] = true;
@ -628,7 +639,7 @@ $params['javascript_is_function_select'] = true;
// Filter by group. // Filter by group.
$params['disabled_javascript_on_blur_function'] = false; $params['disabled_javascript_on_blur_function'] = false;
$agent_for_group_input = ui_print_agent_autocomplete_input($params); $agent_for_group_input = ui_print_agent_autocomplete_input($params);
$add_group_btn = html_print_button(__('Add'), 'add_group', true, '', 'class="sub add"', true); $add_group_btn = html_print_button(__('Add'), 'add_group', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
$table->data[1][1] .= '<tr><td colspan="4"><hr /></td></tr> $table->data[1][1] .= '<tr><td colspan="4"><hr /></td></tr>
<tr> <tr>
@ -660,21 +671,19 @@ $table->data[1][1] .= '<tr>
html_print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
switch ($action) { switch ($action) {
case 'save_new': case 'save_new':
case 'edit_map': case 'edit_map':
case 'update_saved': case 'update_saved':
if (empty($invalidFields) === true) { if (empty($invalidFields) === true) {
html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"'); $action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
} else { } else {
html_print_submit_button(_('Update map'), 'update_button', false, 'class="sub upd"'); $action_button = html_print_submit_button(_('Update map'), 'update_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
} }
break; break;
case 'new_map': case 'new_map':
html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"'); $action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
break; break;
default: default:
@ -682,7 +691,10 @@ switch ($action) {
break; break;
} }
echo '</div>'; html_print_action_buttons(
$action_button,
['type' => 'form_action']
);
echo '</form>'; echo '</form>';
@ -702,7 +714,7 @@ echo '</form>';
false, false,
[ [
'alt' => '', 'alt' => '',
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
); );
?> ?>
@ -899,7 +911,7 @@ function setLayerEditorData (data) {
var $layerFormVisibleCheckbox = $("input#checkbox-layer_visible_form"); var $layerFormVisibleCheckbox = $("input#checkbox-layer_visible_form");
var $layerFormAgentsFromGroupSelect = $("#layer_group_form"); var $layerFormAgentsFromGroupSelect = $("#layer_group_form");
var $layerFormAgentInput = $("input#text-agent_alias"); var $layerFormAgentInput = $("input#text-agent_alias");
var $layerFormAgentButton = $("input#button-add_agent"); var $layerFormAgentButton = $("button#button-add_agent");
var $layerFormAgentsListItems = $("tr.agents_list_item"); var $layerFormAgentsListItems = $("tr.agents_list_item");
var $layerFormGroupsListItems = $("tr.groups_list_item"); var $layerFormGroupsListItems = $("tr.groups_list_item");
@ -1005,7 +1017,7 @@ function getAgentRow (layerId, agentId, agentAlias) {
var $deleteCol = $("<td />"); var $deleteCol = $("<td />");
var $agentAlias = $("<span class=\"agent_alias\" data-agent-id=\"" + agentId + "\">" + agentAlias + "</span>"); var $agentAlias = $("<span class=\"agent_alias\" data-agent-id=\"" + agentId + "\">" + agentAlias + "</span>");
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/delete.svg', false, ['class' => 'invert_filter']); ?> </a>'); var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/delete.svg', false, ['class' => 'invert_filter main_menu_icon']); ?> </a>');
$removeBtn.click(function (event) { $removeBtn.click(function (event) {
var $layerRow = $("tr#layer_row_" + layerId); var $layerRow = $("tr#layer_row_" + layerId);
@ -1061,7 +1073,7 @@ function getGroupRow (layerId, groupId, groupName, agentId, agentAlias) {
+ "<i>" + agentAlias + "</i>" + "<i>" + agentAlias + "</i>"
+ ")" + ")"
+ "</span>"); + "</span>");
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>'); var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']); ?></a>');
$removeBtn.click(function (event) { $removeBtn.click(function (event) {
var $layerRow = $("tr#layer_row_" + layerId); var $layerRow = $("tr#layer_row_" + layerId);
@ -1139,8 +1151,8 @@ function getLayerRow (layerId, layerData) {
var $layerName = $("<span class=\"layer_name\">" + layerData.name + "</span>"); var $layerName = $("<span class=\"layer_name\">" + layerData.name + "</span>");
var $sortUpBtn = $("<a class=\"up_arrow\" href=\"javascript:;\" />"); var $sortUpBtn = $("<a class=\"up_arrow\" href=\"javascript:;\" />");
var $sortDownBtn = $("<a class=\"down_arrow\" href=\"javascript:;\" />"); var $sortDownBtn = $("<a class=\"down_arrow\" href=\"javascript:;\" />");
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/edit.svg', true, ['class' => 'invert_filter']); ?></a>'); var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/edit.svg', true, ['class' => 'invert_filter main_menu_icon']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>'); var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter main_menu_icon']); ?></a>');
$sortUpBtn.click(moveLayerRowUpOnClick); $sortUpBtn.click(moveLayerRowUpOnClick);
$sortDownBtn.click(moveLayerRowDownOnClick); $sortDownBtn.click(moveLayerRowDownOnClick);
@ -1231,9 +1243,9 @@ function onLayerGroupIdChange (event) {
// Bind events // Bind events
$("form#form_setup").submit(onFormSubmit); $("form#form_setup").submit(onFormSubmit);
$("input#button-add_agent").click(addAgentClick); $("button#button-add_agent").click(addAgentClick);
$("select#layer_group_id").change(onLayerGroupIdChange); $("select#layer_group_id").change(onLayerGroupIdChange);
$("input#button-add_group").click(addGroupClick); $("button#button-add_group").click(addGroupClick);
// Populate layer list // Populate layer list
var layers = <?php echo json_encode($layer_list); ?>; var layers = <?php echo json_encode($layer_list); ?>;

View File

@ -118,7 +118,7 @@ if (is_metaconsole() === true) {
// Data before table. // Data before table.
$files = list_files('images/', '@groups.svg', 1, 0); $files = list_files(((is_metaconsole() === true) ? '../../' : '').'images/', '@groups.svg', 1, 0);
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';

View File

@ -270,7 +270,7 @@ $agents_with_templates_json = json_encode($agents_with_templates_json);
echo "<input type='hidden' id='hidden-agents_with_templates' value='$agents_with_templates_json'>"; echo "<input type='hidden' id='hidden-agents_with_templates' value='$agents_with_templates_json'>";
attachActionButton('add', 'create', $table->width); attachActionButton('add', 'create', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -293,7 +293,7 @@ $table->data[2][3] = '';
echo '<form method="post" id="form_alerts" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_alerts">'; echo '<form method="post" id="form_alerts" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_alerts">';
html_print_table($table); html_print_table($table);
attachActionButton('add', 'add', $table->width); attachActionButton('add', 'add', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -295,7 +295,7 @@ array_push($table->data, $data);
html_print_table($table); html_print_table($table);
attachActionButton('create_profiles', 'update', $table->width); attachActionButton('create_profiles', 'update', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -310,7 +310,7 @@ echo '<legend><span>'.__('To agent(s)').'</span></legend>';
html_print_table($table); html_print_table($table);
echo '</fieldset>'; echo '</fieldset>';
attachActionButton('do_operation', 'copy', $table->width); attachActionButton('do_operation', 'copy', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -298,7 +298,7 @@ $agents_with_templates_json = json_encode($agents_with_templates_json);
echo "<input type='hidden' id='hidden-agents_with_templates' value='".$agents_with_templates_json."'>"; echo "<input type='hidden' id='hidden-agents_with_templates' value='".$agents_with_templates_json."'>";
attachActionButton('delete', 'delete', $table->width); attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -188,7 +188,7 @@ $params = [
echo get_table_inputs_masive_agents($params); echo get_table_inputs_masive_agents($params);
if (is_metaconsole() === true || is_management_allowed() === true) { if (is_metaconsole() === true || is_management_allowed() === true) {
attachActionButton('delete', 'delete', '100%'); attachActionButton('delete', 'delete', '100%', false, $SelectAction);
} }
echo '</form>'; echo '</form>';

View File

@ -358,7 +358,7 @@ $table->data[2][3] = html_print_select([], 'module[]', '', false, '', '', true,
echo '<form method="post" id="form_alerts" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_alerts" >'; echo '<form method="post" id="form_alerts" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_alerts" >';
html_print_table($table); html_print_table($table);
attachActionButton('delete', 'delete', $table->width); attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -583,7 +583,7 @@ $table->data['form_agents_3'][3] = html_print_select(
echo '<form method="post" id="form_modules" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" >'; echo '<form method="post" id="form_modules" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" >';
html_print_table($table); html_print_table($table);
attachActionButton('delete', 'delete', $table->width); attachActionButton('delete', 'delete', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -246,7 +246,7 @@ array_push($table->data, $data);
html_print_table($table); html_print_table($table);
attachActionButton('delete_profiles', 'delete', $table->width); attachActionButton('delete_profiles', 'delete', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -1257,7 +1257,7 @@ echo '<h3 class="error invisible" id="message"> </h3>';
html_print_input_hidden('id_agente', $id_agente); html_print_input_hidden('id_agente', $id_agente);
attachActionButton('update_agents', 'update', $table->width); attachActionButton('update_agents', 'update', $table->width, false, $SelectAction);
// Shown and hide div. // Shown and hide div.
echo '</div></form>'; echo '</div></form>';

View File

@ -1265,7 +1265,7 @@ $table->data['edit1'][1] = '<table width="100%">';
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit">';
html_print_table($table); html_print_table($table);
attachActionButton('update', 'update', $table->width); attachActionButton('update', 'update', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -391,7 +391,7 @@ echo '<form method="POST" id="form-massive_plugin_edition"
html_print_table($table); html_print_table($table);
attachActionButton('update', 'update', $table->width); attachActionButton('update', 'update', $table->width, false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -556,7 +556,7 @@ echo sprintf(
); );
echo '</div>'; echo '</div>';
attachActionButton('edit_users', 'update', '100%'); attachActionButton('edit_users', 'update', '100%', false, $SelectAction);
echo '</form>'; echo '</form>';

View File

@ -220,7 +220,7 @@ $alertstab = [
true, true,
[ [
'title' => __('Alerts operations'), 'title' => __('Alerts operations'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
'active' => $tab == 'massive_alerts', 'active' => $tab == 'massive_alerts',
@ -232,7 +232,7 @@ $userstab = [
true, true,
[ [
'title' => __('Users operations'), 'title' => __('Users operations'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
'active' => $tab == 'massive_users', 'active' => $tab == 'massive_users',
@ -244,7 +244,7 @@ $agentstab = [
true, true,
[ [
'title' => __('Agents operations'), 'title' => __('Agents operations'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
'active' => $tab == 'massive_agents', 'active' => $tab == 'massive_agents',
@ -256,7 +256,7 @@ $modulestab = [
true, true,
[ [
'title' => __('Modules operations'), 'title' => __('Modules operations'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
'active' => $tab == 'massive_modules', 'active' => $tab == 'massive_modules',
@ -268,7 +268,7 @@ $pluginstab = [
true, true,
[ [
'title' => __('Plugins operations'), 'title' => __('Plugins operations'),
'class' => 'invert_filter', 'class' => 'invert_filter main_menu_icon',
] ]
).'</a>', ).'</a>',
'active' => $tab == 'massive_plugins', 'active' => $tab == 'massive_plugins',
@ -308,34 +308,58 @@ $onheader['services'] = $servicestab;
// Header. // Header.
ui_print_standard_header( if (is_metaconsole() === false) {
__('Bulk operations').' - '.$options[$option], ui_print_standard_header(
'images/gm_massive_operations.png', __('Bulk operations').' - '.$options[$option],
false, 'images/gm_massive_operations.png',
$help_header, false,
false, $help_header,
[ false,
$agentstab,
$modulestab,
$pluginstab,
$userstab,
$alertstab,
$policiestab,
$snmptab,
$satellitetab,
$servicestab,
],
[
[ [
'link' => '', $agentstab,
'label' => __('Configuration'), $modulestab,
$pluginstab,
$userstab,
$alertstab,
$policiestab,
$snmptab,
$satellitetab,
$servicestab,
], ],
[ [
'link' => '', [
'label' => __('Bulk operations'), 'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Bulk operations'),
],
]
);
} else {
ui_print_standard_header(
__('Bulk operations').' - '.$options[$option],
'images/gm_massive_operations.png',
false,
$help_header,
false,
[
$userstab,
$agentstab,
], ],
] [
); [
'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Bulk operations'),
],
]
);
}
// Checks if the PHP configuration is correctly. // Checks if the PHP configuration is correctly.
@ -419,29 +443,26 @@ if (is_management_allowed() === false) {
); );
} }
echo '<br />'; $tip = '';
echo '<form method="post" id="form_options" action="'.$url.'">'; if ($option === 'edit_agents' || $option === 'edit_modules') {
echo '<table border="0"><tr><td>'; $tip = ui_print_help_tip(__('The blank fields will not be updated'), true);
echo __('Action'); }
echo '</td><td>';
html_print_select( $SelectAction = '<form method="post" id="form_options" action="'.$url.'">';
$SelectAction .= '<span class="mrgn_lft_10px mrgn_right_10px">'._('Action').'</span>';
$SelectAction .= html_print_select(
$options, $options,
'option', 'option',
$option, $option,
'this.form.submit()', 'this.form.submit()',
'', '',
0, 0,
false, true,
false, false,
false false
); ).$tip;
if ($option === 'edit_agents' || $option === 'edit_modules') {
ui_print_help_tip(__('The blank fields will not be updated'));
}
echo '</td></tr></table>'; $SelectAction .= '</form>';
echo '</form>';
echo '<br />';
switch ($option) { switch ($option) {
case 'delete_alerts': case 'delete_alerts':

View File

@ -228,11 +228,24 @@ if (isset($_GET['server']) === true) {
$advanced_editor = false; $advanced_editor = false;
if ($server_type === 13) { if ($server_type === 13) {
echo "<table cellpadding='4' cellspacing='4' class='databox filters font_bold margin-bottom-10' width='100%'> echo "<table cellpadding='4' cellspacing='4' class='databox filters margin-bottom-10 max_floating_element_size filter-table-adv'>
<tr>"; <tr>";
echo '<td class="w100p">'; echo '<td class="w100p">';
echo __('Dynamic search').'&nbsp;&nbsp;'; echo html_print_label_input_block(
html_print_input_text('search_config_token', $search, '', 12); __('Dynamic search'),
html_print_input_text(
'search_config_token',
$search,
'',
12,
255,
true,
false,
false,
'',
'w400px'
)
);
echo '</td>'; echo '</td>';
echo '</tr></table>'; echo '</tr></table>';
} }

View File

@ -254,7 +254,7 @@ foreach ($servers as $server) {
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext).'">'; $data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext).'">';
$data[8] .= html_print_image( $data[8] .= html_print_image(
'images/remote_configuration@svg.svg', 'images/remote-configuration@svg.svg',
true, true,
[ [
'title' => __('Remote configuration'), 'title' => __('Remote configuration'),

View File

@ -50,13 +50,23 @@ echo '<form action="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2" method="
switch ($action) { switch ($action) {
case 'create_connection_map': case 'create_connection_map':
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Create new map connection'), __('Create new map connection'),
'', '',
false, false,
'map_connection_tab', 'map_connection_tab',
true, true,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Setup'),
],
[
'link' => '',
'label' => __('Setup').' - '.__('Gis'),
],
]
); );
$mapConnection_name = ''; $mapConnection_name = '';
@ -77,13 +87,23 @@ switch ($action) {
case 'edit_connection_map': case 'edit_connection_map':
// Header. // Header.
ui_print_page_header( ui_print_standard_header(
__('Edit map connection'), __('Edit map connection'),
'', '',
false, false,
'map_connection_tab', 'map_connection_tab',
true, true,
$buttons $buttons,
[
[
'link' => '',
'label' => __('Setup'),
],
[
'link' => '',
'label' => __('Setup').' - '.__('Gis'),
],
]
); );
$idConnectionMap = get_parameter('id_connection_map'); $idConnectionMap = get_parameter('id_connection_map');

View File

@ -25,8 +25,25 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
exit; exit;
} }
// Header // Header.
ui_print_page_header(__('Site news management'), '', false, '', true); ui_print_standard_header(
__('Site news management'),
'images/custom_field.png',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Site news'),
],
]
);

View File

@ -640,7 +640,6 @@ if ($update_user) {
} }
$values = []; $values = [];
$values['id_user'] = (string) get_parameter('id_user');
$values['fullname'] = (string) get_parameter('fullname'); $values['fullname'] = (string) get_parameter('fullname');
$values['firstname'] = (string) get_parameter('firstname'); $values['firstname'] = (string) get_parameter('firstname');
$values['lastname'] = (string) get_parameter('lastname'); $values['lastname'] = (string) get_parameter('lastname');
@ -658,7 +657,7 @@ if ($update_user) {
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh'); $values['time_autorefresh'] = (int) get_parameter('time_autorefresh');
// API Token information. // API Token information.
$apiTokenRenewed = (bool) get_parameter('renewAPIToken'); $apiTokenRenewed = (bool) get_parameter('renewAPIToken');
$values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']); $values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($id);
if (users_is_admin() === false && (bool) $values['is_admin'] !== false) { if (users_is_admin() === false && (bool) $values['is_admin'] !== false) {
db_pandora_audit( db_pandora_audit(
@ -806,7 +805,7 @@ if ($update_user) {
$has_skin = false; $has_skin = false;
$has_wizard = false; $has_wizard = false;
$info = '{"id_user":"'.$values['id_user'].'", $info = '{"id_user":"'.$id.'",
"FullName":"'.$values['fullname'].'", "FullName":"'.$values['fullname'].'",
"Firstname":"'.$values['firstname'].'", "Firstname":"'.$values['firstname'].'",
"Lastname":"'.$values['lastname'].'", "Lastname":"'.$values['lastname'].'",

View File

@ -157,7 +157,7 @@ if ($new_user === true) {
true true
); );
} else { } else {
// TODO. Show the user id with a label. $userManagementTable->data['fields_iduser'][0] = html_print_input_hidden('id', $id, false, false, false, 'id');
} }
// User Full name. // User Full name.

View File

@ -1279,16 +1279,18 @@ if (check_login()) {
if ((int) $module['flag'] === 0) { if ((int) $module['flag'] === 0) {
$additionalLinkAction = '&amp;flag=1'; $additionalLinkAction = '&amp;flag=1';
$linkCaption = __('Force checks'); $linkCaption = __('Force checks');
$imgaction = 'images/target.png';
} else { } else {
$additionalLinkAction = ''; $additionalLinkAction = '';
$linkCaption = __('Refresh'); $linkCaption = __('Refresh');
$imgaction = 'images/go-back@svg.svg';
} }
$moduleActionButtons[] = html_print_anchor( $moduleActionButtons[] = html_print_anchor(
[ [
'href' => 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module['id_agente_modulo'].'&amp;refr=60'.$addedLinkParams.'"', 'href' => 'index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;id_agente_modulo='.$module['id_agente_modulo'].'&amp;refr=60'.$additionalLinkAction.'"',
'content' => html_print_image( 'content' => html_print_image(
'images/go-back@svg.svg', $imgaction,
true, true,
[ 'class' => 'main_menu_icon' ] [ 'class' => 'main_menu_icon' ]
), ),

View File

@ -162,7 +162,7 @@ class SatelliteAgent extends HTML
[ [
'id' => $this->tableId, 'id' => $this->tableId,
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $column_names, 'column_names' => $column_names,
'ajax_url' => $this->ajaxController, 'ajax_url' => $this->ajaxController,
@ -200,6 +200,7 @@ class SatelliteAgent extends HTML
], ],
], ],
], ],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
] ]
); );
} catch (Exception $e) { } catch (Exception $e) {
@ -213,10 +214,7 @@ class SatelliteAgent extends HTML
echo $modal.$msg.$aux; echo $modal.$msg.$aux;
echo '<div style="display: flex;justify-content: space-between;">'; $select = html_print_select(
echo '<div class="flex-content-left">';
html_print_select(
[ [
'0' => 'Disable / Enable selected agents', '0' => 'Disable / Enable selected agents',
'1' => 'Delete / Create selected agents', '1' => 'Delete / Create selected agents',
@ -226,30 +224,32 @@ class SatelliteAgent extends HTML
'', '',
'', '',
0, 0,
false, true,
false, false,
false false
); );
html_print_submit_button( $execute = html_print_submit_button(
__('Execute action'), __('Execute action'),
'submit_satellite_action', 'submit_satellite_action',
false, false,
'class="sub next"' [
'icon' => 'cog',
'class' => 'secondary',
],
true
); );
echo '</div>';
// Create button add host. // Create button add host.
echo '<div class="flex-content-right">'; $add = html_print_submit_button(
html_print_submit_button(
__('Add host'), __('Add host'),
'create', 'create',
false, false,
'class="sub next"' ['icon' => 'next'],
true
); );
echo '</div>';
echo '</div>'; html_print_action_buttons($add.$execute.$select);
// Load own javascript file. // Load own javascript file.
echo $this->loadJS(); echo $this->loadJS();
@ -503,6 +503,7 @@ class SatelliteAgent extends HTML
'arguments' => [ 'arguments' => [
'name' => 'address', 'name' => 'address',
'type' => 'text', 'type' => 'text',
'class' => 'w100p',
'value' => $values['address'], 'value' => $values['address'],
'return' => true, 'return' => true,
], ],
@ -514,6 +515,7 @@ class SatelliteAgent extends HTML
'arguments' => [ 'arguments' => [
'name' => 'name', 'name' => 'name',
'type' => 'text', 'type' => 'text',
'class' => 'w100p',
'value' => $values['name'], 'value' => $values['name'],
'return' => true, 'return' => true,
], ],
@ -1244,7 +1246,7 @@ class SatelliteAgent extends HTML
$('input[name*=check_]').prop('checked', check); $('input[name*=check_]').prop('checked', check);
}); });
$('#submit-submit_satellite_action').click(function() { $('#button-submit_satellite_action').click(function() {
const checks = $('input[name*=check_]:checked'); const checks = $('input[name*=check_]:checked');
const action = $('#satellite_action').val(); const action = $('#satellite_action').val();
let agent_delete_error = []; let agent_delete_error = [];

View File

@ -142,7 +142,7 @@ class SatelliteCollection extends HTML
[ [
'id' => $this->tableId, 'id' => $this->tableId,
'class' => 'info_table', 'class' => 'info_table',
'style' => 'width: 100%', 'style' => 'width: 99%',
'columns' => $columns, 'columns' => $columns,
'column_names' => $column_names, 'column_names' => $column_names,
'ajax_url' => $this->ajaxController, 'ajax_url' => $this->ajaxController,
@ -164,10 +164,12 @@ class SatelliteCollection extends HTML
'label' => __('Search'), 'label' => __('Search'),
'type' => 'text', 'type' => 'text',
'name' => 'filter_search', 'name' => 'filter_search',
'class' => 'w400px',
'size' => 12, 'size' => 12,
], ],
], ],
], ],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
] ]
); );
} catch (Exception $e) { } catch (Exception $e) {
@ -176,6 +178,7 @@ class SatelliteCollection extends HTML
echo '<div id="aux" class="invisible"></div>'; echo '<div id="aux" class="invisible"></div>';
echo '<div id="msg" class="invisible"></div>'; echo '<div id="msg" class="invisible"></div>';
html_print_action_buttons('');
// Load own javascript file. // Load own javascript file.
echo $this->loadJS(); echo $this->loadJS();

View File

@ -489,10 +489,8 @@ function cron_list_table()
} }
if ($defined_tasks !== false) { if ($defined_tasks !== false) {
echo '<h2>'.__('Scheduled jobs').'</h2>';
$table = new stdClass(); $table = new stdClass();
$table->class = 'databox data'; $table->class = 'info_table';
$table->width = '100%'; $table->width = '100%';
$table->data = []; $table->data = [];
$table->head = []; $table->head = [];
@ -912,8 +910,7 @@ function cron_list_table()
if ($function_name == 'cron_task_do_backup' || $function_name == 'cron_task_execute_custom_script') { if ($function_name == 'cron_task_do_backup' || $function_name == 'cron_task_execute_custom_script') {
if ($manage_pandora) { if ($manage_pandora) {
$data[7] = '<a href="'.$url; $data[7] = '<a href="javascript:form_add_cron_task('.$task['id'].',1);">';
$data[7] .= 'edit_task=1&id='.$task['id'].'">';
$data[7] .= html_print_image( $data[7] .= html_print_image(
'images/edit.svg', 'images/edit.svg',
true, true,
@ -926,8 +923,7 @@ function cron_list_table()
} }
if ($manage_pandora) { if ($manage_pandora) {
$data[7] .= '<a href="'.$url; $data[7] .= '<a href="javascript:form_add_cron_task('.$task['id'].',1);">';
$data[7] .= 'delete_task=1&id_user_task='.$task['id'].'">';
$data[7] .= html_print_image( $data[7] .= html_print_image(
'images/delete.svg', 'images/delete.svg',
true, true,
@ -940,8 +936,7 @@ function cron_list_table()
} }
} else { } else {
if ($write_perms || $manage_pandora) { if ($write_perms || $manage_pandora) {
$data[7] = '<a href="'.$url; $data[7] = '<a href="javascript:form_add_cron_task('.$task['id'].',1);">';
$data[7] .= 'edit_task=1&id='.$task['id'].'">';
$data[7] .= html_print_image( $data[7] .= html_print_image(
'images/edit.svg', 'images/edit.svg',
true, true,
@ -994,5 +989,7 @@ function cron_list_table()
} }
html_print_table($table); html_print_table($table);
} else {
ui_print_info_message(['no_close' => true, 'message' => __('There are no jobs') ]);
} }
} }

View File

@ -43,7 +43,8 @@ function attachActionButton(
string $action, string $action,
string $buttonAction, string $buttonAction,
string $tableWidth, string $tableWidth,
bool $return=false bool $return=false,
string $SelectAction=''
) { ) {
switch ($buttonAction) { switch ($buttonAction) {
case 'add': case 'add':
@ -88,7 +89,7 @@ function attachActionButton(
['icon' => $class], ['icon' => $class],
true true
), ),
[], ['right_content' => $SelectAction],
$return $return
); );
} }

View File

@ -68,6 +68,19 @@ function menu_print_menu(&$menu)
$sec2 = 'godmode/alerts/alert_commands'; $sec2 = 'godmode/alerts/alert_commands';
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') { } else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
$sec2 = 'enterprise/godmode/setup/setup_skins'; $sec2 = 'enterprise/godmode/setup/setup_skins';
} else if ($sec2 === 'godmode/gis_maps/configure_gis_map') {
$map_id = (string) get_parameter('map_id');
if (empty($map_id) === false) {
$sec2 = 'operation/gis_maps/render_view&map_id='.$map_id;
} else {
$sec2 = 'operation/gis_maps/gis_map';
}
} else if ($sec2 === 'enterprise/godmode/servers/manage_export_form') {
$sec2 = 'enterprise/godmode/servers/manage_export';
} else if ($sec2 === 'godmode/setup/gis_step_2') {
$sec2 = 'godmode/setup/setup&section=gis';
} else if ($sec2 === 'enterprise/godmode/agentes/agent_autoconfiguration.definition') {
$sec2 = 'enterprise/godmode/agentes/agent_autoconfiguration';
} else if ($sec2 === 'operation/gis_maps/render_view') { } else if ($sec2 === 'operation/gis_maps/render_view') {
$map_id = (int) get_parameter('map_id'); $map_id = (int) get_parameter('map_id');
if (empty($map_id) === false) { if (empty($map_id) === false) {

View File

@ -545,7 +545,7 @@ final class ModuleGraph extends Item
'label' => __('Module Graph'), 'label' => __('Module Graph'),
'arguments' => [ 'arguments' => [
'type' => 'radio_button', 'type' => 'radio_button',
'attributes' => 'class="btn" style="flex: 1;"', 'attributes' => 'class="btn mrgn_right_20px" style="flex: 1;"',
'name' => 'choosetype', 'name' => 'choosetype',
'value' => 'module', 'value' => 'module',
'checkedvalue' => $checkedModule, 'checkedvalue' => $checkedModule,

View File

@ -10225,9 +10225,9 @@ button.submitButton > div {
button.buttonButton.onlyIcon, button.buttonButton.onlyIcon,
button.submitButton.onlyIcon { button.submitButton.onlyIcon {
padding: 0 !important; padding: 0 !important;
min-width: 1.7em !important; min-width: 1.6em !important;
width: 1.7em !important; width: 1.6em !important;
height: 1.7em !important; height: 1.6em !important;
border: none; border: none;
box-shadow: none; box-shadow: none;
} }
@ -10291,8 +10291,9 @@ button.submitButton.onlyIcon.auto_sla_graph_min {
button.buttonButton.onlyIcon.basic_chart_min, button.buttonButton.onlyIcon.basic_chart_min,
button.submitButton.onlyIcon.basic_chart_min { button.submitButton.onlyIcon.basic_chart_min {
mask: url(../../images/event-history.svg) no-repeat right / contain; mask: url(../../images/web-analisys-data@svg.svg) no-repeat right / contain;
-webkit-mask: url(../../images/event-history.svg) no-repeat right / contain; -webkit-mask: url(../../images/web-analisys-data@svg.svg) no-repeat right /
contain;
} }
button.buttonButton.onlyIcon.binary_min, button.buttonButton.onlyIcon.binary_min,
@ -11462,31 +11463,6 @@ p.trademark-copyright {
height: 24px; height: 24px;
} }
form#satellite_conf_edit {
display: flex;
flex-direction: row;
justify-items: baseline;
justify-content: space-between;
flex-wrap: wrap;
}
form#satellite_conf_edit > fieldset {
background-color: #fff;
// border: 1px solid #e2e2e2;
padding: 0.5em;
margin: 0px 1em;
margin-bottom: 20px;
position: relative;
border-radius: 5px;
flex: 1 1 700px;
}
form#satellite_conf_edit > fieldset.full-column {
width: 100%;
flex: none;
margin: 0 0 20px;
}
.input_sub_placeholder { .input_sub_placeholder {
font-size: 8pt; font-size: 8pt;
color: #8a96a6; color: #8a96a6;
@ -11766,3 +11742,7 @@ div.relative > div > div#ui-datepicker-div {
.container-div-input-password:has(.w400px-important) { .container-div-input-password:has(.w400px-important) {
width: 400px; width: 400px;
} }
span.help_icon_15px > img {
height: 15px !important;
}

View File

@ -741,6 +741,10 @@ tr.datos2 > td.datos2 > div > div > label {
line-height: 16px; line-height: 16px;
} }
td[id^="basic_thresholds-"] .switch_radio_button > label[id^="label-radius"] {
line-height: 26px;
}
.mgn_tp_0_imp { .mgn_tp_0_imp {
margin-top: 0px !important; margin-top: 0px !important;
} }
@ -823,3 +827,13 @@ div[id^="auto-os-"] > img {
.w22px { .w22px {
width: 22px; width: 22px;
} }
table#simple.floating_form tr[id^="simple-plugin_"],
table#simple.floating_form tr[id^="simple-macro_field"] {
display: grid;
margin-bottom: 10px;
}
table#simple.floating_form tr[id^="simple-macro_field"] > td > input {
width: 50%;
}

View File

@ -14,6 +14,7 @@ div.external-visual-console-container {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
position: relative;
z-index: 0; z-index: 0;
} }
@ -47,7 +48,6 @@ div#vc-controls .nomn #vc-refr-form {
} }
div#vc-controls div.vc-title, div#vc-controls div.vc-title,
div#vc-controls div.vc-refr { div#vc-controls div.vc-refr {
/*margin-top: 15px;*/
margin-left: 3px; margin-left: 3px;
margin-right: 3px; margin-right: 3px;
} }

View File

@ -41,11 +41,11 @@
} }
.visual-console-item.is-editing:hover { .visual-console-item.is-editing:hover {
border-color: #82b92e; border-color: #2b2b2b;
} }
.visual-console-item.is-editing.is-selected { .visual-console-item.is-editing.is-selected {
border: 2px dashed #2b2b2b; border: 2px dashed #82b92e;
cursor: move; cursor: move;
z-index: 10; z-index: 10;
} }

File diff suppressed because one or more lines are too long

View File

@ -540,11 +540,8 @@ $table_contact->data[] = $data;
$data_opcional = new stdClass(); $data_opcional = new stdClass();
$data_opcional->id = 'agent_data_main'; $data_opcional->id = 'agent_data_main';
$data_opcional->width = '100%';
$data_opcional->class = 'floating_form'; $data_opcional->class = 'floating_form';
$data_opcional->cellspacing = 0;
$data_opcional->cellpadding = 0;
$data_opcional->style[0] = 'height: 46px; width: 25%; padding-right: 5px;text-align: end;';
$data_opcional->style[1] = 'height: 46px; width: 75%; padding-left: 5px;';
// Gis and url address. // Gis and url address.
$agentAdditionalContent = ''; $agentAdditionalContent = '';
// Position Information. // Position Information.
@ -624,8 +621,6 @@ foreach ($fields as $field) {
$data = []; $data = [];
$data[0] = '<b>'.$field['name'].ui_print_help_tip(__('Custom field'), true).'</b>'; $data[0] = '<b>'.$field['name'].ui_print_help_tip(__('Custom field'), true).'</b>';
$custom_value[0]['description'] = ui_bbcode_to_html($custom_value[0]['description']);
if ($custom_value[0]['is_password_type']) { if ($custom_value[0]['is_password_type']) {
$data[1] = '&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;'; $data[1] = '&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;';
} else if ($field['is_link_enabled'] === '1') { } else if ($field['is_link_enabled'] === '1') {
@ -642,6 +637,7 @@ foreach ($fields as $field) {
$data[1] = '<a href="'.$link_url.'">'.$link_text.'</a>'; $data[1] = '<a href="'.$link_url.'">'.$link_text.'</a>';
} else { } else {
$custom_value[0]['description'] = ui_bbcode_to_html($custom_value[0]['description']);
$data[1] = $custom_value[0]['description']; $data[1] = $custom_value[0]['description'];
} }
@ -1056,19 +1052,13 @@ if (isset($data_opcional) === false || isset($data_opcional->data) === false ||
false, false,
false, false,
true, true,
'box-flat agent_details_col agent_details_toggle agent_details_first_row w100p', '',
'mrgn_right_20px', 'white-box-content',
'w100p' 'box-flat white_table_graph w100p'
); );
} }
$agentIncidents = (isset($table_incident) === false) ? '' : html_print_table($table_incident, true); $agentIncidents = (isset($table_incident) === false) ? '' : html_print_table($table_incident, true);
/*
echo '<div class="agent_details_first_row">
<div class="box-flat agent_details_col mrgn_lft_20px mrgn_right_20px">'.$table_agent.'</div>
<div class="box-flat agent_details_col mrgn_right_20px">'.$agent_contact.'</div>
</div>'.$agent_info;
*/
html_print_div( html_print_div(
[ [

View File

@ -33,8 +33,9 @@ $buttons['gis_maps_list'] = [
).'</a>', ).'</a>',
]; ];
// Header.
ui_print_standard_header( ui_print_standard_header(
__('GIS Maps'), __('List of GIS maps'),
'images/op_gis.png', 'images/op_gis.png',
false, false,
'', '',
@ -199,7 +200,7 @@ if ($maps !== false) {
} }
$table->cellclass[]['op'] = 'table_action_buttons'; $table->cellclass[]['op'] = 'table_action_buttons';
$data['op'] = '<a href="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&amp;action=edit_map">'.html_print_image('images/edit.svg', true, ['title' => __('Edit')]).'</a>'.'<a href="index.php?sec=godgismaps&amp;sec2=operation/gis_maps/gis_map&amp;map_id='.$map['id_tgis_map'].'&amp;action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'; $data['op'] = '<a href="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&amp;action=edit_map">'.html_print_image('images/edit.svg', true, ['title' => __('Edit')]).'</a>'.'<a href="index.php?sec=godgismaps&amp;sec2=operation/gis_maps/gis_map&amp;map_id='.$map['id_tgis_map'].'&amp;action=delete_map" onclick="return confirmDelete();">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter main_menu_icon']).'</a>';
} }
array_push($table->data, $data); array_push($table->data, $data);
@ -213,12 +214,20 @@ if (!empty($table->data)) {
} }
if ($edit_gis_maps) { if ($edit_gis_maps) {
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form action="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map" method="post">'; echo '<form action="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map" method="post">';
html_print_input_hidden('action', 'new_map'); html_print_input_hidden('action', 'new_map');
html_print_submit_button(__('Create'), '', false, 'class="sub next"'); $ActionButton = html_print_submit_button(
__('Create'),
'create',
false,
[
'class' => 'sub ok submitButton',
'icon' => 'next',
],
true
);
echo '<div class="action-buttons">'.html_print_action_buttons($ActionButton, ['type' => 'form_action'], true).'</div>';
echo '</form>'; echo '</form>';
echo '</div>';
} }
unset($table); unset($table);

View File

@ -175,9 +175,10 @@ if ($has_management_acl) {
$buttons['setup']['godmode'] = 1; $buttons['setup']['godmode'] = 1;
} }
// Header.
ui_print_standard_header( ui_print_standard_header(
__('Map').' &raquo; '.__('Map').'&nbsp;'.$map['map_name'], __('Map').': '.$map['map_name'],
'images/op_gis.png', 'images/op_snmp.png',
false, false,
'', '',
false, false,
@ -331,5 +332,8 @@ if ($layers != false) {
$(document).ready(function() { $(document).ready(function() {
var $map = $("#map"); var $map = $("#map");
$map.css("height", "calc(100vh - " + $map.offset().top + "px - 20px)"); $map.css("height", "calc(100vh - " + $map.offset().top + "px - 20px)");
$('#select2-show_status-container').parent().parent().parent().removeClass('select2');
$('#select2-refresh_time-container').parent().parent().parent().removeClass('select2');
}); });
</script> </script>

View File

@ -287,7 +287,7 @@ if ($pure === false) {
$class_nlink = 'network_link_min link-create-item'; $class_nlink = 'network_link_min link-create-item';
$class_odometer = 'odometer_min link-create-item'; $class_odometer = 'odometer_min link-create-item';
$class_basic_chart = 'basic_chart_min link-create-item'; $class_basic_chart = 'basic_chart_min link-create-item';
$class_delete = 'delete_item delete_min'; $class_delete = 'delete_item';
$class_copy = 'copy_item'; $class_copy = 'copy_item';
if ($config['style'] === 'pandora_black' && is_metaconsole() === false) { if ($config['style'] === 'pandora_black' && is_metaconsole() === false) {
$class_camera .= ' invert_filter'; $class_camera .= ' invert_filter';

View File

@ -143,7 +143,9 @@ html_print_action_buttons(
var buttonback = $('#button-submit').parent().html(); var buttonback = $('#button-submit').parent().html();
$('#button-submit').hide(); $('#button-submit').hide();
var buttonback = buttonback.replace('button-submit','button-submit_copy'); var buttonback = buttonback.replace('button-submit','button-submit_copy');
$('.action_buttons_right_content').parent().html(buttonnext+buttonback); var buttonalert = $('#button-add').parent().html();
var buttonalert = buttonalert.replace('button-add','button-add_copy');
$('.action_buttons_right_content').parent().html(buttonnext+buttonback+buttonalert);
var style = $('#principal_action_buttons').attr('style'); var style = $('#principal_action_buttons').attr('style');
$('#principal_action_buttons').attr('style',style+' justify-content: unset;'); $('#principal_action_buttons').attr('style',style+' justify-content: unset;');

View File

@ -27,12 +27,23 @@
*/ */
// Header. // Header.
\ui_print_page_header( ui_print_standard_header(
__('Monitoring').' &raquo; '.__('Clusters'), __('Cluster view'),
'images/chart.png', 'images/chart.png',
false, false,
'', '',
false true,
[],
[
[
'link' => '',
'label' => __('Monitoring'),
],
[
'link' => '',
'label' => __('Clusters'),
],
]
); );
if (empty($message) === false) { if (empty($message) === false) {

View File

@ -41,11 +41,11 @@
} }
.visual-console-item.is-editing:hover { .visual-console-item.is-editing:hover {
border-color: #82b92e; border-color: #2b2b2b;
} }
.visual-console-item.is-editing.is-selected { .visual-console-item.is-editing.is-selected {
border: 2px dashed #2b2b2b; border: 2px dashed #82b92e;
cursor: move; cursor: move;
z-index: 10; z-index: 10;
} }