fixed styles
This commit is contained in:
parent
1ac37dd538
commit
95834b2de7
|
@ -57,14 +57,33 @@ if ($id_field) {
|
|||
$combo_values = $field['combo_values'] ? $field['combo_values'] : '';
|
||||
$is_combo_enable = $config['is_combo_enable'];
|
||||
$is_link_enabled = $field['is_link_enabled'];
|
||||
ui_print_page_header(__('Update agent custom field'), 'images/custom_field.png', false, '', true, '');
|
||||
$header_title = __('Update agent custom field');
|
||||
} else {
|
||||
ui_print_page_header(__('Create agent custom field'), 'images/custom_field.png', false, '', true, '');
|
||||
$header_title = __('Create agent custom field');
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->class = 'databox';
|
||||
$table->id = 'configure_field';
|
||||
ui_print_standard_header(
|
||||
$header_title,
|
||||
'images/custom_field.png',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
[],
|
||||
[
|
||||
[
|
||||
'link' => 'index.php?sec=gagente&sec2=godmode/agentes/fields_manager',
|
||||
'label' => __('Resources'),
|
||||
],
|
||||
[
|
||||
'link' => 'index.php?sec=gagente&sec2=godmode/agentes/fields_manager',
|
||||
'label' => __('Custom field'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Edit'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
echo "<div id='message_set_password' title='".__('Agent Custom Fields Information')."' class='invisible'>";
|
||||
echo "<p class='center bolder'>".__('You cannot set the Password type until you clear the combo values and click on update button.').'</p>';
|
||||
|
@ -82,80 +101,96 @@ echo "<div id='message_no_set_combo' title='".__('Agent Custom Fields Informati
|
|||
echo "<p class='center bolder'>".__('If you select Passord type the Enabled combo will be disabled.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->class = 'databox filter-table-adv';
|
||||
$table->id = 'configure_field';
|
||||
$table->width = '100%';
|
||||
$table->size = [];
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '50%';
|
||||
|
||||
$table->data = [];
|
||||
|
||||
$table->data[0][0] = __('Name');
|
||||
$table->data[1][0] = html_print_input_text(
|
||||
'name',
|
||||
$name,
|
||||
'',
|
||||
35,
|
||||
100,
|
||||
true
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Name'),
|
||||
html_print_input_text(
|
||||
'name',
|
||||
$name,
|
||||
'',
|
||||
35,
|
||||
100,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Pass type').ui_print_help_tip(
|
||||
__('The fields with pass type enabled will be displayed like html input type pass in html'),
|
||||
true
|
||||
);
|
||||
$table->data[2][1] = __('Display on front').ui_print_help_tip(
|
||||
__('The fields with display on front enabled will be displayed into the agent details'),
|
||||
true
|
||||
);
|
||||
$table->data[2][2] = __('Link type');
|
||||
|
||||
$table->data[3][0] = html_print_checkbox_switch(
|
||||
'is_password_type',
|
||||
1,
|
||||
$is_password_type,
|
||||
true
|
||||
);
|
||||
$table->data[3][1] = html_print_checkbox_switch(
|
||||
'display_on_front',
|
||||
1,
|
||||
$display_on_front,
|
||||
true
|
||||
);
|
||||
$table->data[3][2] = html_print_checkbox_switch_extended(
|
||||
'is_link_enabled',
|
||||
1,
|
||||
$is_link_enabled,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
);
|
||||
$table->data[4][0] = __('Enabled combo');
|
||||
$table->data[5][0] = html_print_checkbox_switch_extended(
|
||||
'is_combo_enable',
|
||||
0,
|
||||
$config['is_combo_enable'],
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Display on front').ui_print_help_tip(
|
||||
__('The fields with display on front enabled will be displayed into the agent details'),
|
||||
true
|
||||
),
|
||||
html_print_checkbox_switch(
|
||||
'display_on_front',
|
||||
1,
|
||||
$display_on_front,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$table->cellstyle[4][1] = 'display: none;';
|
||||
$table->cellstyle[5][1] = 'display: none;';
|
||||
|
||||
$table->data[4][1] = __('Combo values').ui_print_help_tip(
|
||||
__('Set values separated by comma'),
|
||||
true
|
||||
);
|
||||
$table->data[5][1] = html_print_textarea(
|
||||
'combo_values',
|
||||
3,
|
||||
65,
|
||||
io_safe_output($combo_values),
|
||||
'',
|
||||
true
|
||||
$table->data[1][0] = html_print_label_input_block(
|
||||
__('Link type'),
|
||||
html_print_checkbox_switch_extended(
|
||||
'is_link_enabled',
|
||||
1,
|
||||
$is_link_enabled,
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = html_print_label_input_block(
|
||||
__('Pass type').ui_print_help_tip(
|
||||
__('The fields with pass type enabled will be displayed like html input type pass in html'),
|
||||
true
|
||||
),
|
||||
html_print_checkbox_switch(
|
||||
'is_password_type',
|
||||
1,
|
||||
$is_password_type,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Enabled combo'),
|
||||
html_print_checkbox_switch_extended(
|
||||
'is_combo_enable',
|
||||
0,
|
||||
$config['is_combo_enable'],
|
||||
false,
|
||||
'',
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][0] = html_print_label_input_block(
|
||||
__('Combo values').ui_print_help_tip(
|
||||
__('Set values separated by comma'),
|
||||
true
|
||||
),
|
||||
html_print_textarea(
|
||||
'combo_values',
|
||||
3,
|
||||
65,
|
||||
io_safe_output($combo_values),
|
||||
'',
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
echo '<form class="max_floating_element_size" name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
|
||||
html_print_table($table);
|
||||
|
||||
if ($id_field > 0) {
|
||||
|
@ -194,65 +229,65 @@ echo '</form>';
|
|||
<script>
|
||||
$(document).ready (function () {
|
||||
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);
|
||||
$('#configure_field-4').show();
|
||||
$('#configure_field-3').show();
|
||||
|
||||
$('input[type=checkbox][name=is_password_type]').change(function (e) {
|
||||
dialog_message("#message_set_password");
|
||||
$('input[type=checkbox][name=is_password_type]').prop('checked', false);
|
||||
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
|
||||
$('#configure_field-4').show();
|
||||
$('#configure_field-3').show();
|
||||
e.preventDefault();
|
||||
});
|
||||
$('input[type=checkbox][name=is_combo_enable]').change(function (e) {
|
||||
if($('#textarea_combo_values').val() != '' && $('input[type=checkbox][name=is_combo_enable]').prop('checked', true)){
|
||||
dialog_message("#message_set_combo");
|
||||
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
|
||||
$('#configure_field-4').show();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('input[type=checkbox][name=is_combo_enable]').change(function (e) {
|
||||
if($('#textarea_combo_values').val() != '' && $('input[type=checkbox][name=is_combo_enable]').prop('checked', true)){
|
||||
dialog_message("#message_set_combo");
|
||||
$('input[type=checkbox][name=is_combo_enable]').prop('checked', true);
|
||||
$('#configure_field-3').show();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('entra');
|
||||
$('#configure_field-3').hide();
|
||||
}
|
||||
|
||||
if ($('input[type=checkbox][name=is_link_enabled]').is(":checked") === true) {
|
||||
$('#configure_field-1').hide();
|
||||
$('#configure_field-3').hide();
|
||||
$('#configure_field-2').hide();
|
||||
} else {
|
||||
$('#configure_field-1').show();
|
||||
$('#configure_field-3').show();
|
||||
$('#configure_field-2').show();
|
||||
}
|
||||
|
||||
$('input[type=checkbox][name=is_link_enabled]').change(function () {
|
||||
if( $(this).is(":checked") ){
|
||||
$('#configure_field-1').hide();
|
||||
$('#configure_field-2').hide();
|
||||
$('#configure_field-3').hide();
|
||||
} else{
|
||||
$('#configure_field-1').show();
|
||||
$('#configure_field-2').show();
|
||||
$('#configure_field-3').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type=checkbox][name=is_combo_enable]').change(function () {
|
||||
if( $(this).is(":checked") ){
|
||||
$('#configure_field-4').show();
|
||||
$('#configure_field-3').show();
|
||||
dialog_message("#message_no_set_password");
|
||||
$('#configure_field-1').hide();
|
||||
$('#configure_field-5').hide();
|
||||
}
|
||||
else{
|
||||
$('#configure_field-4').hide();
|
||||
$('#configure_field-3').hide();
|
||||
$('#configure_field-1').show();
|
||||
$('#configure_field-5').show();
|
||||
}
|
||||
});
|
||||
$('input[type=checkbox][name=is_password_type]').change(function () {
|
||||
if( $(this).is(":checked")){
|
||||
dialog_message("#message_no_set_combo");
|
||||
$('#configure_field-3').hide();
|
||||
$('#configure_field-5').hide();
|
||||
}
|
||||
else{
|
||||
$('#configure_field-3').show();
|
||||
$('#configure_field-5').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -704,6 +704,19 @@ if ($step == 2) {
|
|||
)
|
||||
);
|
||||
|
||||
$usr_groups = implode(
|
||||
',',
|
||||
array_keys(users_get_groups($config['id_user'], 'LM', true))
|
||||
);
|
||||
|
||||
$sql_query = sprintf(
|
||||
'SELECT id, name
|
||||
FROM talert_actions
|
||||
WHERE id_group IN (%s)
|
||||
ORDER BY name',
|
||||
$usr_groups
|
||||
);
|
||||
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Default action').ui_print_help_tip(
|
||||
__('Unless they\'re left blank, the fields from the action will override those set on the template.'),
|
||||
|
@ -801,19 +814,6 @@ if ($step == 2) {
|
|||
)
|
||||
);
|
||||
|
||||
$usr_groups = implode(
|
||||
',',
|
||||
array_keys(users_get_groups($config['id_user'], 'LM', true))
|
||||
);
|
||||
|
||||
$sql_query = sprintf(
|
||||
'SELECT id, name
|
||||
FROM talert_actions
|
||||
WHERE id_group IN (%s)
|
||||
ORDER BY name',
|
||||
$usr_groups
|
||||
);
|
||||
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
__('Condition type'),
|
||||
html_print_select(
|
||||
|
|
|
@ -445,7 +445,7 @@ if ($is_management_allowed === true
|
|||
if ($aviable_name === true) {
|
||||
$values = [
|
||||
'nombre' => $name,
|
||||
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
|
||||
'icon' => $icon,
|
||||
'parent' => $id_parent,
|
||||
'disabled' => $alerts_disabled,
|
||||
'custom_id' => $custom_id,
|
||||
|
@ -513,7 +513,7 @@ if ($is_management_allowed === true && $update_group === true) {
|
|||
if ($aviable_name === true) {
|
||||
$values = [
|
||||
'nombre' => $name,
|
||||
'icon' => empty($icon) ? '' : substr($icon, 0, -4),
|
||||
'icon' => $icon,
|
||||
'parent' => ($id_parent == -1) ? 0 : $id_parent,
|
||||
'disabled' => !$alerts_enabled,
|
||||
'custom_id' => $custom_id,
|
||||
|
@ -741,12 +741,11 @@ if ($is_management_allowed === true
|
|||
|
||||
// Credential store is loaded previously in this document to avoid
|
||||
// process group tree - list forms.
|
||||
ui_print_spinner(__('Loading'));
|
||||
if ($tab == 'tree') {
|
||||
/*
|
||||
* Group tree view.
|
||||
*/
|
||||
|
||||
ui_print_spinner(__('Loading'));
|
||||
echo "<div id='tree-controller-recipient'></div>";
|
||||
} else {
|
||||
/*
|
||||
|
@ -986,7 +985,7 @@ if ($tab == 'tree') {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
} else {
|
||||
ui_print_info_message(
|
||||
|
@ -1038,6 +1037,7 @@ $tab = 'group_edition';
|
|||
|
||||
<script type="text/javascript">
|
||||
var treeController = TreeController.getController();
|
||||
treeController.meta = <?php echo (is_metaconsole() === true) ? 1 : 0; ?>;
|
||||
|
||||
if (typeof treeController.recipient != 'undefined' && treeController.recipient.length > 0)
|
||||
treeController.recipient.empty();
|
||||
|
|
|
@ -297,7 +297,7 @@ if (!empty($table->data)) {
|
|||
html_print_input_hidden('multiple_delete', 1);
|
||||
ui_pagination($count_network_templates, false, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, '');
|
||||
echo "<div class='pdd_l_5px right'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</div>';
|
||||
|
|
|
@ -445,7 +445,7 @@ if (!empty($graphs)) {
|
|||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table($table);
|
||||
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, '');
|
||||
echo "<div class='right'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</form>';
|
||||
|
|
|
@ -146,17 +146,41 @@ foreach ($osList as $os) {
|
|||
$table->data[] = $data;
|
||||
}
|
||||
|
||||
$tablePagination = '';
|
||||
if (isset($data) === true) {
|
||||
html_print_table($table);
|
||||
ui_pagination($count_osList, ui_get_url_refresh(['message' => false]), $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
$tablePagination = ui_pagination(
|
||||
$count_osList,
|
||||
ui_get_url_refresh(['message' => false]),
|
||||
$offset,
|
||||
0,
|
||||
true,
|
||||
'offset',
|
||||
false,
|
||||
''
|
||||
);
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]);
|
||||
}
|
||||
|
||||
$buttons = '';
|
||||
if (is_metaconsole() === true) {
|
||||
echo '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">';
|
||||
echo "<div style='text-align:right;width:".$table->width."'>";
|
||||
html_print_submit_button(__('Create OS'), '', false, 'class="sub next"');
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
$buttons .= '<form method="post" action="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&tab2=builder">';
|
||||
$buttons .= html_print_submit_button(
|
||||
__('Create OS'),
|
||||
'',
|
||||
false,
|
||||
['icon' => 'next'],
|
||||
true
|
||||
);
|
||||
$buttons .= '</form>';
|
||||
}
|
||||
|
||||
html_print_action_buttons(
|
||||
$buttons,
|
||||
[
|
||||
'type' => 'data_table',
|
||||
'class' => 'fixed_action_buttons',
|
||||
'right_content' => $tablePagination,
|
||||
]
|
||||
);
|
||||
|
|
|
@ -393,6 +393,7 @@ if ($create_user === true) {
|
|||
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
|
||||
$values['default_custom_view'] = (int) get_parameter('default_custom_view');
|
||||
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh', 0);
|
||||
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
|
||||
$dashboard = get_parameter('dashboard', '');
|
||||
$visual_console = get_parameter('visual_console', '');
|
||||
|
||||
|
|
|
@ -1390,7 +1390,7 @@ if (check_login()) {
|
|||
false,
|
||||
'offset',
|
||||
true,
|
||||
'pagination-bottom',
|
||||
'',
|
||||
'pagination_list_modules(offset_param)',
|
||||
[
|
||||
'count' => '',
|
||||
|
|
|
@ -652,10 +652,15 @@ var TreeController = {
|
|||
typeof element.icon != "undefined" &&
|
||||
element.icon.length > 0
|
||||
) {
|
||||
console.log("a");
|
||||
console.log(controller);
|
||||
$content.append(
|
||||
'<div class="node-icon"><div class="node-icon-container"><img src="' +
|
||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||
"images/" +
|
||||
(treeController.meta != undefined &&
|
||||
treeController.meta == 1
|
||||
? "../../images/"
|
||||
: "images/") +
|
||||
element.icon +
|
||||
'" class="invert_filter"/></div></div>'
|
||||
);
|
||||
|
@ -679,7 +684,10 @@ var TreeController = {
|
|||
var $deleteBtn = $(
|
||||
'<a style="float: right; margin-top: 5px;"><img src="' +
|
||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||
'images/delete.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/></a>'
|
||||
(controller.meta != undefined && controller.meta == 1
|
||||
? "../../images/"
|
||||
: "images/") +
|
||||
'delete.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/></a>'
|
||||
);
|
||||
$deleteBtn.click(function(event) {
|
||||
var ok_function = function() {
|
||||
|
@ -703,7 +711,10 @@ var TreeController = {
|
|||
var $updateicon = $(
|
||||
'<img src="' +
|
||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||
'images/edit.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/>'
|
||||
(controller.meta != undefined && controller.meta == 1
|
||||
? "../../images/"
|
||||
: "images/") +
|
||||
'edit.svg" class="main_menu_icon invert_filter" style="width:18px; padding: 0 5px;"/>'
|
||||
);
|
||||
var $updatebtn = $(
|
||||
'<a style="float: right; margin-top: 5px;" href = "' +
|
||||
|
|
|
@ -530,15 +530,6 @@ ul li {
|
|||
width: 35px;
|
||||
}
|
||||
|
||||
/* Menu height: 601px, 720px, 735px */
|
||||
@media screen and (max-height: 750px) {
|
||||
.menu li,
|
||||
.menu li a,
|
||||
.menu li div {
|
||||
min-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-height: 750px) {
|
||||
.operation {
|
||||
padding-top: 10px;
|
||||
|
|
|
@ -791,7 +791,7 @@ function print_table(
|
|||
html_print_table($table);
|
||||
|
||||
if (count($selected_interfaces) > $config['block_size']) {
|
||||
ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, 'pagination-bottom');
|
||||
ui_pagination(count($selected_interfaces), false, $pagination_index, 0, false, 'offset', true, '');
|
||||
}
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No search parameters')]);
|
||||
|
|
|
@ -643,7 +643,7 @@ if (empty($table->data) === true) {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ if (empty($dashboards) === true) {
|
|||
true,
|
||||
'offset',
|
||||
false,
|
||||
'pagination-bottom'
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue