Merge branch 'develop' into '486-Mejoras-visuales-de-las-ventanas-modales-de-las-MRs-open'
# Conflicts: # pandora_console/include/javascript/update_manager.js
This commit is contained in:
commit
6259a62095
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG-170323
|
||||
Version: 7.0NG-170419
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG-170323"
|
||||
pandora_version="7.0NG-170419"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG';
|
||||
use constant AGENT_BUILD => '170323';
|
||||
use constant AGENT_BUILD => '170419';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG
|
||||
%define release 170323
|
||||
%define release 170419
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG
|
||||
%define release 170323
|
||||
%define release 170419
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG"
|
||||
PI_BUILD="170323"
|
||||
PI_BUILD="170419"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -40,14 +40,15 @@ If (NOT flag) Then
|
|||
set ifaces_cfg = objWMIService.ExecQuery("Select ipaddress from Win32_NetworkAdapterConfiguration Where Caption='" & iface.caption & "'")
|
||||
Wscript.StdOut.Write "<data><![CDATA[" & iface.ProductName & ";" & iface.MACAddress & ";"
|
||||
for each iface_cfg in ifaces_cfg
|
||||
if ( iface_cfg.IPAddress(0) <> "" ) then
|
||||
On Error Resume Next
|
||||
if (iface_cfg.IPAddress(0) <> "" ) then
|
||||
Wscript.StdOut.Write trim(iface_cfg.IPAddress(0))
|
||||
end if
|
||||
next
|
||||
wscript.stdOut.WriteLine "]]></data>"
|
||||
Wscript.StdOut.WriteLine "]]></data>"
|
||||
Next
|
||||
|
||||
Wscript.StdOut.WriteLine "</datalist>"
|
||||
Wscript.StdOut.WriteLine "</inventory_module>"
|
||||
Wscript.StdOut.WriteLine "</inventory>"
|
||||
End If
|
||||
End If
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{170323}
|
||||
{170419}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "pandora_module_plugin.h"
|
||||
#include "pandora_module_ping.h"
|
||||
#include "pandora_module_snmpget.h"
|
||||
#include "../windows/pandora_wmi.h"
|
||||
#include "../pandora_strutils.h"
|
||||
#include <list>
|
||||
|
||||
|
@ -1137,6 +1138,13 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
|||
} else if (module_freedisk_percent != "") {
|
||||
module = new Pandora_Module_Freedisk_Percent (module_name,
|
||||
module_freedisk_percent);
|
||||
// Added a description with the memory free
|
||||
char buffer[100];
|
||||
unsigned long memory = Pandora_Wmi::getDiskFreeSpace(module_freedisk_percent);
|
||||
if (sprintf(buffer, "Free memory %s %dMB",
|
||||
module_freedisk_percent.c_str(), memory) > 0) {
|
||||
module->setDescription(buffer);
|
||||
}
|
||||
} else if (module_freememory != "") {
|
||||
module = new Pandora_Module_Freememory (module_name);
|
||||
} else if (module_freememory_percent != "") {
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG(Build 170323)")
|
||||
#define PANDORA_VERSION ("7.0NG(Build 170419)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -300,7 +300,7 @@ Pandora_Windows_Service::pandora_init () {
|
|||
}
|
||||
|
||||
// Get the agent alias.
|
||||
conf->getValue ("agent_alias");
|
||||
agent_alias = conf->getValue ("agent_alias");
|
||||
if (agent_alias == "") {
|
||||
agent_alias = Pandora_Windows_Info::getSystemName ();
|
||||
this->conf->setValue("agent_alias", agent_alias);
|
||||
|
@ -441,7 +441,7 @@ Pandora_Windows_Service::getXmlHeader () {
|
|||
agent_name = conf->getValue ("agent_name");
|
||||
|
||||
// Get agent alias
|
||||
conf->getValue ("agent_alias");
|
||||
agent_alias = conf->getValue ("agent_alias");
|
||||
|
||||
// Get parent agent name
|
||||
parent_agent_name = conf->getValue ("parent_agent_name");
|
||||
|
@ -1519,7 +1519,7 @@ Pandora_Windows_Service::checkConfig (string file) {
|
|||
}
|
||||
|
||||
/* Get agent name */
|
||||
tmp = conf->getValue ("agent_name");
|
||||
agent_name = conf->getValue ("agent_name");
|
||||
|
||||
|
||||
/* Error getting agent name */
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG(Build 170323))"
|
||||
VALUE "ProductVersion", "(7.0NG(Build 170419))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG-170323
|
||||
Version: 7.0NG-170419
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG-170323"
|
||||
pandora_version="7.0NG-170419"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ttable_test` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`field1` varchar(60) NOT NULL default '',
|
||||
`field2` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE `tusuario` ADD COLUMN `test` tinyint(1) NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
|
@ -1,11 +0,0 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ttable_test2` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`field1` varchar(60) NOT NULL default '',
|
||||
`field2` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE `tusuario` ADD COLUMN `test_nuevo2` tinyint(1) NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
|
@ -1,11 +0,0 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ttable_test3` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`field1` varchar(60) NOT NULL default '',
|
||||
`field2` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE `tusuario` ADD COLUMN `test3` tinyint(1) NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT;
|
|
@ -1,11 +0,0 @@
|
|||
START TRANSACTION;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ttable_test4` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`field1` varchar(60) NOT NULL default '',
|
||||
`field2` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE `tusuario` ADD COLUMN `test4` asdfasdfa;
|
||||
|
||||
COMMIT;
|
|
@ -1291,6 +1291,22 @@ UPDATE twidget_dashboard SET id_widget = (SELECT id FROM twidget WHERE unique_na
|
|||
DELETE FROM twidget WHERE unique_name = 'graph_availability';
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tbackup`
|
||||
-- Table `tbackup` (Extension table. Modify only if exists)
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
|
||||
DROP PROCEDURE IF EXISTS addcol;
|
||||
delimiter //
|
||||
CREATE PROCEDURE addcol()
|
||||
BEGIN
|
||||
SET @vv1 = (SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'tbackup');
|
||||
IF @vv1>0 THEN
|
||||
ALTER TABLE tbackup ADD COLUMN `filepath` varchar(512) NOT NULL DEFAULT "";
|
||||
END IF;
|
||||
END;
|
||||
//
|
||||
CALL addcol();
|
||||
DROP PROCEDURE addcol;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tconfig`
|
||||
-- ---------------------------------------------------------------------
|
||||
UPDATE `tconfig` SET `value` = 'login_logo_v7.png' where `token`='custom_logo_login';
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
$stacked = db_get_sql('select stacked from tgraph where id_graph = '.$_GET['data']);
|
||||
$num_items = db_get_sql('select count(*) from tgraph_source where id_graph = '.$_GET['data']);
|
||||
echo "$stacked,$num_items";
|
||||
|
||||
|
||||
?>
|
|
@ -293,8 +293,8 @@ if ($search != "") {
|
|||
$search_sql .= ")";
|
||||
}else{
|
||||
$search_sql = " AND ( nombre " . $order_collation . "
|
||||
LIKE '%$search%' OR alias " . $order_collation . "
|
||||
LIKE '%$search%') ";
|
||||
LIKE LOWER('%$search%') OR alias " . $order_collation . "
|
||||
LIKE LOWER('%$search%')) ";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ foreach ($modules as $module) {
|
|||
}
|
||||
}
|
||||
|
||||
$data[1] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id_policy'] . '">' .
|
||||
$data[1] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id_policy'] . '">' .
|
||||
html_print_image($img,true, array('title' => $title)) .
|
||||
'</a>';
|
||||
}
|
||||
|
|
|
@ -1173,7 +1173,7 @@ ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascri
|
|||
secondText: '<?php echo __('Second');?>',
|
||||
currentText: '<?php echo __('Now');?>',
|
||||
closeText: '<?php echo __('Close');?>'});
|
||||
$("#text-once_date_from, #text-once_date_to").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>"});
|
||||
$("#text-once_date_from, #text-once_date_to").datepicker({dateFormat: "<?php echo DATE_FORMAT_JS; ?>", showButtonPanel: true});
|
||||
|
||||
$.datepicker.setDefaults($.datepicker.regional[ "<?php echo get_user_language(); ?>"]);
|
||||
|
||||
|
|
|
@ -688,7 +688,7 @@ foreach ($simple_alerts as $alert) {
|
|||
else {
|
||||
$img = 'images/policies.png';
|
||||
|
||||
$data[3] .= ' <a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&pure='.$pure.'&id=' . $policyInfo['id'] . '">' .
|
||||
$data[3] .= ' <a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&pure='.$pure.'&id=' . $policyInfo['id'] . '">' .
|
||||
html_print_image($img, true, array('title' => $policyInfo['name'])) .
|
||||
'</a>';
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ if (enterprise_installed() && $alert['id_policy_alerts'] != 0) {
|
|||
else {
|
||||
$img = 'images/policies.png';
|
||||
|
||||
$policy = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id'] . '">' .
|
||||
$policy = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id'] . '">' .
|
||||
html_print_image($img, true, array('title' => $policyInfo['name'])) .
|
||||
'</a>';
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ You can of course remove the warnings, that's why we include the source and do n
|
|||
|
||||
ui_print_page_header (__('Module management') . ' » ' .
|
||||
__('Network component management'), "", false,
|
||||
"network_component", true,"sell",true,"modulemodal");
|
||||
"network_component", true,"",true,"modulemodal");
|
||||
$sec = 'gmodules';
|
||||
}
|
||||
|
||||
|
|
|
@ -73,9 +73,11 @@ elseif (isset ($_GET["add_module"])) {
|
|||
|
||||
if (isset ($_GET["create"]) || isset ($_GET["update"])) {
|
||||
//Submitted form
|
||||
$name = get_parameter_post ("name");
|
||||
$name = io_safe_output(get_parameter_post ("name"));
|
||||
$description = get_parameter_post ("description");
|
||||
if ($name != "") {
|
||||
|
||||
if (!empty($name) && !ctype_space($name)) {
|
||||
$name = io_safe_input($name);
|
||||
if ($id_np > 0) {
|
||||
//Profile exists
|
||||
$values = array(
|
||||
|
|
|
@ -65,6 +65,17 @@ $change_weight = (bool) get_parameter('change_weight', false);
|
|||
$change_label = (bool) get_parameter('change_label', false);
|
||||
$id_graph = (int) get_parameter('id', 0);
|
||||
|
||||
if($id_graph !== 0){
|
||||
$sql = "SELECT * FROM tgraph
|
||||
WHERE (private = 0 OR (private = 1 AND id_user = '".$config["id_user"]."'))
|
||||
AND id_graph = ".$id_graph;
|
||||
$control = db_process_sql($sql);
|
||||
if(!$control){
|
||||
header('Location: index.php?sec=reporting&sec2=godmode/reporting/graphs');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($add_graph) {
|
||||
$name = get_parameter_post ("name");
|
||||
$description = get_parameter_post ("description");
|
||||
|
|
|
@ -298,6 +298,26 @@ function update_button_palette_callback() {
|
|||
break;
|
||||
case 'module_graph':
|
||||
|
||||
|
||||
if($('#dir_items').html() == 'horizontal'){
|
||||
if(parseInt($('#text-left').val()) + (parseInt($('input[name=height_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('width'))
|
||||
|| parseInt($('#text-left').val()) + (parseInt($('input[name=width_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('width'))){
|
||||
|
||||
alert($('#count_items').html()+' joined graph items are wider than background');
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($('#dir_items').html() == 'vertical'){
|
||||
if(parseInt($('#text-top').val()) + (parseInt($('input[name=height_module_graph]').val() * $('#count_items').html())) > parseInt($('#background').css('height'))){
|
||||
alert($('#count_items').html()+' joined graph items are higher than background');
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($('input[name=width_module_graph]').val() == ''){
|
||||
alert('Undefined width');
|
||||
return false;
|
||||
|
@ -1151,6 +1171,8 @@ function loadFieldsFromDB(item) {
|
|||
|
||||
});
|
||||
|
||||
$('#count_items').html(1);
|
||||
|
||||
if (data.type == 6 || data.type == 7 || data.type == 8 || data.type == 1) {
|
||||
|
||||
$("#period_row." + item).css('display', '');
|
||||
|
@ -1169,6 +1191,20 @@ function loadFieldsFromDB(item) {
|
|||
|
||||
}
|
||||
else {
|
||||
|
||||
jQuery.get ("ajax.php",
|
||||
{"page": "general/cg_items","data": data.id_custom_graph},
|
||||
function (data, status) {
|
||||
if(data.split(",")[0] == 4){
|
||||
$('#count_items').html(data.split(",")[1]);
|
||||
$('#dir_items').html('vertical');
|
||||
}
|
||||
else if (data.split(",")[0] == 5) {
|
||||
$('#count_items').html(data.split(",")[1]);
|
||||
$('#dir_items').html('horizontal');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='radio_choice'][value='custom_graph']")
|
||||
.prop('checked', true);
|
||||
|
@ -3125,9 +3161,8 @@ function move_elements_resize(original_width, original_height, width, height) {
|
|||
}
|
||||
|
||||
function unselectAll() {
|
||||
$("#background").css('border', '1px lightgray solid');
|
||||
|
||||
$(".item").each(function(){
|
||||
$("#background").css('border', '1px lightgray solid');
|
||||
$(".item").each(function(){
|
||||
$(this).css('border', '');
|
||||
if($(this).attr('withborder') == 'true'){
|
||||
$(this).css('top', '+=1');
|
||||
|
@ -3136,7 +3171,7 @@ function unselectAll() {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
selectedItem = null;
|
||||
}
|
||||
|
||||
function click_button_toolbox(id) {
|
||||
|
|
|
@ -55,12 +55,12 @@ if (isset($_GET["server"])) {
|
|||
|
||||
}
|
||||
elseif (isset($_GET["server_remote"])) {
|
||||
|
||||
// Headers
|
||||
$id_server= get_parameter_get ("server_remote");
|
||||
$ext = get_parameter ("ext", '');
|
||||
ui_print_page_header (__('Remote Configuration'), "images/gm_servers.png", false, "servers", true);
|
||||
enterprise_include("godmode/servers/server_disk_conf_editor.php");
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Header
|
||||
ui_print_page_header (__('Pandora servers'), "images/gm_servers.png", false, "servers", true);
|
||||
|
@ -119,7 +119,8 @@ else {
|
|||
|
||||
$correct = false;
|
||||
$id_server = get_parameter ("id_server");
|
||||
$server_md5 = md5(io_safe_output(servers_get_name ($id_server,'none')), FALSE);
|
||||
$ext = get_parameter ("ext", '');
|
||||
$server_md5 = md5(io_safe_output(servers_get_name ($id_server,'none') . $ext), FALSE);
|
||||
|
||||
if (file_exists ($config["remote_config"] . "/md5/" . $server_md5 . ".srv.md5")) {
|
||||
// Server remote configuration editor
|
||||
|
|
|
@ -124,9 +124,14 @@ foreach ($servers as $server) {
|
|||
}
|
||||
$data[7] = ui_print_timestamp ($server['keepalive'], true);
|
||||
|
||||
|
||||
$ext = '_server';
|
||||
if ($server['type'] != 'data')
|
||||
$ext = '';
|
||||
|
||||
$safe_server_name = servers_get_name($server["id_server"]);
|
||||
if (!isset($names_servers[$safe_server_name])){
|
||||
if (servers_check_remote_config ($safe_server_name) && enterprise_installed()) {
|
||||
if (($server['type'] == 'data' || $server['type'] == 'enterprise satellite')) {
|
||||
if (servers_check_remote_config ($safe_server_name . $ext) && enterprise_installed()) {
|
||||
$names_servers[$safe_server_name] = true;
|
||||
} else {
|
||||
$names_servers[$safe_server_name] = false;
|
||||
|
@ -154,8 +159,8 @@ foreach ($servers as $server) {
|
|||
array('title' => __('Edit')));
|
||||
$data[8] .= '</a>';
|
||||
|
||||
if ($names_servers[$safe_server_name] === true) {
|
||||
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server["id_server"].'">';
|
||||
if (($names_servers[$safe_server_name] === true) && ($server['type'] == 'data' || $server['type'] == 'enterprise satellite')) {
|
||||
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server["id_server"].'&ext='.$ext.'">';
|
||||
$data[8] .= html_print_image ('images/remote_configuration.png', true,
|
||||
array('title' => __('Remote configuration')));
|
||||
$data[8] .= '</a>';
|
||||
|
|
|
@ -296,6 +296,8 @@ if ($get_double_auth_generation_page) {
|
|||
|
||||
ob_clean();
|
||||
?>
|
||||
|
||||
<script type="text/javascript" src="../../include/javascript/qrcode.js"></script>
|
||||
<script type="text/javascript">
|
||||
var secret = "<?php echo $secret; ?>";
|
||||
var userID = "<?php echo $config['id_user']; ?>";
|
||||
|
|
|
@ -851,7 +851,7 @@ if ($list_modules) {
|
|||
}
|
||||
}
|
||||
|
||||
$data[1] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $id_policy . '">' .
|
||||
$data[1] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id=' . $id_policy . '">' .
|
||||
html_print_image($img,true, array('title' => $title)) .
|
||||
'</a>';
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ if (is_ajax ()) {
|
|||
$ent = get_parameter('ent');
|
||||
$offline = get_parameter('offline');
|
||||
if (!$ent) {
|
||||
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
|
||||
$dir = $config['attachment_store'] . "/downloads/pandora_console/extras/mr";
|
||||
}
|
||||
else {
|
||||
if ($offline) {
|
||||
|
@ -38,7 +38,6 @@ if (is_ajax ()) {
|
|||
}
|
||||
}
|
||||
$file = "$dir/$number.sql";
|
||||
|
||||
$dangerous_query = false;
|
||||
$mr_file = fopen($file, "r");
|
||||
while (!feof($mr_file)) {
|
||||
|
@ -141,17 +140,19 @@ if (is_ajax ()) {
|
|||
}
|
||||
|
||||
if ($remove_rr) {
|
||||
$number = get_parameter('number');
|
||||
$numbers = get_parameter('number',0);
|
||||
|
||||
for ($i = 1; $i <= $number; $i++) {
|
||||
$file = $config["homedir"] . "/extras/mr/$i.sql";
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
foreach ($numbers as $number) {
|
||||
for ($i = 1; $i <= $number; $i++) {
|
||||
$file = $config["homedir"] . "/extras/mr/$i.sql";
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($remove_rr_extras) {
|
||||
$dir = $config["homedir"] . "/extras/mr/";
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC170323';
|
||||
$build_version = 'PC170419';
|
||||
$pandora_version = 'v7.0NG';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -2687,7 +2687,7 @@ function get_number_of_mr($package, $ent, $offline) {
|
|||
global $config;
|
||||
|
||||
if (!$ent) {
|
||||
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
|
||||
$dir = $config['attachment_store'] . "/downloads/pandora_console/extras/mr";
|
||||
}
|
||||
else {
|
||||
if ($offline) {
|
||||
|
|
|
@ -1739,6 +1739,10 @@ function agents_get_status($id_agent = 0, $noACLs = false) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset($modules) || empty($modules) || count($modules) == 0) {
|
||||
return AGENT_MODULE_STATUS_NOT_INIT;
|
||||
}
|
||||
|
||||
$modules_status = array();
|
||||
$modules_async = 0;
|
||||
foreach ($modules as $module) {
|
||||
|
@ -2473,27 +2477,27 @@ function agents_get_network_interfaces ($agents = false, $agents_filter = false)
|
|||
else{
|
||||
$interface_traffic_modules = agents_get_modules($agent_id, $columns, "nombre LIKE 'if%Octets_$interface_name'");
|
||||
}
|
||||
|
||||
if (!empty($interface_traffic_modules) && count($interface_traffic_modules) >= 2) {
|
||||
$interface_traffic_modules_aux = array('in' => '', 'out' => '');
|
||||
foreach ($interface_traffic_modules as $interface_traffic_module) {
|
||||
$interface_name_escaped = str_replace("/", "\/", $interface_name);
|
||||
if($type_interface){
|
||||
|
||||
if ($type_interface) {
|
||||
if (preg_match ("/^" . $interface_name_escaped . "_if(.+)Octets$/i", $interface_traffic_module['nombre'], $matches)) {
|
||||
if (strtolower($matches[1]) == 'in') {
|
||||
if (strtolower($matches[1]) == 'in' || strtolower($matches[1]) == 'hcin') {
|
||||
$interface_traffic_modules_aux['in'] = $interface_traffic_module['id_agente_modulo'];
|
||||
}
|
||||
elseif (strtolower($matches[1]) == 'out') {
|
||||
elseif (strtolower($matches[1]) == 'out' || strtolower($matches[1]) == 'hcout') {
|
||||
$interface_traffic_modules_aux['out'] = $interface_traffic_module['id_agente_modulo'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (preg_match ("/^if(.+)Octets_$interface_name_escaped$/i", $interface_traffic_module['nombre'], $matches)) {
|
||||
if (strtolower($matches[1]) == 'in') {
|
||||
if (strtolower($matches[1]) == 'in' || strtolower($matches[1]) == 'hcin') {
|
||||
$interface_traffic_modules_aux['in'] = $interface_traffic_module['id_agente_modulo'];
|
||||
}
|
||||
elseif (strtolower($matches[1]) == 'out') {
|
||||
elseif (strtolower($matches[1]) == 'out' || strtolower($matches[1]) == 'hcout') {
|
||||
$interface_traffic_modules_aux['out'] = $interface_traffic_module['id_agente_modulo'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,10 +145,22 @@ function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query =
|
|||
else {
|
||||
$temp = array();
|
||||
foreach ($type as $item) {
|
||||
$temp[] = '"' . $item . '"';
|
||||
array_push ( $temp , $item );
|
||||
}
|
||||
|
||||
$typeWhere = ' AND event_type IN (' . implode(',', $temp) . ')';
|
||||
$typeWhere = ' AND event_type IN (';
|
||||
|
||||
foreach ($temp as $ele) {
|
||||
$typeWhere .= "'".$ele."'";
|
||||
|
||||
if($ele != end($temp)){
|
||||
$typeWhere .= ",";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$typeWhere .= ')';
|
||||
|
||||
}
|
||||
|
||||
if ($agents == null) {
|
||||
|
@ -160,14 +172,11 @@ function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query =
|
|||
else {
|
||||
$idAgents = array_values($agents);
|
||||
|
||||
if($type=='alert_fired'){
|
||||
$idAgents = array_keys($agents);
|
||||
}
|
||||
}
|
||||
|
||||
$result = db_get_all_rows_sql('SELECT id_evento
|
||||
FROM tevento
|
||||
WHERE estado = 0 AND id_agente IN (' . implode(',', $idAgents) . ') ' . $typeWhere . $query . '
|
||||
WHERE estado = 0 AND id_agente IN (0,' . implode(',', $idAgents) . ') ' . $typeWhere . $query . '
|
||||
ORDER BY id_evento DESC LIMIT 1');
|
||||
|
||||
if ($result === false) {
|
||||
|
|
|
@ -1724,7 +1724,7 @@ function db_check_minor_relase_available_to_um ($package, $ent, $offline) {
|
|||
global $config;
|
||||
|
||||
if (!$ent) {
|
||||
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
|
||||
$dir = $config['attachment_store'] . "/downloads/pandora_console/extras/mr";
|
||||
}
|
||||
else {
|
||||
if ($offline) {
|
||||
|
@ -1736,7 +1736,6 @@ function db_check_minor_relase_available_to_um ($package, $ent, $offline) {
|
|||
}
|
||||
|
||||
$have_minor_release = false;
|
||||
|
||||
if (file_exists($dir) && is_dir($dir)) {
|
||||
if (is_readable($dir)) {
|
||||
$files = scandir($dir); // Get all the files from the directory ordered by asc
|
||||
|
|
|
@ -4242,7 +4242,7 @@ function graph_netflow_aggregate_area ($data, $period, $width, $height, $unit =
|
|||
$sources, array (), ui_get_full_url("images/image_problem.opaque.png", false, false, false),
|
||||
"", $unit, $homeurl,
|
||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], $unit, 2);
|
||||
$config['fontpath'], $config['font_size'], $unit, $ttl);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -519,13 +519,23 @@ function networkmap_links_to_js_links($relations, $nodes_graph) {
|
|||
$item['arrow_end'] = 'module';
|
||||
$item['status_end'] = modules_get_agentmodule_status((int)$id_target_module, false, false, null);
|
||||
$item['id_module_end'] = (int)$id_target_module;
|
||||
$item['text_end'] = io_safe_output(modules_get_agentmodule_name((int)$id_target_module));
|
||||
$text_end = io_safe_output(modules_get_agentmodule_name((int)$id_target_module));
|
||||
if (preg_match ("/(.+)_ifOperStatus$/" , (string)$text_end, $matches)) {
|
||||
if ($matches[1]) {
|
||||
$item['text_end'] = $matches[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($relation['child_type'] == 1) {
|
||||
$item['arrow_start'] = 'module';
|
||||
$item['status_start'] = modules_get_agentmodule_status((int)$id_source_module, false, false, null);
|
||||
$item['id_module_start'] = (int)$id_source_module;
|
||||
$item['text_start'] = io_safe_output(modules_get_agentmodule_name((int)$id_source_module));
|
||||
$text_start = io_safe_output(modules_get_agentmodule_name((int)$id_source_module));
|
||||
if (preg_match ("/(.+)_ifOperStatus$/" , (string)$text_start, $matches)) {
|
||||
if ($matches[1]) {
|
||||
$item['text_start'] = $matches[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$agent = 0;
|
||||
|
@ -1038,7 +1048,7 @@ function clean_duplicate_links ($relations) {
|
|||
if (enterprise_installed()) {
|
||||
delete_link($segregation_links['mm'][$index_to_del]);
|
||||
}
|
||||
unset($segregation_links['mm'][$index_to_del]);
|
||||
//unset($segregation_links['mm'][$index_to_del]);
|
||||
}
|
||||
$index_to_del++;
|
||||
}
|
||||
|
@ -1142,8 +1152,8 @@ function clean_duplicate_links ($relations) {
|
|||
}
|
||||
|
||||
$final_links3['aa'] = $final_links2['aa'];
|
||||
$final_links3['mm'] = $final_links2['mm'];
|
||||
$final_links3['am'] = $final_links2['am'];
|
||||
$final_links3['mm'] = $segregation_links['mm'];
|
||||
$final_links3['am'] = $segregation_links['am'];
|
||||
$final_links3['ff'] = $final_links2['ff'];
|
||||
|
||||
$cleaned_links = array();
|
||||
|
@ -1270,6 +1280,9 @@ function show_networkmap($id = 0, $user_readonly = false, $nodes_and_relations =
|
|||
<img id="image_hide_show_labels" src="images/icono_borrar.png" />
|
||||
</a>
|
||||
</div>';
|
||||
echo '<div id="holding_spinner_' . $networkmap['id'] . '" style="display: none; position: absolute; right: 50px; top: 20px;">
|
||||
<img id="image_hide_show_labels" src="images/spinner.gif" />
|
||||
</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
@ -1322,7 +1335,6 @@ function show_networkmap($id = 0, $user_readonly = false, $nodes_and_relations =
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
$(document).ready(function() {
|
||||
init_graph({
|
||||
refesh_period: networkmap_refresh_time,
|
||||
graph: networkmap,
|
||||
networkmap_center: networkmap_center,
|
||||
networkmap_dimensions: networkmap_dimensions,
|
||||
|
@ -1335,8 +1347,6 @@ function show_networkmap($id = 0, $user_readonly = false, $nodes_and_relations =
|
|||
init_minimap();
|
||||
function_open_minimap();
|
||||
|
||||
window.interval_obj = setInterval(update_networkmap, networkmap_refresh_time);
|
||||
|
||||
$(document.body).on("mouseleave",
|
||||
".context-menu-list",
|
||||
function(e) {
|
||||
|
@ -1415,6 +1425,13 @@ if (empty($list_networkmaps))
|
|||
html_print_image('images/dot_green.png', true) . '</span>' .
|
||||
'<span id="shape_icon_fail" style="display: none;">' .
|
||||
html_print_image('images/dot_red.png', true) . '</span>';
|
||||
$table->data["node_name"][0] = __('Name');
|
||||
$table->data["node_name"][1] = html_print_input_text('edit_name_node',
|
||||
'', __('name node'), '20', '50', true);
|
||||
$table->data["node_name"][2] =
|
||||
html_print_button(__('Update node'), '', false,
|
||||
'', 'class="sub"', true);
|
||||
|
||||
$table->data["fictional_node_name"][0] = __('Name');
|
||||
$table->data["fictional_node_name"][1] = html_print_input_text('edit_name_fictional_node',
|
||||
'', __('name fictional node'), '20', '50', true);
|
||||
|
|
|
@ -311,7 +311,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||
$type,
|
||||
$force_width_chart,
|
||||
$force_height_chart,
|
||||
'netflow_area');
|
||||
'netflow_area',
|
||||
$pdf);
|
||||
break;
|
||||
case 'netflow_pie':
|
||||
$report['contents'][] = reporting_netflow(
|
||||
|
@ -320,7 +321,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||
$type,
|
||||
$force_width_chart,
|
||||
$force_height_chart,
|
||||
'netflow_pie');
|
||||
'netflow_pie',
|
||||
$pdf);
|
||||
break;
|
||||
case 'netflow_data':
|
||||
$report['contents'][] = reporting_netflow(
|
||||
|
@ -329,7 +331,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||
$type,
|
||||
$force_width_chart,
|
||||
$force_height_chart,
|
||||
'netflow_data');
|
||||
'netflow_data',
|
||||
$pdf);
|
||||
break;
|
||||
case 'netflow_statistics':
|
||||
$report['contents'][] = reporting_netflow(
|
||||
|
@ -338,7 +341,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||
$type,
|
||||
$force_width_chart,
|
||||
$force_height_chart,
|
||||
'netflow_statistics');
|
||||
'netflow_statistics',
|
||||
$pdf);
|
||||
break;
|
||||
case 'netflow_summary':
|
||||
$report['contents'][] = reporting_netflow(
|
||||
|
@ -347,7 +351,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||
$type,
|
||||
$force_width_chart,
|
||||
$force_height_chart,
|
||||
'netflow_summary');
|
||||
'netflow_summary',
|
||||
$pdf);
|
||||
break;
|
||||
case 'monitor_report':
|
||||
$report['contents'][] = reporting_monitor_report(
|
||||
|
@ -3241,7 +3246,7 @@ function reporting_monitor_report($report, $content) {
|
|||
}
|
||||
|
||||
function reporting_netflow($report, $content, $type,
|
||||
$force_width_chart, $force_height_chart, $type_netflow = null) {
|
||||
$force_width_chart, $force_height_chart, $type_netflow = null, $pdf = false) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
@ -3315,7 +3320,7 @@ function reporting_netflow($report, $content, $type,
|
|||
$filter,
|
||||
$content['top_n_value'],
|
||||
$content ['server_name'],
|
||||
'HTML');
|
||||
$pdf ? 'PDF' : 'HTML');
|
||||
break;
|
||||
case 'data':
|
||||
break;
|
||||
|
|
|
@ -1361,7 +1361,7 @@ function reporting_html_agent_module($table, $item) {
|
|||
break;
|
||||
}
|
||||
|
||||
$file_name = ui_print_truncate_text($row['agent_alias'], 'agent_small',
|
||||
$file_name = ui_print_truncate_text($row['agent_name'], 'agent_small',
|
||||
false, true, false, '...');
|
||||
$table_data .= "<td style='background-color: " . $rowcolor . ";'>" .
|
||||
$file_name . "</td>";
|
||||
|
@ -1379,7 +1379,8 @@ function reporting_html_agent_module($table, $item) {
|
|||
__("%s in %s : NORMAL",
|
||||
$module_name,
|
||||
$row['agent_name']),
|
||||
true, array('width' => '20px', 'height' => '20px'));
|
||||
true, array('width' => '20px', 'height' => '20px'),
|
||||
'images/status_sets/default/');
|
||||
break;
|
||||
case AGENT_STATUS_CRITICAL:
|
||||
$table_data .= ui_print_status_image(
|
||||
|
@ -1387,7 +1388,8 @@ function reporting_html_agent_module($table, $item) {
|
|||
__("%s in %s : CRITICAL",
|
||||
$module_name,
|
||||
$row['agent_name']),
|
||||
true, array('width' => '20px', 'height' => '20px'));
|
||||
true, array('width' => '20px', 'height' => '20px'),
|
||||
'images/status_sets/default/');
|
||||
break;
|
||||
case AGENT_STATUS_WARNING:
|
||||
$table_data .= ui_print_status_image(
|
||||
|
@ -1395,7 +1397,8 @@ function reporting_html_agent_module($table, $item) {
|
|||
__("%s in %s : WARNING",
|
||||
$module_name,
|
||||
$row['agent_name']),
|
||||
true, array('width' => '20px', 'height' => '20px'));
|
||||
true, array('width' => '20px', 'height' => '20px'),
|
||||
'images/status_sets/default/');
|
||||
break;
|
||||
case AGENT_STATUS_UNKNOWN:
|
||||
$table_data .= ui_print_status_image(
|
||||
|
@ -1403,7 +1406,8 @@ function reporting_html_agent_module($table, $item) {
|
|||
__("%s in %s : UNKNOWN",
|
||||
$module_name,
|
||||
$row['agent_name']),
|
||||
true, array('width' => '20px', 'height' => '20px'));
|
||||
true, array('width' => '20px', 'height' => '20px'),
|
||||
'images/status_sets/default/');
|
||||
break;
|
||||
case AGENT_MODULE_STATUS_NORMAL_ALERT:
|
||||
case AGENT_MODULE_STATUS_WARNING_ALERT:
|
||||
|
@ -1413,7 +1417,8 @@ function reporting_html_agent_module($table, $item) {
|
|||
__("%s in %s : ALERTS FIRED",
|
||||
$module_name,
|
||||
$row['agent_name']),
|
||||
true, array('width' => '20px', 'height' => '20px'));
|
||||
true, array('width' => '20px', 'height' => '20px'),
|
||||
'images/status_sets/default/');
|
||||
break;
|
||||
case 4:
|
||||
$table_data .= ui_print_status_image(
|
||||
|
@ -1421,7 +1426,8 @@ function reporting_html_agent_module($table, $item) {
|
|||
__("%s in %s : Not initialize",
|
||||
$module_name,
|
||||
$row['agent_name']),
|
||||
true, array('width' => '20px', 'height' => '20px'));
|
||||
true, array('width' => '20px', 'height' => '20px'),
|
||||
'images/status_sets/default/');
|
||||
break;
|
||||
}
|
||||
$table_data .= "</td>";
|
||||
|
|
|
@ -124,7 +124,7 @@ function ui_print_truncate_text($text, $numChars = GENERIC_SIZE_TEXT, $showTextI
|
|||
}
|
||||
}
|
||||
if ($showTextInAToopTip) {
|
||||
$truncateText = $truncateText . ui_print_help_tip($text, true);
|
||||
$truncateText = $truncateText . ui_print_help_tip(htmlspecialchars($text), true);
|
||||
}
|
||||
else {
|
||||
if ($style !== false) {
|
||||
|
@ -813,7 +813,7 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f
|
|||
else {
|
||||
$img = 'images/policies.png';
|
||||
|
||||
$data[$index['policy']] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id'] . '">' .
|
||||
$data[$index['policy']] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id'] . '">' .
|
||||
html_print_image($img,true, array('title' => $policyInfo['name'])) .
|
||||
'</a>';
|
||||
}
|
||||
|
|
|
@ -363,10 +363,10 @@ function update_manager_check_online_free_packages ($is_ajax=true) {
|
|||
var applying_mr = "<?php echo __('Applying DB MR'); ?>\n";
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$baseurl = ui_get_full_url(false, false, false, false);
|
||||
echo "<p><b>There is a new version:</b> " . $result[0]['version'] . "</p>";
|
||||
echo "<a href='javascript: update_last_package(\"" . base64_encode($result[0]["file_name"]) .
|
||||
"\", \"" . $result[0]['version'] ."\");'>" .
|
||||
"\", \"" . $result[0]['version'] ."\", \"" . $baseurl ."\");'>" .
|
||||
__("Update to the last version") . "</a>";
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -2434,12 +2434,9 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||
$proportion_height = 0;
|
||||
$proportion_width = 0;
|
||||
|
||||
|
||||
|
||||
if (!is_null($height) && !is_null($width)) {
|
||||
$resizedMap = true;
|
||||
|
||||
|
||||
if ($keep_aspect_ratio) {
|
||||
$ratio = min($width / $layout['width'], $height / $layout['height']);
|
||||
$mapWidth = $ratio * $layout['width'];
|
||||
|
@ -2453,49 +2450,48 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||
$dif_height = $layout["height"] - $mapHeight;
|
||||
$dif_width = $layout["width"] - $mapWidth;
|
||||
|
||||
|
||||
$proportion_height = $mapHeight / $layout["height"];
|
||||
$proportion_width = $mapWidth / $layout["width"];
|
||||
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$backgroundImage =
|
||||
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
||||
$config['homeurl'] . 'images/console/background/' .
|
||||
$layout["background"];
|
||||
}
|
||||
else {
|
||||
$backgroundImage =
|
||||
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
||||
$config['homedir'] . '/images/console/background/' .
|
||||
($layout["background"]);
|
||||
if ($layout["background"] != 'None.png' ) {
|
||||
if (is_metaconsole()) {
|
||||
$backgroundImage =
|
||||
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
||||
$config['homeurl'] . 'images/console/background/' .
|
||||
$layout["background"];
|
||||
}
|
||||
else {
|
||||
$backgroundImage =
|
||||
'/include/Image/image_functions.php?getFile=1&thumb=1&thumb_size=' . $mapWidth . 'x' . $mapHeight . '&file=' .
|
||||
$config['homedir'] . '/images/console/background/' .
|
||||
($layout["background"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$mapWidth = $layout["width"];
|
||||
$mapHeight = $layout["height"];
|
||||
$backgroundImage = $metaconsole_hack . 'images/console/background/' .
|
||||
$layout["background"];
|
||||
$backgroundImage = '';
|
||||
if ($layout["background"] != 'None.png' )
|
||||
$backgroundImage = $metaconsole_hack . 'images/console/background/' .
|
||||
$layout["background"];
|
||||
}
|
||||
|
||||
if (defined('METACONSOLE')) {
|
||||
echo "<div style='width: 100%; overflow:auto; margin: 0 auto; padding:5px;'>";
|
||||
}
|
||||
|
||||
echo '<div style="';
|
||||
|
||||
if(get_parameter('pure')==1){
|
||||
echo 'width:100%;height:100%;position:absolute;';
|
||||
}
|
||||
|
||||
echo 'background-color:'.$layout["background_color"].';"><div id="background_'.$id_layout.'"
|
||||
echo '<div id="background_'.$id_layout.'"
|
||||
style="margin:0px auto;text-align:
|
||||
z-index: 0;
|
||||
position:relative;
|
||||
width:' . $mapWidth . 'px;
|
||||
height:' . $mapHeight . 'px;">';
|
||||
echo "<img src='" .
|
||||
ui_get_full_url($backgroundImage) . "' width='100%' height='100%' />";
|
||||
height:' . $mapHeight . 'px;
|
||||
background-color:'.$layout["background_color"].';">';
|
||||
|
||||
if ($layout["background"] != 'None.png' )
|
||||
echo "<img src='" .
|
||||
ui_get_full_url($backgroundImage) . "' width='100%' height='100%' />";
|
||||
|
||||
|
||||
$layout_datas = db_get_all_rows_field_filter('tlayout_data',
|
||||
|
|
|
@ -446,7 +446,10 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
html_print_input_text('width_module_graph', 300, '', 3, 5, true) .
|
||||
' X ' .
|
||||
html_print_input_text('height_module_graph', 180, '', 3, 5, true) .
|
||||
'</td>';
|
||||
' X ' .
|
||||
'<span id="count_items">1</span> '.
|
||||
'<span id="dir_items"></span> item/s
|
||||
</td>';
|
||||
|
||||
|
||||
//Insert and modify before the buttons to create or update.
|
||||
|
@ -587,6 +590,49 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
$(".border_color").attachColorPicker();
|
||||
$(".fill_color").attachColorPicker();
|
||||
$(".line_color").attachColorPicker();
|
||||
|
||||
$("input[name=radio_choice]").change(function(){
|
||||
$('#count_items').html(1);
|
||||
});
|
||||
|
||||
$("#custom_graph").click(function(){
|
||||
$('#count_items').html(1);
|
||||
jQuery.get ("ajax.php",
|
||||
{"page": "general/cg_items","data": $(this).val()},
|
||||
function (data, status) {
|
||||
if(data.split(",")[0] == 8){
|
||||
size = 400+(data.split(",")[1] * 50);
|
||||
if(data.split(",")[1]>3){
|
||||
size = 400+(3 * 50);
|
||||
}
|
||||
$('#text-width_module_graph').val(size);
|
||||
$('#text-height_module_graph').val(180);
|
||||
|
||||
}
|
||||
else if (data.split(",")[0] == 4) {
|
||||
size = data.split(",")[1];
|
||||
if(data.split(",")[1] > 1){
|
||||
$('#count_items').html(data.split(",")[1]);
|
||||
$('#dir_items').html('vertical');
|
||||
}
|
||||
$('#text-width_module_graph').val(300);
|
||||
$('#text-height_module_graph').val(50);
|
||||
}
|
||||
else if (data.split(",")[0] == 5) {
|
||||
size = data.split(",")[1];
|
||||
if(data.split(",")[1] > 1){
|
||||
$('#count_items').html(data.split(",")[1]);
|
||||
$('#dir_items').html('horizontal');
|
||||
}
|
||||
$('#text-width_module_graph').val(100);
|
||||
$('#text-height_module_graph').val(100);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
|
|
@ -143,8 +143,12 @@ function progressbar($progress, $width, $height, $title, $font,
|
|||
$graph['mode'] = $mode;
|
||||
|
||||
$id_graph = serialize_in_temp($graph, null, $ttl);
|
||||
|
||||
return "<img src='include/graphs/functions_gd.php?static_graph=1&graph_type=progressbar&ttl=".$ttl."&id_graph=".$id_graph."'>";
|
||||
if (is_metaconsole()) {
|
||||
return "<img src='../../include/graphs/functions_gd.php?static_graph=1&graph_type=progressbar&ttl=".$ttl."&id_graph=".$id_graph."'>";
|
||||
}
|
||||
else {
|
||||
return "<img src='include/graphs/functions_gd.php?static_graph=1&graph_type=progressbar&ttl=".$ttl."&id_graph=".$id_graph."'>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -142,23 +142,31 @@ function pandoraFlotPieCustom(graph_id, values, labels, width,
|
|||
}
|
||||
|
||||
var label_conf;
|
||||
|
||||
label_conf = {
|
||||
show: true,
|
||||
radius: 0.75,
|
||||
formatter: function(label, series) {
|
||||
return '<div style="font-size:' + font_size + 'pt;' +
|
||||
'text-align:center;padding:2px;color:white;">' +
|
||||
series.percent.toFixed(2) + '%</div>';
|
||||
},
|
||||
background: {
|
||||
opacity: 0.5,
|
||||
color: ''
|
||||
}
|
||||
};
|
||||
|
||||
var show_legend = true;
|
||||
|
||||
if((width <= 450)) {
|
||||
show_legend = false;
|
||||
label_conf = {
|
||||
show: false
|
||||
};
|
||||
}
|
||||
else {
|
||||
label_conf = {
|
||||
show: true,
|
||||
radius: 0.75,
|
||||
formatter: function(label, series) {
|
||||
return '<div style="font-size:' + font_size + 'pt;' +
|
||||
'text-align:center;padding:2px;color:white;">' +
|
||||
series.percent.toFixed(2) + '%</div>';
|
||||
},
|
||||
background: {
|
||||
opacity: 0.5,
|
||||
color: ''
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
var conf_pie = {
|
||||
series: {
|
||||
pie: {
|
||||
|
@ -176,6 +184,9 @@ function pandoraFlotPieCustom(graph_id, values, labels, width,
|
|||
clickable: true
|
||||
}
|
||||
};
|
||||
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
||||
conf_pie.series.pie.label = {show: false};
|
||||
}
|
||||
|
||||
var plot = $.plot($('#'+graph_id), data, conf_pie);
|
||||
if (no_data == data.length) {
|
||||
|
@ -205,17 +216,17 @@ function pandoraFlotPieCustom(graph_id, values, labels, width,
|
|||
|
||||
var pielegends = $('#'+graph_id+' .pieLabelBackground');
|
||||
pielegends.each(function () {
|
||||
$(this).css('transform', "rotate(-35deg)");
|
||||
$(this).css('transform', "rotate(-35deg)").css('color', 'black');
|
||||
});
|
||||
var labelpielegends = $('#'+graph_id+' .pieLabel');
|
||||
labelpielegends.each(function () {
|
||||
$(this).css('transform', "rotate(-35deg)");
|
||||
$(this).css('transform', "rotate(-35deg)").css('color', 'black');
|
||||
});
|
||||
|
||||
// Events
|
||||
$('#' + graph_id).bind('plothover', pieHover);
|
||||
$('#' + graph_id).bind('plotclick', Clickpie);
|
||||
$('#' + graph_id).bind('mouseout',resetInteractivity);
|
||||
$('#' + graph_id).bind('mouseout', resetInteractivity);
|
||||
$('#' + graph_id).css('margin-left', 'auto');
|
||||
$('#' + graph_id).css('margin-right', 'auto');
|
||||
|
||||
|
@ -309,15 +320,19 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
|
|||
borderWidth: 1,
|
||||
backgroundColor: { colors: ["#FFF", "#FFF"] }
|
||||
},
|
||||
xaxis: {
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: font_size,
|
||||
axisLabelFontFamily: font+'Font',
|
||||
tickFormatter: xFormatter,
|
||||
},
|
||||
yaxis: {
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 12,
|
||||
axisLabelFontFamily: font+'Font',
|
||||
axisLabelPadding: 3,
|
||||
ticks: yFormatter,
|
||||
tickSize: 1,
|
||||
color: '',
|
||||
},
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: font_size,
|
||||
axisLabelFontFamily: font+'Font',
|
||||
ticks: yFormatter,
|
||||
color: '',
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
}
|
||||
|
@ -339,141 +354,38 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
|
|||
$('#' + graph_id).HUseTooltip();
|
||||
$('#' + graph_id).css("margin-left","auto");
|
||||
$('#' + graph_id).css("margin-right","auto");
|
||||
$('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true });
|
||||
// Adjust the top of yaxis tick to set it in the middle of the bars
|
||||
//yAxisHeight = $('#' + graph_id + ' .yAxis .tickLabel')
|
||||
//.css('height').split('px')[0];
|
||||
//~ $('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true });
|
||||
|
||||
//~ i = 0;
|
||||
//~ $('#' + graph_id + ' .yAxis .tickLabel').each(function() {
|
||||
//~ $(this).css('display','none');
|
||||
//~ $(this).addClass("legend_"+i);
|
||||
//~ i++;
|
||||
//~ });
|
||||
|
||||
$('#' + graph_id + ' .xAxis .tickLabel').each(function() {
|
||||
/*
|
||||
tickTop = $(this).css('top').split('px')[0];
|
||||
tickNewTop = parseInt(parseInt(tickTop) - (yAxisHeight / 2) - 3);
|
||||
$(this).css('top', tickNewTop + 'px');
|
||||
|
||||
valuesNewTop = parseInt(parseInt(tickTop) - (yAxisHeight));
|
||||
|
||||
$('#value_' + i + '_' + graph_id)
|
||||
.css('top',parseInt(plot.offset().top) + parseInt(valuesNewTop));
|
||||
|
||||
pixelPerValue = parseInt(plot.width()) / maxvalue;
|
||||
|
||||
inCanvasValuePos = parseInt(pixelPerValue *
|
||||
($('#value_' + i + '_' + graph_id).html()));
|
||||
label_width = ($('#value_' + i + '_' + graph_id)
|
||||
.css('width').split('px')[0] - 3);
|
||||
|
||||
label_left_offset = plot.offset().left + inCanvasValuePos + 5; //Label located on right side of bar + 5 pixels
|
||||
|
||||
//If label fit into the bar just recalculate left position to fit on right side of bar
|
||||
if (inCanvasValuePos > label_width) {
|
||||
label_left_offset = plot.offset().left + inCanvasValuePos
|
||||
- $('#value_' + i + '_' + graph_id).css('width').split('px')[0] - 3;
|
||||
}
|
||||
|
||||
$('#value_' + i + '_' + graph_id)
|
||||
.css('left', label_left_offset);
|
||||
i++;
|
||||
*/
|
||||
label = parseFloat($(this).text());
|
||||
text = label.toLocaleString();
|
||||
if ( label >= 1000000)
|
||||
text = text.substring(0,4) + "M";
|
||||
else if (label >= 100000)
|
||||
text = text.substring(0,3) + "K";
|
||||
else if (label >= 1000)
|
||||
text = text.substring(0,2) + "K";
|
||||
|
||||
$(this).text(text);
|
||||
|
||||
});
|
||||
/*
|
||||
// When resize the window, adjust the values
|
||||
$('#' + graph_id).parent().resize(function () {
|
||||
i = 0;
|
||||
pixelPerValue = parseInt(plot.width()) / maxvalue;
|
||||
|
||||
$('#' + graph_id + ' .yAxis .tickLabel').each(function() {
|
||||
inCanvasValuePos = parseInt(pixelPerValue *
|
||||
($('#value_' + i + '_' + graph_id).html()));
|
||||
label_width = ($('#value_' + i + '_' + graph_id)
|
||||
.css('width').split('px')[0] - 3);
|
||||
|
||||
label_left_offset = plot.offset().left + inCanvasValuePos + 5; //Label located on right side of bar + 5 pixels
|
||||
|
||||
//If label fit into the bar just recalculate left position to fit on right side of bar
|
||||
if (inCanvasValuePos > label_width) {
|
||||
label_left_offset = plot.offset().left + inCanvasValuePos
|
||||
- $('#value_' + i + '_' + graph_id)
|
||||
.css('width').split('px')[0] - 3;
|
||||
}
|
||||
|
||||
$('#value_' + i + '_' + graph_id)
|
||||
.css('left', label_left_offset);
|
||||
i++;
|
||||
});
|
||||
});
|
||||
|
||||
// Format functions
|
||||
function xFormatter(v, axis) {
|
||||
if (labels[v] != undefined) {
|
||||
return labels[v];
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function yFormatter(v, axis) {
|
||||
return v;
|
||||
}
|
||||
|
||||
// Events
|
||||
$('#' + graph_id).bind('plothover', function (event, pos, item) {
|
||||
$('.values_' + graph_id).css('font-weight', '');
|
||||
if (item != null) {
|
||||
index = item.dataIndex;
|
||||
$('#value_' + index + '_' + graph_id)
|
||||
.css('font-weight', 'bold');
|
||||
}
|
||||
});
|
||||
|
||||
if (water_mark) {
|
||||
set_watermark(graph_id, plot,
|
||||
$('#watermark_image_' + graph_id).attr('src'));
|
||||
}
|
||||
|
||||
if (maxvalue == 0) {
|
||||
|
||||
// Fixed the position for the graphs with all values in
|
||||
// bars is 0.
|
||||
|
||||
$(".values_" + graph_id).css("left", (plot.offset().left + 5) + "px");
|
||||
}
|
||||
* */
|
||||
function yFormatter(v, axis) {
|
||||
format = new Array();
|
||||
for (i = 0; i < labels_total.length; i++) {
|
||||
var label = labels_total[i][1];
|
||||
var shortLabel = reduceText(label, 30);
|
||||
var shortLabel = reduceText(label, 25);
|
||||
var title = '';
|
||||
if (label !== shortLabel) {
|
||||
title = label;
|
||||
label = shortLabel;
|
||||
}
|
||||
format.push([i,'<div style=font-size:'+font_size+'pt title="'+title+'" class="'+font+'">'
|
||||
format.push([i,'<div style="font-size:'+font_size+'pt !important; word-break:keep-all; max-width: 150px;" title="'+title+'" class="'+font+'">'
|
||||
+ label
|
||||
+ '</div>']);
|
||||
}
|
||||
return format;
|
||||
}
|
||||
|
||||
function xFormatter(v, axis) {
|
||||
label = parseFloat(v);
|
||||
text = label.toLocaleString();
|
||||
if ( label >= 1000000)
|
||||
text = text.substring(0,4) + "M";
|
||||
else if (label >= 100000)
|
||||
text = text.substring(0,3) + "K";
|
||||
else if (label >= 1000)
|
||||
text = text.substring(0,2) + "K";
|
||||
|
||||
return '<div style="font-size:'+font_size+'pt !important;">'+text+'</div>';
|
||||
}
|
||||
|
||||
if (water_mark) {
|
||||
set_watermark(graph_id, plot, $('#watermark_image_'+graph_id).attr('src'));
|
||||
}
|
||||
|
@ -600,20 +512,30 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors,
|
|||
},
|
||||
xaxis: {
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 7,
|
||||
axisLabelFontSizePixels: font_size,
|
||||
axisLabelFontFamily: font+'Font',
|
||||
axisLabelPadding: 0,
|
||||
ticks: xFormatter,
|
||||
labelWidth: 130,
|
||||
labelHeight: 50,
|
||||
},
|
||||
yaxis: {
|
||||
axisLabelUseCanvas: true,
|
||||
axisLabelFontSizePixels: 7,
|
||||
axisLabelFontSizePixels: font_size,
|
||||
axisLabelFontFamily: font+'Font',
|
||||
axisLabelPadding: 100,
|
||||
autoscaleMargin: 0.02,
|
||||
tickFormatter: function (v, axis) {
|
||||
return v ;
|
||||
label = parseFloat(v);
|
||||
text = label.toLocaleString();
|
||||
if ( label >= 1000000)
|
||||
text = text.substring(0,4) + "M";
|
||||
else if (label >= 100000)
|
||||
text = text.substring(0,3) + "K";
|
||||
else if (label >= 1000)
|
||||
text = text.substring(0,2) + "K";
|
||||
|
||||
return '<div style="font-size:'+font_size+'pt !important;">'+text+'</div>';
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
|
@ -630,82 +552,43 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors,
|
|||
}
|
||||
};
|
||||
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
|
||||
options.xaxis.labelWidth = 100;
|
||||
|
||||
var plot = $.plot($('#'+graph_id),datas, options );
|
||||
$('#' + graph_id).VUseTooltip();
|
||||
$('#' + graph_id).css("margin-left","auto");
|
||||
$('#' + graph_id).css("margin-right","auto");
|
||||
$('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true });
|
||||
// Adjust the top of yaxis tick to set it in the middle of the bars
|
||||
//yAxisHeight = $('#'+graph_id+' .yAxis .tickLabel').css('height').split('px')[0];
|
||||
|
||||
//plot.getPlaceholder().onload = function(){pruebas};
|
||||
//~ i = 0;
|
||||
//~ $('#'+graph_id+' .xAxis .tickLabel').each(function() {
|
||||
//~ $(this).css('display','none');
|
||||
//~ $(this).addClass("legend_"+i);
|
||||
//~ i++;
|
||||
//~ tickNewTop = parseInt(parseInt(tickTop) - (yAxisHeight/2)-3);
|
||||
//~ $(this).css('top', tickNewTop+'px');
|
||||
//~
|
||||
//~ valuesNewTop = parseInt(parseInt(tickTop) - (yAxisHeight));
|
||||
//~
|
||||
//~ $('#value_'+i+'_'+graph_id).css('top',parseInt(plot.offset().top) + parseInt(valuesNewTop));
|
||||
//~
|
||||
//~ pixelPerValue = parseInt(plot.width()) / maxvalue;
|
||||
//~
|
||||
//~ inCanvasValuePos = parseInt(pixelPerValue * ($('#value_'+i+'_'+graph_id).html()));
|
||||
//~
|
||||
//~ $('#value_'+i+'_'+graph_id).css('left',plot.offset().left + inCanvasValuePos - $('#value_'+i+'_'+graph_id).css('width').split('px')[0] - 3);
|
||||
//~ });
|
||||
|
||||
// When resize the window, adjust the values
|
||||
//~ $('#'+graph_id).parent().resize(function () {
|
||||
//~ i = 0;
|
||||
//~ pixelPerValue = parseInt(plot.width()) / maxvalue;
|
||||
//~
|
||||
//~ $('#'+graph_id+' .yAxis .tickLabel').each(function() {
|
||||
//~ inCanvasValuePos = parseInt(pixelPerValue * ($('#value_'+i+'_'+graph_id).html()));
|
||||
//~
|
||||
//~ $('#value_'+i+'_'+graph_id).css('left',plot.offset().left + inCanvasValuePos - $('#value_'+i+'_'+graph_id).css('width').split('px')[0] - 3);
|
||||
//~ i++;
|
||||
//~ });
|
||||
//~ });
|
||||
|
||||
|
||||
|
||||
$('#'+graph_id+' .yAxis .tickLabel').each(function() {
|
||||
label = parseFloat($(this).text());
|
||||
text = label.toLocaleString();
|
||||
if ( label >= 1000000)
|
||||
text = text.substring(0,4) + "M";
|
||||
else if (label >= 100000)
|
||||
text = text.substring(0,3) + "K";
|
||||
else if (label >= 1000)
|
||||
text = text.substring(0,2) + "K";
|
||||
|
||||
$(this).text(text);
|
||||
});
|
||||
//~ $('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true });
|
||||
|
||||
$('#'+graph_id+' .xAxis .tickLabel')
|
||||
.css('transform', 'rotate(-45deg)')
|
||||
.css('max-width','100px')
|
||||
.find('div')
|
||||
.css('position', 'relative')
|
||||
.css('top', '+10px')
|
||||
.css('left', '-20px');
|
||||
|
||||
.css('left', '-30px');
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
|
||||
$('#'+graph_id+' .xAxis .tickLabel')
|
||||
.find('div')
|
||||
.css('top', '+0px')
|
||||
.css('left', '-20px');
|
||||
// Format functions
|
||||
function xFormatter(v, axis) {
|
||||
var format = new Array();
|
||||
for (i = 0; i < labels_total.length; i++) {
|
||||
var label = labels_total[i][1];
|
||||
var shortLabel = reduceText(label, 35);
|
||||
var shortLabel = reduceText(label, 28);
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
|
||||
shortLabel = reduceText(label, 18);
|
||||
var title = '';
|
||||
if (label !== shortLabel) {
|
||||
title = label;
|
||||
label = shortLabel;
|
||||
}
|
||||
|
||||
format.push([i,
|
||||
'<div class="'+font+'" title="'+title+'" style="word-break: break-word; max-width: 110px;font-size:'+font_size+'pt">'
|
||||
'<div class="'+font+'" title="'+title+'" style="word-break: normal; max-width: 100px;font-size:'+font_size+'pt !important;">'
|
||||
+ label
|
||||
+ '</div>']);
|
||||
}
|
||||
|
@ -713,22 +596,13 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors,
|
|||
}
|
||||
|
||||
function yFormatter(v, axis) {
|
||||
return v;
|
||||
return '<div class="'+font+'" style="font-size:'+font_size+'pt !important;">'+v+'</div>';
|
||||
}
|
||||
|
||||
function lFormatter(v, axis) {
|
||||
return '<div style=color:>'+v+'</div>';
|
||||
return '<div style="font-size:'+font_size+'pt !important;">'+v+'</div>';
|
||||
}
|
||||
|
||||
// Events
|
||||
//~ $('#'+graph_id).bind('plothover', function (event, pos, item) {
|
||||
//~ $('.values_'+graph_id).css('font-weight', '');
|
||||
//~ if(item != null) {
|
||||
//~ index = item.dataIndex;
|
||||
//~ $('#value_'+index+'_'+graph_id).css('font-weight', 'bold');
|
||||
//~ }
|
||||
//~ });
|
||||
|
||||
|
||||
if (water_mark) {
|
||||
set_watermark(graph_id, plot, $('#watermark_image_'+graph_id).attr('src'));
|
||||
}
|
||||
|
@ -857,7 +731,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
force_integer, separator, separator2,
|
||||
yellow_up, red_up, yellow_inverse, red_inverse,
|
||||
series_suffix_str, dashboard, vconsole, xaxisname,background_color,legend_color) {
|
||||
|
||||
|
||||
var threshold = true;
|
||||
var thresholded = false;
|
||||
font = font.split("/").pop().split(".").shift();
|
||||
|
@ -1581,7 +1455,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
// Re-calculate the graph height with the legend height
|
||||
if (dashboard || vconsole) {
|
||||
var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height();
|
||||
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
|
||||
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){
|
||||
}
|
||||
else {
|
||||
$('#'+graph_id).css('height', hDiff);
|
||||
|
@ -1649,8 +1523,21 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
if (thresholded) {
|
||||
var zoom_data_threshold = new Array ();
|
||||
|
||||
var y_recal = axis_thresholded(threshold_data, plot.getAxes().yaxis.min, plot.getAxes().yaxis.max,
|
||||
red_threshold, extremes, red_up);
|
||||
plot = $.plot($('#' + graph_id), data_base,
|
||||
$.extend(true, {}, options, {
|
||||
yaxis: {
|
||||
max: y_recal.max,
|
||||
min: y_recal.min
|
||||
},
|
||||
xaxis: {
|
||||
min: plot.getAxes().xaxis.min,
|
||||
max: plot.getAxes().xaxis.max
|
||||
}
|
||||
}));
|
||||
zoom_data_threshold = add_threshold (data_base, threshold_data, plot.getAxes().yaxis.min, plot.getAxes().yaxis.max,
|
||||
yellow_threshold, red_threshold, extremes, red_up);
|
||||
red_threshold, extremes, red_up);
|
||||
plot.setData(zoom_data_threshold);
|
||||
plot.draw();
|
||||
}
|
||||
|
@ -1874,18 +1761,18 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
if (labels[v] == undefined) {
|
||||
return '';
|
||||
}
|
||||
return '<div class='+font+' style=font-size:'+font_size+'pt>'+labels[v]+'</div>';
|
||||
return '<div class='+font+' style="font-size:'+font_size+'pt !important;">'+labels[v]+'</div>';
|
||||
}
|
||||
|
||||
function yFormatter(v, axis) {
|
||||
axis.datamin = 0;
|
||||
var formatted = number_format(v,force_integer,unit);
|
||||
|
||||
return '<div class='+font+' style=font-size:'+font_size+'pt>'+formatted+'</div>';
|
||||
return '<div class='+font+' style="font-size:'+font_size+'pt !important;">'+formatted+'</div>';
|
||||
}
|
||||
|
||||
function lFormatter(v, item) {
|
||||
return '<div style=font-size:'+font_size+'pt>'+v+'</div>';
|
||||
return '<div style="font-size:'+font_size+'pt !important;">'+v+'</div>';
|
||||
// Prepared to turn series with a checkbox
|
||||
//return '<div style=color:;font-size:'+font_size+'pt><input type="checkbox" id="' + graph_id + '_' + item.id +'" checked="checked" class="check_serie_'+graph_id+'">'+v+'</div>';
|
||||
}
|
||||
|
@ -1931,28 +1818,32 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
plot = $.plot($('#' + graph_id), data_base,
|
||||
$.extend(true, {}, options, {
|
||||
yaxis: {max: max_draw},
|
||||
xaxis: {
|
||||
min: plot.getAxes().xaxis.min,
|
||||
max: plot.getAxes().xaxis.max
|
||||
}
|
||||
}));
|
||||
thresholded = false;
|
||||
}
|
||||
else {
|
||||
|
||||
var max_draw = plot.getAxes().yaxis.datamax;
|
||||
if (max_draw < red_threshold || max_draw < yellow_threshold) {
|
||||
|
||||
var maxim_data = (red_threshold < yellow_threshold) ? yellow_threshold : red_threshold
|
||||
|
||||
plot = $.plot($('#' + graph_id), data_base,
|
||||
$.extend(true, {}, options, {
|
||||
yaxis: {max: maxim_data + (maxim_data*0.5)},
|
||||
}));
|
||||
} else {
|
||||
plot = $.plot($('#' + graph_id), data_base,
|
||||
$.extend(true, {}, options, {
|
||||
yaxis: {max: plot.getAxes().yaxis.max},
|
||||
}));
|
||||
}
|
||||
// Recalculate the y axis
|
||||
var y_recal = axis_thresholded(threshold_data, plot.getAxes().yaxis.min, plot.getAxes().yaxis.max,
|
||||
red_threshold, extremes, red_up);
|
||||
plot = $.plot($('#' + graph_id), data_base,
|
||||
$.extend(true, {}, options, {
|
||||
yaxis: {
|
||||
max: y_recal.max,
|
||||
min: y_recal.min
|
||||
},
|
||||
xaxis: {
|
||||
min: plot.getAxes().xaxis.min,
|
||||
max: plot.getAxes().xaxis.max
|
||||
}
|
||||
}));
|
||||
datas = add_threshold (data_base, threshold_data, plot.getAxes().yaxis.min, plot.getAxes().yaxis.max,
|
||||
yellow_threshold, red_threshold, extremes, red_up);
|
||||
red_threshold, extremes, red_up);
|
||||
thresholded = true;
|
||||
|
||||
}
|
||||
|
@ -1994,7 +1885,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
$('#legend_'+graph_id).css('margin-bottom', '10px');
|
||||
parent_height = parseInt(
|
||||
$('#menu_'+graph_id).parent().css('height').split('px')[0]);
|
||||
adjust_menu(graph_id, plot, parent_height);
|
||||
adjust_menu(graph_id, plot, parent_height, width);
|
||||
}
|
||||
|
||||
if (!dashboard) {
|
||||
|
@ -2054,6 +1945,7 @@ function set_watermark(graph_id, plot, watermark_src) {
|
|||
if ($('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height') != undefined) {
|
||||
down_ticks_height = $('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height').split('px')[0];
|
||||
}
|
||||
|
||||
var left_pos = parseInt(context.canvas.width - 3) - $('#watermark_image_'+graph_id)[0].width;
|
||||
var top_pos = 6;
|
||||
//var top_pos = parseInt(context.canvas.height - down_ticks_height - 10) - $('#watermark_image_'+graph_id)[0].height;
|
||||
|
@ -2143,7 +2035,65 @@ function number_format(number, force_integer, unit) {
|
|||
|
||||
return number + ' ' + shorts[pos] + unit;
|
||||
}
|
||||
function add_threshold (data_base, threshold_data, y_min, y_max, yellow_threshold,
|
||||
// Recalculate the threshold data depends on warning and critical
|
||||
function axis_thresholded (threshold_data, y_min, y_max, red_threshold, extremes, red_up) {
|
||||
|
||||
var y = {
|
||||
min: 0,
|
||||
max: 0
|
||||
};
|
||||
|
||||
// Default values
|
||||
var yaxis_resize = {
|
||||
up: null,
|
||||
normal_up: 0,
|
||||
normal_down: 0,
|
||||
down: null
|
||||
};
|
||||
// Resize the y axis to display all intervals
|
||||
$.each(threshold_data, function() {
|
||||
if (/_up/.test(this.id)){
|
||||
yaxis_resize['up'] = this.data[0][1];
|
||||
}
|
||||
if (/_down/.test(this.id)){
|
||||
if (/critical/.test(this.id)) {
|
||||
yaxis_resize['down'] = red_threshold;
|
||||
} else {
|
||||
yaxis_resize['down'] = extremes[this.id];
|
||||
}
|
||||
}
|
||||
if (/_normal/.test(this.id)){
|
||||
var end;
|
||||
if (/critical/.test(this.id)) {
|
||||
end = red_up;
|
||||
} else {
|
||||
end = extremes[this.id + '_2'];
|
||||
}
|
||||
if (yaxis_resize['normal_up'] < end) yaxis_resize['normal_up'] = end;
|
||||
if (yaxis_resize['normal_down'] > this.data[0][1]) yaxis_resize['normal_down'] = this.data[0][1];
|
||||
}
|
||||
});
|
||||
|
||||
// If you need to display a up or a down bar, display 10% of data height
|
||||
var margin_up_or_down = (y_max - y_min)*0.10;
|
||||
|
||||
// Calculate the new axis
|
||||
y['max'] = yaxis_resize['normal_up'] > y_max ? yaxis_resize['normal_up'] : y_max;
|
||||
y['min'] = yaxis_resize['normal_down'] > y_min ? yaxis_resize['normal_down'] : y_min;
|
||||
if (yaxis_resize['up'] !== null) {
|
||||
y['max'] = (yaxis_resize['up'] + margin_up_or_down) < y_max
|
||||
? y_max
|
||||
: yaxis_resize['up'] + margin_up_or_down;
|
||||
}
|
||||
if (yaxis_resize['down'] !== null) {
|
||||
y['min'] = (yaxis_resize['down'] - margin_up_or_down) < y_min
|
||||
? yaxis_resize['up'] + margin_up_or_down
|
||||
: y_min;
|
||||
}
|
||||
|
||||
return y;
|
||||
}
|
||||
function add_threshold (data_base, threshold_data, y_min, y_max,
|
||||
red_threshold, extremes, red_up) {
|
||||
|
||||
var datas = new Array ();
|
||||
|
@ -2195,5 +2145,6 @@ function add_threshold (data_base, threshold_data, y_min, y_max, yellow_threshol
|
|||
function reduceText (text, maxLength) {
|
||||
if (text.length <= maxLength) return text
|
||||
var firstSlideEnd = parseInt((maxLength - 3) / 2);
|
||||
return text.substr(0, firstSlideEnd) + '...' + text.substr(-firstSlideEnd - 3);
|
||||
var str_cut = text.substr(0, firstSlideEnd);
|
||||
return str_cut + '...' + text.substr(-firstSlideEnd - 3);
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||
// Parent layer
|
||||
$return = "<div class='parent_graph' style='width: " . $width . "px; " . $background_style . "'>";
|
||||
// Set some containers to legend, graph, timestamp tooltip, etc.
|
||||
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:".$font_size."pt'></p>";
|
||||
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:$font_size"."pt !important;'></p>";
|
||||
|
||||
if (!empty($threshold_data)) {
|
||||
$yellow_up = $threshold_data['yellow_up'];
|
||||
|
@ -265,7 +265,9 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||
}
|
||||
$return .= html_print_input_hidden('line_width_graph', $config['custom_graph_width'], true);
|
||||
$return .= "<div id='timestamp_$graph_id' class='timestamp_graph' style='font-size:".$font_size."pt;display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px; z-index:1000;'></div>";
|
||||
$return .= "<div id='$graph_id' class='graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||
$return .= "<div id='$graph_id' class='";
|
||||
if($type=='area_simple'){$return .= "noresizevc ";}
|
||||
$return .= "graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||
if ($menu) {
|
||||
$height = 100;
|
||||
}
|
||||
|
@ -598,7 +600,7 @@ function flot_custom_pie_chart ($flash_charts, $graph_values,
|
|||
|
||||
$graph_id = uniqid('graph_');
|
||||
|
||||
$return = "<div id='$graph_id' class='graph' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||
$return = "<div id='$graph_id' class='graph noresizevc' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||
|
||||
if ($water_mark != '') {
|
||||
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='".$water_mark["url"]."'></div>";
|
||||
|
|
|
@ -172,7 +172,6 @@ function delete_link(source_id, source_module_id, target_id, target_module_id, i
|
|||
init_drag_and_drop();
|
||||
set_positions_graph();
|
||||
}
|
||||
|
||||
$("#dialog_node_edit").dialog("close");
|
||||
}
|
||||
});
|
||||
|
@ -219,6 +218,43 @@ function update_fictional_node(id_db_node) {
|
|||
}
|
||||
}
|
||||
|
||||
function update_node_name (id_db_node) {
|
||||
if (enterprise_installed) {
|
||||
var name = $("input[name='edit_name_node']").val();
|
||||
|
||||
var params = [];
|
||||
params.push("update_node_name=1");
|
||||
params.push("networkmap_id=" + networkmap_id);
|
||||
params.push("node_id=" + id_db_node);
|
||||
params.push("name=" + name);
|
||||
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
if (data['correct']) {
|
||||
$("#dialog_node_edit").dialog("close");
|
||||
|
||||
jQuery.each(graph.nodes, function(i, element) {
|
||||
if (element.id_db == id_db_node) {
|
||||
graph.nodes[i].text = name;
|
||||
|
||||
$("#id_node_" + i + networkmap_id + " title").html(name);
|
||||
$("#id_node_" + i + networkmap_id + " tspan").html(name);
|
||||
}
|
||||
});
|
||||
|
||||
draw_elements_graph();
|
||||
set_positions_graph();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function change_shape(id_db_node) {
|
||||
if (enterprise_installed) {
|
||||
var shape = $("select[name='shape']").val();
|
||||
|
@ -532,6 +568,9 @@ function update_link(row_index, id_link) {
|
|||
temp_link["status_start"] = "0";
|
||||
temp_link["status_end"] = "0";
|
||||
|
||||
temp_link["text_start"] = data["text_start"];
|
||||
temp_link["text_end"] = data["text_end"];
|
||||
|
||||
$.each(graph.nodes, function(k, node) {
|
||||
if (node['id_agent'] == data['id_db_target']) {
|
||||
temp_link["target"] = graph.nodes[k];
|
||||
|
@ -579,7 +618,7 @@ function add_new_link (new_link) {
|
|||
graph.links.push(new_link);
|
||||
}
|
||||
|
||||
function edit_node(data, dblClick) {
|
||||
function edit_node(data_node, dblClick) {
|
||||
if (enterprise_installed) {
|
||||
var flag_edit_node = true;
|
||||
var edit_node = null
|
||||
|
@ -594,7 +633,7 @@ function edit_node(data, dblClick) {
|
|||
edit_node = selection[0].pop();
|
||||
}
|
||||
else if (dblClick){
|
||||
edit_node = d3.select("#id_node_" + data['id'] + networkmap_id);
|
||||
edit_node = d3.select("#id_node_" + data_node['id'] + networkmap_id);
|
||||
edit_node = edit_node[0][0];
|
||||
}
|
||||
else {
|
||||
|
@ -615,18 +654,22 @@ function edit_node(data, dblClick) {
|
|||
|
||||
selected_links = get_relations(node_selected);
|
||||
|
||||
$("select[name='shape'] option[value='" + data.shape + "']")
|
||||
$("select[name='shape'] option[value='" + node_selected.shape + "']")
|
||||
.prop("selected", true);
|
||||
$("select[name='shape']").attr("onchange",
|
||||
"javascript: change_shape(" + data.id_db + ");");
|
||||
"javascript: change_shape(" + node_selected.id_db + ");");
|
||||
$("#node_options-fictional_node_update_button-1 input")
|
||||
.attr("onclick", "update_fictional_node(" + data.id_db + ");");
|
||||
.attr("onclick", "update_fictional_node(" + node_selected.id_db + ");");
|
||||
|
||||
$("#node_options-node_name-2 input")
|
||||
.attr("onclick", "update_node_name(" + node_selected.id_db + ");");
|
||||
|
||||
$("#node_details-0-1").html('<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' + data["id_agent"] + '">' + data["text"] + '</a>');
|
||||
$("#node_details-0-1").html('<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' + node_selected["id_agent"] + '">' + node_selected["text"] + '</a>');
|
||||
var params = [];
|
||||
params.push("get_agent_info=1");
|
||||
params.push("id_agent=" + data["id_agent"]);
|
||||
params.push("id_agent=" + node_selected["id_agent"]);
|
||||
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
dataType: 'json',
|
||||
|
@ -640,75 +683,47 @@ function edit_node(data, dblClick) {
|
|||
$("#node_details-1-1").html(adressess);
|
||||
$("#node_details-2-1").html(data["os"]);
|
||||
$("#node_details-3-1").html(data["group"]);
|
||||
}
|
||||
});
|
||||
|
||||
$("#interface_information").find("tr:gt(0)").remove();
|
||||
|
||||
var params = [];
|
||||
params.push("get_interface_info=1");
|
||||
params.push("id_agent=" + data["id_agent"]);
|
||||
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
if (data.length == 0) {
|
||||
$("#interface_information").find('tbody')
|
||||
.append($('<tr>').html("<p style=\"text-align: center;\">It has no interface to display</p>"));
|
||||
}
|
||||
else {
|
||||
jQuery.each(data, function(j, interface) {
|
||||
$("#interface_information").find('tbody')
|
||||
.append($('<tr>')
|
||||
.append($('<td>')
|
||||
.html(interface['name'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['status'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['graph'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['ip'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['mac'])
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
$('[aria-describedby=dialog_node_edit]').css({'top':'200px'});
|
||||
$('#foot').css({'top':parseInt($("[aria-describedby=dialog_node_edit]").css('height')+$("[aria-describedby=dialog_node_edit]").css('top')),'position':'relative'});
|
||||
|
||||
get_interface_data_to_table(node_selected, selected_links);
|
||||
}
|
||||
});
|
||||
|
||||
$("#dialog_node_edit" )
|
||||
.dialog( "option", "title",
|
||||
dialog_node_edit_title.replace("%s", data.text));
|
||||
dialog_node_edit_title.replace("%s", node_selected.text));
|
||||
$("#dialog_node_edit").dialog("open");
|
||||
|
||||
if (data.id_agent == -2) {
|
||||
if (node_selected.id_agent == undefined || node_selected.id_agent == -2) {
|
||||
//Fictional node
|
||||
$("#node_options-fictional_node_name")
|
||||
.css("display", "");
|
||||
$("input[name='edit_name_fictional_node']")
|
||||
.val(data.text);
|
||||
.val(node_selected.text);
|
||||
$("#node_options-fictional_node_networkmap_link")
|
||||
.css("display", "");
|
||||
$("#edit_networkmap_to_link")
|
||||
.val(data.networkmap_id);
|
||||
.val(node_selected.networkmap_id);
|
||||
$("#node_options-fictional_node_update_button")
|
||||
.css("display", "");
|
||||
$("#node_options-node_name")
|
||||
.css("display", "none");
|
||||
$("#node_options-node_update_button")
|
||||
.css("display", "none");
|
||||
}
|
||||
else {
|
||||
$("input[name='edit_name_node']")
|
||||
.val(node_selected.text);
|
||||
$("#node_options-fictional_node_name")
|
||||
.css("display", "none");
|
||||
$("#node_options-fictional_node_networkmap_link")
|
||||
.css("display", "none");
|
||||
$("#node_options-fictional_node_update_button")
|
||||
.css("display", "none");
|
||||
$("#node_options-node_name")
|
||||
.css("display", "");
|
||||
}
|
||||
|
||||
//Clean
|
||||
|
@ -716,124 +731,160 @@ function edit_node(data, dblClick) {
|
|||
//Show the no relations
|
||||
$("#relations_table-loading").css('display', 'none');
|
||||
$("#relations_table-no_relations").css('display', '');
|
||||
|
||||
|
||||
jQuery.each(selected_links, function(i, link_each) {
|
||||
|
||||
$("#relations_table-no_relations").css('display', 'none');
|
||||
$("#relations_table-loading").css('display', '');
|
||||
|
||||
var template_relation_row = $("#relations_table-template_row")
|
||||
.clone();
|
||||
|
||||
$(template_relation_row).css('display', '');
|
||||
$(template_relation_row).attr('class', 'relation_link_row');
|
||||
|
||||
$("select[name='interface_source']", template_relation_row)
|
||||
.attr('name', "interface_source_" + i)
|
||||
.attr('id', "interface_source_" + i + networkmap_id);
|
||||
$("select[name='interface_target']", template_relation_row)
|
||||
.attr('name', "interface_target_" + i)
|
||||
.attr('id', "interface_target_" + i + networkmap_id);
|
||||
$(".edit_icon_progress", template_relation_row)
|
||||
.attr('class', "edit_icon_progress_" + i);
|
||||
$(".edit_icon", template_relation_row)
|
||||
.attr('class', "edit_icon_" + i);
|
||||
$(".edit_icon_correct", template_relation_row)
|
||||
.attr('class', "edit_icon_correct_" + i);
|
||||
$(".edit_icon_fail", template_relation_row)
|
||||
.attr('class', "edit_icon_fail_" + i);
|
||||
$(".edit_icon_link", template_relation_row)
|
||||
.attr('class', "edit_icon_link_" + i)
|
||||
.click(function() {
|
||||
update_link(i, link_each.id_db);
|
||||
}
|
||||
);
|
||||
|
||||
var params = [];
|
||||
params.push("get_intefaces=1");
|
||||
params.push("id_agent=" + link_each.source.id_agent);
|
||||
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
if (data['correct']) {
|
||||
$("select[name='interface_source_" + i + "']", template_relation_row).empty();
|
||||
$("select[name='interface_source_" + i + "']", template_relation_row).append('<option value="' + link_each.source.id_agent + '">None</option>');
|
||||
jQuery.each(data['interfaces'], function(j, interface) {
|
||||
|
||||
$("select[name='interface_source_" + i + "']", template_relation_row)
|
||||
.append($("<option>")
|
||||
.attr("value", interface['id_agente_modulo'])
|
||||
.html(interface['nombre']));
|
||||
|
||||
if (interface.id_agente_modulo == link_each.id_module_start) {
|
||||
$("select[name='interface_source_" + i + "'] option[value='" + interface['id_agente_modulo'] + "']", template_relation_row)
|
||||
.prop("selected", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var params = [];
|
||||
params.push("get_intefaces=1");
|
||||
params.push("id_agent=" + link_each.target.id_agent);
|
||||
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
if (data['correct']) {
|
||||
$("select[name='interface_target_" + i + "']", template_relation_row).empty();
|
||||
$("select[name='interface_target_" + i + "']", template_relation_row).append('<option value="' + link_each.target.id_agent + '">None</option>');
|
||||
jQuery.each(data['interfaces'], function(j, interface) {
|
||||
$("select[name='interface_target_" + i + "']", template_relation_row)
|
||||
.append($("<option>")
|
||||
.attr("value", interface['id_agente_modulo'])
|
||||
.html(interface['nombre']));
|
||||
|
||||
if (interface.id_agente_modulo == link_each.id_module_end) {
|
||||
$("select[name='interface_target_" + i + "'] option[value='" + interface['id_agente_modulo'] + "']", template_relation_row)
|
||||
.prop("selected", true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#relations_table-template_row-node_source", template_relation_row)
|
||||
.html(link_each.source.text);
|
||||
$("#relations_table-template_row-node_target", template_relation_row)
|
||||
.html(link_each.target.text);
|
||||
$("#relations_table-template_row-edit", template_relation_row)
|
||||
.attr("align", "center");
|
||||
$("#relations_table-template_row-edit .delete_icon", template_relation_row)
|
||||
.attr("href", "javascript: " +
|
||||
"delete_link(" +
|
||||
link_each.source.id_db + "," +
|
||||
link_each.id_module_start + "," +
|
||||
link_each.target.id_db + "," +
|
||||
link_each.id_module_end + "," +
|
||||
link_each.id_db + ");");
|
||||
$("#relations_table tbody").append(template_relation_row);
|
||||
|
||||
template_relation_row = null;
|
||||
});
|
||||
|
||||
$("#relations_table-loading").css('display', 'none');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function get_interface_data_to_table (node_selected, selected_links) {
|
||||
$("#interface_information").find("tr:gt(0)").remove();
|
||||
|
||||
var params = [];
|
||||
params.push("get_interface_info=1");
|
||||
params.push("id_agent=" + node_selected["id_agent"]);
|
||||
params.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
jQuery.ajax ({
|
||||
data: params.join ("&"),
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
if (data.length == 0) {
|
||||
$("#interface_information").find('tbody')
|
||||
.append($('<tr>').html("<p style=\"text-align: center;\">It has no interface to display</p>"));
|
||||
}
|
||||
else {
|
||||
jQuery.each(data, function(j, interface) {
|
||||
$("#interface_information").find('tbody')
|
||||
.append($('<tr>')
|
||||
.append($('<td>')
|
||||
.html(interface['name'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['status'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['graph'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['ip'])
|
||||
)
|
||||
.append($('<td>')
|
||||
.html(interface['mac'])
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
load_interfaces(selected_links);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function load_interfaces (selected_links) {
|
||||
//Clean
|
||||
$("#relations_table .relation_link_row").remove();
|
||||
//Show the no relations
|
||||
$("#relations_table-loading").css('display', 'none');
|
||||
$("#relations_table-no_relations").css('display', '');
|
||||
|
||||
jQuery.each(selected_links, function(i, link_each) {
|
||||
$("#relations_table-no_relations").css('display', 'none');
|
||||
$("#relations_table-loading").css('display', '');
|
||||
|
||||
var template_relation_row = $("#relations_table-template_row")
|
||||
.clone();
|
||||
|
||||
$(template_relation_row).css('display', '');
|
||||
$(template_relation_row).attr('class', 'relation_link_row');
|
||||
|
||||
$("select[name='interface_source']", template_relation_row)
|
||||
.attr('name', "interface_source_" + i)
|
||||
.attr('id', "interface_source_" + i);
|
||||
$("select[name='interface_target']", template_relation_row)
|
||||
.attr('name', "interface_target_" + i)
|
||||
.attr('id', "interface_target_" + i);
|
||||
$(".edit_icon_progress", template_relation_row)
|
||||
.attr('class', "edit_icon_progress_" + i);
|
||||
$(".edit_icon", template_relation_row)
|
||||
.attr('class', "edit_icon_" + i);
|
||||
$(".edit_icon_correct", template_relation_row)
|
||||
.attr('class', "edit_icon_correct_" + i);
|
||||
$(".edit_icon_fail", template_relation_row)
|
||||
.attr('class', "edit_icon_fail_" + i);
|
||||
$(".edit_icon_link", template_relation_row)
|
||||
.attr('class', "edit_icon_link_" + i)
|
||||
.click(function() {
|
||||
update_link(i, link_each.id_db);
|
||||
}
|
||||
);
|
||||
|
||||
var params3 = [];
|
||||
params3.push("get_intefaces=1");
|
||||
params3.push("id_agent_target=" + link_each.target.id_agent);
|
||||
params3.push("id_agent_source=" + link_each.source.id_agent);
|
||||
params3.push("page=enterprise/operation/agentes/pandora_networkmap.view");
|
||||
|
||||
jQuery.ajax ({
|
||||
data: params3.join ("&"),
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
async: true,
|
||||
cache: false,
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
if (data['correct']) {
|
||||
$("select[name='interface_target_" + i + "']", template_relation_row).empty();
|
||||
$("select[name='interface_target_" + i + "']", template_relation_row).append('<option value="' + link_each.target.id_agent + '">None</option>');
|
||||
|
||||
$("select[name='interface_source_" + i + "']", template_relation_row).empty();
|
||||
$("select[name='interface_source_" + i + "']", template_relation_row).append('<option value="' + link_each.source.id_agent + '">None</option>');
|
||||
jQuery.each(data['target_interfaces'], function(j, interface) {
|
||||
$("select[name='interface_target_" + i + "']", template_relation_row)
|
||||
.append($("<option>")
|
||||
.attr("value", interface['id_agente_modulo'])
|
||||
.html(interface['nombre']));
|
||||
|
||||
if (interface.id_agente_modulo == link_each.id_module_end) {
|
||||
$("select[name='interface_target_" + i + "'] option[value='" + interface['id_agente_modulo'] + "']", template_relation_row)
|
||||
.prop("selected", true);
|
||||
}
|
||||
});
|
||||
|
||||
jQuery.each(data['source_interfaces'], function(j, interface) {
|
||||
$("select[name='interface_source_" + i + "']", template_relation_row)
|
||||
.append($("<option>")
|
||||
.attr("value", interface['id_agente_modulo'])
|
||||
.html(interface['nombre']));
|
||||
|
||||
if (interface.id_agente_modulo == link_each.id_module_start) {
|
||||
$("select[name='interface_source_" + i + "'] option[value='" + interface['id_agente_modulo'] + "']", template_relation_row)
|
||||
.prop("selected", true);
|
||||
}
|
||||
});
|
||||
$("#relations_table-loading").css('display', 'none');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#relations_table-template_row-node_source", template_relation_row)
|
||||
.html(link_each.source.text);
|
||||
$("#relations_table-template_row-node_target", template_relation_row)
|
||||
.html(link_each.target.text);
|
||||
$("#relations_table-template_row-edit", template_relation_row)
|
||||
.attr("align", "center");
|
||||
$("#relations_table-template_row-edit .delete_icon", template_relation_row)
|
||||
.attr("href", "javascript: " +
|
||||
"delete_link(" +
|
||||
link_each.source.id_db + "," +
|
||||
link_each.id_module_start + "," +
|
||||
link_each.target.id_db + "," +
|
||||
link_each.id_module_end + "," +
|
||||
link_each.id_db + ");");
|
||||
$("#relations_table tbody").append(template_relation_row);
|
||||
|
||||
template_relation_row = null;
|
||||
});
|
||||
}
|
||||
|
||||
function add_node() {
|
||||
$("#agent_name").val("");
|
||||
|
||||
|
@ -925,16 +976,34 @@ function add_agent_node(agents) {
|
|||
temp_node['state'] = data['state'];
|
||||
|
||||
graph.nodes.push(temp_node);
|
||||
/* FLECHAS EMPEZADO PARA MEJORAR
|
||||
jQuery.each(data['rel'], function(i, relation) {
|
||||
|
||||
/*jQuery.each(data['rel'], function(i, relation) {
|
||||
var temp_link = {};
|
||||
if (i == 0) {
|
||||
var found = 0;
|
||||
temp_link['source'] = graph.nodes[temp_node['id']];
|
||||
jQuery.each(graph.nodes, function(j, element) {
|
||||
if (element.id_agent == relation['id_agent_end']) {
|
||||
found = j;
|
||||
}
|
||||
});
|
||||
temp_link['target'] = graph.nodes[found];
|
||||
}
|
||||
else {
|
||||
var found = 0;
|
||||
temp_link['target'] = graph.nodes[temp_node['id']];
|
||||
jQuery.each(graph.nodes, function(j, element) {
|
||||
if (element.id_agent == relation['id_agent_start']) {
|
||||
found = j;
|
||||
}
|
||||
});
|
||||
temp_link['source'] = graph.nodes[found];
|
||||
}
|
||||
temp_link['id_db'] = String(relation['id_db']);
|
||||
temp_link['id_agent_end'] = String(relation['id_agent_end']);
|
||||
temp_link['id_agent_start'] = String(relation['id_agent_start']);
|
||||
temp_link['id_module_end'] = relation['id_module_end'];
|
||||
temp_link['id_module_start'] = relation['id_module_start'];
|
||||
temp_link['source'] = relation['source'];
|
||||
temp_link['target'] = relation['target'];
|
||||
temp_link['source_in_db'] = String(relation['source_in_db']);
|
||||
temp_link['target_in_db'] = String(relation['target_in_db']);
|
||||
temp_link['arrow_end'] = relation['arrow_end'];
|
||||
|
@ -945,8 +1014,7 @@ function add_agent_node(agents) {
|
|||
temp_link['text_start'] = relation['text_start'];
|
||||
|
||||
graph.links.push(temp_link);
|
||||
});
|
||||
*/
|
||||
});*/
|
||||
|
||||
draw_elements_graph();
|
||||
init_drag_and_drop();
|
||||
|
@ -1145,18 +1213,79 @@ function zoom(manual) {
|
|||
function set_positions_graph() {
|
||||
link.selectAll("path.link")
|
||||
.attr("d", function(d) {
|
||||
|
||||
return "M " + d.source.x + " " + d.source.y +
|
||||
" L " + d.target.x + " " + d.target.y;
|
||||
});
|
||||
|
||||
if (d.arrow_end == "module" || d.arrow_start == "module") {
|
||||
return arcPath(true, d);
|
||||
}
|
||||
else {
|
||||
return "M " + d.source.x + " " + d.source.y + " L " + d.target.x + " " + d.target.y;
|
||||
}
|
||||
})
|
||||
.style("fill", "none");
|
||||
|
||||
link.selectAll("path.link_reverse")
|
||||
.attr("d", function(d) {
|
||||
|
||||
return "M " + d.target.x + " " + d.target.y +
|
||||
" L " + d.source.x + " " + d.source.y;
|
||||
});
|
||||
if (d.arrow_end == "module" || d.arrow_start == "module") {
|
||||
return arcPath(false, d);
|
||||
}
|
||||
else {
|
||||
return "M " + d.target.x + " " + d.target.y + " L " + d.source.x + " " + d.source.y;
|
||||
}
|
||||
})
|
||||
.style("fill", "none");
|
||||
|
||||
function arcPath(leftHand, d) {
|
||||
var x1 = leftHand ? d.source.x : d.target.x,
|
||||
y1 = leftHand ? d.source.y : d.target.y,
|
||||
x2 = leftHand ? d.target.x : d.source.x,
|
||||
y2 = leftHand ? d.target.y : d.source.y,
|
||||
dx = x2 - x1,
|
||||
dy = y2 - y1,
|
||||
dr = Math.sqrt(dx * dx + dy * dy),
|
||||
drx = dr,
|
||||
dry = dr,
|
||||
sweep = leftHand ? 0 : 1;
|
||||
siblingCount = countSiblingLinks(d.source, d.target)
|
||||
xRotation = 1,
|
||||
largeArc = 0;
|
||||
|
||||
if (siblingCount > 1) {
|
||||
var siblings = getSiblingLinks(d.source, d.target);
|
||||
var arcScale = d3.scale.ordinal()
|
||||
.domain(siblings)
|
||||
.rangePoints([1, siblingCount]);
|
||||
drx = drx/(1 + (1/siblingCount) * (arcScale(d.text_start + d.id_db + networkmap_id) - 1));
|
||||
dry = dry/(1 + (1/siblingCount) * (arcScale(d.text_start + d.id_db + networkmap_id) - 1));
|
||||
|
||||
return "M" + x1 + "," + y1 + "A" + drx + ", " + dry + " " + xRotation + ", " + largeArc + ", " + sweep + " " + x2 + "," + y2;
|
||||
}
|
||||
else {
|
||||
if (leftHand) {
|
||||
return "M " + d.source.x + " " + d.source.y + " L " + d.target.x + " " + d.target.y;
|
||||
}
|
||||
else {
|
||||
return "M " + d.target.x + " " + d.target.y + " L " + d.source.x + " " + d.source.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function countSiblingLinks (source, target) {
|
||||
var count = 0;
|
||||
for(var i = 0; i < graph.links.length; ++i){
|
||||
if( (graph.links[i].source.id == source.id && graph.links[i].target.id == target.id) || (graph.links[i].source.id == target.id && graph.links[i].target.id == source.id) )
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
function getSiblingLinks (source, target) {
|
||||
var siblings = [];
|
||||
for(var i = 0; i < graph.links.length; ++i){
|
||||
if( (graph.links[i].source.id == source.id && graph.links[i].target.id == target.id) || (graph.links[i].source.id == target.id && graph.links[i].target.id == source.id) )
|
||||
siblings.push(graph.links[i].text_start + graph.links[i].id_db + networkmap_id);
|
||||
}
|
||||
return siblings;
|
||||
}
|
||||
|
||||
node.selectAll(".node_shape_circle")
|
||||
.attr("cx", function(d) {
|
||||
return d.x;
|
||||
|
@ -1863,8 +1992,8 @@ function add_interface_link_js () {
|
|||
temp_link['status_end'] = "0";
|
||||
|
||||
|
||||
//temp_link['text_start'] = link['text_start'];
|
||||
//temp_link['text_end'] = link['text_end'];
|
||||
temp_link['text_start'] = data['text_start'];
|
||||
temp_link['text_end'] = data['text_end'];
|
||||
|
||||
jQuery.each(graph.nodes, function(j, node) {
|
||||
if (node['id_agent'] == data['id_db_target']) {
|
||||
|
@ -1892,6 +2021,7 @@ function refresh_holding_area() {
|
|||
var pos_x = parseInt(holding_pos_x) + parseInt(node_radius);
|
||||
var pos_y = parseInt(holding_pos_y) + parseInt(node_radius);
|
||||
if (enterprise_installed) {
|
||||
$('#holding_spinner_' + networkmap_id).css("display", "");
|
||||
var params = [];
|
||||
params.push("refresh_holding_area=1");
|
||||
params.push("id=" + networkmap_id);
|
||||
|
@ -1904,16 +2034,13 @@ function refresh_holding_area() {
|
|||
type: 'POST',
|
||||
url: action="ajax.php",
|
||||
success: function (data) {
|
||||
|
||||
if (data['correct']) {
|
||||
window.holding_area = data['holding_area'];
|
||||
|
||||
var length_nodes = graph.nodes.length;
|
||||
|
||||
jQuery.each(holding_area.nodes, function(i, node) {
|
||||
var temp_node = {};
|
||||
|
||||
temp_node['id'] = length_nodes + node['id'];
|
||||
temp_node['id'] = graph.nodes.length;
|
||||
holding_area.nodes[i]['id'] = temp_node['id'];
|
||||
|
||||
temp_node['id_db'] = node['id_db'];
|
||||
|
@ -1970,10 +2097,32 @@ function refresh_holding_area() {
|
|||
graph.links.push(temp_link);
|
||||
});
|
||||
|
||||
$("#layer_graph_links_" + networkmap_id).remove();
|
||||
$("#layer_graph_nodes_" + networkmap_id).remove();
|
||||
|
||||
window.layer_graph_links = window.layer_graph
|
||||
.append("g")
|
||||
.attr("id", "layer_graph_links_" + networkmap_id);
|
||||
window.layer_graph_nodes = window.layer_graph
|
||||
.append("g")
|
||||
.attr("id", "layer_graph_nodes_" + networkmap_id);
|
||||
|
||||
force.nodes(graph.nodes)
|
||||
.links(graph.links)
|
||||
.start();
|
||||
|
||||
window.node = layer_graph_nodes.selectAll(".node");
|
||||
window.link = layer_graph_links.selectAll(".link");
|
||||
|
||||
draw_elements_graph();
|
||||
init_drag_and_drop();
|
||||
set_positions_graph();
|
||||
|
||||
$('#holding_spinner_' + networkmap_id).css("display", "none");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
$('#holding_spinner_' + networkmap_id).css("display", "none");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2210,6 +2359,7 @@ function init_drag_and_drop() {
|
|||
graph.nodes[d.id].py = d.py + delta[1];
|
||||
});
|
||||
|
||||
draw_elements_graph();
|
||||
set_positions_graph();
|
||||
|
||||
d3.event.sourceEvent.stopPropagation();
|
||||
|
@ -2324,7 +2474,7 @@ function init_graph(parameter_object) {
|
|||
if (typeof(parameter_object.node_radius) != "undefined") {
|
||||
window.node_radius = parameter_object.node_radius;
|
||||
}
|
||||
window.interface_radius = 5;
|
||||
window.interface_radius = 3;
|
||||
window.disabled_drag_zoom = false;
|
||||
window.key_multiple_selection = 17; //CTRL key
|
||||
window.flag_multiple_selection = false;
|
||||
|
@ -2543,7 +2693,7 @@ function init_graph(parameter_object) {
|
|||
.attr("markerHeight", (node_radius / 2) + interface_radius)
|
||||
.attr("orient", "auto")
|
||||
.append("circle")
|
||||
.attr("cx", (node_radius / 2) - (interface_radius / 2))
|
||||
.attr("cx", (node_radius / 2.3) - (interface_radius / 2.3))
|
||||
.attr("cy", interface_radius)
|
||||
.attr("r", interface_radius)
|
||||
.attr("style", function(d) {
|
||||
|
@ -2554,19 +2704,19 @@ function init_graph(parameter_object) {
|
|||
.data(module_color_status)
|
||||
.enter()
|
||||
.append("marker")
|
||||
.attr("id", function(d) { return "interface_end_" + d.status_code; })
|
||||
.attr("refX", (node_radius / 2) + (interface_radius / 2))
|
||||
.attr("refY", interface_radius)
|
||||
.attr("markerWidth", (node_radius / 2) + interface_radius)
|
||||
.attr("markerHeight", (node_radius / 2) + interface_radius)
|
||||
.attr("orient", "auto")
|
||||
.append("circle")
|
||||
.attr("cx", interface_radius)
|
||||
.attr("cy", interface_radius)
|
||||
.attr("r", interface_radius)
|
||||
.attr("style", function(d) {
|
||||
return "fill: " + d.color + ";";
|
||||
});
|
||||
.attr("id", function(d) { return "interface_end_" + d.status_code; })
|
||||
.attr("refX", (node_radius / 2.3) + (interface_radius / 2.3))
|
||||
.attr("refY", interface_radius)
|
||||
.attr("markerWidth", (node_radius / 2) + interface_radius)
|
||||
.attr("markerHeight", (node_radius / 2) + interface_radius)
|
||||
.attr("orient", "auto")
|
||||
.append("circle")
|
||||
.attr("cx", interface_radius)
|
||||
.attr("cy", interface_radius)
|
||||
.attr("r", interface_radius)
|
||||
.attr("style", function(d) {
|
||||
return "fill: " + d.color + ";";
|
||||
});
|
||||
|
||||
defs.append("marker")
|
||||
.attr("id", "interface_start")
|
||||
|
@ -2786,7 +2936,7 @@ function myMouseoutRhombusFunction(node_id) {
|
|||
|
||||
function draw_elements_graph() {
|
||||
link = link.data(force.links(), function(d) {
|
||||
return d.source.id + networkmap_id + "-" + d.target.id + networkmap_id;
|
||||
return d.source.id + networkmap_id + "-" + d.target.id + networkmap_id + Math.random();
|
||||
});
|
||||
|
||||
link_temp = link.enter()
|
||||
|
@ -2814,7 +2964,7 @@ function draw_elements_graph() {
|
|||
|
||||
link_temp.append("path")
|
||||
.attr("id", function(d) {
|
||||
return "link_id_" + d.id_db + networkmap_id;
|
||||
return "link_id_text_" + d.id_db + networkmap_id;
|
||||
})
|
||||
.attr("class", function(d) {
|
||||
var holding_area_text = "";
|
||||
|
@ -2865,10 +3015,10 @@ function draw_elements_graph() {
|
|||
});
|
||||
|
||||
//Add the reverse line for the end marker, it is invisible
|
||||
link_temp.append("path")
|
||||
.attr("id", function(d) {
|
||||
return "link_reverse_id_" + d.id_db;
|
||||
})
|
||||
link_temp.append("path")
|
||||
.attr("id", function(d) {
|
||||
return "link_reverse_id_" + d.id_db + networkmap_id;
|
||||
})
|
||||
.attr("stroke-width", 0)
|
||||
.attr("d", null)
|
||||
.attr("class", function(d) {
|
||||
|
@ -2879,8 +3029,27 @@ function draw_elements_graph() {
|
|||
.attr("xml:space", "preserve")
|
||||
.append("textPath")
|
||||
.attr("xlink:href", function(d) {
|
||||
return "#link_id_" + d.id_db;
|
||||
if (d.source.x < d.target.x) {
|
||||
return "#link_id_text_" + d.id_db + networkmap_id;
|
||||
}
|
||||
else {
|
||||
return "#link_reverse_id_" + d.id_db + networkmap_id;
|
||||
}
|
||||
})
|
||||
.attr("startOffset", function(d) {
|
||||
if (d.source.x < d.target.x) {
|
||||
return "";
|
||||
}
|
||||
else {
|
||||
return "85%";
|
||||
}})
|
||||
.attr("text-anchor", function(d) {
|
||||
if (d.source.x < d.target.x) {
|
||||
return "";
|
||||
}
|
||||
else {
|
||||
return "end";
|
||||
}})
|
||||
.append("tspan")
|
||||
.attr("style", "font-size: 12px; " +
|
||||
"font-style:normal; " +
|
||||
|
@ -2891,7 +3060,7 @@ function draw_elements_graph() {
|
|||
"fill:#000000; " +
|
||||
"fill-opacity:1; " +
|
||||
"stroke:none; " +
|
||||
"text-align:end; ")
|
||||
"text-align:start; ")
|
||||
.text(function(d) {
|
||||
var text_link = "";
|
||||
if (d.text_start) {
|
||||
|
@ -2905,8 +3074,27 @@ function draw_elements_graph() {
|
|||
.attr("xml:space", "preserve")
|
||||
.append("textPath")
|
||||
.attr("xlink:href", function(d) {
|
||||
return "#link_reverse_id_" + d.id_db;
|
||||
if (d.source.x < d.target.x) {
|
||||
return "#link_id_text_" + d.id_db + networkmap_id;
|
||||
}
|
||||
else {
|
||||
return "#link_reverse_id_" + d.id_db + networkmap_id;
|
||||
}
|
||||
})
|
||||
.attr("startOffset", function(d) {
|
||||
if (d.source.x < d.target.x) {
|
||||
return "85%";
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
}})
|
||||
.attr("text-anchor", function(d) {
|
||||
if (d.source.x < d.target.x) {
|
||||
return "end";
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
}})
|
||||
.append("tspan")
|
||||
.attr("style", "font-size: 12px; " +
|
||||
"font-style:normal; " +
|
||||
|
@ -2926,7 +3114,7 @@ function draw_elements_graph() {
|
|||
|
||||
return (Array(25).join(" ")) + text_link;
|
||||
});
|
||||
|
||||
|
||||
node = node.data(force.nodes(), function(d) { return d.id;});
|
||||
|
||||
node_temp = node.enter()
|
||||
|
|
|
@ -5727,7 +5727,7 @@ $.widget( "ui.dialog", {
|
|||
if ( !$( event.target ).closest(".ui-dialog").length ) {
|
||||
event.preventDefault();
|
||||
$(".ui-dialog:visible:last .ui-dialog-content")
|
||||
.data("ui-dialog")._focusTabbable();
|
||||
.data("ui-dialog");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -234,7 +234,7 @@ function install_package (package, homeurl) {
|
|||
buttons: {
|
||||
"Apply MR": function () {
|
||||
var err = [];
|
||||
err = apply_minor_release(data['mr'], package, 1, 1);
|
||||
err = apply_minor_release(data['mr'], package, 1, 1, home_url);
|
||||
|
||||
if (!err['error']) {
|
||||
if (err['message'] == 'bad_mr_filename') {
|
||||
|
@ -271,7 +271,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_accept_package_mr_fail_text = "<div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_not_accepted_code_yes + "</p></div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "</div>";
|
||||
|
@ -314,7 +314,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_success + "</p></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "</div>";
|
||||
|
@ -345,7 +345,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_error + "</p></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
@ -388,7 +388,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_cancel + "</p></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "</div>";
|
||||
|
@ -405,7 +405,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_bad_message_text = "<div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<p style='font-family:Verdana; font-size:12pt;'>" + bad_mr_file + "</p></div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "</div>";
|
||||
|
@ -433,7 +433,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_success_mr_text = "<div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_exito_mr.png'></div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_success + "</p></div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "</div>";
|
||||
|
@ -476,7 +476,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_success + "</p></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "</div>";
|
||||
|
@ -507,7 +507,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_error + "</p></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
@ -529,7 +529,7 @@ function install_package (package, homeurl) {
|
|||
// Check the status of the update
|
||||
check_install_package(package, homeurl);
|
||||
|
||||
remove_rr_file(data['mr']);
|
||||
remove_rr_file(data['mr'], home_url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -552,7 +552,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_mr_text = "<div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_error + "</p></div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "</div>";
|
||||
|
@ -586,7 +586,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_cancel_mr_text = "<div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_cancel + "</p></div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "</div>";
|
||||
|
@ -606,8 +606,8 @@ function install_package (package, homeurl) {
|
|||
$('button:contains(Cancel)').attr("id","cancel_rr_button");
|
||||
|
||||
var dialog_have_mr_text = "<div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_warning_mr.png'></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>This package includes db changes</strong></h3>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_warning_mr.png'></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>There are a DB changes</strong></h3>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text1_mr_file + "</p>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text2_mr_file + "<a style='font-family:Verdana bold; font-size:12pt; color:#82B92E'href=\"index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">" + text3_mr_file + "</a>" + text4_mr_file + "</p></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "</div>";
|
||||
|
@ -653,7 +653,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_success + "</p></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "</div>";
|
||||
|
@ -684,7 +684,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_error + "</p></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
@ -706,7 +706,7 @@ function install_package (package, homeurl) {
|
|||
// Check the status of the update
|
||||
check_install_package(package, homeurl);
|
||||
|
||||
remove_rr_file_to_extras();
|
||||
remove_rr_file_to_extras(home_url);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -732,7 +732,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_cancel + "</p></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "</div>";
|
||||
|
@ -785,7 +785,7 @@ function install_package (package, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_text = "<div>";
|
||||
dialog_text = dialog_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_text = dialog_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_text = dialog_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>" + text1_package_file + "</strong></h3>";
|
||||
dialog_text = dialog_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text2_package_file + "</p></div>";
|
||||
dialog_text = dialog_text + "</div>";
|
||||
|
@ -872,7 +872,6 @@ function update_last_package(package, version, homeurl) {
|
|||
parameters,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
@ -888,12 +887,11 @@ function update_last_package(package, version, homeurl) {
|
|||
parameters2,
|
||||
function (data) {
|
||||
if (data['correct']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
||||
install_free_package_prev_step(package, version, homeurl);
|
||||
install_free_package_prev_step(package, version, home_url);
|
||||
}
|
||||
else {
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
@ -981,9 +979,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
home_url + "ajax.php",
|
||||
parameters,
|
||||
function (data) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .downloading_package").hide();
|
||||
|
||||
if (data['have_minor']) {
|
||||
$("<div id='mr_dialog2' class='dialog ui-dialog-content' title='" + mr_available + "'></div>").dialog ({
|
||||
resizable: true,
|
||||
|
@ -998,8 +994,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
buttons: {
|
||||
"Apply MR": function () {
|
||||
var err = [];
|
||||
err = apply_minor_release(data['mr'], package, 0, 0);
|
||||
|
||||
err = apply_minor_release(data['mr'], package, 0, 0, home_url);
|
||||
if (!err['error']) {
|
||||
if (err['message'] == 'bad_mr_filename') {
|
||||
$("#mr_dialog2").dialog("close");
|
||||
|
@ -1035,7 +1030,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_accept_package_mr_fail_text = "<div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_not_accepted_code_yes + "</p></div>";
|
||||
dialog_accept_package_mr_fail_text = dialog_accept_package_mr_fail_text + "</div>";
|
||||
|
@ -1054,7 +1049,6 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
parameters2,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
@ -1070,6 +1064,8 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
},
|
||||
"json"
|
||||
);
|
||||
|
||||
remove_rr_file_to_extras(home_url);
|
||||
},
|
||||
"Cancel": function () {
|
||||
$(this).dialog("close");
|
||||
|
@ -1094,7 +1090,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_cancel + "</p></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "</div>";
|
||||
|
@ -1108,7 +1104,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_bad_message_text = "<div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "<p style='font-family:Verdana; font-size:12pt;'>" + bad_mr_file + "</p></div>";
|
||||
dialog_bad_message_text = dialog_bad_message_text + "</div>";
|
||||
|
@ -1136,7 +1132,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_success_mr_text = "<div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_exito_mr.png'></div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_success + "</p></div>";
|
||||
dialog_success_mr_text = dialog_success_mr_text + "</div>";
|
||||
|
@ -1155,7 +1151,6 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
parameters2,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
@ -1172,7 +1167,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
"json"
|
||||
);
|
||||
|
||||
remove_rr_file(data['mr']);
|
||||
remove_rr_file_to_extras(home_url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1195,7 +1190,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_mr_text = "<div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_error + "</p></div>";
|
||||
dialog_error_mr_text = dialog_error_mr_text + "</div>";
|
||||
|
@ -1227,7 +1222,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_cancel_mr_text = "<div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + mr_cancel + "</p></div>";
|
||||
dialog_cancel_mr_text = dialog_cancel_mr_text + "</div>";
|
||||
|
@ -1246,13 +1241,13 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
$('button:contains(Cancel)').attr("id","cancel_rr_button");
|
||||
|
||||
var dialog_have_mr_text = "<div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_warning_mr.png'></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>This package includes db changes</strong></h3>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_warning_mr.png'></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>There are a DB changes</strong></h3>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text1_mr_file + "</p>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text2_mr_file + "<a style='font-family:Verdana bold; font-size:12pt; color:#82B92E'href=\"index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">" + text3_mr_file + "</a>" + text4_mr_file + "</p></div>";
|
||||
dialog_have_mr_text = dialog_have_mr_text + "</div>";
|
||||
|
||||
$('#mr_dialog2').html(dialog_have_mr_mr_text);
|
||||
$('#mr_dialog2').html(dialog_have_mr_text);
|
||||
$('#mr_dialog2').dialog('open');
|
||||
}
|
||||
else {
|
||||
|
@ -1267,7 +1262,6 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
parameters2,
|
||||
function (data) {
|
||||
if (data['in_progress']) {
|
||||
$("#box_online .loading").hide();
|
||||
$("#box_online .download_package").hide();
|
||||
|
||||
$("#box_online .content").html(data['message']);
|
||||
|
@ -1284,9 +1278,10 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
"json"
|
||||
);
|
||||
|
||||
remove_rr_file_to_extras();
|
||||
remove_rr_file_to_extras(home_url);
|
||||
}
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
},
|
||||
"Cancel": function () {
|
||||
|
@ -1310,7 +1305,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_cancel_pkg_text = "<div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>INFO</strong></h3>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + package_cancel + "</p></div>";
|
||||
dialog_cancel_pkg_text = dialog_cancel_pkg_text + "</div>";
|
||||
|
@ -1326,7 +1321,7 @@ function install_free_package_prev_step(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_text = "<div>";
|
||||
dialog_text = dialog_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_info_mr.png'></div>";
|
||||
dialog_text = dialog_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_info_mr.png'></div>";
|
||||
dialog_text = dialog_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>" + text1_package_file + "</strong></h3>";
|
||||
dialog_text = dialog_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text2_package_file + "</p></div>";
|
||||
dialog_text = dialog_text + "</div>";
|
||||
|
@ -1369,7 +1364,7 @@ function install_free_package(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + data['message'] + "</p></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
@ -1405,7 +1400,7 @@ function install_free_package(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_success_pkg_text = "<div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_exito_mr.png'></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>SUCCESS</strong></h3>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + data['message'] + "</p></div>";
|
||||
dialog_success_pkg_text = dialog_success_pkg_text + "</div>";
|
||||
|
@ -1439,7 +1434,7 @@ function install_free_package(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + data['message'] + "</p></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
@ -1474,7 +1469,7 @@ function install_free_package(package, version, homeurl) {
|
|||
});
|
||||
|
||||
var dialog_error_pkg_text = "<div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:25%; float:left'><img style='padding-left:20px; padding-top:20px;' src='" + home_url + "images/icono_error_mr.png'></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<div style='width:75%; float:left;'><h3><strong style='font-family:Verdana; font-size:13pt;'>ERROR</strong></h3>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "<p style='font-family:Verdana; font-size:12pt;'>" + data['message'] + "</p></div>";
|
||||
dialog_error_pkg_text = dialog_error_pkg_text + "</div>";
|
||||
|
@ -1486,7 +1481,8 @@ function install_free_package(package, version, homeurl) {
|
|||
});
|
||||
}
|
||||
|
||||
function apply_minor_release (n_mr, pkg, ent, off) {
|
||||
function apply_minor_release (n_mr, pkg, ent, off, homeurl) {
|
||||
var home_url = (typeof homeurl !== 'undefined') ? homeurl + '/' : '';
|
||||
var error = [];
|
||||
error['error'] = false;
|
||||
$('#mr_dialog2').empty();
|
||||
|
@ -1504,7 +1500,7 @@ function apply_minor_release (n_mr, pkg, ent, off) {
|
|||
async: false,
|
||||
dataType: "html",
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
url: home_url + "ajax.php",
|
||||
success: function (data) {
|
||||
$('#mr_dialog2').append("</div style='max-height:50px'>");
|
||||
if (data == 'bad_mr_filename') {
|
||||
|
@ -1535,7 +1531,8 @@ function apply_minor_release (n_mr, pkg, ent, off) {
|
|||
return error;
|
||||
}
|
||||
|
||||
function remove_rr_file (number) {
|
||||
function remove_rr_file (number, homeurl) {
|
||||
var home_url = (typeof homeurl !== 'undefined') ? homeurl + '/' : '';
|
||||
var params = {};
|
||||
params["remove_rr"] = 1;
|
||||
params["number"] = number;
|
||||
|
@ -1545,13 +1542,14 @@ function remove_rr_file (number) {
|
|||
data: params,
|
||||
dataType: "html",
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
url: home_url + "ajax.php",
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function remove_rr_file_to_extras () {
|
||||
function remove_rr_file_to_extras (homeurl) {
|
||||
var home_url = (typeof homeurl !== 'undefined') ? homeurl + '/' : '';
|
||||
var params = {};
|
||||
params["remove_rr_extras"] = 1;
|
||||
params["page"] = "include/ajax/rolling_release.ajax";
|
||||
|
@ -1560,7 +1558,7 @@ function remove_rr_file_to_extras () {
|
|||
data: params,
|
||||
dataType: "html",
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
url: home_url + "ajax.php",
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
|
|
@ -451,13 +451,13 @@ button.ui-button::-moz-focus-inner {
|
|||
float: right;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane button {
|
||||
margin: .5em 1em .5em 0;
|
||||
cursor: pointer;
|
||||
background: white;
|
||||
background-color: white;
|
||||
border: 1px solid #82b92e;
|
||||
height:30px;
|
||||
width:90px;
|
||||
margin: .5em 1em .5em 0 !important;
|
||||
cursor: pointer !important;
|
||||
background: white !important;
|
||||
background-color: white !important;
|
||||
border: 1px solid #82b92e !important;
|
||||
height:30px !important;
|
||||
width:90px !important;
|
||||
}
|
||||
.ui-dialog .ui-resizable-se {
|
||||
width: 12px;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG';
|
||||
$build = '170323';
|
||||
$build = '170419';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -450,6 +450,7 @@ if (!empty($network_interfaces)) {
|
|||
$table_interface->head_colspan[0] = 8;
|
||||
$table_interface->data = array();
|
||||
$event_text_cont = 0;
|
||||
|
||||
foreach ($network_interfaces as $interface_name => $interface) {
|
||||
if (!empty($interface['traffic'])) {
|
||||
$permission = false;
|
||||
|
|
|
@ -82,11 +82,12 @@ $interface_traffic_modules = array(
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Pandora FMS Graph (<?php echo agents_get_alias($agent_id) . ' - ' . $interface_name; ?>)</title>
|
||||
<link rel="stylesheet" href="../../include/styles/pandora_minimal.css" type="text/css" />
|
||||
<script type='text/javaScript' src='../../include/javascript/calendar.js'></script>
|
||||
<link rel="stylesheet" href="../../include/styles/jquery-ui-1.10.0.custom.css" type="text/css" />
|
||||
<script type='text/javascript' src='../../include/javascript/pandora.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery-1.9.0.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery.pandora.js'></script>
|
||||
<script type='text/javascript'>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery.jquery-ui-1.10.0.custom.js'></script>
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
window.onload = function() {
|
||||
// Hack to repeat the init process to period select
|
||||
|
@ -103,7 +104,7 @@ $interface_traffic_modules = array(
|
|||
$("#hidden-show_other").val(0);
|
||||
}
|
||||
}
|
||||
//-->
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
||||
|
@ -142,6 +143,7 @@ $interface_traffic_modules = array(
|
|||
$width = (int) get_parameter("width", 555);
|
||||
$height = (int) get_parameter("height", 245);
|
||||
$start_date = (string) get_parameter("start_date", date("Y-m-d"));
|
||||
$start_time = get_parameter ("start_time", date("H:i:s"));
|
||||
$zoom = (int) get_parameter ("zoom", 1);
|
||||
$baseline = get_parameter ("baseline", 0);
|
||||
$show_percentil = get_parameter ("show_percentil", 0);
|
||||
|
@ -153,12 +155,19 @@ $interface_traffic_modules = array(
|
|||
echo "<script type='text/javascript'>window.resizeTo($width + 120, $height + 320);</script>";
|
||||
}
|
||||
|
||||
$current = date("Y-m-d");
|
||||
/*$current = date("Y-m-d");
|
||||
|
||||
if ($start_date != $current)
|
||||
$date = strtotime($start_date);
|
||||
else
|
||||
$date = $utime;
|
||||
*/
|
||||
$date = strtotime("$start_date $start_time");
|
||||
$now = time();
|
||||
|
||||
if ($date > $now){
|
||||
$date = $now;
|
||||
}
|
||||
|
||||
$urlImage = ui_get_full_url(false);
|
||||
|
||||
|
@ -229,6 +238,12 @@ $interface_traffic_modules = array(
|
|||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$data[0] = __('Begin time');
|
||||
$data[1] = html_print_input_text ("start_time", $start_time,'', 10, 10, true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$data[0] = __('Time range');
|
||||
$data[1] = html_print_extended_select_for_time('period', $period, '', '', 0, 7, true);
|
||||
|
@ -295,6 +310,13 @@ $interface_traffic_modules = array(
|
|||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
// Echo the script tags of the datepicker and the timepicker
|
||||
// Modify the user language cause the ui.datepicker language files use - instead _
|
||||
$custom_user_language = str_replace('_', '-', $user_language);
|
||||
ui_require_jquery_file("ui.datepicker-" . $custom_user_language, "include/javascript/i18n/", true);
|
||||
ui_include_time_picker(true);
|
||||
?>
|
||||
<script>
|
||||
|
||||
<?php
|
||||
|
@ -321,5 +343,24 @@ $interface_traffic_modules = array(
|
|||
}
|
||||
?>
|
||||
|
||||
// Add datepicker and timepicker
|
||||
$("#text-start_date").datepicker({
|
||||
dateFormat: "<?php echo DATE_FORMAT_JS; ?>"
|
||||
});
|
||||
|
||||
$("#text-start_time").timepicker({
|
||||
showSecond: true,
|
||||
timeFormat: '<?php echo TIME_FORMAT_JS; ?>',
|
||||
timeOnlyTitle: '<?php echo __('Choose time');?>',
|
||||
timeText: '<?php echo __('Time');?>',
|
||||
hourText: '<?php echo __('Hour');?>',
|
||||
minuteText: '<?php echo __('Minute');?>',
|
||||
secondText: '<?php echo __('Second');?>',
|
||||
currentText: '<?php echo __('Now');?>',
|
||||
closeText: '<?php echo __('Close');?>'
|
||||
});
|
||||
|
||||
$.datepicker.setDefaults($.datepicker.regional["<?php echo $custom_user_language; ?>"]);
|
||||
|
||||
forced_title_callback();
|
||||
</script>
|
||||
|
|
|
@ -759,3 +759,27 @@ else {
|
|||
show_networkmap($id, $user_readonly, $nodes_and_relations, $dash_mode, $map_dash_details);
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("*").on("click", function(){
|
||||
if($("[aria-describedby=dialog_node_edit]").css('display') == 'block'){
|
||||
$('#foot').css({'top':parseInt($("[aria-describedby=dialog_node_edit]").css('height')+$("[aria-describedby=dialog_node_edit]").css('top')),'position':'relative'});
|
||||
|
||||
}
|
||||
else{
|
||||
$('#foot').css({'position':'','top':'0'});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$("[aria-describedby=dialog_node_edit]").on('dialogclose', function(event) {
|
||||
|
||||
$('#foot').css({'position':'','top':'0'});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
|
@ -1050,7 +1050,7 @@ if (!empty($result)) {
|
|||
}
|
||||
}
|
||||
|
||||
$data[0] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id_policy'] . '">' .
|
||||
$data[0] = '<a href="?sec=gmodules&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id_policy'] . '">' .
|
||||
html_print_image($img,true, array('title' => $title)) .
|
||||
'</a>';
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ if (is_ajax ()) {
|
|||
$alert = get_parameter('alert_fired');
|
||||
if ($alert == 'true') {
|
||||
$resultAlert = alerts_get_event_status_group($idGroup,
|
||||
'alert_fired', $query, $agents);
|
||||
array('alert_fired','alert_ceased'), $query, $agents);
|
||||
}
|
||||
$critical = get_parameter('critical');
|
||||
if ($critical == 'true') {
|
||||
|
|
|
@ -57,6 +57,7 @@ if (is_ajax()) {
|
|||
|
||||
$event_filter = events_get_event_filter($id_filter);
|
||||
|
||||
$event_filter['search'] = io_safe_output($event_filter['search']);
|
||||
$event_filter['id_name'] = io_safe_output($event_filter['id_name']);
|
||||
$event_filter['tag_with'] = base64_encode(io_safe_output($event_filter['tag_with']));
|
||||
$event_filter['tag_without'] = base64_encode(io_safe_output($event_filter['tag_without']));
|
||||
|
|
|
@ -25,6 +25,16 @@ $delete_graph = (bool) get_parameter ('delete_graph');
|
|||
$view_graph = (bool) get_parameter ('view_graph');
|
||||
$id_graph = (int) get_parameter ('id');
|
||||
|
||||
if($id_graph !== 0){
|
||||
$sql = "SELECT * FROM tgraph
|
||||
WHERE (private = 0 OR (private = 1 AND id_user = '".$config["id_user"]."'))
|
||||
AND id_graph = ".$id_graph;
|
||||
$control = db_process_sql($sql);
|
||||
if(!$control){
|
||||
header('Location: index.php?sec=reporting&sec2=godmode/reporting/graphs');
|
||||
}
|
||||
}
|
||||
|
||||
// Delete module SQL code
|
||||
if ($delete_graph) {
|
||||
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||
|
|
|
@ -302,9 +302,8 @@ $ignored_params['refr'] = '';
|
|||
}
|
||||
});
|
||||
|
||||
$(".graph").each(function(){
|
||||
height = parseInt($(this).css("height")) - 30;
|
||||
|
||||
$(".graph:not([class~='noresizevc'])").each(function(){
|
||||
height = parseInt($(this).css("height")) - 30;
|
||||
$(this).css('height', height);
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG
|
||||
%define release 170323
|
||||
%define release 170419
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG
|
||||
%define release 170323
|
||||
%define release 170419
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1086,7 +1086,7 @@ INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `o
|
|||
INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `os_version`, `id_network_component_group`, `type`, `max`, `min`, `module_interval`, `id_module_group`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `prediction_sample_window`, `prediction_samples`, `prediction_threshold`) VALUES (54,'InetdDaemon','module_begin
module_name InetdDaemon
module_type generic_proc
module_exec ps -Af | grep inetd | grep -v "grep" | wc -l |  awk '{ print $1 }'
module_end
','Check inetddaemon running in system',3,'',46,2,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `os_version`, `id_network_component_group`, `type`, `max`, `min`, `module_interval`, `id_module_group`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `prediction_sample_window`, `prediction_samples`, `prediction_threshold`) VALUES (55,'disk_root_free','module_begin
module_name disk_root_free
module_type generic_data
module_exec df -k / | tail -1 | awk '{ print 100-$4 }'
module_max 100
module_min 0
module_description Free disk Percentage of root partition
module_end','Free disk Percentage of root partition',3,'',46,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `os_version`, `id_network_component_group`, `type`, `max`, `min`, `module_interval`, `id_module_group`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `prediction_sample_window`, `prediction_samples`, `prediction_threshold`) VALUES (56,'OpenedFiles ','module_begin 
module_name OpenedFiles 
module_type generic_data 
module_exec lsof | wc -l 
module_description Total files opened in system 
module_end ','Total files opened in system ',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `os_version`, `id_network_component_group`, `type`, `max`, `min`, `module_interval`, `id_module_group`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `prediction_sample_window`, `prediction_samples`, `prediction_threshold`) VALUES (57,'Zombie processes','module_begin 
module_name Zombie processes 
module_type generic_data 
module_exec ps ­eos | grep Z | wc ­l | tr ­d “\n” 
module_description Number of zombie processes 
module_end ','Number of zombie processes ',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `os_version`, `id_network_component_group`, `type`, `max`, `min`, `module_interval`, `id_module_group`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `prediction_sample_window`, `prediction_samples`, `prediction_threshold`) VALUES (57,'Zombie processes','module_begin 
module_name Zombie processes
module_type generic_data 
module_exec ps -eos | grep 'Z' | wc -l | tr -d "\n" 
module_description Number of zombie processes 
module_end ','Number of zombie processes ',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tlocal_component` (`id`, `name`, `data`, `description`, `id_os`, `os_version`, `id_network_component_group`, `type`, `max`, `min`, `module_interval`, `id_module_group`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `dynamic_interval`, `dynamic_max`, `dynamic_min`, `prediction_sample_window`, `prediction_samples`, `prediction_threshold`) VALUES (58,'Disk_IO_Wait','module_begin 
module_name Disk_IO_Wait 
module_type generic_data 
module_exec top -n 3 -c | grep "Cpu" | awk '{ print $6 }' | grep -o "[0-9]*" | tail -1 
module_description Simple approach to IO/Wait monitoring. 
module_end ','Simple approach to IO/Wait monitoring. ',1,'',43,1,0,0,0,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,0.000000000000000,NULL,'basic',NULL,'','','',0,0,0,'','',0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
-- GIS Data
|
||||
|
@ -1128,8 +1128,6 @@ INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (4, 'Group vi
|
|||
|
||||
INSERT INTO `trecon_script` VALUES (2,'IPMI Recon','Specific Pandora FMS Intel DCM Discovery (c) Artica ST 2011 <info@artica.es>

Usage: ./ipmi-recon.pl <task_id> <group_id> <create_incident_flag> <custom_field1> <custom_field2> <custom_field3> <custom_field4>

* custom_field1 = Network i.e.: 192.168.100.0/24
* custom_field2 = Username
* custom_field3 = Password
* custom_field4 = Additional parameters i.e.: -D LAN_2_0','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.: 192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional parameters\",\"help\":\"Optional additional parameters such as -D LAN_2_0 to use IPMI ver 2.0 instead of 1.5.  These options will also be passed to the IPMI plugin when the current values are read.\",\"value\":\"\",\"hide\":\"\"}}');
|
||||
|
||||
INSERT INTO `trecon_script` VALUES (4,'SNMP L2 Recon','Pandora FMS SNMP Recon Plugin for level 2 network topology discovery.
(c) Artica ST 2014 <info@artica.es>

Usage:

   ./snmp-recon.pl <task_id> <group_id> <create_incident> <custom_field1> <custom_field2> [custom_field3] [custom_field4]

 * custom_field1 = comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)
 * custom_field2 = comma separated list of snmp communities to try.
 * custom_field3 = a router in the network. Optional but recommended.
 * custom_field4 = set to -a to add all network interfaces (by default only interfaces that are up are added).

 Additional information:
When the script is called from a recon task the task_id, group_id and create_incident parameters are automatically filled by the Pandora FMS Server.','/usr/share/pandora_server/util/recon_scripts/snmp-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"Comma separated list of networks (i.e.: 192.168.1.0/24,192.168.2.0/24)\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Community\",\"help\":\"Comma separated list of snmp communities to try.\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Router\",\"help\":\"A router in the network. Optional but recommended.\",\"value\":\"\",\"hide\":\"\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Optional parameter\",\"help\":\"Set to -a to add all network interfaces (by default only interfaces that are up are added).\",\"value\":\"\",\"hide\":\"\"}}');
|
||||
|
||||
INSERT INTO `trecon_script` VALUES (5,'WMI Recon Script','This script is used to automatically gather host information via WMI.
Available parameters:

* Network = network to scan (e.g. 192.168.100.0/24).
* WMI auth = comma separated list of WMI authentication tokens in the format username%password (e.g. Administrador%pass).

See the documentation for more information.','/usr/share/pandora_server/util/recon_scripts/wmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"WMI auth\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}');
|
||||
|
||||
INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `plugin_type`, `macros`, `parameters`) VALUES (1,'IPMI Plugin','Plugin to get IPMI monitors from a IPMI Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl',0,'{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"true\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Sensor\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"5\":{\"macro\":\"_field5_\",\"desc\":\"Additional Options\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','-h _field1_ -u _field2_ -p _field3_ -s _field4_ -- _field5_');
|
||||
|
@ -1250,4 +1248,4 @@ INSERT INTO `tpolicy_modules` (`id_policy`, `configuration_data`, `id_tipo_modul
|
|||
--
|
||||
-- Dumping data for table `tprofile_view`
|
||||
--
|
||||
INSERT INTO `tprofile_view` (`id_profile`, `sec`, `sec2`, `sec3`) VALUES (5, '*', '*','*');
|
||||
INSERT INTO `tprofile_view` (`id_profile`, `sec`, `sec2`, `sec3`) VALUES (5, '*', '*','*');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG-170323
|
||||
Version: 7.0NG-170419
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG-170323"
|
||||
pandora_version="7.0NG-170419"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -102,7 +102,7 @@ sub pandora_startup () {
|
|||
$Config{"encryption_key"} = enterprise_hook('pandora_get_encryption_key', [\%Config, $Config{"encryption_passphrase"}]);
|
||||
|
||||
# Update the agent cache.
|
||||
enterprise_hook('update_agent_cache', [\%Config, $DBH]) if ($Config{'metaconsole_agent_cache'} == 1);
|
||||
enterprise_hook('update_agent_cache', [\%Config, $DBH]) if ($Config{'node_metaconsole'} == 1);
|
||||
|
||||
pandora_audit (\%Config, 'Pandora FMS Server Daemon starting', 'SYSTEM', 'System', $DBH);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ fi
|
|||
#Create the pandora user to run the anyterd, mainly
|
||||
/usr/sbin/useradd -d /home/pandora -s /bin/false -M -g 0 pandora
|
||||
|
||||
cd /tmp/pandorafms/pandora_server && chmod +x pandora_server_installer && sync && ./pandora_server_installer --install
|
||||
cd /tmp/pandorafms/pandora_server && ./pandora_server_installer --install
|
||||
|
||||
#Configure the Pandora FMS Server to connect to the database
|
||||
sed -i "s/dbname pandora/dbname $PANDORA_DB_NAME/g" /etc/pandora/pandora_server.conf
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG";
|
||||
my $pandora_build = "170323";
|
||||
my $pandora_build = "170419";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -160,9 +160,6 @@ sub pandora_get_sharedconfig ($$) {
|
|||
# Pandora FMS Console's attachment directory
|
||||
$pa_config->{"attachment_dir"} = pandora_get_tconfig_token ($dbh, 'attachment_store', '/var/www/pandora_console/attachment');
|
||||
|
||||
# Metaconsole agent cache.
|
||||
$pa_config->{"metaconsole_agent_cache"} = pandora_get_tconfig_token ($dbh, 'metaconsole_agent_cache', 0);
|
||||
|
||||
#Limit of events replicate in metaconsole
|
||||
$pa_config->{'replication_limit'} = pandora_get_tconfig_token ($dbh, 'replication_limit', 1000);
|
||||
$pa_config->{'include_agents'} = pandora_get_tconfig_token ($dbh, 'include_agents', 0);
|
||||
|
@ -170,6 +167,11 @@ sub pandora_get_sharedconfig ($$) {
|
|||
#Public url
|
||||
$pa_config->{'public_url'} = pandora_get_tconfig_token ($dbh, 'public_url', 'http://localhost/pandora_console');
|
||||
|
||||
# Node with a metaconsole license.
|
||||
# NOTE: This must be read when checking license limits!
|
||||
#$pa_config->{"node_metaconsole"} = pandora_get_tconfig_token ($dbh, 'node_metaconsole', 0);
|
||||
|
||||
|
||||
if ($pa_config->{'include_agents'} eq '') {
|
||||
$pa_config->{'include_agents'} = 0;
|
||||
}
|
||||
|
@ -400,6 +402,7 @@ sub pandora_load_config {
|
|||
$pa_config->{"stats_interval"} = 300;
|
||||
$pa_config->{"agentaccess"} = 1;
|
||||
$pa_config->{"event_storm_protection"} = 0;
|
||||
$pa_config->{"node_metaconsole"} = 0; # > 7.0NG
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
#SNMP Forwarding tokens
|
||||
|
|
|
@ -4053,10 +4053,10 @@ sub export_module_data ($$$$$$$) {
|
|||
# Data export is disabled
|
||||
return if ($module->{'id_export'} < 1);
|
||||
|
||||
logger($pa_config, "Exporting data for module '" . $module->{'nombre'} . "' agent '" . $agent->{'nombre'} . "'.", 10);
|
||||
logger($pa_config, "Exporting data for module '" . $module->{'nombre'} . "' agent '" . $agent->{'alias'} . "'.", 10);
|
||||
db_do($dbh, 'INSERT INTO tserver_export_data
|
||||
(id_export_server, agent_name , module_name, module_type, data, timestamp) VALUES
|
||||
(?, ?, ?, ?, ?, ?)', $module->{'id_export'}, $agent->{'nombre'}, $module->{'nombre'}, $module_type, $data, $timestamp);
|
||||
(?, ?, ?, ?, ?, ?)', $module->{'id_export'}, $agent->{'alias'}, $module->{'nombre'}, $module_type, $data, $timestamp);
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
|
@ -4994,7 +4994,7 @@ sub pandora_update_agent_module_count ($$$) {
|
|||
') WHERE id_agente = ' . $agent_id);
|
||||
|
||||
# Sync the agent cache every time the module count is updated.
|
||||
enterprise_hook('update_agent_cache', [$pa_config, $dbh, $agent_id]) if ($pa_config->{'metaconsole_agent_cache'} == 1);
|
||||
enterprise_hook('update_agent_cache', [$pa_config, $dbh, $agent_id]) if ($pa_config->{'node_metaconsole'} == 1);
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
|
@ -5008,7 +5008,7 @@ sub pandora_update_agent_alert_count ($$$) {
|
|||
') WHERE id_agente = ' . $agent_id);
|
||||
|
||||
# Sync the agent cache every time the module count is updated.
|
||||
enterprise_hook('update_agent_cache', [$pa_config, $dbh, $agent_id]) if ($pa_config->{'metaconsole_agent_cache'} == 1);
|
||||
enterprise_hook('update_agent_cache', [$pa_config, $dbh, $agent_id]) if ($pa_config->{'node_metaconsole'} == 1);
|
||||
}
|
||||
|
||||
########################################################################
|
||||
|
|
|
@ -249,8 +249,8 @@ sub are_connected($$$$$) {
|
|||
$if_1 = "ping" if $if_1 eq '';
|
||||
$if_2 = "ping" if $if_2 eq '';
|
||||
|
||||
if (defined($self->{'connections'}->{"${dev_1}\t${if_1}\t${dev_2}\t{$if_2}"}) ||
|
||||
defined($self->{'connections'}->{"${dev_2}\t${if_2}\t${dev_1}\t{$if_1}"})) {
|
||||
if (defined($self->{'connections'}->{"${dev_1}\t${if_1}\t${dev_2}\t${if_2}"}) ||
|
||||
defined($self->{'connections'}->{"${dev_2}\t${if_2}\t${dev_1}\t${if_1}"})) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ sub scan($) {
|
|||
|
||||
# Get a list of found hosts.
|
||||
my @hosts = @{$self->get_hosts()};
|
||||
if (scalar(@hosts) > 0) {
|
||||
if (scalar(@hosts) > 0 && $self->{'parent_detection'} == 1) {
|
||||
# Delete previous connections.
|
||||
$self->call('delete_connections');
|
||||
|
||||
|
|
|
@ -1459,7 +1459,9 @@ sub valid_regex ($) {
|
|||
sub is_metaconsole ($) {
|
||||
my ($pa_config) = @_;
|
||||
|
||||
if (defined($pa_config->{"license_type"}) && $pa_config->{"license_type"} == METACONSOLE_LICENSE) {
|
||||
if (defined($pa_config->{"license_type"}) &&
|
||||
$pa_config->{"license_type"} == METACONSOLE_LICENSE &&
|
||||
$pa_config->{"node_metaconsole"} == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG
|
||||
%define release 170323
|
||||
%define release 170419
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG
|
||||
%define release 170323
|
||||
%define release 170419
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG"
|
||||
PI_BUILD="170323"
|
||||
PI_BUILD="170419"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG PS170323";
|
||||
my $version = "7.0NG PS170419";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG PS170323";
|
||||
my $version = "7.0NG PS170419";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue