Merge remote-tracking branch 'origin/develop' into ent-8075-Informe-de-acciones-de-alerta

This commit is contained in:
Daniel Barbero Martin 2021-11-25 08:19:35 +01:00
commit f7233604fe
40 changed files with 618 additions and 506 deletions

View File

@ -88,7 +88,7 @@ public class PandoraWebView extends Activity {
//Check the first load the page for to hide a toast with the
//connection message
//Close the CustomToast (I love this hack, fuck javalovers and yours patterns.).
//Close the CustomToast.
if (ConnectionCustomToast.activity != null)
ConnectionCustomToast.activity.finish();
}

View File

@ -1,428 +1,479 @@
<html>
<head>
<title>gatete</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<script>
<head>
<title>gatete</title>
<script
type="text/javascript"
src="http://code.jquery.com/jquery-2.2.0.min.js"
></script>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<script>
var svg = d3.select("#test svg");
</script>
var svg = d3.select("#test svg");
</script>
<div id="test">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1000px" height="1000px" style="background: black;">
<image id="cat_piano" x="400" y="-100" width="50%" height="50%" xlink:href="https://media.giphy.com/media/ymckEpq27dQ9W/giphy.gif" />
<g id="zoom" transform="translate(-10 20) scale (1)">
<g
transform="translate(100, 300) scale(0.50)"
id="cat1">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="translate(700, 500) scale(0.25)"
id="cat2">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<div id="test">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="1000px"
height="1000px"
style="background: black;"
>
<image
id="cat_piano"
x="400"
y="-100"
width="50%"
height="50%"
xlink:href="https://media.giphy.com/media/ymckEpq27dQ9W/giphy.gif"
/>
<g id="zoom" transform="translate(-10 20) scale (1)">
<g transform="translate(100, 300) scale(0.50)" id="cat1">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
</g>
<g
transform="translate(200, 0) scale(0.25)"
id="cat3">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g transform="translate(700, 500) scale(0.25)" id="cat2">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
</g>
<g
transform="translate(600, 0) scale(0.25)"
id="cat4">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</svg>
</div>
<script type="text/javascript">
var svg = d3.select("svg #zoom");
svg.append("g")
.attr("id", "circulo")
.attr("transform",
function(d) {
return "translate(" + get_center_element("#cat1")[0] + " " + get_center_element("#cat1")[1] + ")";})
.append("circle")
.attr("style", "fill: rgb(0, 255, 0);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", 20);
svg.append("g")
.attr("transform",
function(d) { return "translate(" + get_pos_element("#cat1")[0] + " " + get_pos_element("#cat1")[1] + ") scale(" + get_scale_element("#cat1") + ")";})
.append("rect")
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
.attr("width", function(d) { return get_size_element("#cat1")[0];})
.attr("height", function(d) { return get_size_element("#cat1")[1];});
svg.append("g")
.attr("transform",
function(d) {
return "translate(" + get_center_element("#cat1")[0] + " " + get_center_element("#cat1")[1] + ") scale(" + get_scale_element("#cat1") + ")";})
.append("circle")
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", get_radius_element("#cat1"));
svg.append("g")
.attr("id", "circulo")
.attr("transform",
function(d) {
return "translate(" + get_center_element("#cat3")[0] + " " + get_center_element("#cat3")[1] + ")";})
.append("circle")
.attr("style", "fill: rgb(0, 255, 0);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", 20);
<g transform="translate(200, 0) scale(0.25)" id="cat3">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
</g>
svg.append("g")
.attr("transform",
function(d) { return "translate(" + get_pos_element("#cat3")[0] + " " + get_pos_element("#cat3")[1] + ") scale(" + get_scale_element("#cat3") + ")";})
.append("rect")
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
.attr("width", function(d) { return get_size_element("#cat3")[0];})
.attr("height", function(d) { return get_size_element("#cat3")[1];});
svg.append("g")
.attr("transform",
function(d) {
return "translate(" + get_center_element("#cat3")[0] + " " + get_center_element("#cat3")[1] + ") scale(" + get_scale_element("#cat3") + ")";})
.append("circle")
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", get_radius_element("#cat3"));
arrow_by_pieces2("gatete_flecha", "cat1", "cat2");
arrow_by_pieces2("gatete_flecha2", "cat1", "cat4");
arrow_by_pieces2("gatete_flecha3", "cat3", "cat4");
//~ arrow_by_pieces("gatete_flecha", "cat1", "cat2");
//~ arrow_by_pieces("gatete_flecha", "cat3", "cat4");
/**
* Function get_radius_element
* Return float
* This method get the element radius
*/
function get_radius_element(element) {
var size = get_size_element(element);
return Math.sqrt(
Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2));
}
/**
* Function get_scale_element
* Return float
* This method get the element escale
*/
function get_scale_element(element) {
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t['scale']);
return element_t_scale;
}
/**
* Function get_size_element
* Return array[2]
* This method get the element size [width, height]
*/
function get_size_element(element) {
var element_b = d3.select(element).node().getBBox();
return [element_b['width'], element_b['height']];
}
/**
* Function get_pos_element
* Return array[2]
* This method get the element position [x, y]
*/
function get_pos_element(element) {
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t['scale']);
var element_b = d3.select(element).node().getBBox();
var box_x = parseFloat(element_t.translate[0]) +
parseFloat(element_b['x']) * element_t_scale;
var box_y = parseFloat(element_t.translate[1]) +
parseFloat(element_b['y']) * element_t_scale;
return [box_x, box_y];
}
/**
* Function get_center_element
* Return array[2]
* This method ge2t the element center point [x, y]
*/
function get_center_element(element) {
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t['scale']);
var element_b = d3.select(element).node().getBBox();
var box_x = parseFloat(element_t.translate[0]) +
parseFloat(element_b['x']) * element_t_scale;
var box_y = parseFloat(element_t.translate[1]) +
parseFloat(element_b['y']) * element_t_scale;
var width = (element_t_scale * element_b['width']);
var height = (element_t_scale * element_b['height']);
var c_x = box_x + (width / 2);
var c_y = box_y + (height / 2);
return [c_x, c_y];
}
/**
* Function get_distance_between_point
* Return float
* This method get the distance betweeen two points
*/
function get_distance_between_point(point1, point2) {
delta_x = Math.abs(point1[0] - point2[0]);
delta_y = Math.abs(point1[1] - point1[1]);
return Math.sqrt(
Math.pow(delta_x, 2) + Math.pow(delta_y, 2));
}
/**
* Function get_angle_of_line
* Return float
* This method get the angle of line and x axe
*/
function get_angle_of_line(point1, point2) {
return Math.atan2(point2[1] - point1[1], point2[0] - point1[0]) * 180 / Math.PI;
}
//~ function wait_for_preload_symbol(symbol) {
//~ preload_symbol(symbol);
//~
//~ while (!is_preload_symbol(symbol)) {
//~ sleep(1000);
//~ }
//~ }
//~
//~ function arrow_by_pieces(id_arrow, element1, element2, step) {
//~
//~ wait_for_preload_symbol('pedo');
//~ wait_for_preload_symbol('caca');
//~ ...
//~ }
function arrow_by_pieces2(id_arrow, element1, element2, step) {
if (typeof(step) === "undefined")
step = 0;
step++;
switch (step) {
case 1:
wait_for_preload_symbols(
["body_arrow.svg#body_arrow",
"head_arrow.svg#head_arrow"],
function() {
arrow_by_pieces2(id_arrow, element1, element2, step)
});
break;
case 2:
var arrow = svg.append("g")
.attr("id", id_arrow)
.attr("style", "opacity: 0");
arrow.append("g")
.attr("id", "body")
.append("use")
.attr("xlink:href", "body_arrow.svg#body_arrow");
arrow.append("g")
.attr("id", "head")
.append("use")
.attr("xlink:href", "head_arrow.svg#head_arrow");
var c_elem1 = get_center_element("#" + element1);
var c_elem2 = get_center_element("#" + element2);
var distance = get_distance_between_point(c_elem1, c_elem2);
var transform = d3.transform();
/*---------------------------------------------*/
/*--- Position of layer arrow (body + head) ---*/
/*---------------------------------------------*/
var arrow = d3.select("#" + id_arrow);
var arrow_body = d3.select("#" + id_arrow + " #body");
var arrow_body_b = arrow_body.node().getBBox();
transform.translate[0] = c_elem1[0];
transform.translate[1] = c_elem1[1] - arrow_body_b['height'] / 2;
transform.rotate = get_angle_of_line(c_elem1, c_elem2);
arrow.attr("transform", transform.toString());
/*---------------------------------------------*/
/*-------- Resize the body arrow width --------*/
/*---------------------------------------------*/
var arrow_body = d3.select("#" + id_arrow + " #body");
var arrow_body_b = arrow_body.node().getBBox();
var arrow_head = d3.select("#" + id_arrow + " #head");
var arrow_head_b = arrow_head.node().getBBox();
var body_width = distance - arrow_head_b['width'];
transform = d3.transform();
transform.scale[0] = body_width / arrow_body_b['width'];
arrow_body.attr("transform", transform.toString());
/*---------------------------------------------*/
/*---------- Position of head arrow -----------*/
/*---------------------------------------------*/
transform = d3.transform();
var arrow_body_t = d3.transform(arrow_body.attr("transform"));
var scale = arrow_body_t.scale[0];
var x = 0 + arrow_body_b['width'] * scale;
var y = 0 + (arrow_body_b['height'] / 2 - arrow_head_b['height'] / 2);
transform.translate[0] = x;
transform.translate[1] = y;
arrow_head.attr("transform", transform.toString());
<g transform="translate(600, 0) scale(0.25)" id="cat4">
<path
id="path8068"
d="m 80,286.64792 28.57143,-31.42857 94.28571,60 5.71429,122.85714 L 200,472.3622 l 82.85714,-54.28571 194.28572,8.57143 191.42857,31.42857 48.57143,40 -11.42857,-65.71429 -48.57143,-94.28571 31.42857,-51.42857 14.28571,-88.57143 62.85715,74.28571 65.71428,0 31.42857,-82.85714 42.85715,94.28572 L 920,340.93363 897.14286,423.79078 868.57143,515.21935 800,663.79078 814.28571,795.21935 760,855.21935 734.28571,649.50506 691.42857,672.3622 714.28571,883.79078 640,895.21935 l -8.57143,-208.57143 -85.71428,71.42857 -160,-14.28571 L 317.14286,695.21935 360,838.07649 l -22.85714,65.71429 -74.28572,-200 -11.42857,162.85714 -74.28571,-17.14286 40,-217.14286 -42.85715,-17.14285 5.71429,-85.71429 -5.71429,-54.28571 -2.85714,-108.57143 -20,-42.85714 z"
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
</g>
</g>
</svg>
</div>
<script type="text/javascript">
var svg = d3.select("svg #zoom");
/*---------------------------------------------*/
/*------- Show the result in one time ---------*/
/*---------------------------------------------*/
arrow.attr("style", "opacity: 1");
break;
}
}
function wait_for_preload_symbols(symbols, callback) {
var count_symbols = symbols.length;
function wait(symbol, callback) {
switch (is_preload_symbol(symbol)) {
case -1:
preload_symbol(symbol);
setTimeout(function() {
wait(symbol,
callback);
}, 100);
break;
case 0:
// Wait
setTimeout(function() {
wait(symbol,
callback);
}, 100);
break;
case 1:
count_symbols--;
break;
}
if (count_symbols == 0) {
//~ setTimeout(function() {
//~ callback();
//~ }, 1000);
callback();
}
}
for (var i in symbols) {
wait(symbols[i], callback);
}
}
function preload_symbol(symbol, param_step) {
var step;
if (typeof(param_step) == "undefined") {
step = 1;
param_step = 1;
}
else {
step = param_step;
}
step++;
var base64symbol = btoa(symbol).replace(/=/g, "");
var callback = function (e) {
preload_symbol(symbol, step);
}
switch (param_step) {
case 1:
d3.select("svg").append("g")
.attr("id", base64symbol)
.attr("data-loaded", 0)
.style("opacity", 0)
.append("use")
.attr("xlink:href", symbol)
.on("load", callback);
break;
case 2:
d3.select("#" + base64symbol).attr("data-loaded", 1);
break;
}
}
function is_preload_symbol(symbol) {
var base64symbol = btoa(symbol).replace(/=/g, "");
if (d3.select("#" + base64symbol).node() === null)
return -1;
return parseInt(d3.select("#" + base64symbol).attr("data-loaded"));
}
</script>
</body>
svg
.append("g")
.attr("id", "circulo")
.attr("transform", function(d) {
return (
"translate(" +
get_center_element("#cat1")[0] +
" " +
get_center_element("#cat1")[1] +
")"
);
})
.append("circle")
.attr("style", "fill: rgb(0, 255, 0);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", 20);
svg
.append("g")
.attr("transform", function(d) {
return (
"translate(" +
get_pos_element("#cat1")[0] +
" " +
get_pos_element("#cat1")[1] +
") scale(" +
get_scale_element("#cat1") +
")"
);
})
.append("rect")
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
.attr("width", function(d) {
return get_size_element("#cat1")[0];
})
.attr("height", function(d) {
return get_size_element("#cat1")[1];
});
svg
.append("g")
.attr("transform", function(d) {
return (
"translate(" +
get_center_element("#cat1")[0] +
" " +
get_center_element("#cat1")[1] +
") scale(" +
get_scale_element("#cat1") +
")"
);
})
.append("circle")
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", get_radius_element("#cat1"));
svg
.append("g")
.attr("id", "circulo")
.attr("transform", function(d) {
return (
"translate(" +
get_center_element("#cat3")[0] +
" " +
get_center_element("#cat3")[1] +
")"
);
})
.append("circle")
.attr("style", "fill: rgb(0, 255, 0);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", 20);
svg
.append("g")
.attr("transform", function(d) {
return (
"translate(" +
get_pos_element("#cat3")[0] +
" " +
get_pos_element("#cat3")[1] +
") scale(" +
get_scale_element("#cat3") +
")"
);
})
.append("rect")
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
.attr("width", function(d) {
return get_size_element("#cat3")[0];
})
.attr("height", function(d) {
return get_size_element("#cat3")[1];
});
svg
.append("g")
.attr("transform", function(d) {
return (
"translate(" +
get_center_element("#cat3")[0] +
" " +
get_center_element("#cat3")[1] +
") scale(" +
get_scale_element("#cat3") +
")"
);
})
.append("circle")
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
.attr("cx", 0)
.attr("cy", 0)
.attr("r", get_radius_element("#cat3"));
arrow_by_pieces2("gatete_flecha", "cat1", "cat2");
arrow_by_pieces2("gatete_flecha2", "cat1", "cat4");
arrow_by_pieces2("gatete_flecha3", "cat3", "cat4");
//~ arrow_by_pieces("gatete_flecha", "cat1", "cat2");
//~ arrow_by_pieces("gatete_flecha", "cat3", "cat4");
/**
* Function get_radius_element
* Return float
* This method get the element radius
*/
function get_radius_element(element) {
var size = get_size_element(element);
return Math.sqrt(Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2));
}
/**
* Function get_scale_element
* Return float
* This method get the element escale
*/
function get_scale_element(element) {
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t["scale"]);
return element_t_scale;
}
/**
* Function get_size_element
* Return array[2]
* This method get the element size [width, height]
*/
function get_size_element(element) {
var element_b = d3
.select(element)
.node()
.getBBox();
return [element_b["width"], element_b["height"]];
}
/**
* Function get_pos_element
* Return array[2]
* This method get the element position [x, y]
*/
function get_pos_element(element) {
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t["scale"]);
var element_b = d3
.select(element)
.node()
.getBBox();
var box_x =
parseFloat(element_t.translate[0]) +
parseFloat(element_b["x"]) * element_t_scale;
var box_y =
parseFloat(element_t.translate[1]) +
parseFloat(element_b["y"]) * element_t_scale;
return [box_x, box_y];
}
/**
* Function get_center_element
* Return array[2]
* This method ge2t the element center point [x, y]
*/
function get_center_element(element) {
var element_t = d3.transform(d3.select(element).attr("transform"));
var element_t_scale = parseFloat(element_t["scale"]);
var element_b = d3
.select(element)
.node()
.getBBox();
var box_x =
parseFloat(element_t.translate[0]) +
parseFloat(element_b["x"]) * element_t_scale;
var box_y =
parseFloat(element_t.translate[1]) +
parseFloat(element_b["y"]) * element_t_scale;
var width = element_t_scale * element_b["width"];
var height = element_t_scale * element_b["height"];
var c_x = box_x + width / 2;
var c_y = box_y + height / 2;
return [c_x, c_y];
}
/**
* Function get_distance_between_point
* Return float
* This method get the distance betweeen two points
*/
function get_distance_between_point(point1, point2) {
delta_x = Math.abs(point1[0] - point2[0]);
delta_y = Math.abs(point1[1] - point1[1]);
return Math.sqrt(Math.pow(delta_x, 2) + Math.pow(delta_y, 2));
}
/**
* Function get_angle_of_line
* Return float
* This method get the angle of line and x axe
*/
function get_angle_of_line(point1, point2) {
return (
(Math.atan2(point2[1] - point1[1], point2[0] - point1[0]) * 180) /
Math.PI
);
}
function arrow_by_pieces2(id_arrow, element1, element2, step) {
if (typeof step === "undefined") step = 0;
step++;
switch (step) {
case 1:
wait_for_preload_symbols(
["body_arrow.svg#body_arrow", "head_arrow.svg#head_arrow"],
function() {
arrow_by_pieces2(id_arrow, element1, element2, step);
}
);
break;
case 2:
var arrow = svg
.append("g")
.attr("id", id_arrow)
.attr("style", "opacity: 0");
arrow
.append("g")
.attr("id", "body")
.append("use")
.attr("xlink:href", "body_arrow.svg#body_arrow");
arrow
.append("g")
.attr("id", "head")
.append("use")
.attr("xlink:href", "head_arrow.svg#head_arrow");
var c_elem1 = get_center_element("#" + element1);
var c_elem2 = get_center_element("#" + element2);
var distance = get_distance_between_point(c_elem1, c_elem2);
var transform = d3.transform();
/*---------------------------------------------*/
/*--- Position of layer arrow (body + head) ---*/
/*---------------------------------------------*/
var arrow = d3.select("#" + id_arrow);
var arrow_body = d3.select("#" + id_arrow + " #body");
var arrow_body_b = arrow_body.node().getBBox();
transform.translate[0] = c_elem1[0];
transform.translate[1] = c_elem1[1] - arrow_body_b["height"] / 2;
transform.rotate = get_angle_of_line(c_elem1, c_elem2);
arrow.attr("transform", transform.toString());
/*---------------------------------------------*/
/*-------- Resize the body arrow width --------*/
/*---------------------------------------------*/
var arrow_body = d3.select("#" + id_arrow + " #body");
var arrow_body_b = arrow_body.node().getBBox();
var arrow_head = d3.select("#" + id_arrow + " #head");
var arrow_head_b = arrow_head.node().getBBox();
var body_width = distance - arrow_head_b["width"];
transform = d3.transform();
transform.scale[0] = body_width / arrow_body_b["width"];
arrow_body.attr("transform", transform.toString());
/*---------------------------------------------*/
/*---------- Position of head arrow -----------*/
/*---------------------------------------------*/
transform = d3.transform();
var arrow_body_t = d3.transform(arrow_body.attr("transform"));
var scale = arrow_body_t.scale[0];
var x = 0 + arrow_body_b["width"] * scale;
var y =
0 + (arrow_body_b["height"] / 2 - arrow_head_b["height"] / 2);
transform.translate[0] = x;
transform.translate[1] = y;
arrow_head.attr("transform", transform.toString());
/*---------------------------------------------*/
/*------- Show the result in one time ---------*/
/*---------------------------------------------*/
arrow.attr("style", "opacity: 1");
break;
}
}
function wait_for_preload_symbols(symbols, callback) {
var count_symbols = symbols.length;
function wait(symbol, callback) {
switch (is_preload_symbol(symbol)) {
case -1:
preload_symbol(symbol);
setTimeout(function() {
wait(symbol, callback);
}, 100);
break;
case 0:
// Wait
setTimeout(function() {
wait(symbol, callback);
}, 100);
break;
case 1:
count_symbols--;
break;
}
if (count_symbols == 0) {
//~ setTimeout(function() {
//~ callback();
//~ }, 1000);
callback();
}
}
for (var i in symbols) {
wait(symbols[i], callback);
}
}
function preload_symbol(symbol, param_step) {
var step;
if (typeof param_step == "undefined") {
step = 1;
param_step = 1;
} else {
step = param_step;
}
step++;
var base64symbol = btoa(symbol).replace(/=/g, "");
var callback = function(e) {
preload_symbol(symbol, step);
};
switch (param_step) {
case 1:
d3.select("svg")
.append("g")
.attr("id", base64symbol)
.attr("data-loaded", 0)
.style("opacity", 0)
.append("use")
.attr("xlink:href", symbol)
.on("load", callback);
break;
case 2:
d3.select("#" + base64symbol).attr("data-loaded", 1);
break;
}
}
function is_preload_symbol(symbol) {
var base64symbol = btoa(symbol).replace(/=/g, "");
if (d3.select("#" + base64symbol).node() === null) return -1;
return parseInt(d3.select("#" + base64symbol).attr("data-loaded"));
}
</script>
</body>
</html>

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.758.1-211124
Version: 7.0NG.758.1-211125
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.758.1-211124"
pandora_version="7.0NG.758.1-211125"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.758.1';
use constant AGENT_BUILD => '211124';
use constant AGENT_BUILD => '211125';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.758.1
%define release 211124
%define release 211125
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.758.1
%define release 211124
%define release 211125
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.758.1"
PI_BUILD="211124"
PI_BUILD="211125"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{211124}
{211125}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.758.1 Build 211124")
#define PANDORA_VERSION ("7.0NG.758.1 Build 211125")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.758.1(Build 211124))"
VALUE "ProductVersion", "(7.0NG.758.1(Build 211125))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.758.1-211124
Version: 7.0NG.758.1-211125
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.758.1-211124"
pandora_version="7.0NG.758.1-211125"
package_pear=0
package_pandora=1

View File

@ -688,7 +688,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</tr>';
}
$data[3] .= '<div id="update_action-div" class="invisible">';
$data[3] .= '<div id="update_action-div-'.$alert['id'].'" class="invisible">';
$data[3] .= '</div>';
$data[3] .= '</table>';
// Is possible manage actions if have LW permissions in the agent group of the alert module
@ -706,9 +706,9 @@ foreach ($simple_alerts as $alert) {
$actions = alerts_get_alert_actions_filter(true, 'id_group IN ('.$filter_groups.')');
}
$data[3] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible left">';
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post">';
$data[3] .= '<table class="databox_color w100p bg_color222">';
$data[3] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible">';
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post" style="height:85%;">';
$data[3] .= '<table class="databox_color w100p bg_color222" style="height:100%;">';
$data[3] .= html_print_input_hidden('add_action', 1, true);
$data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true);
@ -1127,13 +1127,14 @@ function show_add_action(id_alert) {
background: "black"
},
open: function() {
$(`#add_action-div-${id_alert}`).css('overflow', 'hidden');
$("#action_select, #action_select").select2({
tags: true,
dropdownParent: $("#add_action-div-" + id_alert)
});
},
width: 500,
height: 300
width: 455,
height: 500
})
.show ();
}
@ -1151,8 +1152,8 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
type: 'POST',
url: action="<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
success: function (data) {
$("#update_action-div").html (data);
$("#update_action-div").hide ()
$(`#update_action-div-${alert_id}`).html (data);
$(`#update_action-div-${alert_id}`).hide ()
.dialog ({
resizable: true,
draggable: true,
@ -1163,14 +1164,14 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
background: "black"
},
open: function() {
$('#update_action-div').css('overflow', 'hidden');
$("#action_select, #action_select_ajax").select2({
$(`#update_action-div-${alert_id}`).css('overflow', 'hidden');
$(`#action_select_ajax-${alert_id}`).select2({
tags: true,
dropdownParent: $('#update_action-')
dropdownParent: $(`#update_action-div-${alert_id}`)
});
},
width: 455,
height: 370
height: 500
})
.show ();
}

View File

@ -270,7 +270,8 @@ if ($add_action) {
}
if ($update_action) {
$id_action = (int) get_parameter('action_select_ajax');
$alert_id = (int) get_parameter('alert_id');
$id_action = (int) get_parameter('action_select_ajax-'.$alert_id);
$id_module_action = (int) get_parameter('id_module_action_ajax');
$fires_min = (int) get_parameter('fires_min_ajax');
$fires_max = (int) get_parameter('fires_max_ajax');

View File

@ -118,8 +118,8 @@ class ClientTest extends \PHPUnit\Framework\TestCase
system('echo "file3" > '.$path.'3');
file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n");
system('echo -e "create table teta (id int);\n" >'.$path.'extras/mr/2.sql');
system('echo -e "create table teto (id int);\n" >>'.$path.'extras/mr/2.sql');
system('echo -e "create table toum1 (id int);\n" >'.$path.'extras/mr/2.sql');
system('echo -e "create table toum2 (id int);\n" >>'.$path.'extras/mr/2.sql');
system('cd '.$path.' && zip '.$target.'/test_3.zip -r * >/dev/null');
system('mv '.$target.'/test_3.zip '.$target.'/test_3.oum');
@ -142,7 +142,7 @@ class ClientTest extends \PHPUnit\Framework\TestCase
system('echo "file4" > '.$path.'4');
file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n");
system('echo -e "drop table teta;\n" >'.$path.'extras/mr/3.sql');
system('echo -e "drop table toum1;\n" >'.$path.'extras/mr/3.sql');
system('cd '.$path.' && zip '.$target.'/test_4.zip -r * >/dev/null');
system('mv '.$target.'/test_4.zip '.$target.'/test_4.oum');

View File

@ -422,13 +422,18 @@ if ($show_update_action_menu) {
$id_action
);
$data .= '<form id="update_action-'.$alert['id'].'" method="post" style="height:85%;">';
$data .= '<form id="update_action-'.$id_alert.'" method="post" style="height:85%;">';
$data .= '<table class="databox_color w100p bg_color222" style="height:100%;">';
$data .= html_print_input_hidden(
'update_action',
1,
true
);
$data .= html_print_input_hidden(
'alert_id',
$id_alert,
true
);
$data .= html_print_input_hidden(
'id_module_action_ajax',
$id_action,
@ -478,7 +483,7 @@ if ($show_update_action_menu) {
$data .= '<td class="datos2">';
$data .= html_print_select(
$actions,
'action_select_ajax',
'action_select_ajax-'.$id_alert,
$action_option['id_alert_action'],
'',
false,

View File

@ -92,7 +92,7 @@ class ModuleTemplates extends HTML
private $validPen;
/**
* Complete list of PENes.
* Complete list of PENs.
*
* @var array.
*/

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC211124';
$build_version = 'PC211125';
$pandora_version = 'v7.0NG.758.1';
// Do not overwrite default timezone set if defined.

View File

@ -1574,7 +1574,9 @@ function graphic_combined_module(
$date_array['final_date'] = $params['date'];
$date_array['start_date'] = ($params['date'] - $params['period']);
$server_name = metaconsole_get_server_by_id($modules[0]['server']);
if (is_metaconsole()) {
$server_name = metaconsole_get_server_by_id($modules[0]['server']);
}
if ($params_combined['projection']) {
$output_projection = forecast_projection_graph(

View File

@ -3279,13 +3279,6 @@ td.empty_field {
width: 96%;
}
#update_action-
> .select2-container--default
.select2-results
> .select2-results__options {
max-height: 125px !important;
}
/* Policies styles */
table#policy_modules td * {

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.758.1';
$build = '211124';
$build = '211125';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -108,7 +108,7 @@ class ModuleGraph
$this->height -= 80;
// Correct the height
// For to avoid fucking IPHONES when they are in horizontal.
// For to avoid IPHONES when they are in horizontal.
if ($this->height < 140) {
$this->height = 140;
}

View File

@ -261,23 +261,22 @@ foreach ($result as $row) {
$data[] = $attr[1] ($row[$attr[0]]);
} else if (($config['command_snapshot']) && (preg_match("/[\n]+/i", $row[$attr[0]]))) {
// Its a single-data, multiline data (data snapshot) ?
// Detect string data with \n and convert to <br>'s
// Detect string data with \n and convert to <br>'s.
$datos = preg_replace('/\n/i', '<br>', $row[$attr[0]]);
$datos = preg_replace('/\s/i', '&nbsp;', $datos);
// Because this *SHIT* of print_table monster, I cannot format properly this cells
// so, eat this, motherfucker :))
// Because this print_table monster, I cannot format properly this cells.
$datos = "<span class='mono'>".$datos.'</span>';
// I dont why, but using index (value) method, data is automatically converted to html entities ¿?
$data[$attr[1]] = $datos;
} else if ($is_web_content_string) {
// Fixed the goliat sends the strings from web
// without HTML entities
// without HTML entities.
$data[$attr[1]] = io_safe_input($row[$attr[0]]);
} else {
// Just a string of alphanumerical data... just do print
// Fixed the data from Selenium Plugin
// Fixed the data from Selenium Plugin.
if ($row[$attr[0]] != strip_tags($row[$attr[0]])) {
$data[$attr[1]] = io_safe_input($row[$attr[0]]);
} else {

View File

@ -78,6 +78,10 @@ $integria_types_csv = integria_api_call(null, null, null, null, 'get_types');
get_array_from_csv_data_pair($integria_types_csv, $integria_types_values);
$integria_resolution_csv = integria_api_call(null, null, null, null, 'get_incidents_resolutions');
get_array_from_csv_data_pair($integria_resolution_csv, $integria_resolution_values);
$event_id = (int) get_parameter('from_event');
$incident_id_edit = (int) get_parameter('incident_id');
$create_incident = (bool) get_parameter('create_incident', 0);
@ -88,6 +92,7 @@ $incident_owner = get_parameter('owner');
$incident_type = (int) get_parameter('type');
$incident_creator = get_parameter('creator');
$incident_status = (int) get_parameter('status');
$incident_resolution = (int) get_parameter('resolution');
$incident_title = events_get_field_value_by_event_id($event_id, get_parameter('incident_title'));
$incident_content = events_get_field_value_by_event_id($event_id, get_parameter('incident_content'));
$file_description = get_parameter('file_description');
@ -98,8 +103,13 @@ $incident_content = str_replace(',', ':::', $incident_content);
// Perform action.
if ($create_incident === true) {
// Disregard incident resolution unless status is 'closed'.
if ($incident_status !== 7) {
$incident_resolution = 0;
}
// Call Integria IMS API method to create an incident.
$result_api_call = integria_api_call(null, null, null, null, 'create_incident', [$incident_title, $incident_group_id, $incident_criticity_id, $incident_content, '', $incident_type, '', $incident_owner, '0', $incident_status], false, '', ',');
$result_api_call = integria_api_call(null, null, null, null, 'create_incident', [$incident_title, $incident_group_id, $incident_criticity_id, $incident_content, '', $incident_type, '', $incident_owner, '0', $incident_status, '', $incident_resolution], false, '', ',');
if ($userfile !== '' && $result_api_call !== false) {
integriaims_upload_file('userfile', $result_api_call, $file_description);
@ -114,8 +124,13 @@ if ($create_incident === true) {
__('Could not be created in Integria IMS')
);
} else if ($update_incident === true) {
// Disregard incident resolution unless status is 'closed'.
if ($incident_status !== 7) {
$incident_resolution = 0;
}
// Call Integria IMS API method to update an incident.
$result_api_call = integria_api_call(null, null, null, null, 'update_incident', [$incident_id_edit, $incident_title, $incident_content, '', $incident_group_id, $incident_criticity_id, 0, $incident_status, $incident_owner, 0, $incident_type], false, '', ',');
$result_api_call = integria_api_call(null, null, null, null, 'update_incident', [$incident_id_edit, $incident_title, $incident_content, '', $incident_group_id, $incident_criticity_id, $incident_resolution, $incident_status, $incident_owner, 0, $incident_type], false, '', ',');
if ($userfile !== '') {
integriaims_upload_file('userfile', $incident_id_edit, $file_description);
@ -161,8 +176,8 @@ $table->style[0] = 'width: 33%; padding-right: 50px; padding-left: 100px;';
$table->style[1] = 'width: 33%; padding-right: 50px; padding-left: 50px;';
$table->style[2] = 'width: 33%; padding-right: 100px; padding-left: 50px;';
$table->colspan[0][0] = 2;
$table->colspan[3][0] = 3;
$table->colspan[5][0] = 3;
$table->colspan[4][0] = 3;
$table->colspan[6][0] = 3;
$help_macros = isset($_GET['from_event']) ? ui_print_help_icon('response_macros', true) : '';
@ -174,6 +189,7 @@ if ($update) {
$input_value_criticity = $incident_details[7];
$input_value_owner = $incident_details[5];
$input_value_content = $incident_details[4];
$input_value_resolution = $incident_details[12];
} else if (isset($_GET['from_event'])) {
$input_value_title = $config['cr_incident_title'];
$input_value_type = $config['cr_incident_type'];
@ -182,6 +198,7 @@ if ($update) {
$input_value_criticity = $config['cr_default_criticity'];
$input_value_owner = $config['cr_default_owner'];
$input_value_content = $config['cr_incident_content'];
$input_value_resolution = 0;
} else {
$input_value_title = '';
$input_value_type = '';
@ -190,6 +207,7 @@ if ($update) {
$input_value_criticity = '';
$input_value_owner = '';
$input_value_content = '';
$input_value_resolution = 0;
}
$table->data[0][0] = '<div class="label_select"><p class="input_label">'.__('Title').':&nbsp'.$help_macros.'</p>';
@ -303,8 +321,26 @@ $table->data[2][2] .= '<div class="label_select_parent">'.html_print_autocomplet
'w100p'
).'</div>';
$table->data[3][0] = '<div class="label_select"><p class="input_label">'.__('Description').':&nbsp'.$help_macros.'</p>';
$table->data[3][0] .= '<div class="label_select_parent">'.html_print_textarea(
$table->data[3][0] = '<div class="label_select"><p class="input_label">'.__('Resolution').': </p>';
$table->data[3][0] .= '<div class="label_select_parent">'.html_print_select(
$integria_resolution_values,
'resolution',
$input_value_resolution,
'',
'',
1,
true,
false,
true,
'',
false,
'width: 100%;'
).'</div>';
$table->data[4][0] = '<div class="label_select"><p class="input_label">'.__('Description').':&nbsp'.$help_macros.'</p>';
$table->data[4][0] .= '<div class="label_select_parent">'.html_print_textarea(
'incident_content',
3,
20,
@ -313,10 +349,10 @@ $table->data[3][0] .= '<div class="label_select_parent">'.html_print_textarea(
true
).'</div>';
$table->data[4][0] = '<div class="label_select"><p class="input_label">'.__('File name').':</p>';
$table->data[4][0] .= html_print_input_file('userfile', true);
$table->data[5][0] = '<div class="label_select"><p class="input_label">'.__('Attachment description').':</p>';
$table->data[5][0] .= html_print_textarea(
$table->data[5][0] = '<div class="label_select"><p class="input_label">'.__('File name').':</p>';
$table->data[5][0] .= html_print_input_file('userfile', true);
$table->data[6][0] = '<div class="label_select"><p class="input_label">'.__('Attachment description').':</p>';
$table->data[6][0] .= html_print_textarea(
'file_description',
3,
20,
@ -345,3 +381,32 @@ if ($update) {
}
echo '</div>';
?>
<script type="text/javascript">
$(document).ready(function () {
$('#add_alert_table-3').hide();
var input_value_status =
<?php
$status_value = ($input_value_status === '') ? 0 : $input_value_status;
echo $status_value;
?>
;
if (input_value_status === 7) {
$('#add_alert_table-3').show();
} else {
$('#add_alert_table-3').hide();
}
$('#status').on('change', function() {
if ($(this).val() === '7') {
$('#add_alert_table-3').show();
} else {
$('#add_alert_table-3').hide();
}
});
});
</script>

View File

@ -48,7 +48,7 @@ if ($id_graph !== 0) {
}
}
// Delete module SQL code
// Delete module SQL code.
if ($delete_graph) {
if (check_acl($config['id_user'], 0, 'AW')) {
$res = db_process_sql_delete('tgraph_source', ['id_graph' => $id_graph]);
@ -239,7 +239,7 @@ if ($view_graph) {
]
).'</a>';
// In full screen, the manage options are not available
// In full screen, the manage options are not available.
$options = [
'view' => $options['view'],
'screen' => $options['screen'],
@ -277,6 +277,12 @@ if ($view_graph) {
'fullscale' => $fullscale,
];
if ($stacked === CUSTOM_GRAPH_AREA || $stacked === CUSTOM_GRAPH_STACKED_AREA) {
$params['type_graph'] = 'area';
} else if ($stacked === CUSTOM_GRAPH_LINE || $stacked === CUSTOM_GRAPH_STACKED_LINE) {
$params['type_graph'] = 'line';
}
$params_combined = [
'stacked' => $stacked,
'id_graph' => $id_graph,

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.758.1
%define release 211124
%define release 211125
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.758.1
%define release 211124
%define release 211125
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.758.1
%define release 211124
%define release 211125
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -134,9 +134,7 @@ sunshine
hunter
4321
buddy
porn
morgan
fuck
4128
whatever
matrix
@ -164,7 +162,6 @@ charles
thomas
casper
jackie
cumshot
girls
tigger
stupid
@ -172,7 +169,6 @@ monica
boston
booboo
robert
shit
midnight
braves
coffee
@ -212,11 +208,9 @@ sierra
mercedes
johnny
george
cumming
leather
5150
gandalf
sexy
hunting
232323
doggie
@ -279,8 +273,6 @@ member
anthony
austin
paul
fucked
boobs
blowme
william
mine
@ -419,13 +411,11 @@ freedom
magnum
extreme
internet
fucking
ginger
juice
redskins
action
captain
blowjob
abgrtyu
erotic
carter
@ -478,7 +468,6 @@ winner
131313
mistress
florida
cock
samantha
123123
phantom

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.758.1-211124
Version: 7.0NG.758.1-211125
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.758.1-211124"
pandora_version="7.0NG.758.1-211125"
package_cpan=0
package_pandora=1

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.758.1";
my $pandora_build = "211124";
my $pandora_build = "211125";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -929,9 +929,9 @@ sub PandoraFMS::Recon::Base::create_network_profile_modules($$) {
# 2. Verify Private Enterprise Number matches (PEN)
if (defined($template->{'pen'})) {
my @penes = split(',', $template->{'pen'});
my @pens = split(',', $template->{'pen'});
next unless (is_in_array(\@penes, $self->get_pen($device)));
next unless (is_in_array(\@pens, $self->get_pen($device)));
}
# 3. Retrieve module list from target template.

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.758.1";
my $pandora_build = "211124";
my $pandora_build = "211125";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.758.1
%define release 211124
%define release 211125
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.758.1
%define release 211124
%define release 211125
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.758.1"
PI_BUILD="211124"
PI_BUILD="211125"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.758.1 Build 211124";
my $version = "7.0NG.758.1 Build 211125";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.758.1 Build 211124";
my $version = "7.0NG.758.1 Build 211125";
# save program name for logging
my $progname = basename($0);
@ -978,7 +978,7 @@ sub pandora_get_same_day_id ($$) {
my $weeks = { 'monday' => 1, 'tuesday' => 2, 'wednesday' => 3, 'thursday' => 4, 'friday' => 5, 'saturday' => 6, 'sunday' => 7, 'holiday' => 8};
return defined ($weeks{$same_day}) ? $weeks{$same_day} : -1;
return defined ($weeks->{$same_day}) ? $weeks->{$same_day} : -1;
}
##########################################################################