Merge remote-tracking branch 'origin/develop' into ent-8123-Autenticacion-remota-en-entornos-centralizados
This commit is contained in:
commit
3262d8ea35
|
@ -88,7 +88,7 @@ public class PandoraWebView extends Activity {
|
||||||
//Check the first load the page for to hide a toast with the
|
//Check the first load the page for to hide a toast with the
|
||||||
//connection message
|
//connection message
|
||||||
|
|
||||||
//Close the CustomToast (I love this hack, fuck javalovers and yours patterns.).
|
//Close the CustomToast.
|
||||||
if (ConnectionCustomToast.activity != null)
|
if (ConnectionCustomToast.activity != null)
|
||||||
ConnectionCustomToast.activity.finish();
|
ConnectionCustomToast.activity.finish();
|
||||||
}
|
}
|
||||||
|
|
903
extras/cats.html
903
extras/cats.html
|
@ -1,428 +1,479 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>gatete</title>
|
<title>gatete</title>
|
||||||
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
|
<script
|
||||||
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
|
type="text/javascript"
|
||||||
</head>
|
src="http://code.jquery.com/jquery-2.2.0.min.js"
|
||||||
<body>
|
></script>
|
||||||
<script>
|
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
|
||||||
|
</head>
|
||||||
var svg = d3.select("#test svg");
|
<body>
|
||||||
</script>
|
<script>
|
||||||
|
var svg = d3.select("#test svg");
|
||||||
<div id="test">
|
</script>
|
||||||
<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" />
|
<div id="test">
|
||||||
<g id="zoom" transform="translate(-10 20) scale (1)">
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<g
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
transform="translate(100, 300) scale(0.50)"
|
width="1000px"
|
||||||
id="cat1">
|
height="1000px"
|
||||||
<path
|
style="background: black;"
|
||||||
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"
|
<image
|
||||||
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
id="cat_piano"
|
||||||
</g>
|
x="400"
|
||||||
|
y="-100"
|
||||||
<g
|
width="50%"
|
||||||
transform="translate(700, 500) scale(0.25)"
|
height="50%"
|
||||||
id="cat2">
|
xlink:href="https://media.giphy.com/media/ymckEpq27dQ9W/giphy.gif"
|
||||||
<path
|
/>
|
||||||
id="path8068"
|
<g id="zoom" transform="translate(-10 20) scale (1)">
|
||||||
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"
|
<g transform="translate(100, 300) scale(0.50)" id="cat1">
|
||||||
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
<path
|
||||||
</g>
|
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"
|
||||||
<g
|
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
transform="translate(200, 0) scale(0.25)"
|
/>
|
||||||
id="cat3">
|
</g>
|
||||||
<path
|
|
||||||
id="path8068"
|
<g transform="translate(700, 500) scale(0.25)" id="cat2">
|
||||||
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"
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
id="path8068"
|
||||||
</g>
|
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
|
/>
|
||||||
transform="translate(600, 0) scale(0.25)"
|
</g>
|
||||||
id="cat4">
|
|
||||||
<path
|
<g transform="translate(200, 0) scale(0.25)" id="cat3">
|
||||||
id="path8068"
|
<path
|
||||||
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"
|
id="path8068"
|
||||||
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
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"
|
||||||
</g>
|
style="fill:none;fill-rule:evenodd;stroke: red; fill: white; stroke-width:4px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
</g>
|
/>
|
||||||
</svg>
|
</g>
|
||||||
</div>
|
|
||||||
<script type="text/javascript">
|
<g transform="translate(600, 0) scale(0.25)" id="cat4">
|
||||||
var svg = d3.select("svg #zoom");
|
<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"
|
||||||
svg.append("g")
|
/>
|
||||||
.attr("id", "circulo")
|
</g>
|
||||||
.attr("transform",
|
</g>
|
||||||
function(d) {
|
</svg>
|
||||||
return "translate(" + get_center_element("#cat1")[0] + " " + get_center_element("#cat1")[1] + ")";})
|
</div>
|
||||||
.append("circle")
|
<script type="text/javascript">
|
||||||
.attr("style", "fill: rgb(0, 255, 0);")
|
var svg = d3.select("svg #zoom");
|
||||||
.attr("cx", 0)
|
|
||||||
.attr("cy", 0)
|
svg
|
||||||
.attr("r", 20);
|
.append("g")
|
||||||
|
.attr("id", "circulo")
|
||||||
svg.append("g")
|
.attr("transform", function(d) {
|
||||||
.attr("transform",
|
return (
|
||||||
function(d) { return "translate(" + get_pos_element("#cat1")[0] + " " + get_pos_element("#cat1")[1] + ") scale(" + get_scale_element("#cat1") + ")";})
|
"translate(" +
|
||||||
.append("rect")
|
get_center_element("#cat1")[0] +
|
||||||
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
|
" " +
|
||||||
.attr("width", function(d) { return get_size_element("#cat1")[0];})
|
get_center_element("#cat1")[1] +
|
||||||
.attr("height", function(d) { return get_size_element("#cat1")[1];});
|
")"
|
||||||
|
);
|
||||||
svg.append("g")
|
})
|
||||||
.attr("transform",
|
.append("circle")
|
||||||
function(d) {
|
.attr("style", "fill: rgb(0, 255, 0);")
|
||||||
return "translate(" + get_center_element("#cat1")[0] + " " + get_center_element("#cat1")[1] + ") scale(" + get_scale_element("#cat1") + ")";})
|
.attr("cx", 0)
|
||||||
.append("circle")
|
.attr("cy", 0)
|
||||||
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
|
.attr("r", 20);
|
||||||
.attr("cx", 0)
|
|
||||||
.attr("cy", 0)
|
svg
|
||||||
.attr("r", get_radius_element("#cat1"));
|
.append("g")
|
||||||
|
.attr("transform", function(d) {
|
||||||
svg.append("g")
|
return (
|
||||||
.attr("id", "circulo")
|
"translate(" +
|
||||||
.attr("transform",
|
get_pos_element("#cat1")[0] +
|
||||||
function(d) {
|
" " +
|
||||||
return "translate(" + get_center_element("#cat3")[0] + " " + get_center_element("#cat3")[1] + ")";})
|
get_pos_element("#cat1")[1] +
|
||||||
.append("circle")
|
") scale(" +
|
||||||
.attr("style", "fill: rgb(0, 255, 0);")
|
get_scale_element("#cat1") +
|
||||||
.attr("cx", 0)
|
")"
|
||||||
.attr("cy", 0)
|
);
|
||||||
.attr("r", 20);
|
})
|
||||||
|
.append("rect")
|
||||||
svg.append("g")
|
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
|
||||||
.attr("transform",
|
.attr("width", function(d) {
|
||||||
function(d) { return "translate(" + get_pos_element("#cat3")[0] + " " + get_pos_element("#cat3")[1] + ") scale(" + get_scale_element("#cat3") + ")";})
|
return get_size_element("#cat1")[0];
|
||||||
.append("rect")
|
})
|
||||||
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
|
.attr("height", function(d) {
|
||||||
.attr("width", function(d) { return get_size_element("#cat3")[0];})
|
return get_size_element("#cat1")[1];
|
||||||
.attr("height", function(d) { return get_size_element("#cat3")[1];});
|
});
|
||||||
|
|
||||||
svg.append("g")
|
svg
|
||||||
.attr("transform",
|
.append("g")
|
||||||
function(d) {
|
.attr("transform", function(d) {
|
||||||
return "translate(" + get_center_element("#cat3")[0] + " " + get_center_element("#cat3")[1] + ") scale(" + get_scale_element("#cat3") + ")";})
|
return (
|
||||||
.append("circle")
|
"translate(" +
|
||||||
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
|
get_center_element("#cat1")[0] +
|
||||||
.attr("cx", 0)
|
" " +
|
||||||
.attr("cy", 0)
|
get_center_element("#cat1")[1] +
|
||||||
.attr("r", get_radius_element("#cat3"));
|
") scale(" +
|
||||||
|
get_scale_element("#cat1") +
|
||||||
|
")"
|
||||||
|
);
|
||||||
|
})
|
||||||
arrow_by_pieces2("gatete_flecha", "cat1", "cat2");
|
.append("circle")
|
||||||
arrow_by_pieces2("gatete_flecha2", "cat1", "cat4");
|
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
|
||||||
arrow_by_pieces2("gatete_flecha3", "cat3", "cat4");
|
.attr("cx", 0)
|
||||||
|
.attr("cy", 0)
|
||||||
|
.attr("r", get_radius_element("#cat1"));
|
||||||
|
|
||||||
//~ arrow_by_pieces("gatete_flecha", "cat1", "cat2");
|
svg
|
||||||
//~ arrow_by_pieces("gatete_flecha", "cat3", "cat4");
|
.append("g")
|
||||||
|
.attr("id", "circulo")
|
||||||
/**
|
.attr("transform", function(d) {
|
||||||
* Function get_radius_element
|
return (
|
||||||
* Return float
|
"translate(" +
|
||||||
* This method get the element radius
|
get_center_element("#cat3")[0] +
|
||||||
*/
|
" " +
|
||||||
function get_radius_element(element) {
|
get_center_element("#cat3")[1] +
|
||||||
var size = get_size_element(element);
|
")"
|
||||||
|
);
|
||||||
return Math.sqrt(
|
})
|
||||||
Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2));
|
.append("circle")
|
||||||
}
|
.attr("style", "fill: rgb(0, 255, 0);")
|
||||||
|
.attr("cx", 0)
|
||||||
/**
|
.attr("cy", 0)
|
||||||
* Function get_scale_element
|
.attr("r", 20);
|
||||||
* Return float
|
|
||||||
* This method get the element escale
|
svg
|
||||||
*/
|
.append("g")
|
||||||
function get_scale_element(element) {
|
.attr("transform", function(d) {
|
||||||
var element_t = d3.transform(d3.select(element).attr("transform"));
|
return (
|
||||||
var element_t_scale = parseFloat(element_t['scale']);
|
"translate(" +
|
||||||
|
get_pos_element("#cat3")[0] +
|
||||||
return element_t_scale;
|
" " +
|
||||||
}
|
get_pos_element("#cat3")[1] +
|
||||||
|
") scale(" +
|
||||||
/**
|
get_scale_element("#cat3") +
|
||||||
* Function get_size_element
|
")"
|
||||||
* Return array[2]
|
);
|
||||||
* This method get the element size [width, height]
|
})
|
||||||
*/
|
.append("rect")
|
||||||
function get_size_element(element) {
|
.attr("style", "fill:none; stroke:#ffff00;stroke-width:5")
|
||||||
var element_b = d3.select(element).node().getBBox();
|
.attr("width", function(d) {
|
||||||
|
return get_size_element("#cat3")[0];
|
||||||
return [element_b['width'], element_b['height']];
|
})
|
||||||
}
|
.attr("height", function(d) {
|
||||||
|
return get_size_element("#cat3")[1];
|
||||||
/**
|
});
|
||||||
* Function get_pos_element
|
|
||||||
* Return array[2]
|
svg
|
||||||
* This method get the element position [x, y]
|
.append("g")
|
||||||
*/
|
.attr("transform", function(d) {
|
||||||
function get_pos_element(element) {
|
return (
|
||||||
var element_t = d3.transform(d3.select(element).attr("transform"));
|
"translate(" +
|
||||||
var element_t_scale = parseFloat(element_t['scale']);
|
get_center_element("#cat3")[0] +
|
||||||
var element_b = d3.select(element).node().getBBox();
|
" " +
|
||||||
|
get_center_element("#cat3")[1] +
|
||||||
var box_x = parseFloat(element_t.translate[0]) +
|
") scale(" +
|
||||||
parseFloat(element_b['x']) * element_t_scale;
|
get_scale_element("#cat3") +
|
||||||
var box_y = parseFloat(element_t.translate[1]) +
|
")"
|
||||||
parseFloat(element_b['y']) * element_t_scale;
|
);
|
||||||
|
})
|
||||||
return [box_x, box_y];
|
.append("circle")
|
||||||
}
|
.attr("style", "fill: none; stroke-width: 5; stroke: rgb(0, 0, 255);")
|
||||||
|
.attr("cx", 0)
|
||||||
/**
|
.attr("cy", 0)
|
||||||
* Function get_center_element
|
.attr("r", get_radius_element("#cat3"));
|
||||||
* Return array[2]
|
|
||||||
* This method ge2t the element center point [x, y]
|
arrow_by_pieces2("gatete_flecha", "cat1", "cat2");
|
||||||
*/
|
arrow_by_pieces2("gatete_flecha2", "cat1", "cat4");
|
||||||
function get_center_element(element) {
|
arrow_by_pieces2("gatete_flecha3", "cat3", "cat4");
|
||||||
var element_t = d3.transform(d3.select(element).attr("transform"));
|
|
||||||
var element_t_scale = parseFloat(element_t['scale']);
|
//~ arrow_by_pieces("gatete_flecha", "cat1", "cat2");
|
||||||
var element_b = d3.select(element).node().getBBox();
|
//~ arrow_by_pieces("gatete_flecha", "cat3", "cat4");
|
||||||
|
|
||||||
var box_x = parseFloat(element_t.translate[0]) +
|
/**
|
||||||
parseFloat(element_b['x']) * element_t_scale;
|
* Function get_radius_element
|
||||||
var box_y = parseFloat(element_t.translate[1]) +
|
* Return float
|
||||||
parseFloat(element_b['y']) * element_t_scale;
|
* This method get the element radius
|
||||||
|
*/
|
||||||
var width = (element_t_scale * element_b['width']);
|
function get_radius_element(element) {
|
||||||
var height = (element_t_scale * element_b['height']);
|
var size = get_size_element(element);
|
||||||
|
|
||||||
var c_x = box_x + (width / 2);
|
return Math.sqrt(Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2));
|
||||||
var c_y = box_y + (height / 2);
|
}
|
||||||
|
|
||||||
return [c_x, c_y];
|
/**
|
||||||
}
|
* Function get_scale_element
|
||||||
|
* Return float
|
||||||
/**
|
* This method get the element escale
|
||||||
* Function get_distance_between_point
|
*/
|
||||||
* Return float
|
function get_scale_element(element) {
|
||||||
* This method get the distance betweeen two points
|
var element_t = d3.transform(d3.select(element).attr("transform"));
|
||||||
*/
|
var element_t_scale = parseFloat(element_t["scale"]);
|
||||||
function get_distance_between_point(point1, point2) {
|
|
||||||
delta_x = Math.abs(point1[0] - point2[0]);
|
return element_t_scale;
|
||||||
delta_y = Math.abs(point1[1] - point1[1]);
|
}
|
||||||
|
|
||||||
return Math.sqrt(
|
/**
|
||||||
Math.pow(delta_x, 2) + Math.pow(delta_y, 2));
|
* Function get_size_element
|
||||||
}
|
* Return array[2]
|
||||||
|
* This method get the element size [width, height]
|
||||||
|
*/
|
||||||
|
function get_size_element(element) {
|
||||||
/**
|
var element_b = d3
|
||||||
* Function get_angle_of_line
|
.select(element)
|
||||||
* Return float
|
.node()
|
||||||
* This method get the angle of line and x axe
|
.getBBox();
|
||||||
*/
|
|
||||||
function get_angle_of_line(point1, point2) {
|
return [element_b["width"], element_b["height"]];
|
||||||
return Math.atan2(point2[1] - point1[1], point2[0] - point1[0]) * 180 / Math.PI;
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* Function get_pos_element
|
||||||
|
* Return array[2]
|
||||||
//~ function wait_for_preload_symbol(symbol) {
|
* This method get the element position [x, y]
|
||||||
//~ preload_symbol(symbol);
|
*/
|
||||||
//~
|
function get_pos_element(element) {
|
||||||
//~ while (!is_preload_symbol(symbol)) {
|
var element_t = d3.transform(d3.select(element).attr("transform"));
|
||||||
//~ sleep(1000);
|
var element_t_scale = parseFloat(element_t["scale"]);
|
||||||
//~ }
|
var element_b = d3
|
||||||
//~ }
|
.select(element)
|
||||||
//~
|
.node()
|
||||||
//~ function arrow_by_pieces(id_arrow, element1, element2, step) {
|
.getBBox();
|
||||||
//~
|
|
||||||
//~ wait_for_preload_symbol('pedo');
|
var box_x =
|
||||||
//~ wait_for_preload_symbol('caca');
|
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;
|
||||||
|
|
||||||
function arrow_by_pieces2(id_arrow, element1, element2, step) {
|
return [box_x, box_y];
|
||||||
if (typeof(step) === "undefined")
|
}
|
||||||
step = 0;
|
|
||||||
|
/**
|
||||||
step++;
|
* Function get_center_element
|
||||||
|
* Return array[2]
|
||||||
switch (step) {
|
* This method ge2t the element center point [x, y]
|
||||||
case 1:
|
*/
|
||||||
wait_for_preload_symbols(
|
function get_center_element(element) {
|
||||||
["body_arrow.svg#body_arrow",
|
var element_t = d3.transform(d3.select(element).attr("transform"));
|
||||||
"head_arrow.svg#head_arrow"],
|
var element_t_scale = parseFloat(element_t["scale"]);
|
||||||
function() {
|
var element_b = d3
|
||||||
arrow_by_pieces2(id_arrow, element1, element2, step)
|
.select(element)
|
||||||
});
|
.node()
|
||||||
break;
|
.getBBox();
|
||||||
case 2:
|
|
||||||
|
var box_x =
|
||||||
var arrow = svg.append("g")
|
parseFloat(element_t.translate[0]) +
|
||||||
.attr("id", id_arrow)
|
parseFloat(element_b["x"]) * element_t_scale;
|
||||||
.attr("style", "opacity: 0");
|
var box_y =
|
||||||
|
parseFloat(element_t.translate[1]) +
|
||||||
arrow.append("g")
|
parseFloat(element_b["y"]) * element_t_scale;
|
||||||
.attr("id", "body")
|
|
||||||
.append("use")
|
var width = element_t_scale * element_b["width"];
|
||||||
.attr("xlink:href", "body_arrow.svg#body_arrow");
|
var height = element_t_scale * element_b["height"];
|
||||||
|
|
||||||
arrow.append("g")
|
var c_x = box_x + width / 2;
|
||||||
.attr("id", "head")
|
var c_y = box_y + height / 2;
|
||||||
.append("use")
|
|
||||||
.attr("xlink:href", "head_arrow.svg#head_arrow");
|
return [c_x, c_y];
|
||||||
|
}
|
||||||
|
|
||||||
var c_elem1 = get_center_element("#" + element1);
|
/**
|
||||||
var c_elem2 = get_center_element("#" + element2);
|
* Function get_distance_between_point
|
||||||
var distance = get_distance_between_point(c_elem1, c_elem2);
|
* Return float
|
||||||
|
* This method get the distance betweeen two points
|
||||||
var transform = d3.transform();
|
*/
|
||||||
|
function get_distance_between_point(point1, point2) {
|
||||||
/*---------------------------------------------*/
|
delta_x = Math.abs(point1[0] - point2[0]);
|
||||||
/*--- Position of layer arrow (body + head) ---*/
|
delta_y = Math.abs(point1[1] - point1[1]);
|
||||||
/*---------------------------------------------*/
|
|
||||||
var arrow = d3.select("#" + id_arrow);
|
return Math.sqrt(Math.pow(delta_x, 2) + Math.pow(delta_y, 2));
|
||||||
|
}
|
||||||
var arrow_body = d3.select("#" + id_arrow + " #body");
|
|
||||||
var arrow_body_b = arrow_body.node().getBBox();
|
/**
|
||||||
|
* Function get_angle_of_line
|
||||||
transform.translate[0] = c_elem1[0];
|
* Return float
|
||||||
transform.translate[1] = c_elem1[1] - arrow_body_b['height'] / 2;
|
* This method get the angle of line and x axe
|
||||||
transform.rotate = get_angle_of_line(c_elem1, c_elem2);
|
*/
|
||||||
|
function get_angle_of_line(point1, point2) {
|
||||||
arrow.attr("transform", transform.toString());
|
return (
|
||||||
|
(Math.atan2(point2[1] - point1[1], point2[0] - point1[0]) * 180) /
|
||||||
/*---------------------------------------------*/
|
Math.PI
|
||||||
/*-------- Resize the body arrow width --------*/
|
);
|
||||||
/*---------------------------------------------*/
|
}
|
||||||
var arrow_body = d3.select("#" + id_arrow + " #body");
|
|
||||||
var arrow_body_b = arrow_body.node().getBBox();
|
function arrow_by_pieces2(id_arrow, element1, element2, step) {
|
||||||
var arrow_head = d3.select("#" + id_arrow + " #head");
|
if (typeof step === "undefined") step = 0;
|
||||||
var arrow_head_b = arrow_head.node().getBBox();
|
|
||||||
|
step++;
|
||||||
var body_width = distance - arrow_head_b['width'];
|
|
||||||
|
switch (step) {
|
||||||
transform = d3.transform();
|
case 1:
|
||||||
transform.scale[0] = body_width / arrow_body_b['width'];
|
wait_for_preload_symbols(
|
||||||
arrow_body.attr("transform", transform.toString());
|
["body_arrow.svg#body_arrow", "head_arrow.svg#head_arrow"],
|
||||||
|
function() {
|
||||||
/*---------------------------------------------*/
|
arrow_by_pieces2(id_arrow, element1, element2, step);
|
||||||
/*---------- Position of head arrow -----------*/
|
}
|
||||||
/*---------------------------------------------*/
|
);
|
||||||
transform = d3.transform();
|
break;
|
||||||
|
case 2:
|
||||||
var arrow_body_t = d3.transform(arrow_body.attr("transform"));
|
var arrow = svg
|
||||||
|
.append("g")
|
||||||
var scale = arrow_body_t.scale[0];
|
.attr("id", id_arrow)
|
||||||
var x = 0 + arrow_body_b['width'] * scale;
|
.attr("style", "opacity: 0");
|
||||||
var y = 0 + (arrow_body_b['height'] / 2 - arrow_head_b['height'] / 2);
|
|
||||||
|
arrow
|
||||||
transform.translate[0] = x;
|
.append("g")
|
||||||
transform.translate[1] = y;
|
.attr("id", "body")
|
||||||
|
.append("use")
|
||||||
arrow_head.attr("transform", transform.toString());
|
.attr("xlink:href", "body_arrow.svg#body_arrow");
|
||||||
|
|
||||||
/*---------------------------------------------*/
|
arrow
|
||||||
/*------- Show the result in one time ---------*/
|
.append("g")
|
||||||
/*---------------------------------------------*/
|
.attr("id", "head")
|
||||||
arrow.attr("style", "opacity: 1");
|
.append("use")
|
||||||
break;
|
.attr("xlink:href", "head_arrow.svg#head_arrow");
|
||||||
}
|
|
||||||
}
|
var c_elem1 = get_center_element("#" + element1);
|
||||||
|
var c_elem2 = get_center_element("#" + element2);
|
||||||
function wait_for_preload_symbols(symbols, callback) {
|
var distance = get_distance_between_point(c_elem1, c_elem2);
|
||||||
var count_symbols = symbols.length;
|
|
||||||
|
var transform = d3.transform();
|
||||||
function wait(symbol, callback) {
|
|
||||||
switch (is_preload_symbol(symbol)) {
|
/*---------------------------------------------*/
|
||||||
case -1:
|
/*--- Position of layer arrow (body + head) ---*/
|
||||||
preload_symbol(symbol);
|
/*---------------------------------------------*/
|
||||||
|
var arrow = d3.select("#" + id_arrow);
|
||||||
setTimeout(function() {
|
|
||||||
wait(symbol,
|
var arrow_body = d3.select("#" + id_arrow + " #body");
|
||||||
callback);
|
var arrow_body_b = arrow_body.node().getBBox();
|
||||||
}, 100);
|
|
||||||
break;
|
transform.translate[0] = c_elem1[0];
|
||||||
case 0:
|
transform.translate[1] = c_elem1[1] - arrow_body_b["height"] / 2;
|
||||||
// Wait
|
transform.rotate = get_angle_of_line(c_elem1, c_elem2);
|
||||||
setTimeout(function() {
|
|
||||||
wait(symbol,
|
arrow.attr("transform", transform.toString());
|
||||||
callback);
|
|
||||||
}, 100);
|
/*---------------------------------------------*/
|
||||||
break;
|
/*-------- Resize the body arrow width --------*/
|
||||||
case 1:
|
/*---------------------------------------------*/
|
||||||
count_symbols--;
|
var arrow_body = d3.select("#" + id_arrow + " #body");
|
||||||
break;
|
var arrow_body_b = arrow_body.node().getBBox();
|
||||||
}
|
var arrow_head = d3.select("#" + id_arrow + " #head");
|
||||||
|
var arrow_head_b = arrow_head.node().getBBox();
|
||||||
if (count_symbols == 0) {
|
|
||||||
//~ setTimeout(function() {
|
var body_width = distance - arrow_head_b["width"];
|
||||||
//~ callback();
|
|
||||||
//~ }, 1000);
|
transform = d3.transform();
|
||||||
callback();
|
transform.scale[0] = body_width / arrow_body_b["width"];
|
||||||
}
|
arrow_body.attr("transform", transform.toString());
|
||||||
}
|
|
||||||
|
/*---------------------------------------------*/
|
||||||
for (var i in symbols) {
|
/*---------- Position of head arrow -----------*/
|
||||||
wait(symbols[i], callback);
|
/*---------------------------------------------*/
|
||||||
}
|
transform = d3.transform();
|
||||||
}
|
|
||||||
|
var arrow_body_t = d3.transform(arrow_body.attr("transform"));
|
||||||
|
|
||||||
function preload_symbol(symbol, param_step) {
|
var scale = arrow_body_t.scale[0];
|
||||||
var step;
|
var x = 0 + arrow_body_b["width"] * scale;
|
||||||
|
var y =
|
||||||
|
0 + (arrow_body_b["height"] / 2 - arrow_head_b["height"] / 2);
|
||||||
if (typeof(param_step) == "undefined") {
|
|
||||||
step = 1;
|
transform.translate[0] = x;
|
||||||
param_step = 1;
|
transform.translate[1] = y;
|
||||||
}
|
|
||||||
else {
|
arrow_head.attr("transform", transform.toString());
|
||||||
step = param_step;
|
|
||||||
}
|
/*---------------------------------------------*/
|
||||||
|
/*------- Show the result in one time ---------*/
|
||||||
|
/*---------------------------------------------*/
|
||||||
step++;
|
arrow.attr("style", "opacity: 1");
|
||||||
|
break;
|
||||||
var base64symbol = btoa(symbol).replace(/=/g, "");
|
}
|
||||||
|
}
|
||||||
var callback = function (e) {
|
|
||||||
preload_symbol(symbol, step);
|
function wait_for_preload_symbols(symbols, callback) {
|
||||||
}
|
var count_symbols = symbols.length;
|
||||||
|
|
||||||
switch (param_step) {
|
function wait(symbol, callback) {
|
||||||
case 1:
|
switch (is_preload_symbol(symbol)) {
|
||||||
d3.select("svg").append("g")
|
case -1:
|
||||||
.attr("id", base64symbol)
|
preload_symbol(symbol);
|
||||||
.attr("data-loaded", 0)
|
|
||||||
.style("opacity", 0)
|
setTimeout(function() {
|
||||||
.append("use")
|
wait(symbol, callback);
|
||||||
.attr("xlink:href", symbol)
|
}, 100);
|
||||||
.on("load", callback);
|
break;
|
||||||
break;
|
case 0:
|
||||||
case 2:
|
// Wait
|
||||||
d3.select("#" + base64symbol).attr("data-loaded", 1);
|
setTimeout(function() {
|
||||||
|
wait(symbol, callback);
|
||||||
break;
|
}, 100);
|
||||||
}
|
break;
|
||||||
}
|
case 1:
|
||||||
|
count_symbols--;
|
||||||
function is_preload_symbol(symbol) {
|
break;
|
||||||
var base64symbol = btoa(symbol).replace(/=/g, "");
|
}
|
||||||
|
|
||||||
if (d3.select("#" + base64symbol).node() === null)
|
if (count_symbols == 0) {
|
||||||
return -1;
|
//~ setTimeout(function() {
|
||||||
|
//~ callback();
|
||||||
return parseInt(d3.select("#" + base64symbol).attr("data-loaded"));
|
//~ }, 1000);
|
||||||
}
|
callback();
|
||||||
</script>
|
}
|
||||||
</body>
|
}
|
||||||
|
|
||||||
|
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>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, AIX version
|
# Version 7.0NG.758.1, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, FreeBSD Version
|
# Version 7.0NG.758.1, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, HP-UX Version
|
# Version 7.0NG.758.1, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, GNU/Linux
|
# Version 7.0NG.758.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, GNU/Linux
|
# Version 7.0NG.758.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, Solaris Version
|
# Version 7.0NG.758.1, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
# Foundation; either version 2 of the Licence or any later version
|
# Foundation; either version 2 of the Licence or any later version
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.758, AIX version
|
# Version 7.0NG.758.1, AIX version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# FreeBSD/IPSO version
|
# FreeBSD/IPSO version
|
||||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.758, HPUX Version
|
# Version 7.0NG.758.1, HPUX Version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# please visit http://pandora.sourceforge.net
|
# please visit http://pandora.sourceforge.net
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Fichero de configuracion base de agentes de Pandora
|
# Fichero de configuracion base de agentes de Pandora
|
||||||
# Base config file for Pandora agents
|
# Base config file for Pandora agents
|
||||||
# Version 7.0NG.758, Solaris version
|
# Version 7.0NG.758.1, Solaris version
|
||||||
|
|
||||||
# General Parameters
|
# General Parameters
|
||||||
# ==================
|
# ==================
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, AIX version
|
# Version 7.0NG.758.1, AIX version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.758-211123
|
Version: 7.0NG.758.1-211130
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.758-211123"
|
pandora_version="7.0NG.758.1-211130"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
|
|
@ -31,7 +31,7 @@ fi
|
||||||
if [ "$#" -ge 2 ]; then
|
if [ "$#" -ge 2 ]; then
|
||||||
VERSION="$2"
|
VERSION="$2"
|
||||||
else
|
else
|
||||||
VERSION="7.0NG.758"
|
VERSION="7.0NG.758.1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Path for the generated DMG file
|
# Path for the generated DMG file
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
<choice id="com.pandorafms.pandorafms_src" visible="false">
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
<pkg-ref id="com.pandorafms.pandorafms_src"/>
|
||||||
</choice>
|
</choice>
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.758" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_src" version="7.0NG.758.1" onConclusion="none">pandorafms_src.pdk</pkg-ref>
|
||||||
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
<choice id="com.pandorafms.pandorafms_uninstall" visible="true" customLocation="/Applications">
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall"/>
|
||||||
</choice>
|
</choice>
|
||||||
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.758" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
<pkg-ref id="com.pandorafms.pandorafms_uninstall" version="7.0NG.758.1" onConclusion="none">pandorafms_uninstall.pdk</pkg-ref>
|
||||||
<!-- <installation-check script="check()" />
|
<!-- <installation-check script="check()" />
|
||||||
<script>
|
<script>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
<key>CFBundleIconFile</key> <string>pandorafms.icns</string>
|
||||||
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
|
||||||
|
|
||||||
<key>CFBundleVersion</key> <string>7.0NG.758</string>
|
<key>CFBundleVersion</key> <string>7.0NG.758.1</string>
|
||||||
<key>CFBundleGetInfoString</key> <string>7.0NG.758 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
<key>CFBundleGetInfoString</key> <string>7.0NG.758.1 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
|
||||||
<key>CFBundleShortVersionString</key> <string>7.0NG.758</string>
|
<key>CFBundleShortVersionString</key> <string>7.0NG.758.1</string>
|
||||||
|
|
||||||
<key>NSPrincipalClass</key><string>NSApplication</string>
|
<key>NSPrincipalClass</key><string>NSApplication</string>
|
||||||
<key>NSMainNibFile</key><string>MainMenu</string>
|
<key>NSMainNibFile</key><string>MainMenu</string>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, GNU/Linux
|
# Version 7.0NG.758.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, FreeBSD Version
|
# Version 7.0NG.758.1, FreeBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, HP-UX Version
|
# Version 7.0NG.758.1, HP-UX Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, GNU/Linux
|
# Version 7.0NG.758.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, GNU/Linux
|
# Version 7.0NG.758.1, GNU/Linux
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, NetBSD Version
|
# Version 7.0NG.758.1, NetBSD Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Base config file for Pandora FMS agents
|
# Base config file for Pandora FMS agents
|
||||||
# Version 7.0NG.758, Solaris Version
|
# Version 7.0NG.758.1, Solaris Version
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
# Copyright (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -1014,8 +1014,8 @@ my $Sem = undef;
|
||||||
# Semaphore used to control the number of threads
|
# Semaphore used to control the number of threads
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.758';
|
use constant AGENT_VERSION => '7.0NG.758.1';
|
||||||
use constant AGENT_BUILD => '211123';
|
use constant AGENT_BUILD => '211130';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#Pandora FMS Linux Agent
|
#Pandora FMS Linux Agent
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#Pandora FMS Linux Agent
|
#Pandora FMS Linux Agent
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758"
|
PI_VERSION="7.0NG.758.1"
|
||||||
PI_BUILD="211123"
|
PI_BUILD="211130"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Base config file for Pandora FMS Windows Agent
|
# Base config file for Pandora FMS Windows Agent
|
||||||
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
# (c) 2006-2021 Artica Soluciones Tecnologicas
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# This program is Free Software, you can redistribute it and/or modify it
|
# This program is Free Software, you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||||
# Foundation; either version 2 of the Licence or any later version
|
# Foundation; either version 2 of the Licence or any later version
|
||||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
||||||
{Yes}
|
{Yes}
|
||||||
|
|
||||||
AppName
|
AppName
|
||||||
{Pandora FMS Windows Agent v7.0NG.758}
|
{Pandora FMS Windows Agent v7.0NG.758.1}
|
||||||
|
|
||||||
ApplicationID
|
ApplicationID
|
||||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{211123}
|
{211130}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.758 Build 211123")
|
#define PANDORA_VERSION ("7.0NG.758.1 Build 211130")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.758(Build 211123))"
|
VALUE "ProductVersion", "(7.0NG.758.1(Build 211130))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.758-211123
|
Version: 7.0NG.758.1-211130
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.758-211123"
|
pandora_version="7.0NG.758.1-211130"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -131,7 +131,7 @@ if (!empty($files)) {
|
||||||
$config_url = ui_get_full_url(
|
$config_url = ui_get_full_url(
|
||||||
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id
|
'index.php?sec=godmode/extensions&sec2=extensions/files_repo&file_id='.$file_id
|
||||||
);
|
);
|
||||||
$data[4] .= '<a href=\"$config_url\">';
|
$data[4] .= "<a href=\"$config_url\">";
|
||||||
$data[4] .= html_print_image(
|
$data[4] .= html_print_image(
|
||||||
'images/config.png',
|
'images/config.png',
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -1078,8 +1078,11 @@ if ($update_agent) {
|
||||||
// If IP is set for deletion, delete first.
|
// If IP is set for deletion, delete first.
|
||||||
if ($action_delete_ip) {
|
if ($action_delete_ip) {
|
||||||
$delete_ip = get_parameter_post('address_list');
|
$delete_ip = get_parameter_post('address_list');
|
||||||
|
if (empty($direccion_agente) === true) {
|
||||||
$direccion_agente = agents_delete_address($id_agente, $delete_ip);
|
$direccideon_agente = agents_delete_address($id_agente, $delete_ip);
|
||||||
|
} else {
|
||||||
|
agents_delete_address($id_agente, $delete_ip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$values = [
|
$values = [
|
||||||
|
|
|
@ -144,7 +144,7 @@ if ($prediction_available) {
|
||||||
$modules['predictionserver'] = __('Create a new prediction server module');
|
$modules['predictionserver'] = __('Create a new prediction server module');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($web_available) {
|
if (is_metaconsole() === true || $web_available === '1') {
|
||||||
$modules['webserver'] = __('Create a new web Server module');
|
$modules['webserver'] = __('Create a new web Server module');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,9 @@ html_print_div(
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
require_once $config['homedir'].'/include/ajax/web_server_module_debug.php';
|
if (is_int($id_agent_module) && $id_agent_module !== 0) {
|
||||||
|
include_once $config['homedir'].'/include/ajax/web_server_module_debug.php';
|
||||||
|
}
|
||||||
|
|
||||||
define('ID_NETWORK_COMPONENT_TYPE', 7);
|
define('ID_NETWORK_COMPONENT_TYPE', 7);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ require_once $config['homedir'].'/include/functions_modules.php';
|
||||||
require_once $config['homedir'].'/include/functions_users.php';
|
require_once $config['homedir'].'/include/functions_users.php';
|
||||||
|
|
||||||
$pure = get_parameter('pure', 0);
|
$pure = get_parameter('pure', 0);
|
||||||
|
$agent_id = get_parameter('agent_id', 0);
|
||||||
|
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
$sec = 'advanced';
|
$sec = 'advanced';
|
||||||
|
@ -74,6 +75,11 @@ $params['input_name'] = 'agent_name';
|
||||||
$params['value'] = $agentName;
|
$params['value'] = $agentName;
|
||||||
$params['size'] = 24;
|
$params['size'] = 24;
|
||||||
$params['metaconsole_enabled'] = false;
|
$params['metaconsole_enabled'] = false;
|
||||||
|
$params['use_hidden_input_idagent'] = true;
|
||||||
|
$params['print_hidden_input_idagent'] = true;
|
||||||
|
$params['hidden_input_idagent_id'] = 'hidden-autocomplete_id_agent';
|
||||||
|
$params['hidden_input_idagent_name'] = 'agent_id';
|
||||||
|
$params['hidden_input_idagent_value'] = $agent_id;
|
||||||
|
|
||||||
$form_filter .= ui_print_agent_autocomplete_input($params);
|
$form_filter .= ui_print_agent_autocomplete_input($params);
|
||||||
|
|
||||||
|
@ -234,7 +240,7 @@ if ($searchFlag) {
|
||||||
$id_agents = array_keys($agents);
|
$id_agents = array_keys($agents);
|
||||||
|
|
||||||
$total = agents_get_alerts_simple(
|
$total = agents_get_alerts_simple(
|
||||||
$id_agents,
|
(empty($agent_id) === false) ? ['0' => $agent_id] : $id_agents,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
$where,
|
$where,
|
||||||
|
@ -412,7 +418,7 @@ if ($id_agente) {
|
||||||
|
|
||||||
$offset = (int) get_parameter('offset');
|
$offset = (int) get_parameter('offset');
|
||||||
$simple_alerts = agents_get_alerts_simple(
|
$simple_alerts = agents_get_alerts_simple(
|
||||||
$id_agents,
|
(empty($agent_id) === false) ? ['0' => $agent_id] : $id_agents,
|
||||||
false,
|
false,
|
||||||
[
|
[
|
||||||
'offset' => $offset,
|
'offset' => $offset,
|
||||||
|
@ -688,7 +694,7 @@ foreach ($simple_alerts as $alert) {
|
||||||
$data[3] .= '</tr>';
|
$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] .= '</div>';
|
||||||
$data[3] .= '</table>';
|
$data[3] .= '</table>';
|
||||||
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
||||||
|
@ -706,9 +712,9 @@ foreach ($simple_alerts as $alert) {
|
||||||
$actions = alerts_get_alert_actions_filter(true, 'id_group IN ('.$filter_groups.')');
|
$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] .= '<div id="add_action-div-'.$alert['id'].'" class="invisible">';
|
||||||
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post">';
|
$data[3] .= '<form id="add_action_form-'.$alert['id'].'" method="post" style="height:85%;">';
|
||||||
$data[3] .= '<table class="databox_color w100p bg_color222">';
|
$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('add_action', 1, true);
|
||||||
$data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true);
|
$data[3] .= html_print_input_hidden('id_alert_module', $alert['id'], true);
|
||||||
|
|
||||||
|
@ -1127,13 +1133,14 @@ function show_add_action(id_alert) {
|
||||||
background: "black"
|
background: "black"
|
||||||
},
|
},
|
||||||
open: function() {
|
open: function() {
|
||||||
|
$(`#add_action-div-${id_alert}`).css('overflow', 'hidden');
|
||||||
$("#action_select, #action_select").select2({
|
$("#action_select, #action_select").select2({
|
||||||
tags: true,
|
tags: true,
|
||||||
dropdownParent: $("#add_action-div-" + id_alert)
|
dropdownParent: $("#add_action-div-" + id_alert)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
width: 500,
|
width: 455,
|
||||||
height: 300
|
height: 500
|
||||||
})
|
})
|
||||||
.show ();
|
.show ();
|
||||||
}
|
}
|
||||||
|
@ -1151,8 +1158,8 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: action="<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
url: action="<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$("#update_action-div").html (data);
|
$(`#update_action-div-${alert_id}`).html (data);
|
||||||
$("#update_action-div").hide ()
|
$(`#update_action-div-${alert_id}`).hide ()
|
||||||
.dialog ({
|
.dialog ({
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
@ -1163,14 +1170,14 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
|
||||||
background: "black"
|
background: "black"
|
||||||
},
|
},
|
||||||
open: function() {
|
open: function() {
|
||||||
$('#update_action-div').css('overflow', 'hidden');
|
$(`#update_action-div-${alert_id}`).css('overflow', 'hidden');
|
||||||
$("#action_select, #action_select_ajax").select2({
|
$(`#action_select_ajax-${alert_id}`).select2({
|
||||||
tags: true,
|
tags: true,
|
||||||
dropdownParent: $('#update_action-')
|
dropdownParent: $(`#update_action-div-${alert_id}`)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
width: 455,
|
width: 455,
|
||||||
height: 370
|
height: 500
|
||||||
})
|
})
|
||||||
.show ();
|
.show ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,8 @@ if ($add_action) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($update_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');
|
$id_module_action = (int) get_parameter('id_module_action_ajax');
|
||||||
$fires_min = (int) get_parameter('fires_min_ajax');
|
$fires_min = (int) get_parameter('fires_min_ajax');
|
||||||
$fires_max = (int) get_parameter('fires_max_ajax');
|
$fires_max = (int) get_parameter('fires_max_ajax');
|
||||||
|
|
|
@ -290,7 +290,7 @@ if (is_array($config) === true
|
||||||
$config['history_db_host'],
|
$config['history_db_host'],
|
||||||
$config['history_db_name'],
|
$config['history_db_name'],
|
||||||
$config['history_db_user'],
|
$config['history_db_user'],
|
||||||
$config['history_db_pass'],
|
io_output_password($config['history_db_pass']),
|
||||||
$config['history_db_port']
|
$config['history_db_port']
|
||||||
);
|
);
|
||||||
ob_get_clean();
|
ob_get_clean();
|
||||||
|
|
|
@ -835,7 +835,7 @@ class Client
|
||||||
function ($carry, $item) {
|
function ($carry, $item) {
|
||||||
$matches = [];
|
$matches = [];
|
||||||
if (is_array($item) !== true
|
if (is_array($item) !== true
|
||||||
&& preg_match('/(\d+)\.tar/', $item, $matches) > 0
|
&& preg_match('/([\d\.\d]+?)\.tar/', $item, $matches) > 0
|
||||||
) {
|
) {
|
||||||
$carry[] = [
|
$carry[] = [
|
||||||
'version' => $matches[1],
|
'version' => $matches[1],
|
||||||
|
|
|
@ -75,8 +75,8 @@ class RepoDisk extends Repo
|
||||||
$this->files = [];
|
$this->files = [];
|
||||||
while ($file_name = readdir($dh)) {
|
while ($file_name = readdir($dh)) {
|
||||||
// Files must contain a version number.
|
// Files must contain a version number.
|
||||||
if (preg_match('/(\d+)\_x86_64.'.$this->extension.'$/', $file_name, $utimestamp) === 1
|
if (preg_match('/([\d\.]+?)\_x86_64.'.$this->extension.'$/', $file_name, $utimestamp) === 1
|
||||||
|| preg_match('/(\d+)\.'.$this->extension.'$/', $file_name, $utimestamp) === 1
|
|| preg_match('/([\d\.]+?)\.'.$this->extension.'$/', $file_name, $utimestamp) === 1
|
||||||
) {
|
) {
|
||||||
// Add the file to the repository.
|
// Add the file to the repository.
|
||||||
$this->files[$utimestamp[1]] = $file_name;
|
$this->files[$utimestamp[1]] = $file_name;
|
||||||
|
|
|
@ -118,8 +118,8 @@ class ClientTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
system('echo "file3" > '.$path.'3');
|
system('echo "file3" > '.$path.'3');
|
||||||
file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n");
|
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 toum1 (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 toum2 (id int);\n" >>'.$path.'extras/mr/2.sql');
|
||||||
system('cd '.$path.' && zip '.$target.'/test_3.zip -r * >/dev/null');
|
system('cd '.$path.' && zip '.$target.'/test_3.zip -r * >/dev/null');
|
||||||
system('mv '.$target.'/test_3.zip '.$target.'/test_3.oum');
|
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');
|
system('echo "file4" > '.$path.'4');
|
||||||
file_put_contents($path.'extras/delete_files/delete_files.txt', "1\n");
|
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('cd '.$path.' && zip '.$target.'/test_4.zip -r * >/dev/null');
|
||||||
system('mv '.$target.'/test_4.zip '.$target.'/test_4.oum');
|
system('mv '.$target.'/test_4.zip '.$target.'/test_4.oum');
|
||||||
|
|
||||||
|
|
|
@ -422,13 +422,18 @@ if ($show_update_action_menu) {
|
||||||
$id_action
|
$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 .= '<table class="databox_color w100p bg_color222" style="height:100%;">';
|
||||||
$data .= html_print_input_hidden(
|
$data .= html_print_input_hidden(
|
||||||
'update_action',
|
'update_action',
|
||||||
1,
|
1,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
$data .= html_print_input_hidden(
|
||||||
|
'alert_id',
|
||||||
|
$id_alert,
|
||||||
|
true
|
||||||
|
);
|
||||||
$data .= html_print_input_hidden(
|
$data .= html_print_input_hidden(
|
||||||
'id_module_action_ajax',
|
'id_module_action_ajax',
|
||||||
$id_action,
|
$id_action,
|
||||||
|
@ -478,7 +483,7 @@ if ($show_update_action_menu) {
|
||||||
$data .= '<td class="datos2">';
|
$data .= '<td class="datos2">';
|
||||||
$data .= html_print_select(
|
$data .= html_print_select(
|
||||||
$actions,
|
$actions,
|
||||||
'action_select_ajax',
|
'action_select_ajax-'.$id_alert,
|
||||||
$action_option['id_alert_action'],
|
$action_option['id_alert_action'],
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -1309,6 +1309,14 @@ if ($get_extended_event) {
|
||||||
&& isset($config['event_replication'])
|
&& isset($config['event_replication'])
|
||||||
&& $config['event_replication'] == 1
|
&& $config['event_replication'] == 1
|
||||||
&& $config['show_events_in_local'] == 1
|
&& $config['show_events_in_local'] == 1
|
||||||
|
|| enterprise_hook(
|
||||||
|
'enterprise_acl',
|
||||||
|
[
|
||||||
|
$config['id_user'],
|
||||||
|
'eventos',
|
||||||
|
'execute_event_responses',
|
||||||
|
]
|
||||||
|
) === false
|
||||||
) {
|
) {
|
||||||
$readonly = true;
|
$readonly = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ class ModuleTemplates extends HTML
|
||||||
private $validPen;
|
private $validPen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Complete list of PENes.
|
* Complete list of PENs.
|
||||||
*
|
*
|
||||||
* @var array.
|
* @var array.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC211123';
|
$build_version = 'PC211130';
|
||||||
$pandora_version = 'v7.0NG.758';
|
$pandora_version = 'v7.0NG.758.1';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
$script_tz = @date_default_timezone_get();
|
$script_tz = @date_default_timezone_get();
|
||||||
|
|
|
@ -760,7 +760,11 @@ function mysql_db_format_array_where_clause_sql($values, $join='AND', $prefix=fa
|
||||||
if ($field[0] != '`') {
|
if ($field[0] != '`') {
|
||||||
// If the field is as <table>.<field>, don't scape.
|
// If the field is as <table>.<field>, don't scape.
|
||||||
if (strstr($field, '.') === false) {
|
if (strstr($field, '.') === false) {
|
||||||
$field = '`'.$field.'`';
|
if (preg_match('/(UPPER|LOWER)(.+)/mi', $field)) {
|
||||||
|
$field = preg_replace('/(UPPER|LOWER])\((.+)\)/mi', '$1(`$2`)', $field);
|
||||||
|
} else {
|
||||||
|
$field = '`'.$field.'`';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -421,12 +421,13 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
|
||||||
INNER JOIN tagente_modulo t2
|
INNER JOIN tagente_modulo t2
|
||||||
ON talert_template_modules.id_agent_module = t2.id_agente_modulo
|
ON talert_template_modules.id_agent_module = t2.id_agente_modulo
|
||||||
INNER JOIN tagente t3
|
INNER JOIN tagente t3
|
||||||
ON t2.id_agente = t3.id_agente
|
ON t2.id_agente = t3.id_agente %s
|
||||||
%s
|
%s
|
||||||
INNER JOIN talert_templates t4
|
INNER JOIN talert_templates t4
|
||||||
ON talert_template_modules.id_alert_template = t4.id
|
ON talert_template_modules.id_alert_template = t4.id
|
||||||
WHERE id_agent_module in (%s) %s %s %s',
|
WHERE id_agent_module in (%s) %s %s %s',
|
||||||
$selectText,
|
$selectText,
|
||||||
|
($id_agent !== false && is_array($id_agent)) ? 'AND t3.id_agente IN ('.implode(',', $id_agent).')' : '',
|
||||||
$secondary_join,
|
$secondary_join,
|
||||||
$subQuery,
|
$subQuery,
|
||||||
$where,
|
$where,
|
||||||
|
@ -434,40 +435,14 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $
|
||||||
$orderbyText
|
$orderbyText
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ($config['dbtype']) {
|
$limit_sql = '';
|
||||||
case 'mysql':
|
if (isset($offset) && isset($limit)) {
|
||||||
$limit_sql = '';
|
$limit_sql = " LIMIT $offset, $limit ";
|
||||||
if (isset($offset) && isset($limit)) {
|
|
||||||
$limit_sql = " LIMIT $offset, $limit ";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = sprintf('%s %s', $sql, $limit_sql);
|
|
||||||
$alerts = db_get_all_rows_sql($sql);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'postgresql':
|
|
||||||
$limit_sql = '';
|
|
||||||
if (isset($offset) && isset($limit)) {
|
|
||||||
$limit_sql = " OFFSET $offset LIMIT $limit ";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = sprintf('%s %s', $sql, $limit_sql);
|
|
||||||
|
|
||||||
$alerts = db_get_all_rows_sql($sql);
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'oracle':
|
|
||||||
$set = [];
|
|
||||||
if (isset($offset) && isset($limit)) {
|
|
||||||
$set['limit'] = $limit;
|
|
||||||
$set['offset'] = $offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
$alerts = oracle_recode_query($sql, $set, 'AND', false);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sql = sprintf('%s %s', $sql, $limit_sql);
|
||||||
|
$alerts = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
if ($alerts === false) {
|
if ($alerts === false) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,11 +194,11 @@ function custom_graphs_get_user($id_user=0, $only_names=false, $returnAllGroup=t
|
||||||
function custom_graphs_search($id_group, $search)
|
function custom_graphs_search($id_group, $search)
|
||||||
{
|
{
|
||||||
if ($id_group != '' && $search != '') {
|
if ($id_group != '' && $search != '') {
|
||||||
$all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.' AND name LIKE "%'.$search.'%"');
|
$all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.' AND (name LIKE "%'.$search.'%" OR description LIKE "'.$search.'")');
|
||||||
} else if ($id_group != '') {
|
} else if ($id_group != '') {
|
||||||
$all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.'');
|
$all_graphs = db_get_all_rows_sql('select * from tgraph where id_group = '.$id_group.'');
|
||||||
} else {
|
} else {
|
||||||
$all_graphs = db_get_all_rows_sql('select * from tgraph where name LIKE "%'.$search.'%"');
|
$all_graphs = db_get_all_rows_sql('select * from tgraph where name LIKE "%'.$search.'%" OR description LIKE "'.$search.'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($all_graphs === false) {
|
if ($all_graphs === false) {
|
||||||
|
|
|
@ -1574,7 +1574,9 @@ function graphic_combined_module(
|
||||||
$date_array['final_date'] = $params['date'];
|
$date_array['final_date'] = $params['date'];
|
||||||
$date_array['start_date'] = ($params['date'] - $params['period']);
|
$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']) {
|
if ($params_combined['projection']) {
|
||||||
$output_projection = forecast_projection_graph(
|
$output_projection = forecast_projection_graph(
|
||||||
|
|
|
@ -503,14 +503,14 @@ function menu_add_extras(&$menu)
|
||||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_editor']['text'] = __('Manage graph templates');
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_editor']['text'] = __('Manage graph templates');
|
||||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_item_editor']['text'] = __('Graph template items');
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_item_editor']['text'] = __('Graph template items');
|
||||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard');
|
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard');
|
||||||
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=wizard&action=wizard']['text'] = __('Templates wizard');
|
||||||
|
$menu_extra['reporting']['sub']['godmode/reporting/reporting_builder&tab=template&action=list_template']['text'] = __('Templates');
|
||||||
if ($config['activate_gis']) {
|
if ($config['activate_gis']) {
|
||||||
$menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps');
|
$menu_extra['godgismaps']['sub']['godmode/gis_maps/configure_gis_map']['text'] = __('Manage GIS Maps');
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages');
|
$menu_extra['workspace']['sub']['operation/messages/message_edit']['text'] = __('Manage messages');
|
||||||
|
|
||||||
$menu_extra['gagente']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups');
|
|
||||||
$menu_extra['gagente']['sub']['godmode/groups/configure_modu_group']['text'] = __('Manage module groups');
|
$menu_extra['gagente']['sub']['godmode/groups/configure_modu_group']['text'] = __('Manage module groups');
|
||||||
$menu_extra['gagente']['sub']['godmode/agentes/configure_field']['text'] = __('Manage custom field');
|
$menu_extra['gagente']['sub']['godmode/agentes/configure_field']['text'] = __('Manage custom field');
|
||||||
|
|
||||||
|
@ -524,6 +524,9 @@ function menu_add_extras(&$menu)
|
||||||
|
|
||||||
$menu_extra['workspace']['sub']['operation/incidents/incident_detail']['text'] = __('Manage incident');
|
$menu_extra['workspace']['sub']['operation/incidents/incident_detail']['text'] = __('Manage incident');
|
||||||
|
|
||||||
|
$menu_extra['gusuarios']['sub']['godmode/groups/configure_group']['text'] = __('Manage groups');
|
||||||
|
$menu_extra['gusuarios']['sub']['godmode/tag/edit_tag']['text'] = __('Tags management');
|
||||||
|
|
||||||
// Duplicate extensions as sec=extension to check it from url.
|
// Duplicate extensions as sec=extension to check it from url.
|
||||||
foreach ($menu as $k => $m) {
|
foreach ($menu as $k => $m) {
|
||||||
if (!isset($m['sub'])) {
|
if (!isset($m['sub'])) {
|
||||||
|
@ -532,7 +535,9 @@ function menu_add_extras(&$menu)
|
||||||
|
|
||||||
foreach ($m['sub'] as $kk => $mm) {
|
foreach ($m['sub'] as $kk => $mm) {
|
||||||
if (isset($mm['sec'])) {
|
if (isset($mm['sec'])) {
|
||||||
$menu_extra[$mm['sec']]['sub'][$kk]['text'] = $mm['text'];
|
if (empty($menu[$mm['sec']]['sub'][$kk]['text']) === true) {
|
||||||
|
$menu_extra[$mm['sec']]['sub'][$kk]['text'] = $mm['text'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,6 +301,7 @@ function users_get_groups(
|
||||||
$search=''
|
$search=''
|
||||||
) {
|
) {
|
||||||
static $group_cache = [];
|
static $group_cache = [];
|
||||||
|
|
||||||
$filter = '';
|
$filter = '';
|
||||||
|
|
||||||
// Added users_group_cache to avoid unnecessary proccess on massive calls...
|
// Added users_group_cache to avoid unnecessary proccess on massive calls...
|
||||||
|
@ -342,13 +343,6 @@ function users_get_groups(
|
||||||
$query = 'SELECT * FROM tgrupo ORDER BY nombre';
|
$query = 'SELECT * FROM tgrupo ORDER BY nombre';
|
||||||
$raw_groups = db_get_all_rows_sql($query);
|
$raw_groups = db_get_all_rows_sql($query);
|
||||||
|
|
||||||
if (empty($search) === false) {
|
|
||||||
$filter = sprintf(
|
|
||||||
' AND lower(tgrupo.nombre) like lower("%%%s%%")',
|
|
||||||
$search
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = sprintf(
|
$query = sprintf(
|
||||||
"SELECT tgrupo.*, tperfil.*, tusuario_perfil.tags, tusuario_perfil.no_hierarchy FROM tgrupo, tusuario_perfil, tperfil
|
"SELECT tgrupo.*, tperfil.*, tusuario_perfil.tags, tusuario_perfil.no_hierarchy FROM tgrupo, tusuario_perfil, tperfil
|
||||||
WHERE (tgrupo.id_grupo = tusuario_perfil.id_grupo OR tusuario_perfil.id_grupo = 0)
|
WHERE (tgrupo.id_grupo = tusuario_perfil.id_grupo OR tusuario_perfil.id_grupo = 0)
|
||||||
|
@ -451,6 +445,16 @@ function users_get_groups(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search filter.
|
||||||
|
if (empty($search) === false) {
|
||||||
|
$user_groups = array_filter(
|
||||||
|
$user_groups,
|
||||||
|
function ($group) use ($search) {
|
||||||
|
return (bool) preg_match('/'.$search.'/i', $group['nombre']);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$users_group_cache[$users_group_cache_key] = $user_groups;
|
$users_group_cache[$users_group_cache_key] = $user_groups;
|
||||||
|
|
||||||
return $user_groups;
|
return $user_groups;
|
||||||
|
|
|
@ -1,5 +1,19 @@
|
||||||
/* global $, jQuery*/
|
/* global $, jQuery*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom selector for case instensitive contains.
|
||||||
|
*/
|
||||||
|
jQuery.expr[":"].iContains = jQuery.expr.createPseudo(function(arg) {
|
||||||
|
return function(elem) {
|
||||||
|
return (
|
||||||
|
jQuery(elem)
|
||||||
|
.text()
|
||||||
|
.toUpperCase()
|
||||||
|
.indexOf(arg.toUpperCase()) >= 0
|
||||||
|
);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add modules from available to selected.
|
* Add modules from available to selected.
|
||||||
*/
|
*/
|
||||||
|
@ -58,14 +72,14 @@ function filterItems(id, str) {
|
||||||
$("#" + id + " option[value=0]").remove();
|
$("#" + id + " option[value=0]").remove();
|
||||||
|
|
||||||
// Move not matching elements filtered to tmp-id.
|
// Move not matching elements filtered to tmp-id.
|
||||||
var tmp = $("#" + id + " option:not(:contains(" + str + "))").toArray();
|
var tmp = $("#" + id + " option:not(:iContains(" + str + "))").toArray();
|
||||||
tmp.forEach(function(item) {
|
tmp.forEach(function(item) {
|
||||||
$("#tmp-" + id).append(item);
|
$("#tmp-" + id).append(item);
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Move matching filter back to id.
|
// Move matching filter back to id.
|
||||||
tmp = $("#tmp-" + id + " option:contains(" + str + ")").toArray();
|
tmp = $("#tmp-" + id + " option:iContains(" + str + ")").toArray();
|
||||||
tmp.forEach(function(item) {
|
tmp.forEach(function(item) {
|
||||||
$("#" + id).append(item);
|
$("#" + id).append(item);
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
|
|
|
@ -3279,13 +3279,6 @@ td.empty_field {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#update_action-
|
|
||||||
> .select2-container--default
|
|
||||||
.select2-results
|
|
||||||
> .select2-results__options {
|
|
||||||
max-height: 125px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Policies styles */
|
/* Policies styles */
|
||||||
|
|
||||||
table#policy_modules td * {
|
table#policy_modules td * {
|
||||||
|
|
|
@ -128,8 +128,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.758';
|
$version = '7.0NG.758.1';
|
||||||
$build = '211123';
|
$build = '211130';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -993,8 +993,14 @@ function install_step4()
|
||||||
|
|
||||||
$step5 = mysqli_query(
|
$step5 = mysqli_query(
|
||||||
$connection,
|
$connection,
|
||||||
"CREATE USER pandora@$host IDENTIFIED BY '".$random_password."'"
|
"CREATE USER IF NOT EXISTS pandora@$host"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
mysqli_query(
|
||||||
|
$connection,
|
||||||
|
"SET PASSWORD FOR 'pandora'@'".$host."' = '".$random_password."'"
|
||||||
|
);
|
||||||
|
|
||||||
$step5 |= mysqli_query(
|
$step5 |= mysqli_query(
|
||||||
$connection,
|
$connection,
|
||||||
"GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host"
|
"GRANT ALL PRIVILEGES ON `$dbname`.* to pandora@$host"
|
||||||
|
|
|
@ -108,7 +108,7 @@ class ModuleGraph
|
||||||
|
|
||||||
$this->height -= 80;
|
$this->height -= 80;
|
||||||
// Correct the height
|
// 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) {
|
if ($this->height < 140) {
|
||||||
$this->height = 140;
|
$this->height = 140;
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,8 @@ if ($free_search != '') {
|
||||||
WHERE id_agente IN (
|
WHERE id_agente IN (
|
||||||
SELECT id_agente
|
SELECT id_agente
|
||||||
FROM tagente
|
FROM tagente
|
||||||
WHERE nombre LIKE "%'.$free_search.'%") OR alias LIKE "%'.$free_search.'%")'.')';
|
WHERE nombre COLLATE utf8_general_ci LIKE "%'.$free_search.'%")
|
||||||
|
OR alias COLLATE utf8_general_ci LIKE "%'.$free_search.'%")'.')';
|
||||||
} else {
|
} else {
|
||||||
$whereAlertSimple = '';
|
$whereAlertSimple = '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,23 +261,22 @@ foreach ($result as $row) {
|
||||||
$data[] = $attr[1] ($row[$attr[0]]);
|
$data[] = $attr[1] ($row[$attr[0]]);
|
||||||
} else if (($config['command_snapshot']) && (preg_match("/[\n]+/i", $row[$attr[0]]))) {
|
} else if (($config['command_snapshot']) && (preg_match("/[\n]+/i", $row[$attr[0]]))) {
|
||||||
// Its a single-data, multiline data (data snapshot) ?
|
// 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('/\n/i', '<br>', $row[$attr[0]]);
|
||||||
$datos = preg_replace('/\s/i', ' ', $datos);
|
$datos = preg_replace('/\s/i', ' ', $datos);
|
||||||
|
|
||||||
// Because this *SHIT* of print_table monster, I cannot format properly this cells
|
// Because this print_table monster, I cannot format properly this cells.
|
||||||
// so, eat this, motherfucker :))
|
|
||||||
$datos = "<span class='mono'>".$datos.'</span>';
|
$datos = "<span class='mono'>".$datos.'</span>';
|
||||||
|
|
||||||
// I dont why, but using index (value) method, data is automatically converted to html entities ¿?
|
// I dont why, but using index (value) method, data is automatically converted to html entities ¿?
|
||||||
$data[$attr[1]] = $datos;
|
$data[$attr[1]] = $datos;
|
||||||
} else if ($is_web_content_string) {
|
} else if ($is_web_content_string) {
|
||||||
// Fixed the goliat sends the strings from web
|
// Fixed the goliat sends the strings from web
|
||||||
// without HTML entities
|
// without HTML entities.
|
||||||
$data[$attr[1]] = io_safe_input($row[$attr[0]]);
|
$data[$attr[1]] = io_safe_input($row[$attr[0]]);
|
||||||
} else {
|
} else {
|
||||||
// Just a string of alphanumerical data... just do print
|
// 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]])) {
|
if ($row[$attr[0]] != strip_tags($row[$attr[0]])) {
|
||||||
$data[$attr[1]] = io_safe_input($row[$attr[0]]);
|
$data[$attr[1]] = io_safe_input($row[$attr[0]]);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1009,6 +1009,18 @@ if (is_metaconsole() !== true) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enterprise_hook(
|
||||||
|
'enterprise_acl',
|
||||||
|
[
|
||||||
|
$config['id_user'],
|
||||||
|
'eventos',
|
||||||
|
'execute_event_responses',
|
||||||
|
]
|
||||||
|
) === false
|
||||||
|
) {
|
||||||
|
$readonly = true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Load filter form.
|
* Load filter form.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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);
|
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');
|
$event_id = (int) get_parameter('from_event');
|
||||||
$incident_id_edit = (int) get_parameter('incident_id');
|
$incident_id_edit = (int) get_parameter('incident_id');
|
||||||
$create_incident = (bool) get_parameter('create_incident', 0);
|
$create_incident = (bool) get_parameter('create_incident', 0);
|
||||||
|
@ -88,6 +92,7 @@ $incident_owner = get_parameter('owner');
|
||||||
$incident_type = (int) get_parameter('type');
|
$incident_type = (int) get_parameter('type');
|
||||||
$incident_creator = get_parameter('creator');
|
$incident_creator = get_parameter('creator');
|
||||||
$incident_status = (int) get_parameter('status');
|
$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_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'));
|
$incident_content = events_get_field_value_by_event_id($event_id, get_parameter('incident_content'));
|
||||||
$file_description = get_parameter('file_description');
|
$file_description = get_parameter('file_description');
|
||||||
|
@ -98,8 +103,13 @@ $incident_content = str_replace(',', ':::', $incident_content);
|
||||||
|
|
||||||
// Perform action.
|
// Perform action.
|
||||||
if ($create_incident === true) {
|
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.
|
// 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) {
|
if ($userfile !== '' && $result_api_call !== false) {
|
||||||
integriaims_upload_file('userfile', $result_api_call, $file_description);
|
integriaims_upload_file('userfile', $result_api_call, $file_description);
|
||||||
|
@ -114,8 +124,13 @@ if ($create_incident === true) {
|
||||||
__('Could not be created in Integria IMS')
|
__('Could not be created in Integria IMS')
|
||||||
);
|
);
|
||||||
} else if ($update_incident === true) {
|
} 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.
|
// 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 !== '') {
|
if ($userfile !== '') {
|
||||||
integriaims_upload_file('userfile', $incident_id_edit, $file_description);
|
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[1] = 'width: 33%; padding-right: 50px; padding-left: 50px;';
|
||||||
$table->style[2] = 'width: 33%; padding-right: 100px; padding-left: 50px;';
|
$table->style[2] = 'width: 33%; padding-right: 100px; padding-left: 50px;';
|
||||||
$table->colspan[0][0] = 2;
|
$table->colspan[0][0] = 2;
|
||||||
$table->colspan[3][0] = 3;
|
$table->colspan[4][0] = 3;
|
||||||
$table->colspan[5][0] = 3;
|
$table->colspan[6][0] = 3;
|
||||||
|
|
||||||
$help_macros = isset($_GET['from_event']) ? ui_print_help_icon('response_macros', true) : '';
|
$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_criticity = $incident_details[7];
|
||||||
$input_value_owner = $incident_details[5];
|
$input_value_owner = $incident_details[5];
|
||||||
$input_value_content = $incident_details[4];
|
$input_value_content = $incident_details[4];
|
||||||
|
$input_value_resolution = $incident_details[12];
|
||||||
} else if (isset($_GET['from_event'])) {
|
} else if (isset($_GET['from_event'])) {
|
||||||
$input_value_title = $config['cr_incident_title'];
|
$input_value_title = $config['cr_incident_title'];
|
||||||
$input_value_type = $config['cr_incident_type'];
|
$input_value_type = $config['cr_incident_type'];
|
||||||
|
@ -182,6 +198,7 @@ if ($update) {
|
||||||
$input_value_criticity = $config['cr_default_criticity'];
|
$input_value_criticity = $config['cr_default_criticity'];
|
||||||
$input_value_owner = $config['cr_default_owner'];
|
$input_value_owner = $config['cr_default_owner'];
|
||||||
$input_value_content = $config['cr_incident_content'];
|
$input_value_content = $config['cr_incident_content'];
|
||||||
|
$input_value_resolution = 0;
|
||||||
} else {
|
} else {
|
||||||
$input_value_title = '';
|
$input_value_title = '';
|
||||||
$input_value_type = '';
|
$input_value_type = '';
|
||||||
|
@ -190,6 +207,7 @@ if ($update) {
|
||||||
$input_value_criticity = '';
|
$input_value_criticity = '';
|
||||||
$input_value_owner = '';
|
$input_value_owner = '';
|
||||||
$input_value_content = '';
|
$input_value_content = '';
|
||||||
|
$input_value_resolution = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[0][0] = '<div class="label_select"><p class="input_label">'.__('Title').': '.$help_macros.'</p>';
|
$table->data[0][0] = '<div class="label_select"><p class="input_label">'.__('Title').': '.$help_macros.'</p>';
|
||||||
|
@ -303,8 +321,26 @@ $table->data[2][2] .= '<div class="label_select_parent">'.html_print_autocomplet
|
||||||
'w100p'
|
'w100p'
|
||||||
).'</div>';
|
).'</div>';
|
||||||
|
|
||||||
$table->data[3][0] = '<div class="label_select"><p class="input_label">'.__('Description').': '.$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').': '.$help_macros.'</p>';
|
||||||
|
$table->data[4][0] .= '<div class="label_select_parent">'.html_print_textarea(
|
||||||
'incident_content',
|
'incident_content',
|
||||||
3,
|
3,
|
||||||
20,
|
20,
|
||||||
|
@ -313,10 +349,10 @@ $table->data[3][0] .= '<div class="label_select_parent">'.html_print_textarea(
|
||||||
true
|
true
|
||||||
).'</div>';
|
).'</div>';
|
||||||
|
|
||||||
$table->data[4][0] = '<div class="label_select"><p class="input_label">'.__('File name').':</p>';
|
$table->data[5][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] .= html_print_input_file('userfile', true);
|
||||||
$table->data[5][0] = '<div class="label_select"><p class="input_label">'.__('Attachment description').':</p>';
|
$table->data[6][0] = '<div class="label_select"><p class="input_label">'.__('Attachment description').':</p>';
|
||||||
$table->data[5][0] .= html_print_textarea(
|
$table->data[6][0] .= html_print_textarea(
|
||||||
'file_description',
|
'file_description',
|
||||||
3,
|
3,
|
||||||
20,
|
20,
|
||||||
|
@ -345,3 +381,32 @@ if ($update) {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>';
|
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>
|
||||||
|
|
|
@ -48,7 +48,7 @@ if ($id_graph !== 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete module SQL code
|
// Delete module SQL code.
|
||||||
if ($delete_graph) {
|
if ($delete_graph) {
|
||||||
if (check_acl($config['id_user'], 0, 'AW')) {
|
if (check_acl($config['id_user'], 0, 'AW')) {
|
||||||
$res = db_process_sql_delete('tgraph_source', ['id_graph' => $id_graph]);
|
$res = db_process_sql_delete('tgraph_source', ['id_graph' => $id_graph]);
|
||||||
|
@ -239,7 +239,7 @@ if ($view_graph) {
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
// In full screen, the manage options are not available
|
// In full screen, the manage options are not available.
|
||||||
$options = [
|
$options = [
|
||||||
'view' => $options['view'],
|
'view' => $options['view'],
|
||||||
'screen' => $options['screen'],
|
'screen' => $options['screen'],
|
||||||
|
@ -277,6 +277,12 @@ if ($view_graph) {
|
||||||
'fullscale' => $fullscale,
|
'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 = [
|
$params_combined = [
|
||||||
'stacked' => $stacked,
|
'stacked' => $stacked,
|
||||||
'id_graph' => $id_graph,
|
'id_graph' => $id_graph,
|
||||||
|
|
|
@ -139,32 +139,32 @@ if ($searchAlerts) {
|
||||||
switch ($config['dbtype']) {
|
switch ($config['dbtype']) {
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$whereAlerts = 'AND (
|
$whereAlerts = 'AND (
|
||||||
id_alert_template IN (SELECT id FROM talert_templates WHERE name LIKE "%'.$stringSearchSQL.'%") OR
|
id_alert_template IN (SELECT id FROM talert_templates WHERE name COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%") OR
|
||||||
id_alert_template IN (
|
id_alert_template IN (
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM talert_templates
|
FROM talert_templates
|
||||||
WHERE id_alert_action IN (
|
WHERE id_alert_action IN (
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM talert_actions
|
FROM talert_actions
|
||||||
WHERE name LIKE "%'.$stringSearchSQL.'%")) OR
|
WHERE name COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%")) OR
|
||||||
talert_template_modules.id IN (
|
talert_template_modules.id IN (
|
||||||
SELECT id_alert_template_module
|
SELECT id_alert_template_module
|
||||||
FROM talert_template_module_actions
|
FROM talert_template_module_actions
|
||||||
WHERE id_alert_action IN (
|
WHERE id_alert_action IN (
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM talert_actions
|
FROM talert_actions
|
||||||
WHERE name LIKE "%'.$stringSearchSQL.'%")) OR
|
WHERE name COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%")) OR
|
||||||
id_agent_module IN (
|
id_agent_module IN (
|
||||||
SELECT id_agente_modulo
|
SELECT id_agente_modulo
|
||||||
FROM tagente_modulo
|
FROM tagente_modulo
|
||||||
WHERE nombre LIKE "%'.$stringSearchSQL.'%") OR
|
WHERE nombre COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%") OR
|
||||||
id_agent_module IN (
|
id_agent_module IN (
|
||||||
SELECT id_agente_modulo
|
SELECT id_agente_modulo
|
||||||
FROM tagente_modulo
|
FROM tagente_modulo
|
||||||
WHERE id_agente IN (
|
WHERE id_agente IN (
|
||||||
SELECT id_agente
|
SELECT id_agente
|
||||||
FROM tagente
|
FROM tagente
|
||||||
WHERE nombre LIKE "%'.$stringSearchSQL.'%" '.$extra_sql.'))
|
WHERE nombre COLLATE utf8_general_ci LIKE "%'.$stringSearchSQL.'%" '.$extra_sql.'))
|
||||||
)';
|
)';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Pandora FMS Console
|
# Pandora FMS Console
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# This code is licensed under GPL 2.0 license.
|
# This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758"
|
PI_VERSION="7.0NG.758.1"
|
||||||
FORCE=0
|
FORCE=0
|
||||||
DESTDIR=""
|
DESTDIR=""
|
||||||
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"`
|
||||||
|
|
|
@ -134,9 +134,7 @@ sunshine
|
||||||
hunter
|
hunter
|
||||||
4321
|
4321
|
||||||
buddy
|
buddy
|
||||||
porn
|
|
||||||
morgan
|
morgan
|
||||||
fuck
|
|
||||||
4128
|
4128
|
||||||
whatever
|
whatever
|
||||||
matrix
|
matrix
|
||||||
|
@ -164,7 +162,6 @@ charles
|
||||||
thomas
|
thomas
|
||||||
casper
|
casper
|
||||||
jackie
|
jackie
|
||||||
cumshot
|
|
||||||
girls
|
girls
|
||||||
tigger
|
tigger
|
||||||
stupid
|
stupid
|
||||||
|
@ -172,7 +169,6 @@ monica
|
||||||
boston
|
boston
|
||||||
booboo
|
booboo
|
||||||
robert
|
robert
|
||||||
shit
|
|
||||||
midnight
|
midnight
|
||||||
braves
|
braves
|
||||||
coffee
|
coffee
|
||||||
|
@ -212,11 +208,9 @@ sierra
|
||||||
mercedes
|
mercedes
|
||||||
johnny
|
johnny
|
||||||
george
|
george
|
||||||
cumming
|
|
||||||
leather
|
leather
|
||||||
5150
|
5150
|
||||||
gandalf
|
gandalf
|
||||||
sexy
|
|
||||||
hunting
|
hunting
|
||||||
232323
|
232323
|
||||||
doggie
|
doggie
|
||||||
|
@ -279,8 +273,6 @@ member
|
||||||
anthony
|
anthony
|
||||||
austin
|
austin
|
||||||
paul
|
paul
|
||||||
fucked
|
|
||||||
boobs
|
|
||||||
blowme
|
blowme
|
||||||
william
|
william
|
||||||
mine
|
mine
|
||||||
|
@ -419,13 +411,11 @@ freedom
|
||||||
magnum
|
magnum
|
||||||
extreme
|
extreme
|
||||||
internet
|
internet
|
||||||
fucking
|
|
||||||
ginger
|
ginger
|
||||||
juice
|
juice
|
||||||
redskins
|
redskins
|
||||||
action
|
action
|
||||||
captain
|
captain
|
||||||
blowjob
|
|
||||||
abgrtyu
|
abgrtyu
|
||||||
erotic
|
erotic
|
||||||
carter
|
carter
|
||||||
|
@ -478,7 +468,6 @@ winner
|
||||||
131313
|
131313
|
||||||
mistress
|
mistress
|
||||||
florida
|
florida
|
||||||
cock
|
|
||||||
samantha
|
samantha
|
||||||
123123
|
123123
|
||||||
phantom
|
phantom
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.758-211123
|
Version: 7.0NG.758.1-211130
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.758-211123"
|
pandora_version="7.0NG.758.1-211130"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# Pandora FMS Server Parameters
|
# Pandora FMS Server Parameters
|
||||||
# Pandora FMS, the Flexible Monitoring System.
|
# Pandora FMS, the Flexible Monitoring System.
|
||||||
# Version 7.0NG.758
|
# Version 7.0NG.758.1
|
||||||
# Licensed under GPL license v2,
|
# Licensed under GPL license v2,
|
||||||
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
# (c) 2003-2021 Artica Soluciones Tecnologicas
|
||||||
# http://www.pandorafms.com
|
# http://www.pandorafms.com
|
||||||
|
|
|
@ -45,8 +45,8 @@ our @EXPORT = qw(
|
||||||
);
|
);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.758";
|
my $pandora_version = "7.0NG.758.1";
|
||||||
my $pandora_build = "211123";
|
my $pandora_build = "211130";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
|
|
@ -929,9 +929,9 @@ sub PandoraFMS::Recon::Base::create_network_profile_modules($$) {
|
||||||
|
|
||||||
# 2. Verify Private Enterprise Number matches (PEN)
|
# 2. Verify Private Enterprise Number matches (PEN)
|
||||||
if (defined($template->{'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.
|
# 3. Retrieve module list from target template.
|
||||||
|
|
|
@ -33,8 +33,8 @@ use base 'Exporter';
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.758";
|
my $pandora_version = "7.0NG.758.1";
|
||||||
my $pandora_build = "211123";
|
my $pandora_build = "211130";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Pandora FMS Server
|
# Pandora FMS Server
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
# Pandora FMS Server
|
# Pandora FMS Server
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.758
|
%define version 7.0NG.758.1
|
||||||
%define release 211123
|
%define release 211130
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
# This code is licensed under GPL 2.0 license.
|
# This code is licensed under GPL 2.0 license.
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.758"
|
PI_VERSION="7.0NG.758.1"
|
||||||
PI_BUILD="211123"
|
PI_BUILD="211130"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.758 Build 211123";
|
my $version = "7.0NG.758.1 Build 211130";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.758 Build 211123";
|
my $version = "7.0NG.758.1 Build 211130";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
@ -343,6 +343,23 @@ sub update_conf_txt ($$$$) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
# PRINT HELP AND CHECK ERRORS FUNCTIONS
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# log wrapper
|
||||||
|
###############################################################################
|
||||||
|
sub print_log ($) {
|
||||||
|
my ($msg) = @_;
|
||||||
|
|
||||||
|
print $msg; # show message
|
||||||
|
|
||||||
|
$msg =~ s/\n+$//;
|
||||||
|
logger( $conf, "($progname) $msg", 10); # save to logging file
|
||||||
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Disable a entire group
|
# Disable a entire group
|
||||||
|
@ -353,6 +370,11 @@ sub pandora_disable_group ($$$) {
|
||||||
my @agents_bd = [];
|
my @agents_bd = [];
|
||||||
my $result = 0;
|
my $result = 0;
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To disable a group go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ($group == 0){
|
if ($group == 0){
|
||||||
# Extract all the names of the pandora agents if it is for all = 0.
|
# Extract all the names of the pandora agents if it is for all = 0.
|
||||||
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente');
|
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente');
|
||||||
|
@ -390,6 +412,11 @@ sub pandora_enable_group ($$$) {
|
||||||
my @agents_bd = [];
|
my @agents_bd = [];
|
||||||
my $result = 0;
|
my $result = 0;
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To enable a group go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ($group == 0){
|
if ($group == 0){
|
||||||
# Extract all the names of the pandora agents if it is for all = 0.
|
# Extract all the names of the pandora agents if it is for all = 0.
|
||||||
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente');
|
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente');
|
||||||
|
@ -510,8 +537,12 @@ sub cli_create_snmp_trap ($$) {
|
||||||
sub pandora_create_user ($$$$$) {
|
sub pandora_create_user ($$$$$) {
|
||||||
my ($dbh, $name, $password, $is_admin, $comments) = @_;
|
my ($dbh, $name, $password, $is_admin, $comments) = @_;
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To create a user go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
return db_insert ($dbh, 'id_user', 'INSERT INTO tusuario (id_user, fullname, password, comments, is_admin)
|
return db_insert ($dbh, 'id_user', 'INSERT INTO tusuario (id_user, fullname, password, comments, is_admin)
|
||||||
VALUES (?, ?, ?, ?, ?)', safe_input($name), safe_input($name), $password, safe_input($comments), $is_admin);
|
VALUES (?, ?, ?, ?, ?)', safe_input($name), safe_input($name), $password, safe_input($comments), $is_admin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,18 +552,23 @@ return db_insert ($dbh, 'id_user', 'INSERT INTO tusuario (id_user, fullname, pas
|
||||||
sub pandora_delete_user ($$) {
|
sub pandora_delete_user ($$) {
|
||||||
my ($dbh, $name) = @_;
|
my ($dbh, $name) = @_;
|
||||||
|
|
||||||
# Delete user profiles
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
db_do ($dbh, 'DELETE FROM tusuario_perfil WHERE id_usuario = ?', $name);
|
print_log "[ERROR] This node is configured with centralized mode. To delete a user go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
# Delete the user
|
# Delete user profiles
|
||||||
my $return = db_do ($dbh, 'DELETE FROM tusuario WHERE id_user = ?', $name);
|
db_do ($dbh, 'DELETE FROM tusuario_perfil WHERE id_usuario = ?', $name);
|
||||||
|
|
||||||
if($return eq '0E0') {
|
# Delete the user
|
||||||
return -1;
|
my $return = db_do ($dbh, 'DELETE FROM tusuario WHERE id_user = ?', $name);
|
||||||
}
|
|
||||||
else {
|
if($return eq '0E0') {
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -976,9 +1012,9 @@ sub pandora_get_calendar_id ($$) {
|
||||||
sub pandora_get_same_day_id ($$) {
|
sub pandora_get_same_day_id ($$) {
|
||||||
my ($dbh, $same_day) = @_;
|
my ($dbh, $same_day) = @_;
|
||||||
|
|
||||||
my $weeks = { 'monday' => 1, 'tuesday' => 2, 'wednesday' => 3, 'thursday' => 4, 'friday' => 5, 'saturday' => 6, 'sunday' => 7, 'holiday' => 8};
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -998,25 +1034,6 @@ sub pandora_delete_special_day ($$) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
###############################################################################
|
|
||||||
# PRINT HELP AND CHECK ERRORS FUNCTIONS
|
|
||||||
###############################################################################
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# log wrapper
|
|
||||||
###############################################################################
|
|
||||||
sub print_log ($) {
|
|
||||||
my ($msg) = @_;
|
|
||||||
|
|
||||||
print $msg; # show message
|
|
||||||
|
|
||||||
$msg =~ s/\n+$//;
|
|
||||||
logger( $conf, "($progname) $msg", 10); # save to logging file
|
|
||||||
}
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Print a parameter error and exit the program.
|
# Print a parameter error and exit the program.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -3038,6 +3055,11 @@ sub cli_create_user() {
|
||||||
sub cli_user_update() {
|
sub cli_user_update() {
|
||||||
my ($user_id,$field,$new_value) = @ARGV[2..4];
|
my ($user_id,$field,$new_value) = @ARGV[2..4];
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To update a user go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my $user_exists = get_user_exists ($dbh, $user_id);
|
my $user_exists = get_user_exists ($dbh, $user_id);
|
||||||
exist_check($user_exists,'user',$user_id);
|
exist_check($user_exists,'user',$user_id);
|
||||||
|
|
||||||
|
@ -5523,7 +5545,7 @@ sub cli_get_agents() {
|
||||||
|
|
||||||
my $head_print = 0;
|
my $head_print = 0;
|
||||||
|
|
||||||
use Data::Dumper;
|
# use Data::Dumper;
|
||||||
|
|
||||||
|
|
||||||
foreach my $agent (@agents) {
|
foreach my $agent (@agents) {
|
||||||
|
@ -5851,6 +5873,11 @@ sub cli_get_planned_downtimes_items() {
|
||||||
sub cli_create_group() {
|
sub cli_create_group() {
|
||||||
my ($group_name,$parent_group_name,$icon,$description) = @ARGV[2..5];
|
my ($group_name,$parent_group_name,$icon,$description) = @ARGV[2..5];
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To create a group go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my $group_id = get_group_id($dbh,$group_name);
|
my $group_id = get_group_id($dbh,$group_name);
|
||||||
non_exist_check($group_id, 'group name', $group_name);
|
non_exist_check($group_id, 'group name', $group_name);
|
||||||
|
|
||||||
|
@ -5922,6 +5949,11 @@ sub cli_create_group() {
|
||||||
sub cli_delete_group() {
|
sub cli_delete_group() {
|
||||||
my ($group_name) = @ARGV[2];
|
my ($group_name) = @ARGV[2];
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To delete a group go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my $group_id = get_group_id($dbh,$group_name);
|
my $group_id = get_group_id($dbh,$group_name);
|
||||||
exist_check($group_id, 'group name', $group_name);
|
exist_check($group_id, 'group name', $group_name);
|
||||||
|
|
||||||
|
@ -5946,6 +5978,11 @@ sub cli_update_group() {
|
||||||
my ($group_id,$group_name,$parent_group_name,$icon,$description) = @ARGV[2..6];
|
my ($group_id,$group_name,$parent_group_name,$icon,$description) = @ARGV[2..6];
|
||||||
my $result;
|
my $result;
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To update a group go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$result = get_db_value ($dbh, 'SELECT * FROM tgrupo WHERE id_grupo=?', $group_id);
|
$result = get_db_value ($dbh, 'SELECT * FROM tgrupo WHERE id_grupo=?', $group_id);
|
||||||
|
|
||||||
if($result == "0E0"){
|
if($result == "0E0"){
|
||||||
|
@ -6144,6 +6181,11 @@ sub cli_disable_double_auth () {
|
||||||
sub cli_user_enable () {
|
sub cli_user_enable () {
|
||||||
my $user_id = @ARGV[2];
|
my $user_id = @ARGV[2];
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To enable a user go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my $user_disabled = get_user_disabled ($dbh, $user_id);
|
my $user_disabled = get_user_disabled ($dbh, $user_id);
|
||||||
|
|
||||||
exist_check($user_disabled,'user',$user_id);
|
exist_check($user_disabled,'user',$user_id);
|
||||||
|
@ -6169,6 +6211,11 @@ sub cli_user_enable () {
|
||||||
sub cli_user_disable () {
|
sub cli_user_disable () {
|
||||||
my $user_id = @ARGV[2];
|
my $user_id = @ARGV[2];
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) != 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
print_log "[ERROR] This node is configured with centralized mode. To disable a user go to metaconsole. \n\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
my $user_disabled = get_user_disabled ($dbh, $user_id);
|
my $user_disabled = get_user_disabled ($dbh, $user_id);
|
||||||
|
|
||||||
exist_check($user_disabled,'user',$user_id);
|
exist_check($user_disabled,'user',$user_id);
|
||||||
|
|
Loading…
Reference in New Issue