Merge remote-tracking branch 'origin/develop' into ent-7074-Command-Center

This commit is contained in:
Daniel Barbero Martin 2021-04-15 17:41:56 +02:00
commit 741ec6a144
20 changed files with 697 additions and 594 deletions

View File

@ -462,13 +462,16 @@ if (is_ajax()) {
}
// This check should be after ajax. Because, ajax will be called from configure_alert_action.
if (!check_acl($config['id_user'], 0, 'PM') && !is_user_admin($config['id_user
'])) {
if (!check_acl($config['id_user'], 0, 'PM') && !is_user_admin(
$config['id_user
']
)
) {
echo "<div id='message_permissions' title='".__('Permissions warning')."' s
tyle='display:none;'>";
echo "<p style='text-align: center;font-weight: bold;'>".__('Command managem
ent is limited to administrator users or user profiles with permissions over Pan
dora FMS management').'</p>';
echo "<p style='text-align: center;font-weight: bold; margin: 15px'>".__(
'Command management is limited to administrator users or user profiles with permissions PM'
).'</p>';
echo '</div>';
}
@ -680,13 +683,20 @@ foreach ($commands as $command) {
// (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group.
if ($is_central_policies_on_node === false && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'LM')) {
if (check_acl($config['id_user'], 0, 'PM') || is_user_admin(
$config['id_user
']
)
) {
$data['action'] = '<span class="inline_flex">';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&amp;copy_command=1&id='.$command['id'].'&pure='.$pure.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'&pure='.$pure.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>';
$data['action'] .= '</span>';
}
}
array_push($table->data, $data);
}

View File

@ -885,6 +885,11 @@ function html_print_select(
";
}
$select2 = 'select2.min';
if ($config['style'] === 'pandora_black') {
$select2 = 'select2_dark.min';
}
if ($multiple === false) {
if (is_ajax()) {
$output .= '<script src="';
@ -898,18 +903,13 @@ function html_print_select(
$output .= '<link rel="stylesheet" href="';
$output .= ui_get_full_url(
'include/styles/select2.min.css',
'include/styles/'.$select2.'.css',
false,
false,
false
);
$output .= '"/>';
} else {
$select2 = 'select2.min';
if ($config['style'] === 'pandora_black') {
$select2 = 'select2_dark.min';
}
ui_require_css_file($select2);
ui_require_javascript_file('select2.min');
}

View File

@ -130,17 +130,24 @@ function html_do_report_info($report)
$date_today = date($config['date_format']);
$date_today = preg_split('/[\s,]+/', io_safe_output($date_today));
$date_today = __($date_today[0]).' '.$date_today[1].' '.$date_today[2].' '.$date_today[3].' '.$date_today[4];
$html = '<div class="report_info" style="background: '.$background_color.'"><table>
<tr>
<td><b>'.__('Generated').': </b></td><td>'.$date_today.'</td>
</tr>
<tr>
<td><b>'.__('Report date').': </b></td>';
$date_before = date($config['date_format'], $report['datetime']);
$date_before = preg_split('/[\s,]+/', io_safe_output($date_before));
$date_before = __($date_before[0]).' '.$date_before[1].' '.$date_before[2].' '.$date_before[3].' '.$date_before[4];
if (is_numeric($report['datetime']) && is_numeric($report['period']) && ($report['period'] != 0)) {
$html .= '<td>'.__('From').' <b>'.date($config['date_format'], ($report['datetime'] - $report['period'])).'</b></td>';
$html .= '<td>'.__('to').' <b>'.date($config['date_format'], $report['datetime']).'</b></td>';
} else {
$html .= '<td>'.__('Items period before').' <b>'.date($config['date_format'], $report['datetime']).'</b></td>';
$html .= '<td>'.__('Items period before').' <b>'.$date_before.'</b></td>';
}
$html .= '</tr>

View File

@ -290,7 +290,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
}
$last_data_str .= '&nbsp;';
$last_data_str .= html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px']);
$last_data_str .= html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px', 'class' => 'invert_filter']);
$is_snapshot = is_snapshot_data($last_data['datos']);
$is_large_image = is_text_to_black_string($last_data['datos']);
@ -307,7 +307,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
}
if ($salida !== null) {
$last_data_str = html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px']);
$last_data_str = html_print_image('images/clock2.png', true, ['title' => $last_data['timestamp'], 'width' => '18px', 'class' => 'invert_filter']);
}
$last_data_str .= $salida;

View File

@ -322,7 +322,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
class="info_box '.$id.' '.$class.' textodialogo" style="'.$force_style.'">
<tr>
<td class="icon icon_ui" rowspan="2" >'.html_print_image($icon_image, true, false, false, false, false).'</td>
<td class="title pandora_upper pdd_t_10px"><b>'.$text_title.'</b></td>
<td class="title pandora_upper pdd_t_10px text_left"><b>'.$text_title.'</b></td>
<td class="icon right pdd_r_3px">';
if (!$no_close_bool) {
// Use the no_meta parameter because this image is only in

View File

@ -29,10 +29,10 @@ Licensed under the MIT license.
* V. 1.1: Fix error handling so e.g. parsing an empty string does
* produce a color rather than just crashing.
*/
(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
(function ($) { $.color = {}; $.color.make = function (r, g, b, a) { var o = {}; o.r = r || 0; o.g = g || 0; o.b = b || 0; o.a = a != null ? a : 1; o.add = function (c, d) { for (var i = 0; i < c.length; ++i)o[c.charAt(i)] += d; return o.normalize() }; o.scale = function (c, f) { for (var i = 0; i < c.length; ++i)o[c.charAt(i)] *= f; return o.normalize() }; o.toString = function () { if (o.a >= 1) { return "rgb(" + [o.r, o.g, o.b].join(",") + ")" } else { return "rgba(" + [o.r, o.g, o.b, o.a].join(",") + ")" } }; o.normalize = function () { function clamp(min, value, max) { return value < min ? min : value > max ? max : value } o.r = clamp(0, parseInt(o.r), 255); o.g = clamp(0, parseInt(o.g), 255); o.b = clamp(0, parseInt(o.b), 255); o.a = clamp(0, o.a, 1); return o }; o.clone = function () { return $.color.make(o.r, o.b, o.g, o.a) }; return o.normalize() }; $.color.extract = function (elem, css) { var c; do { c = elem.css(css).toLowerCase(); if (c != "" && c != "transparent") break; elem = elem.parent() } while (elem.length && !$.nodeName(elem.get(0), "body")); if (c == "rgba(0, 0, 0, 0)") c = "transparent"; return $.color.parse(c) }; $.color.parse = function (str) { var res, m = $.color.make; if (res = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str)) return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10)); if (res = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)) return m(parseInt(res[1], 10), parseInt(res[2], 10), parseInt(res[3], 10), parseFloat(res[4])); if (res = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str)) return m(parseFloat(res[1]) * 2.55, parseFloat(res[2]) * 2.55, parseFloat(res[3]) * 2.55); if (res = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str)) return m(parseFloat(res[1]) * 2.55, parseFloat(res[2]) * 2.55, parseFloat(res[3]) * 2.55, parseFloat(res[4])); if (res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)) return m(parseInt(res[1], 16), parseInt(res[2], 16), parseInt(res[3], 16)); if (res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)) return m(parseInt(res[1] + res[1], 16), parseInt(res[2] + res[2], 16), parseInt(res[3] + res[3], 16)); var name = $.trim(str).toLowerCase(); if (name == "transparent") return m(255, 255, 255, 0); else { res = lookupColors[name] || [0, 0, 0]; return m(res[0], res[1], res[2]) } }; var lookupColors = { aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0] } })(jQuery);
// the actual Flot code
(function($) {
(function ($) {
// Cache the prototype hasOwnProperty for faster access
@ -45,10 +45,10 @@ Licensed under the MIT license.
// Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.
if (!$.fn.detach) {
$.fn.detach = function() {
return this.each(function() {
$.fn.detach = function () {
return this.each(function () {
if (this.parentNode) {
this.parentNode.removeChild( this );
this.parentNode.removeChild(this);
}
});
};
@ -129,7 +129,7 @@ Licensed under the MIT license.
// @param {number} width New width of the canvas, in pixels.
// @param {number} width New height of the canvas, in pixels.
Canvas.prototype.resize = function(width, height) {
Canvas.prototype.resize = function (width, height) {
if (width <= 0 || height <= 0) {
throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height);
@ -174,13 +174,13 @@ Licensed under the MIT license.
// Clears the entire canvas area, not including any overlaid HTML text
Canvas.prototype.clear = function() {
Canvas.prototype.clear = function () {
this.context.clearRect(0, 0, this.width, this.height);
};
// Finishes rendering the canvas, including managing the text overlay.
Canvas.prototype.render = function() {
Canvas.prototype.render = function () {
var cache = this._textCache;
@ -236,7 +236,7 @@ Licensed under the MIT license.
// uniquely identify the text layer.
// @return {object} The jQuery-wrapped text-layer div.
Canvas.prototype.getTextLayer = function(classes) {
Canvas.prototype.getTextLayer = function (classes) {
var layer = this.text[classes];
@ -247,7 +247,7 @@ Licensed under the MIT license.
// Create the text layer container, if it doesn't exist
if (this.textContainer == null) {
this.textContainer = $("<div class='flot-text'></div>")
this.textContainer = $("<div class='flot-text white_important'></div>")
.css({
position: "absolute",
top: 0,
@ -315,7 +315,7 @@ Licensed under the MIT license.
// @param {number=} width Maximum width of the text before it wraps.
// @return {object} a text info object.
Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
Canvas.prototype.getTextInfo = function (layer, text, font, angle, width) {
var textStyle, layerCache, styleCache, info;
@ -401,7 +401,7 @@ Licensed under the MIT license.
// @param {string=} valign Vertical alignment of the text; either "top",
// "middle" or "bottom".
Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
Canvas.prototype.addText = function (layer, x, y, text, font, angle, width, halign, valign) {
var info = this.getTextInfo(layer, text, font, angle, width),
positions = info.positions;
@ -474,7 +474,7 @@ Licensed under the MIT license.
// @param {number=} angle Angle at which the text is rotated, in degrees.
// Angle is currently unused, it will be implemented in the future.
Canvas.prototype.removeText = function(layer, x, y, text, font, angle) {
Canvas.prototype.removeText = function (layer, x, y, text, font, angle) {
if (text == null) {
var layerCache = this._textCache[layer];
if (layerCache != null) {
@ -610,7 +610,7 @@ Licensed under the MIT license.
mouseActiveRadius: 10 // how far the mouse can be away to activate an item
},
interaction: {
redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow
redrawOverlayInterval: 1000 / 60 // time between updates, -1 means in same flow
},
hooks: {}
},
@ -619,7 +619,7 @@ Licensed under the MIT license.
eventHolder = null, // jQuery object that events should be bound to
ctx = null, octx = null,
xaxes = [], yaxes = [],
plotOffset = { left: 0, right: 0, top: 0, bottom: 0},
plotOffset = { left: 0, right: 0, top: 0, bottom: 0 },
plotWidth = 0, plotHeight = 0,
hooks = {
processOptions: [],
@ -639,9 +639,9 @@ Licensed under the MIT license.
plot.setData = setData;
plot.setupGrid = setupGrid;
plot.draw = draw;
plot.getPlaceholder = function() { return placeholder; };
plot.getCanvas = function() { return surface.element; };
plot.getPlotOffset = function() { return plotOffset; };
plot.getPlaceholder = function () { return placeholder; };
plot.getCanvas = function () { return surface.element; };
plot.getPlotOffset = function () { return plotOffset; };
plot.width = function () { return plotWidth; };
plot.height = function () { return plotHeight; };
plot.offset = function () {
@ -667,7 +667,7 @@ Licensed under the MIT license.
plot.highlight = highlight;
plot.unhighlight = unhighlight;
plot.triggerRedrawOverlay = triggerRedrawOverlay;
plot.pointOffset = function(point) {
plot.pointOffset = function (point) {
return {
left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10),
top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10)
@ -1106,7 +1106,7 @@ Licensed under the MIT license.
s = series[i];
s.datapoints = { points: [] };
executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);
executeHooks(hooks.processRawData, [s, s.data, s.datapoints]);
}
// first pass: clean and copy data
@ -1222,7 +1222,7 @@ Licensed under the MIT license.
for (i = 0; i < series.length; ++i) {
s = series[i];
executeHooks(hooks.processDatapoints, [ s, s.datapoints]);
executeHooks(hooks.processDatapoints, [s, s.datapoints]);
}
// second pass: find datamax/datamin for auto-scaling
@ -1303,7 +1303,7 @@ Licensed under the MIT license.
// from a previous plot in this container that we'll try to re-use.
placeholder.css("padding", 0) // padding messes up the positioning
.children().filter(function(){
.children().filter(function () {
return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base');
}).remove();
@ -1445,7 +1445,7 @@ Licensed under the MIT license.
// Determine the axis's position in its direction and on its side
$.each(isXAxis ? xaxes : yaxes, function(i, a) {
$.each(isXAxis ? xaxes : yaxes, function (i, a) {
if (a && (a.show || a.reserveSpace)) {
if (a === axis) {
found = true;
@ -1535,7 +1535,7 @@ Licensed under the MIT license.
if (minMargin == null) {
minMargin = 0;
for (i = 0; i < series.length; ++i)
minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));
minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth / 2));
}
var margins = {
@ -1581,7 +1581,7 @@ Licensed under the MIT license.
// If the grid is visible, add its border width to the offset
for (var a in plotOffset) {
if(typeof(options.grid.borderWidth) == "object") {
if (typeof (options.grid.borderWidth) == "object") {
plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;
}
else {
@ -2125,20 +2125,20 @@ Licensed under the MIT license.
// If either borderWidth or borderColor is an object, then draw the border
// line by line instead of as one rectangle
bc = options.grid.borderColor;
if(typeof bw == "object" || typeof bc == "object") {
if (typeof bw == "object" || typeof bc == "object") {
if (typeof bw !== "object") {
bw = {top: bw, right: bw, bottom: bw, left: bw};
bw = { top: bw, right: bw, bottom: bw, left: bw };
}
if (typeof bc !== "object") {
bc = {top: bc, right: bc, bottom: bc, left: bc};
bc = { top: bc, right: bc, bottom: bc, left: bc };
}
if (bw.top > 0) {
ctx.strokeStyle = bc.top;
ctx.lineWidth = bw.top;
ctx.beginPath();
ctx.moveTo(0 - bw.left, 0 - bw.top/2);
ctx.lineTo(plotWidth, 0 - bw.top/2);
ctx.moveTo(0 - bw.left, 0 - bw.top / 2);
ctx.lineTo(plotWidth, 0 - bw.top / 2);
ctx.stroke();
}
@ -2164,15 +2164,15 @@ Licensed under the MIT license.
ctx.strokeStyle = bc.left;
ctx.lineWidth = bw.left;
ctx.beginPath();
ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);
ctx.lineTo(0- bw.left/2, 0);
ctx.moveTo(0 - bw.left / 2, plotHeight + bw.bottom);
ctx.lineTo(0 - bw.left / 2, 0);
ctx.stroke();
}
}
else {
ctx.lineWidth = bw;
ctx.strokeStyle = options.grid.borderColor;
ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);
ctx.strokeRect(-bw / 2, -bw / 2, plotWidth + bw, plotHeight + bw);
}
}
@ -2472,10 +2472,10 @@ Licensed under the MIT license.
ctx.lineWidth = sw;
ctx.strokeStyle = "rgba(0,0,0,0.1)";
// position shadow at angle from the mid of line
var angle = Math.PI/18;
plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);
ctx.lineWidth = sw/2;
plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);
var angle = Math.PI / 18;
plotLine(series.datapoints, Math.sin(angle) * (lw / 2 + sw / 2), Math.cos(angle) * (lw / 2 + sw / 2), series.xaxis, series.yaxis);
ctx.lineWidth = sw / 2;
plotLine(series.datapoints, Math.sin(angle) * (lw / 2 + sw / 4), Math.cos(angle) * (lw / 2 + sw / 4), series.xaxis, series.yaxis);
}
ctx.lineWidth = lw;
@ -2530,7 +2530,7 @@ Licensed under the MIT license.
// Doing the conditional here allows the shadow setting to still be
// optional even with a lineWidth of 0.
if( lw == 0 )
if (lw == 0)
lw = 0.0001;
if (lw > 0 && sw > 0) {
@ -2538,11 +2538,11 @@ Licensed under the MIT license.
var w = sw / 2;
ctx.lineWidth = w;
ctx.strokeStyle = "rgba(0,0,0,0.1)";
plotPoints(series.datapoints, radius, null, w + w/2, true,
plotPoints(series.datapoints, radius, null, w + w / 2, true,
series.xaxis, series.yaxis, symbol);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
plotPoints(series.datapoints, radius, null, w/2, true,
plotPoints(series.datapoints, radius, null, w / 2, true,
series.xaxis, series.yaxis, symbol);
}
@ -2748,7 +2748,7 @@ Licensed under the MIT license.
entries.reverse();
} else {
var ascending = options.legend.sorted != "descending";
entries.sort(function(a, b) {
entries.sort(function (a, b) {
return a.label == b.label ? 0 : (
(a.label < b.label) != ascending ? 1 : -1 // Logical XOR
);
@ -2798,7 +2798,7 @@ Licensed under the MIT license.
pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
else if (p.charAt(1) == "w")
pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
var legend = $('<div class="legend">' + table.replace('style="', 'style="position:absolute;' + pos +';') + '</div>').appendTo(placeholder);
var legend = $('<div class="bg_222_important">' + table.replace('style="', 'style="position:absolute;' + pos + ';') + '</div>').appendTo(placeholder);
if (options.legend.backgroundOpacity != 0.0) {
// put in the transparent background
// separately to avoid blended labels and
@ -2814,7 +2814,7 @@ Licensed under the MIT license.
c = c.toString();
}
var div = legend.children();
$('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
$('<div class="" style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos + 'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
}
}
}
@ -2917,10 +2917,12 @@ Licensed under the MIT license.
j = item[1];
ps = series[i].datapoints.pointsize;
return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
return {
datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
dataIndex: j,
series: series[i],
seriesIndex: i };
seriesIndex: i
};
}
return null;
@ -2977,7 +2979,7 @@ Licensed under the MIT license.
highlight(item.series, item.datapoint, eventname);
}
placeholder.trigger(eventname, [ pos, item ]);
placeholder.trigger(eventname, [pos, item]);
}
function triggerRedrawOverlay() {
@ -3141,7 +3143,7 @@ Licensed under the MIT license.
// Add the plot function to the top level of the jQuery object
$.plot = function(placeholder, data, options) {
$.plot = function (placeholder, data, options) {
//var t0 = new Date();
var plot = new Plot($(placeholder), data, options, $.plot.plugins);
//(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime()));
@ -3154,8 +3156,8 @@ Licensed under the MIT license.
// Also add the plot function as a chainable property
$.fn.plot = function(data, options) {
return this.each(function() {
$.fn.plot = function (data, options) {
return this.each(function () {
$.plot(this, data, options);
});
};

File diff suppressed because one or more lines are too long

View File

@ -114,7 +114,8 @@ function pandoraFlotPie(
// Reset styles
function resetInteractivity() {
legends.css("color", "#fff");
legends.css("color", "#3F3F3D");
legends.attr("class", "invert_filter");
}
if (water_mark) {
@ -293,7 +294,6 @@ function pandoraFlotPieCustom(
function resetInteractivity() {
legends.each(function() {
// fix the widths so they don't jump around
console.log($(this));
$(this).css("color", "#3F3F3D");
});
}

View File

@ -683,12 +683,13 @@ function flot_vcolumn_chart(array $options)
$options['graphId'] = $graphId;
// If pandora_black theme its enabled then change grid colors.
/*
if ($config['style'] === 'pandora_black') {
$options['grid']['backgroundColor']['colors'][0] = 'transparent';
$options['grid']['backgroundColor']['colors'][1] = 'transparent';
$options['y']['color'] = 'transparent';
$options['x']['color'] = 'transparent';
}
}*/
$settings = base64_encode(json_encode($options));

View File

@ -2486,6 +2486,7 @@ function printClockAnalogic1(
var face = svg
.append("g")
.attr("id", "clock-face")
.attr("class", "invert_filter")
.attr(
"transform",
"translate(" +
@ -2646,6 +2647,8 @@ function printClockDigital1(
svg = d3.selectAll("#clock_" + id_element + " svg");
svgUnderlay.attr("id", "underlay_" + id_element);
svgUnderlay.attr("class", "invert_filter");
svgOverlay.attr("id", "overlay_" + id_element);
var digit = svg.selectAll(".digit"),

View File

@ -3385,8 +3385,8 @@ function init_graph(parameter_object) {
"stroke-opacity: 0.75; " +
"stroke-dasharray: none; " +
"stroke-dashoffset: 0"
);
)
.attr("class", "fill_222");
window.layer_graph
.append("text")
.append("tspan")
@ -3406,6 +3406,7 @@ function init_graph(parameter_object) {
"stroke: none; " +
"font-family: Verdana"
)
.attr("class", "fill_fff")
.attr(
"x",
networkmap_dimensions[0] + node_radius - holding_area_dimensions[0]
@ -4072,7 +4073,7 @@ function draw_elements_graph() {
node_temp
.append("text")
.attr("class", "node_text")
.attr("class", "node_text fill_fff")
.attr("id", "node_text_" + networkmap_id)
.attr(
"style",
@ -4094,7 +4095,7 @@ function draw_elements_graph() {
.text(function(d) {
return ellipsize(get_node_name_ov(d), 30);
})
.classed("dragable_node", true) //own dragable
.classed("dragable_node fill_fff", true) //own dragable
.on("click", selected_node)
.on("contextmenu", function(d) {
show_menu("node", d);

View File

@ -490,6 +490,8 @@ class Widget
*/
public function getFormInputs(): array
{
global $config;
$inputs = [];
$values = $this->values;
@ -501,6 +503,10 @@ class Widget
if (empty($values['background']) === true) {
$values['background'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
$values['background'] = '#222222';
}
}
$inputs[] = [

View File

@ -732,7 +732,12 @@ class EventsListWidget extends Widget
$table->data[$i] = $data;
$table->cellstyle[$i][0] = 'background: #E8E8E8;';
$bg_color = 'background: #E8E8E8;';
if ($config['style'] === 'pandora_black') {
$bg_color = 'background: #222;';
}
$table->cellstyle[$i][0] = $bg_color;
$rowclass = \events_get_criticity_class($event['criticity']);
$table->cellclass[$i][1] = $rowclass;
$table->cellclass[$i][2] = $rowclass;

View File

@ -510,7 +510,7 @@ class SystemGroupStatusWidget extends Widget
$show_link = array_key_exists($group['g'], $user_groups);
if ((in_array($group['g'], $this->values['groupId'])) === true) {
$table->data[$i][] = '<span>'.$group['name'].'</span>';
$table->data[$i][] = '<span class="legendLabel">'.$group['name'].'</span>';
$url = $config['homeurl'].'index.php';
$url .= '?sec=estado&sec2=operation/agentes/status_monitor';

View File

@ -536,6 +536,9 @@ class TreeViewWidget extends Widget
// Css Files.
\ui_require_css_file('tree', 'include/styles/', true);
if ($config['style'] == 'pandora_black') {
\ui_require_css_file('pandora_black', 'include/styles/', true);
}
// Javascript Files.
\ui_include_time_picker();
@ -683,7 +686,7 @@ class TreeViewWidget extends Widget
];
// Show the modal window of an module.
$output .= '<div id="module_details_window" class="invisible">';
$output .= '<div id="module_details_window" class="">';
$output .= '</div>';
// Script.

View File

@ -5450,6 +5450,10 @@ table.info_table.policy_sub_table {
min-width: 100px;
}
div.label_select_child_left > span {
width: 100% !important;
}
.label_select_child_right {
width: 20%;
min-width: 140px;

View File

@ -665,6 +665,9 @@ form ul.form_flex {
border-radius: 4px;
}
text {
color: #fff !important;
}
.legendLabel {
color: #fff;
}
@ -720,8 +723,9 @@ form ul.form_flex {
color: #900;
}
.cluetip-default ul {
text-align: left;
.cluetip-default ul,
.text_left {
text-align: left !important;
}
.card {
border: 1px solid #e2e2e2;
@ -892,3 +896,53 @@ div.integria_details_description textarea {
color: #fff;
resize: vertical;
}
.grid-stack-item-content {
color: #fff !important;
}
.widget-groups-status h1 a {
font-size: 1.1em;
font-weight: bold;
line-height: 20px;
color: #fff;
font-family: "lato-lighter", "Open Sans", sans-serif;
letter-spacing: 0.03pt;
text-decoration: none;
text-transform: capitalize;
}
.widget_groups_status {
background-color: #222;
}
.flot-text {
color: #fff !important;
}
.table.group_modules_status_box tr td {
font-family: "lato-lighter", "Open Sans", sans-serif;
letter-spacing: 0.03pt;
font-size: 11pt;
text-decoration: none;
color: #fff !important;
font-weight: bolder;
text-align: justify;
border-bottom: 0px;
}
.bg_222_important {
background-color: #222 !important;
}
.networkconsole {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
background-color: #111;
}
.fill_222 {
fill: #222 !important;
}
.fill_fff {
fill: #fff !important;
}

View File

@ -255,7 +255,7 @@
.select2-container--default
.select2-selection--multiple
.select2-selection__choice {
background-color: #e4e4e4;
background-color: #222;
border: 1px solid #aaa;
border-radius: 4px;
cursor: default;
@ -263,7 +263,7 @@
margin-right: 5px;
margin-top: 5px;
padding: 0 5px;
color: #111;
color: #fff;
}
.select2-container--default
.select2-selection--multiple
@ -277,7 +277,7 @@
.select2-container--default
.select2-selection--multiple
.select2-selection__choice__remove:hover {
color: #333;
color: #82b92e;
}
.select2-container--default[dir="rtl"]
.select2-selection--multiple
@ -301,7 +301,7 @@
}
.select2-container--default.select2-container--focus
.select2-selection--multiple {
border: solid black 1px;
border: solid #fff 1px;
outline: 0;
}
.select2-container--default.select2-container--disabled
@ -331,7 +331,7 @@
border: 1px solid #aaa;
}
.select2-container--default .select2-search--inline .select2-search__field {
background: transparent;
background: #222;
border: none;
outline: 0;
box-shadow: none;

View File

@ -438,7 +438,7 @@ enterprise_hook('close_meta_frame');
.hide()
.prop("id", "module_details_window")
.appendTo('body');
console.log("vamos a ver");
function show_module_detail_dialog(module_id, id_agent, server_name, offset, period, module_name) {
var params = {};
var f = new Date();

View File

@ -73,6 +73,13 @@ if ($manageDashboards !== 0) {
$output .= '</div>';
$output .= '</div>';
if ($config['style'] === 'pandora') {
$options['background'] = '#fff';
}
if ($config['style'] === 'pandora_black') {
$options['background'] = '#222';
}
if ((int) $cellData['id_widget'] !== 0) {
$style = 'style="background-color:'.$options['background'].';"';