mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Merge remote-tracking branch 'origin/develop' into 3924-eHorus-settings
Former-commit-id: c5f4313d97cad17c9f653dc0e4bbc0d9e7e9f308
This commit is contained in:
commit
895588ebe0
@ -674,12 +674,17 @@ function update_button_palette_callback() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (values["module"] == 0) {
|
||||
var radio_value = $("input[name='radio_choice']:checked").val();
|
||||
if (values["agent"] == "" && radio_value == "module_graph") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
return false;
|
||||
}
|
||||
if (values["module"] == 0 && radio_value == "module_graph") {
|
||||
dialog_message("#message_alert_no_module");
|
||||
return false;
|
||||
}
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") {
|
||||
dialog_message("#message_alert_no_custom_graph");
|
||||
return false;
|
||||
}
|
||||
if ($("input[name=width_module_graph]").val() == "") {
|
||||
@ -1425,11 +1430,12 @@ function create_button_palette_callback() {
|
||||
|
||||
break;
|
||||
case "module_graph":
|
||||
if (values["module"] == 0) {
|
||||
var radio_value = $("input[name='radio_choice']:checked").val();
|
||||
if (values["module"] == 0 && radio_value == "module_graph") {
|
||||
dialog_message("#message_alert_no_module");
|
||||
validate = false;
|
||||
}
|
||||
if (values["id_custom_graph"] == 0) {
|
||||
if (values["id_custom_graph"] == 0 && radio_value == "module_graph") {
|
||||
if (values["agent"] == "") {
|
||||
dialog_message("#message_alert_no_agent");
|
||||
validate = false;
|
||||
@ -1439,6 +1445,10 @@ function create_button_palette_callback() {
|
||||
validate = false;
|
||||
}
|
||||
}
|
||||
if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") {
|
||||
dialog_message("#message_alert_no_custom_graph");
|
||||
validate = false;
|
||||
}
|
||||
if (
|
||||
values["height_module_graph"] == "" ||
|
||||
values["height_module_graph"] == 0
|
||||
|
@ -52,8 +52,9 @@ $table_enable->style['name'] = 'font-weight: bold';
|
||||
|
||||
// Enable eHorus.
|
||||
$row = [];
|
||||
$row['name'] = __('Enable eHorus');
|
||||
$row['name'] = ('Enable eHorus');
|
||||
$row['control'] = html_print_checkbox_switch('ehorus_enabled', 1, $config['ehorus_enabled'], true);
|
||||
$row['button'] = html_print_submit_button(('Update'), 'update_button', false, 'class="sub upd"', true);
|
||||
$table_enable->data['ehorus_enabled'] = $row;
|
||||
|
||||
// Remote config table.
|
||||
@ -139,15 +140,15 @@ if ($config['ehorus_enabled'] && !$custom_field_exists) {
|
||||
ui_print_error_message($error_message);
|
||||
}
|
||||
|
||||
echo "<form method='post'>";
|
||||
// Form enable.
|
||||
echo '<form id="form_enable" method="post">';
|
||||
echo '<div id="form_enable">';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($table_enable);
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
||||
// Form remote.
|
||||
if ($config['ehorus_enabled']) {
|
||||
echo '<form id="form_remote" method="post">';
|
||||
echo '<div id="form_remote">';
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('eHorus API').'</legend>';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
@ -156,30 +157,31 @@ if ($config['ehorus_enabled']) {
|
||||
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
|
||||
echo '</div>';
|
||||
echo '</fieldset>';
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', false);
|
||||
$('form#form_remote').hide();
|
||||
$('form#form_enable').css('margin-bottom','20px');
|
||||
if(!$('input:checkbox[name="ehorus_enabled"]').is(':checked')){
|
||||
$('#form_remote').hide();
|
||||
}
|
||||
$('#form_enable').css('margin-bottom','20px');
|
||||
var showFields = function () {
|
||||
$('form#form_remote').show();
|
||||
$('#form_remote').show();
|
||||
}
|
||||
var hideFields = function () {
|
||||
$('form#form_remote').hide();
|
||||
$('#form_remote').hide();
|
||||
}
|
||||
var handleEnable = function (event) {
|
||||
var is_checked = $('input:checkbox[name="ehorus_enabled"]').is(':checked');
|
||||
if (event.target.value == '1' && is_checked) {
|
||||
showFields();
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', false);
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', true);
|
||||
}
|
||||
else {
|
||||
hideFields();
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', true);
|
||||
$('input:checkbox[name="ehorus_enabled"]').attr('checked', false);
|
||||
};
|
||||
}
|
||||
$('input:checkbox[name="ehorus_enabled"]').change(handleEnable);
|
||||
|
@ -742,7 +742,7 @@ class HostDevices extends Wizard
|
||||
|
||||
echo '<div class="white_box">
|
||||
<div class="edit_discovery_info" style="margin-bottom: 15px;">
|
||||
<div style="width: 25%; padding: 9px;">'.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close'), 'style' => 'width: 60%;'], false).'</div>'.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'.'</div>
|
||||
<div style="width: 25%; padding: 9px;">'.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>'.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'.'</div>
|
||||
|
||||
<div style="width: 40%; padding-left: 5%; padding-right: 12%;">
|
||||
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'.'</div>'.'<div style="width: 35%;">'.$group_select.'</div>'.'</div>'.'<div class="edit_discovery_info">
|
||||
|
@ -443,7 +443,7 @@ class CustomNetScan extends Wizard
|
||||
'name' => 'taskname',
|
||||
'value' => $this->task['name'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
'size' => 50,
|
||||
],
|
||||
];
|
||||
|
||||
@ -465,7 +465,7 @@ class CustomNetScan extends Wizard
|
||||
'name' => 'comment',
|
||||
'value' => $this->task['description'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
'size' => 50,
|
||||
],
|
||||
];
|
||||
|
||||
@ -652,7 +652,7 @@ class CustomNetScan extends Wizard
|
||||
'value' => $explanation,
|
||||
'return' => true,
|
||||
'attributes' => 'style="width: 388px;"',
|
||||
'class' => 'discovery_textarea_input'
|
||||
'class' => 'discovery_textarea_input',
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -1386,6 +1386,10 @@ function visual_map_editor_print_hack_translate_strings()
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('Could not be save.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;font-weight: bold;'>".__('No custom graph defined.').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -162,7 +162,7 @@ span.breadcrumb_link {
|
||||
|
||||
.edit_discovery_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
@ -181,28 +181,18 @@ span.breadcrumb_link {
|
||||
|
||||
label {
|
||||
color: #343434 !important;
|
||||
font-size: 1.5em;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-weight: bold;
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
|
||||
.discovery_full_width_input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
select {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.6em !important;
|
||||
color: #686868;
|
||||
}
|
||||
|
||||
select > option {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1em !important;
|
||||
}
|
||||
|
||||
li > input[type=text], li > input[type=password], .discovery_text_input > input[type=password], .discovery_text_input > input[type=text], #interval_manual > input[type=text] {
|
||||
li > input[type="text"],
|
||||
li > input[type="password"],
|
||||
.discovery_text_input > input[type="password"],
|
||||
.discovery_text_input > input[type="text"],
|
||||
#interval_manual > input[type="text"] {
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
border-radius: 0 !important;
|
||||
@ -210,34 +200,22 @@ li > input[type=text], li > input[type=password], .discovery_text_input > input[
|
||||
padding: 0px 0px 2px 0px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 4px;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_input > input[type=password]:focus, .discovery_text_input > input[type=text]:focus, #interval_manual > input[type=text]:focus {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#interval_manual > input[type=text] {
|
||||
#interval_manual > input[type="text"] {
|
||||
width: 50px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.discovery_list_input {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.6em !important;
|
||||
color: #686868;
|
||||
width: 100%;
|
||||
height: 240px;
|
||||
border: 1px solid #CBCBCB;
|
||||
border: 1px solid #cbcbcb;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.discovery_list_input option {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.1em !important;
|
||||
padding-left: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.discovery_list_input option:checked {
|
||||
@ -256,8 +234,6 @@ li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_in
|
||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
box-sizing: border-box;
|
||||
resize: none;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
||||
font-size: 1.4em !important;
|
||||
}
|
||||
|
||||
a.tip {
|
||||
|
@ -6,7 +6,8 @@ ul.wizard {
|
||||
}
|
||||
|
||||
ul.wizard li {
|
||||
padding: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
ul.wizard li > label:not(.p-switch) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user