Merge remote-tracking branch 'origin/develop' into 3177-Send_custom_report
Former-commit-id: 3bb953eb2b06d3c827093a0648c722c5281d73d5
This commit is contained in:
commit
b06790cc1a
|
@ -32,13 +32,6 @@ enterprise_include ('godmode/massive/massive_operations.php');
|
|||
$tab = (string) get_parameter ('tab', 'massive_agents');
|
||||
$option = (string) get_parameter ('option', '');
|
||||
|
||||
if ($tab == 'massive_policies' && is_central_policies_on_node()){
|
||||
ui_print_warning_message(__('This node is configured with centralized mode. All policies information is read only. Go to metaconsole to manage it.'));
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access massive operation section");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
$options_alerts = array(
|
||||
'add_alerts' => __('Bulk alert add'),
|
||||
|
@ -232,6 +225,11 @@ if ((get_cfg_var("max_execution_time") != 0)
|
|||
echo '</div>';
|
||||
}
|
||||
|
||||
if ($tab == 'massive_policies' && is_central_policies_on_node()){
|
||||
ui_print_warning_message(__('This node is configured with centralized mode. All policies information is read only. Go to metaconsole to manage it.'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Catch all submit operations in this view to display Wait banner
|
||||
$submit_action = get_parameter('go');
|
||||
$submit_update = get_parameter('updbutton');
|
||||
|
|
|
@ -120,9 +120,7 @@ if (check_acl ($config['id_user'], 0, "AW")) {
|
|||
$sub2["godmode/massive/massive_operations&tab=massive_users"]["text"] = __('Users operations');
|
||||
}
|
||||
$sub2["godmode/massive/massive_operations&tab=massive_alerts"]["text"] = __('Alerts operations');
|
||||
if ($config["centralized_management"] != 1) {
|
||||
enterprise_hook('massivepolicies_submenu');
|
||||
}
|
||||
enterprise_hook('massivepolicies_submenu');
|
||||
enterprise_hook('massivesnmp_submenu');
|
||||
enterprise_hook('massivesatellite_submenu');
|
||||
|
||||
|
|
|
@ -653,9 +653,6 @@ function update_button_palette_callback() {
|
|||
var image = values['image'] + ".png";
|
||||
set_image("image", idItem, image);
|
||||
break;
|
||||
case "color_cloud":
|
||||
setColorCloud(id_visual_console, idItem);
|
||||
break;
|
||||
default:
|
||||
if($('input[name=width]').val() == ''){
|
||||
alert('Undefined width');
|
||||
|
@ -2782,7 +2779,7 @@ function setColorCloud (visualConsoleId, dataId, $container) {
|
|||
$container = $container || $("#" + dataId + ".item.color_cloud");
|
||||
if ($container.length === 0) return;
|
||||
|
||||
var $spinner = $container.find("#image_" + dataId);
|
||||
var $spinner = $container.children("img");
|
||||
var $svg = $container.children("svg");
|
||||
|
||||
if ($svg.length === 0) {
|
||||
|
@ -3929,10 +3926,11 @@ function updateDB_visual(type, idElement , values, event, top, left) {
|
|||
case 'color_cloud':
|
||||
var diameter = values["diameter"];
|
||||
var $container = $("#" + idElement + ".item.color_cloud");
|
||||
$container
|
||||
.children("svg")
|
||||
.attr("width", diameter)
|
||||
.attr("height", diameter);
|
||||
if ($container.children("img").length === 0) {
|
||||
$container.append(
|
||||
'<img id="image_' + idElement + '" class="image" src="images/spinner.gif" width="' + diameter + '" height="' + diameter + '" />'
|
||||
);
|
||||
}
|
||||
setColorCloud(id_visual_console, idElement, $container);
|
||||
break;
|
||||
case 'background':
|
||||
|
@ -5400,7 +5398,10 @@ function getColorRangeTable ($colorRangeCreationTable, values) {
|
|||
// Change img
|
||||
$colorRangeAddImg = $colorRangeAddBtn.children("img");
|
||||
if ($colorRangeAddImg.length > 0) {
|
||||
$colorRangeAddImg.prop("src", "images/delete.png");
|
||||
var src = $("#hidden-metaconsole").val() == 1
|
||||
? "../../images/delete.png"
|
||||
: "images/delete.png";
|
||||
$colorRangeAddImg.prop("src", src);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4071,8 +4071,21 @@ function visual_map_get_color_cloud_element ($data) {
|
|||
!empty($dynamic_fields["color_ranges"]) &&
|
||||
!empty($data["id_agente_modulo"])
|
||||
) {
|
||||
// TODO: Metaconsole support.
|
||||
$value = modules_get_last_value($data["id_agente_modulo"]);
|
||||
$node_id = null;
|
||||
$node_connected = false;
|
||||
// Connect to node
|
||||
if (is_metaconsole() && !empty($data["id_metaconsole"])) {
|
||||
$node_id = (int) $data["id_metaconsole"];
|
||||
if (metaconsole_connect(null, $node_id) === NOERR) $node_connected = true;
|
||||
}
|
||||
|
||||
// Fetch module value
|
||||
$value = (!$node_id || ($node_id && $node_connected))
|
||||
? modules_get_last_value($data["id_agente_modulo"])
|
||||
: false;
|
||||
|
||||
// Restore connection
|
||||
if ($node_connected) metaconsole_restore_db();
|
||||
|
||||
if ($value !== false) {
|
||||
/* TODO: It would be ok to give support to string values in the future?
|
||||
|
|
|
@ -612,10 +612,14 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
"</td>";
|
||||
|
||||
// Color ranges
|
||||
$color_range_tip = __("TODO");
|
||||
$form_items["color_cloud_color_ranges_row"] = array();
|
||||
$form_items["color_cloud_color_ranges_row"]["items"] = array("color_cloud");
|
||||
$form_items["color_cloud_color_ranges_row"]["html"] =
|
||||
"<td align=\"left\">" . __("Color ranges") . "</td>" .
|
||||
"<td align=\"left\">" .
|
||||
__("Ranges") .
|
||||
ui_print_help_tip($color_range_tip, true) .
|
||||
"</td>" .
|
||||
"<td align=\"left\">" .
|
||||
"<table id=\"new-color-range\" class=\"databox color-range color-range-creation\">" .
|
||||
"<tr>" .
|
||||
|
@ -817,6 +821,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
var $mapLinkedSelect = $("select#map_linked");
|
||||
var $linkedMapNodeIDInput = $("input#hidden-linked_map_node_id");
|
||||
var visualMaps = <?php echo json_encode($visual_maps); ?>;
|
||||
if (!(visualMaps instanceof Array)) visualMaps = [];
|
||||
var nodesById = <?php echo json_encode($meta_servers_by_id); ?>;
|
||||
|
||||
visualMaps.forEach(function (vMap) {
|
||||
|
|
Loading…
Reference in New Issue