Merge remote-tracking branch 'origin/develop' into 3545-8250-7558-7882-monitorizar-servicios-de-azure

This commit is contained in:
fbsanchez 2019-07-09 17:28:14 +02:00
commit cab4a6dc03
19 changed files with 583 additions and 131 deletions

View File

@ -0,0 +1,164 @@
<html>
<head>
<style>
#alert_messages_na{
z-index:2;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
width:650px;
height: 400px;
background:white;
background-image:url('images/imagen-no-acceso.jpg');
background-repeat:no-repeat;
justify-content: center;
display: flex;
flex-direction: column;
box-shadow:4px 5px 10px 3px rgba(0, 0, 0, 0.4);
}
.modalheade{
text-align:center;
width:100%;
position:absolute;
top:0;
}
.modalheadertex{
color:#000;
font-family:Nunito;
line-height: 40px;
font-size: 23pt;
margin-bottom:30px;
}
.modalclose{
cursor:pointer;
display:inline;
float:right;
margin-right:10px;
margin-top:10px;
}
.modalconten{
color:black;
width:300px;
margin-left: 30px;
}
.modalcontenttex{
text-align:left;
color:black;
font-size: 11pt;
line-height:13pt;
margin-bottom:30px;
}
.modalokbutto{
cursor:pointer;
text-align:center;
display: inline-block;
padding: 6px 45px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-color:white;
border: 1px solid #82b92e;
}
.modalokbuttontex{
color:#82b92e;
font-family:Nunito;
font-size:13pt;
}
.modalgobutto{
cursor:pointer;
text-align:center;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background-color:white;
border: 1px solid #82b92e;
}
.modalgobuttontex{
color:#82b92e;
font-family:Nunito;
font-size:10pt;
}
#opacidad{
position:fixed;
background:black;
opacity:0.6;
z-index:-1;
left:0px;
top:0px;
width:100%;
height:100%;
}
/*
.textodialog{
margin-left: 0px;
color:#333;
padding:20px;
font-size:9pt;
}
.cargatextodialog{
max-width:58.5%;
width:58.5%;
min-width:58.5%;
float:left;
margin-left: 0px;
font-size:18pt;
padding:20px;
text-align:center;
}
.cargatextodialog p, .cargatextodialog b, .cargatextodialog a{
font-size:18pt;
}
*/
</style>
</head>
<body>
<div id="alert_messages_na">
<div class='modalheade'>
<img class='modalclose cerrar' src='<?php echo $config['homeurl']; ?>images/input_cross.png'>
</div>
<div class='modalconten'>
<div class='modalheadertex'>
<?php echo __("You don't have access to this page"); ?>
</div>
<div class='modalcontenttex'>
<?php
echo __('Access to this page is restricted to authorized users SAML only, please contact system administrator if you need assistance.');
echo '<br/> <br/>';
echo __('Please make sure you have SAML authentication properly configured. For more information the error to access this page are recorded in security logs of %s System Database', get_product_name());
?>
</div>
<div class='modalokbutto cerrar'>
<span class='modalokbuttontex'>OK</span>
</div>
</div>
</div>
<div id="opacidad"></div>
</body>
</html>
<script>
$(".cerrar").click(function(){
window.location=".";
});
$('div#page').css('background-color','#d3d3d3');
</script>

View File

@ -1276,19 +1276,11 @@ if ($update_module || $create_module) {
$m_hide = $m['hide'];
}
if ($update_module) {
if ($m_hide == '1') {
$macros[$k]['value'] = io_input_password(get_parameter($m['macro'], ''));
} else {
$macros[$k]['value'] = get_parameter($m['macro'], '');
}
} else {
if ($m_hide == '1') {
$macros[$k]['value'] = io_input_password($macros_names[$k]);
} else {
$macros[$k]['value'] = $macros_names[$k];
}
}
}
$macros = io_json_mb_encode($macros);

View File

@ -1,17 +1,32 @@
<?php
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
*
* @category Network components Plugins
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation for version 2.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Load global variables
global $config;
check_login();
@ -29,7 +44,7 @@ $data[1] = html_print_select_from_sql(
false,
false
);
// Store the macros in base64 into a hidden control to move between pages
// Store the macros in base64 into a hidden control to move between pages.
$data[1] .= html_print_input_hidden('macros', base64_encode($macros), true);
$data[2] = __('Post process');
$data[3] = html_print_extended_select_for_post_process(
@ -46,7 +61,7 @@ $data[3] = html_print_extended_select_for_post_process(
push_table_row($data, 'plugin_1');
// A hidden "model row" to clone it from javascript to add fields dynamicly
// A hidden "model row" to clone it from javascript to add fields dynamicly.
$data = [];
$data[0] = 'macro_desc';
$data[0] .= ui_print_help_tip('macro_help', true);
@ -56,7 +71,7 @@ $table->rowstyle['macro_field'] = 'display:none';
push_table_row($data, 'macro_field');
// If there are $macros, we create the form fields
// If there are $macros, we create the form fields.
if (!empty($macros)) {
$macros = json_decode($macros, true);
@ -68,9 +83,23 @@ if (!empty($macros)) {
}
if ($m['hide'] == 1) {
$data[1] = html_print_input_text($m['macro'], $m['value'], '', 100, 1024, true);
$data[1] = html_print_input_text(
$m['macro'],
io_output_password($m['value']),
'',
100,
1024,
true
);
} else {
$data[1] = html_print_input_text($m['macro'], io_output_password($m['value']), '', 100, 1024, true);
$data[1] = html_print_input_text(
$m['macro'],
$m['value'],
'',
100,
1024,
true
);
}
$table->colspan['macro'.$m['macro']][1] = 3;

View File

@ -159,6 +159,16 @@ $table_styles->data[$row][1] = html_print_select(
$table_styles->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'status_set_preview', false, '', 'class="sub camera logo_preview"', true);
$row++;
// Divs to show icon status Colours (Default)
$icon_unknown_ball = ui_print_status_image(STATUS_AGENT_UNKNOWN_BALL, '', true);
$icon_unknown = ui_print_status_image(STATUS_AGENT_UNKNOWN, '', true);
$icon_ok_ball = ui_print_status_image(STATUS_AGENT_OK_BALL, '', true);
$icon_ok = ui_print_status_image(STATUS_AGENT_OK, '', true);
$icon_warning_ball = ui_print_status_image(STATUS_AGENT_WARNING_BALL, '', true);
$icon_warning = ui_print_status_image(STATUS_AGENT_WARNING, '', true);
$icon_bad_ball = ui_print_status_image(STATUS_AGENT_CRITICAL_BALL, '', true);
$icon_bad = ui_print_status_image(STATUS_AGENT_CRITICAL, '', true);
// End - Divs to show icon status Colours (Default)
$table_styles->data[$row][0] = __('Login background').ui_print_help_tip(__('You can place your custom images into the folder images/backgrounds/'), true);
$backgrounds_list_jpg = list_files('images/backgrounds', 'jpg', 1, 0);
$backgrounds_list_gif = list_files('images/backgrounds', 'gif', 1, 0);
@ -1635,6 +1645,17 @@ $("#button-status_set_preview").click (function (e) {
$icon_bad_ball = $("<img src=\"" + icon_path + "agent_critical_ball.png\">");
$icon_bad = $("<img src=\"" + icon_path + "agent_critical.png\">");
if(icon_dir == 'default'){
$icon_unknown_ball = '<?php echo $icon_unknown_ball; ?>';
$icon_unknown = '<?php echo $icon_unknown; ?>';
$icon_ok_ball = '<?php echo $icon_ok_ball; ?>';
$icon_ok = '<?php echo $icon_ok; ?>';
$icon_warning_ball = '<?php echo $icon_warning_ball; ?>';
$icon_warning = '<?php echo $icon_warning; ?>';
$icon_bad_ball = '<?php echo $icon_bad_ball; ?>';
$icon_bad = '<?php echo $icon_bad; ?>';
}
try {
$dialog
.hide()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

View File

@ -1011,7 +1011,7 @@ if (check_login()) {
$title
);
$data[5] = ui_print_module_status($module['estado'], $title, true, false, true);
$data[5] = ui_print_status_image($status, $title, true);
if (!$show_context_help_first_time) {
$show_context_help_first_time = true;

View File

@ -527,14 +527,6 @@ define('NODE_MODULE', 1);
define('NODE_PANDORA', 2);
define('NODE_GENERIC', 3);
// SAML attributes constants.
define('SAML_ROLE_AND_TAG', 'eduPersonEntitlement');
define('SAML_USER_DESC', 'commonName');
define('SAML_ID_USER_IN_PANDORA', 'eduPersonTargetedId');
define('SAML_GROUP_IN_PANDORA', 'schacHomeOrganization');
define('SAML_MAIL_IN_PANDORA', 'mail');
define('SAML_DEFAULT_PROFILES_AND_TAGS_FORM', 'urn:mace:rediris.es:entitlement:monitoring:');
// Other constants.
define('STATUS_OK', 0);
define('STATUS_ERROR', 1);

View File

@ -652,6 +652,42 @@ function config_update_config()
$error_update[] = __('Saml path');
}
if (!config_update_value('saml_source', get_parameter('saml_source'))) {
$error_update[] = __('Saml source');
}
if (!config_update_value('saml_user_id', get_parameter('saml_user_id'))) {
$error_update[] = __('Saml user id parameter');
}
if (!config_update_value('saml_mail', get_parameter('saml_mail'))) {
$error_update[] = __('Saml mail parameter');
}
if (!config_update_value('saml_group_name', get_parameter('saml_group_name'))) {
$error_update[] = __('Saml group name parameter');
}
if (!config_update_value('saml_attr_type', (bool) get_parameter('saml_attr_type'))) {
$error_update[] = __('Saml attr type parameter');
}
if (!config_update_value('saml_profiles_and_tags', get_parameter('saml_profiles_and_tags'))) {
$error_update[] = __('Saml profiles and tags parameter');
}
if (!config_update_value('saml_profile', get_parameter('saml_profile'))) {
$error_update[] = __('Saml profile parameters');
}
if (!config_update_value('saml_tag', get_parameter('saml_tag'))) {
$error_update[] = __('Saml tag parameter');
}
if (!config_update_value('saml_profile_tag_separator', get_parameter('saml_profile_tag_separator'))) {
$error_update[] = __('Saml profile and tag separator');
}
if (!config_update_value('double_auth_enabled', get_parameter('double_auth_enabled'))) {
$error_update[] = __('Double authentication');
}
@ -2364,6 +2400,42 @@ function config_process_config()
config_update_value('saml_path', '/opt/');
}
if (!isset($config['saml_source'])) {
config_update_value('saml_source', '');
}
if (!isset($config['saml_user_id'])) {
config_update_value('saml_user_id', '');
}
if (!isset($config['saml_mail'])) {
config_update_value('saml_mail', '');
}
if (!isset($config['saml_group_name'])) {
config_update_value('saml_group_name', '');
}
if (!isset($config['saml_attr_type'])) {
config_update_value('saml_attr_type', false);
}
if (!isset($config['saml_profiles_and_tags'])) {
config_update_value('saml_profiles_and_tags', '');
}
if (!isset($config['saml_profile'])) {
config_update_value('saml_profile', '');
}
if (!isset($config['saml_tag'])) {
config_update_value('saml_tag', '');
}
if (!isset($config['saml_profile_tag_separator'])) {
config_update_value('saml_profile_tag_separator', '');
}
if (!isset($config['autoupdate'])) {
config_update_value('autoupdate', 1);
}

View File

@ -2308,32 +2308,67 @@ function modules_get_color_status($status)
return COL_UNKNOWN;
}
switch ($status) {
case AGENT_MODULE_STATUS_NORMAL:
case AGENT_STATUS_NORMAL:
switch ((string) $status) {
case (string) AGENT_MODULE_STATUS_NORMAL:
case (string) AGENT_STATUS_NORMAL:
case STATUS_MODULE_OK:
case STATUS_AGENT_OK:
case STATUS_ALERT_NOT_FIRED:
case STATUS_SERVER_OK:
case STATUS_MODULE_OK_BALL:
case STATUS_AGENT_OK_BALL:
case STATUS_ALERT_NOT_FIRED_BALL:
return COL_NORMAL;
case AGENT_MODULE_STATUS_NOT_INIT:
case AGENT_STATUS_NOT_INIT:
case STATUS_MODULE_NO_DATA:
case STATUS_AGENT_NOT_INIT:
case STATUS_AGENT_NO_DATA:
case STATUS_MODULE_NO_DATA_BALL:
case STATUS_AGENT_NO_DATA_BALL:
case STATUS_AGENT_NO_MONITORS_BALL:
return COL_NOTINIT;
case AGENT_MODULE_STATUS_CRITICAL_BAD:
case AGENT_STATUS_CRITICAL:
case STATUS_MODULE_CRITICAL:
case STATUS_AGENT_CRITICAL:
case STATUS_MODULE_CRITICAL_BALL:
case STATUS_AGENT_CRITICAL_BALL:
return COL_CRITICAL;
case AGENT_MODULE_STATUS_WARNING:
case AGENT_STATUS_WARNING:
case STATUS_MODULE_WARNING:
case STATUS_AGENT_WARNING:
case STATUS_MODULE_WARNING_BALL:
case STATUS_AGENT_WARNING_BALL:
return COL_WARNING;
case AGENT_MODULE_STATUS_CRITICAL_ALERT:
case AGENT_MODULE_STATUS_WARNING_ALERT:
case AGENT_STATUS_ALERT_FIRED:
case STATUS_ALERT_FIRED:
case STATUS_ALERT_FIRED_BALL:
return COL_ALERTFIRED;
case AGENT_MODULE_STATUS_UNKNOWN:
case AGENT_STATUS_UNKNOWN:
case STATUS_MODULE_UNKNOWN:
case STATUS_AGENT_UNKNOWN:
case STATUS_AGENT_DOWN:
case STATUS_ALERT_DISABLED:
case STATUS_MODULE_UNKNOWN_BALL:
case STATUS_AGENT_UNKNOWN_BALL:
case STATUS_AGENT_DOWN_BALL:
case STATUS_ALERT_DISABLED_BALL:
return COL_UNKNOWN;
case STATUS_SERVER_DOWN:
case STATUS_SERVER_DOWN_BALL:
return '#444';
default:
// Ignored.
break;

View File

@ -2603,7 +2603,7 @@ function ui_get_status_images_path()
* @param boolean $return Whether to return an output string or echo now (optional, echo by default).
* @param array $options Options to set image attributes: I.E.: style.
* @param string $path Path of the image, if not provided use the status path.
* @param boolean $rounded_image Round.
* @param boolean $image_with_css Don't use an image. Draw an image with css styles.
*
* @return string HTML code if return parameter is true.
*/
@ -2613,37 +2613,8 @@ function ui_print_status_image(
$return=false,
$options=false,
$path=false,
$rounded_image=false
$image_with_css=false
) {
// This is for the List of Modules in Agent View.
if ($rounded_image === true) {
switch ($type) {
case 'module_ok.png':
$type = 'module_ok_rounded.png';
break;
case 'module_critical.png':
$type = 'module_critical_rounded.png';
break;
case 'module_warning.png':
$type = 'module_warning_rounded.png';
break;
case 'module_no_data.png':
$type = 'module_no_data_rounded.png';
break;
case 'module_unknown.png':
$type = 'module_unknown_rounded.png';
break;
default:
$type = $type;
break;
}
}
if ($path === false) {
$imagepath_array = ui_get_status_images_path();
$imagepath = $imagepath_array[0];
@ -2651,8 +2622,16 @@ function ui_print_status_image(
$imagepath = $path;
}
if ($imagepath == 'images/status_sets/default') {
$image_with_css = true;
}
$imagepath .= '/'.$type;
if ($image_with_css === true) {
$shape_status = get_shape_status_set($type);
return ui_print_status_sets($type, $title, $return, $shape_status);
} else {
if ($options === false) {
$options = [];
}
@ -2661,6 +2640,77 @@ function ui_print_status_image(
return html_print_image($imagepath, $return, $options, false, false, false, true);
}
}
/**
* Get the shape of an image by assigning it a CSS class. Prints an image with CSS representing a status.
*
* @param string $type Module/Agent/Alert status.
*
* @return array With CSS class.
*/
function get_shape_status_set($type)
{
switch ($type) {
// Small rectangles.
case STATUS_ALERT_NOT_FIRED:
case STATUS_ALERT_FIRED:
case STATUS_ALERT_DISABLED:
$return = ['class' => 'status_small_rectangles'];
break;
// Rounded rectangles.
case STATUS_MODULE_OK:
case STATUS_AGENT_OK:
case STATUS_MODULE_NO_DATA:
case STATUS_AGENT_NO_DATA:
case STATUS_MODULE_CRITICAL:
case STATUS_AGENT_CRITICAL:
case STATUS_MODULE_WARNING:
case STATUS_AGENT_WARNING:
case STATUS_MODULE_UNKNOWN:
case STATUS_AGENT_UNKNOWN:
case STATUS_AGENT_DOWN:
$return = ['class' => 'status_rounded_rectangles'];
break;
// Small squares.
case STATUS_SERVER_OK:
case STATUS_SERVER_DOWN:
$return = ['class' => 'status_small_squares'];
break;
// Balls.
case STATUS_AGENT_CRITICAL_BALL:
case STATUS_AGENT_WARNING_BALL:
case STATUS_AGENT_DOWN_BALL:
case STATUS_AGENT_UNKNOWN_BALL:
case STATUS_AGENT_OK_BALL:
case STATUS_AGENT_NO_DATA_BALL:
case STATUS_AGENT_NO_MONITORS_BALL:
$return = ['class' => 'status_balls'];
break;
// Small Balls.
case STATUS_MODULE_OK_BALL:
case STATUS_MODULE_CRITICAL_BALL:
case STATUS_MODULE_WARNING_BALL:
case STATUS_MODULE_NO_DATA_BALL:
case STATUS_MODULE_UNKNOWN_BALL:
case STATUS_ALERT_FIRED_BALL:
case STATUS_ALERT_NOT_FIRED_BALL:
case STATUS_ALERT_DISABLED_BALL:
$return = ['class' => 'status_small_balls'];
break;
default:
// Ignored.
break;
}
return $return;
}
/**
@ -2670,16 +2720,14 @@ function ui_print_status_image(
* @param string $title Title.
* @param boolean $return Whether to return an output string or echo now (optional, echo by default).
* @param array $options Options to set image attributes: I.E.: style.
* @param boolean $rounded_image Round.
*
* @return string HTML.
*/
function ui_print_module_status(
function ui_print_status_sets(
$status,
$title='',
$return=false,
$options=false,
$rounded_image=false
$options=false
) {
global $config;
@ -2687,21 +2735,26 @@ function ui_print_module_status(
$options = [];
}
$options['style'] .= 'width: 50px;';
$options['style'] .= 'height: 2em;';
$options['style'] .= 'display: inline-block;';
include_once __DIR__.'/functions_modules.php';
$options['style'] .= 'background: '.modules_get_color_status($status).';';
if ($rounded_image === true) {
$options['style'] .= 'border-radius: 5px;';
if (isset($options['style'])) {
$options['style'] .= ' background: '.modules_get_color_status($status).'; display: inline-block;';
} else {
$options['style'] = 'background: '.modules_get_color_status($status).'; display: inline-block;';
}
if (isset($options['class'])) {
$options['class'] = $options['class'];
}
if ($title != '') {
$options['title'] = $title;
$options['data-title'] = $title;
$options['data-use_title_for_force_title'] = 1;
if (isset($options['class'])) {
$options['class'] .= ' forced_title';
} else {
$options['class'] = 'forced_title';
}
}
$output = '<div ';
foreach ($options as $k => $v) {

View File

@ -536,7 +536,7 @@ function configure_modules_form() {
var obj = jQuery.parseJSON(data["macros"]);
$.each(obj, function(k, macro) {
add_macro_field(macro, "simple-macro");
add_macro_field(macro, "simple-macro", "td", k);
});
}
@ -791,7 +791,7 @@ function new_macro(prefix, callback) {
}
}
function add_macro_field(macro, row_model_id) {
function add_macro_field(macro, row_model_id, type_copy, k) {
var macro_desc = macro["desc"];
// Change the carriage returns by html returns <br> in help
var macro_help = macro["help"].replace(/&#x0d;/g, "<br>");
@ -799,7 +799,6 @@ function add_macro_field(macro, row_model_id) {
var macro_value = $("<div />")
.html(macro["value"])
.text();
var macro_hide = macro["hide"];
macro_value.type = "password";
@ -809,6 +808,7 @@ function add_macro_field(macro, row_model_id) {
// Change attributes to be unique and with identificable class
$macro_field.attr("id", row_id);
$macro_field.attr("class", "macro_field");
// Get the number of fields already printed
@ -828,6 +828,19 @@ function add_macro_field(macro, row_model_id) {
);
}
// Only for create module type plugin need rename
// td id "simple-macro_field" + k + "-1" is horrible.
if (k) {
$("#" + row_model_id + "_field" + k + "_ td:eq(0)").attr(
"id",
"simple-macro_field" + k + "-0"
);
$("#" + row_model_id + "_field" + k + "_ td:eq(1)").attr(
"id",
"simple-macro_field" + k + "-1"
);
}
// Change the label
if (macro_help == "") {
$("#" + row_id)
@ -850,6 +863,18 @@ function add_macro_field(macro, row_model_id) {
}
// Change the text box id and value
if (type_copy == "td") {
$("#" + row_id)
.children()
.eq(1)
.children()
.attr("id", "text-" + macro_macro);
$("#" + row_id)
.children()
.eq(1)
.children()
.attr("name", macro_macro);
} else {
$("#" + row_id)
.children()
.eq(1)
@ -858,8 +883,9 @@ function add_macro_field(macro, row_model_id) {
.children()
.eq(1)
.attr("name", macro_macro);
}
macro_field_hide = false;
var macro_field_hide = false;
if (typeof macro["hide"] == "string") {
if (macro["hide"].length == 0) {
macro_field_hide = false;
@ -872,16 +898,33 @@ function add_macro_field(macro, row_model_id) {
}
}
if (type_copy == "td") {
if (macro_field_hide) {
$("#" + row_id)
.children()
.eq(1)
.children()
.attr("type", "password");
} else {
$("#" + row_id)
.children()
.eq(1)
.children()
.val(macro_value);
}
} else {
if (macro_field_hide) {
$("#" + row_id)
.children()
.eq(1)
.attr("type", "password");
}
} else {
$("#" + row_id)
.children()
.eq(1)
.val(macro_value);
}
}
$("#" + row_id).show();
}
@ -908,7 +951,7 @@ function load_plugin_macros_fields(row_model_id) {
$("#hidden-macros").val(data["base64"]);
jQuery.each(data["array"], function(i, macro) {
if (macro["desc"] != "") {
add_macro_field(macro, row_model_id);
add_macro_field(macro, row_model_id, "td");
}
});
//Plugin text can be larger

View File

@ -5791,9 +5791,53 @@ div#status_pie {
grid-template-columns: 50px auto;
}
/*
* ---------------------------------------------------------------------
* - IMAGES FOR STATUS. This replaces the images of /images/status_sets/default/
* - Don't delete this
* ---------------------------------------------------------------------
*/
.status_small_rectangles {
width: 20px;
height: 10px;
display: inline-block;
}
.status_rounded_rectangles {
width: 50px;
height: 2em;
display: inline-block;
border-radius: 5px;
}
.status_small_squares,
.status_balls {
width: 12px;
height: 12px;
display: inline-block;
}
.status_balls {
border-radius: 50%;
}
.status_small_balls {
width: 8px;
height: 8px;
display: inline-block;
border-radius: 50%;
}
/*
* ---------------------------------------------------------------------
* - END - IMAGES FOR STATUS. Don't delete this
* ---------------------------------------------------------------------
*/
/* Table for show more info in events and config menu in modules graphs. (This class exists in events.css too) */
.table_modal_alternate {
border-spacing: 0px;
border-spacing: 0;
text-align: left;
}

View File

@ -138,3 +138,7 @@ div#tree-controller-recipient {
width: 98%;
margin-top: 10px;
}
.tree-node > .node-content > div + div:not(.tree-node-counters) {
margin-left: 3px;
}

View File

@ -359,14 +359,17 @@ if (! isset($config['id_user'])) {
$nick_in_db = $_SESSION['prepared_login_da']['id_user'];
$expired_pass = false;
} else if (($config['auth'] == 'saml') && ($login_button_saml)) {
include_once ENTERPRISE_DIR.'/include/auth/saml.php';
if (!include_once 'include/auth/saml.php') {
include_once 'general/noaccesssaml.php';
} else {
$saml_user_id = saml_process_user_login();
}
$nick_in_db = $saml_user_id;
if (!$nick_in_db) {
include_once 'general/noaccesssaml.php';
include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php';
$as = new SimpleSAML_Auth_Simple('PandoraFMS');
$as = new SimpleSAML_Auth_Simple($config['saml_source']);
$as->logout();
}
} else {
@ -868,7 +871,7 @@ if (isset($_GET['bye'])) {
if ($config['auth'] == 'saml') {
include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php';
$as = new SimpleSAML_Auth_Simple('PandoraFMS');
$as = new SimpleSAML_Auth_Simple($config['saml_source']);
$as->logout();
}