Merge remote-tracking branch 'origin/develop' into ent-3866-7901-bug-en-busqueda-general-usuario-con-grupo-asignado
Former-commit-id: e51d5accb228485a309abae06d2a68352ae18a9b
|
@ -11,16 +11,16 @@ echo "Creating RPM packages in $RPMHOME/RPMS"
|
|||
rpmbuild -ba $CODEHOME/pandora_console/pandora_console.rhel7.spec || exit 1
|
||||
|
||||
# Server
|
||||
rpmbuild -ba $CODEHOME/pandora_server/pandora_server.rhel7.spec || exit 1
|
||||
#rpmbuild -ba $CODEHOME/pandora_server/pandora_server.rhel7.spec || exit 1
|
||||
|
||||
# Unix agent
|
||||
rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.rhel7.spec || exit 1
|
||||
#rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.rhel7.spec || exit 1
|
||||
|
||||
# Enterprise console
|
||||
rpmbuild -ba $PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.rhel7.spec || exit 1
|
||||
|
||||
# Enterprise server
|
||||
rpmbuild -ba $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.rhel7.spec || exit 1
|
||||
#rpmbuild -ba $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.rhel7.spec || exit 1
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ $CODEHOME/pandora_console/pandora_console.rhel7.spec \
|
|||
$CODEHOME/pandora_agents/unix/pandora_agent.redhat.spec \
|
||||
$CODEHOME/pandora_server/pandora_server.redhat.spec \
|
||||
$PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.redhat.spec \
|
||||
$PANDHOME_ENT/pandora_console/enterprise/pandora_console_enterprise.rhel7.spec \
|
||||
$PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.redhat.spec"
|
||||
DEBIAN_FILES="$CODEHOME/pandora_console/DEBIAN \
|
||||
$CODEHOME/pandora_server/DEBIAN \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, AIX version
|
||||
# Version 7.0NG.734, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, FreeBSD Version
|
||||
# Version 7.0NG.734, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, HP-UX Version
|
||||
# Version 7.0NG.734, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, GNU/Linux
|
||||
# Version 7.0NG.734, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, GNU/Linux
|
||||
# Version 7.0NG.734, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, Solaris Version
|
||||
# Version 7.0NG.734, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2010 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.733
|
||||
# Version 7.0NG.734
|
||||
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.733, AIX version
|
||||
# Version 7.0NG.734, AIX version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.733
|
||||
# Version 7.0NG.734
|
||||
# FreeBSD/IPSO version
|
||||
# Licenced under GPL licence, 2003-2007 Sancho Lerena
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.733, HPUX Version
|
||||
# Version 7.0NG.734, HPUX Version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733
|
||||
# Version 7.0NG.734
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733
|
||||
# Version 7.0NG.734
|
||||
# Licensed under GPL license v2,
|
||||
# (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733
|
||||
# Version 7.0NG.734
|
||||
# Licensed under GPL license v2,
|
||||
# please visit http://pandora.sourceforge.net
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Fichero de configuracion base de agentes de Pandora
|
||||
# Base config file for Pandora agents
|
||||
# Version 7.0NG.733, Solaris version
|
||||
# Version 7.0NG.734, Solaris version
|
||||
|
||||
# General Parameters
|
||||
# ==================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, AIX version
|
||||
# Version 7.0NG.734, AIX version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.733-190411
|
||||
Version: 7.0NG.734
|
||||
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.733-190411"
|
||||
pandora_version="7.0NG.734"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, GNU/Linux
|
||||
# Version 7.0NG.734, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, FreeBSD Version
|
||||
# Version 7.0NG.734, FreeBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, HP-UX Version
|
||||
# Version 7.0NG.734, HP-UX Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, GNU/Linux
|
||||
# Version 7.0NG.734, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, GNU/Linux
|
||||
# Version 7.0NG.734, GNU/Linux
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, NetBSD Version
|
||||
# Version 7.0NG.734, NetBSD Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Base config file for Pandora FMS agents
|
||||
# Version 7.0NG.733, Solaris Version
|
||||
# Version 7.0NG.734, Solaris Version
|
||||
# Licensed under GPL license v2,
|
||||
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
|
||||
# http://www.pandorafms.com
|
||||
|
|
|
@ -41,8 +41,8 @@ my $Sem = undef;
|
|||
# Semaphore used to control the number of threads
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.733';
|
||||
use constant AGENT_BUILD => '190411';
|
||||
use constant AGENT_VERSION => '7.0NG.734';
|
||||
use constant AGENT_BUILD => '190424';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -1075,6 +1075,10 @@ sub send_buffered_xml_files ($;$) {
|
|||
unlink ("$temporal_file/$xml_file");
|
||||
}
|
||||
}
|
||||
# Do not get stuck trying to send buffered XML files to a secondary server.
|
||||
elsif ($flag_always == 2) {
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (defined($flag_always) && ($flag_always == 2)){
|
||||
swap_servers ();
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.733
|
||||
%define release 190411
|
||||
%define version 7.0NG.734
|
||||
%define release 1
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#Pandora FMS Linux Agent
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.733
|
||||
%define release 190411
|
||||
%define version 7.0NG.734
|
||||
%define release 1
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.733"
|
||||
PI_BUILD="190411"
|
||||
PI_VERSION="7.0NG.734"
|
||||
PI_BUILD="190424"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Base config file for Pandora FMS Windows Agent
|
||||
# (c) 2006-2017 Artica Soluciones Tecnologicas
|
||||
# Version 7.0NG.733
|
||||
# Version 7.0NG.734
|
||||
|
||||
# This program is Free Software, you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public Licence as published by the Free Software
|
||||
|
|
|
@ -3,7 +3,7 @@ AllowLanguageSelection
|
|||
{Yes}
|
||||
|
||||
AppName
|
||||
{Pandora FMS Windows Agent v7.0NG.733}
|
||||
{Pandora FMS Windows Agent v7.0NG.734}
|
||||
|
||||
ApplicationID
|
||||
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{190411}
|
||||
{190424}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives
|
|||
{No}
|
||||
|
||||
Windows,Executable
|
||||
{<%AppName%>-<%Version%>-Setup<%Ext%>}
|
||||
{<%AppName%>-Setup<%Ext%>}
|
||||
|
||||
Windows,FileDescription
|
||||
{<%AppName%> <%Version%> Setup}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.733(Build 190411)")
|
||||
#define PANDORA_VERSION ("7.0NG.734(Build 190424)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.733(Build 190411))"
|
||||
VALUE "ProductVersion", "(7.0NG.734(Build 190424))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.733-190411
|
||||
Version: 7.0NG.734
|
||||
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.733-190411"
|
||||
pandora_version="7.0NG.734"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -378,7 +378,8 @@ function mainAgentsAlerts()
|
|||
'alerts_agents'
|
||||
);
|
||||
|
||||
echo '<table class="databox data" cellpadding="0" cellspacing="0" border="0" width=100%>';
|
||||
echo '<table class="info_table" cellpadding="0" cellspacing="0" border="0" width=100%>';
|
||||
echo '<thead><tr>';
|
||||
echo "<th width='140px' >".__('Agents').' / '.__('Alert templates').'</th>';
|
||||
|
||||
if ($hor_offset > 0) {
|
||||
|
@ -421,9 +422,10 @@ function mainAgentsAlerts()
|
|||
continue;
|
||||
}
|
||||
|
||||
echo '<th width="20px" >'.io_safe_output($tname).html_print_image('images/information_alerts.png', true, ['title' => io_safe_output($tname), 'style' => 'margin-left:5px' ]).'</th>';
|
||||
echo '<th width="20px" >'.io_safe_output($tname).'</th>';
|
||||
}
|
||||
|
||||
echo '</tr></thead>';
|
||||
if (($hor_offset + $block) < $ntemplates) {
|
||||
$new_hor_offset = ($hor_offset + $block);
|
||||
echo "<th width='20px' style='' rowspan='".($nagents + 1)."'>
|
||||
|
@ -455,7 +457,7 @@ function mainAgentsAlerts()
|
|||
$cellstyle = 'background:'.COL_ALERTFIRED.';';
|
||||
}
|
||||
|
||||
echo '<td style=";'.$cellstyle.'"> ';
|
||||
echo '<td style=";'.$cellstyle.'" class="action_buttons"> ';
|
||||
|
||||
$uniqid = uniqid();
|
||||
echo '<div>';
|
||||
|
@ -478,6 +480,23 @@ function mainAgentsAlerts()
|
|||
}
|
||||
|
||||
echo '</table>';
|
||||
|
||||
ui_pagination(
|
||||
$nagents,
|
||||
false,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
'offset',
|
||||
true,
|
||||
'pagination-bottom',
|
||||
'',
|
||||
[
|
||||
'count' => '',
|
||||
'offset' => 'offset_param',
|
||||
],
|
||||
'alerts_agents'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -487,7 +506,7 @@ function mainAgentsAlerts()
|
|||
function print_alerts_summary_modal_window($id, $alerts)
|
||||
{
|
||||
$table->width = '98%';
|
||||
$table->class = 'databox';
|
||||
$table->class = 'info_table';
|
||||
$table->data = [];
|
||||
|
||||
$table->head[0] = __('Module');
|
||||
|
|
|
@ -148,7 +148,7 @@ function dbmgr_extension_main()
|
|||
echo "<div style='overflow: auto;'>";
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = array_keys($result[0]);
|
||||
|
||||
$table->data = $result;
|
||||
|
|
|
@ -45,11 +45,9 @@ if (!empty($files)) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->style = [];
|
||||
$table->style[1] = 'max-width: 200px;';
|
||||
$table->style[2] = 'text-align: center;';
|
||||
$table->style[3] = 'text-align: center;';
|
||||
$table->style[4] = 'text-align: center;';
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
|
@ -81,6 +79,7 @@ if (!empty($files)) {
|
|||
// Last modification
|
||||
// Public URL
|
||||
$data[4] = '';
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
if (!empty($file['hash'])) {
|
||||
$public_url = ui_get_full_url(EXTENSIONS_DIR.'/files_repo/files_repo_get_file.php?file='.$file['hash']);
|
||||
$message = __('Copy to clipboard').': Ctrl+C -> Enter';
|
||||
|
@ -92,7 +91,7 @@ if (!empty($files)) {
|
|||
}
|
||||
|
||||
$data[4] .= "<a href=\"$url\" target=\"_blank\">";
|
||||
$data[4] .= html_print_image('images/download.png', true, ['title' => __('Download')]);
|
||||
$data[4] .= html_print_image('images/download.png', true, ['title' => __('Download'), 'style' => 'padding:3px' ]);
|
||||
// Download image
|
||||
$data[4] .= '</a>';
|
||||
|
||||
|
|
|
@ -66,10 +66,10 @@ function users_extension_main_god($god=true)
|
|||
$rows = [];
|
||||
echo "<div class='nf'>".__('No other users connected').'</div>';
|
||||
} else {
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->size = [];
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `tnetflow_filter` DROP COLUMN `output`;
|
||||
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
|
||||
ALTER TABLE `tnetwork_component` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
|
||||
ALTER TABLE `tlocal_component` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
|
||||
|
@ -37,4 +39,16 @@ ALTER TABLE `treport_content_template` ADD COLUMN `unknown_checks` TINYINT(1) DE
|
|||
ALTER TABLE `treport_content_template` ADD COLUMN `agent_max_value` TINYINT(1) DEFAULT '1';
|
||||
ALTER TABLE `treport_content_template` ADD COLUMN `agent_min_value` TINYINT(1) DEFAULT '1';
|
||||
|
||||
ALTER TABLE `trecon_script` ADD COLUMN `type` int NOT NULL default 0;
|
||||
ALTER TABLE `trecon_task` ADD COLUMN `type` int NOT NULL default 0;
|
||||
|
||||
UPDATE `trecon_script` SET `type` = 1 WHERE `name`="Discovery.Application.VMware";
|
||||
UPDATE `trecon_script` SET `type` = 2 WHERE `name`="Discovery.Cloud";
|
||||
UPDATE `trecon_script` SET `type` = 3 WHERE `name` LIKE "IPAM%Recon";
|
||||
UPDATE `trecon_script` SET `type` = 4 WHERE `name` LIKE "IPMI%Recon";
|
||||
|
||||
UPDATE `trecon_task` SET `type`=3 WHERE `description`="Discovery.Application.VMware";
|
||||
UPDATE `trecon_task` SET `type`=2 WHERE `description`="Discovery.Cloud";
|
||||
UPDATE `trecon_task` SET `type`=7 WHERE `description`="Discovery.Cloud.RDS";
|
||||
|
||||
COMMIT;
|
|
@ -2093,6 +2093,12 @@ INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Di
|
|||
-- ----------------------------------------------------------------------
|
||||
ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT '';
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Add column in table `tnetflow_filter`
|
||||
-- ----------------------------------------------------------------------
|
||||
ALTER TABLE `tnetflow_filter` DROP COLUMN `output`;
|
||||
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Update table `tuser_task`
|
||||
-- ----------------------------------------------------------------------
|
||||
|
|
|
@ -284,7 +284,7 @@ if ($config['menu_type'] == 'classic') {
|
|||
$header_support .= '</a></div>';
|
||||
|
||||
// Documentation.
|
||||
$header_docu = '<div id="header_support">';
|
||||
$header_docu = '<div id="header_docu">';
|
||||
$header_docu .= '<a href="https://wiki.pandorafms.com/index.php?title=Main_Page" target="_blank">';
|
||||
$header_docu .= html_print_image('/images/header_docu.png', true, ['title' => __('Go to documentation'), 'class' => 'bot', 'alt' => 'user']);
|
||||
$header_docu .= '</a></div>';
|
||||
|
|
|
@ -272,7 +272,9 @@ if (!empty($all_data)) {
|
|||
echo '<div id="activity">';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
// Don't specify px.
|
||||
$table->data = [];
|
||||
|
|
|
@ -4,29 +4,35 @@
|
|||
<style>
|
||||
|
||||
#alert_messages_na{
|
||||
-moz-border-bottom-right-radius: 5px;
|
||||
-webkit-border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
z-index:2;
|
||||
position:fixed;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
width:650px;
|
||||
height: 400px;
|
||||
background:white;
|
||||
background-image:url('images/imagen-no-acceso.jpg');
|
||||
background-repeat:no-repeat;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow:4px 5px 10px 3px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.modalheade{
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:37px;
|
||||
left:0px;
|
||||
background-color:#82b92e;
|
||||
position:absolute;
|
||||
top:0;
|
||||
}
|
||||
.modalheadertex{
|
||||
color:white;
|
||||
position:relative;
|
||||
color:#000;
|
||||
font-family:Nunito;
|
||||
font-size:13pt;
|
||||
top:8px;
|
||||
line-height: 40px;
|
||||
font-size: 23pt;
|
||||
margin-bottom:30px;
|
||||
}
|
||||
.modalclose{
|
||||
cursor:pointer;
|
||||
|
@ -37,50 +43,59 @@
|
|||
}
|
||||
.modalconten{
|
||||
color:black;
|
||||
background:white;
|
||||
}
|
||||
.modalcontentim{
|
||||
float:left;
|
||||
margin-left:30px;
|
||||
margin-top:30px;
|
||||
margin-bottom:30px;
|
||||
width:300px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.modalcontenttex{
|
||||
float:left;
|
||||
text-align:justify;
|
||||
text-align:left;
|
||||
color:black;
|
||||
font-size: 9.5pt;
|
||||
font-size: 11pt;
|
||||
line-height:13pt;
|
||||
margin-top:30px;
|
||||
width:430px;
|
||||
margin-left:30px;
|
||||
margin-bottom:30px;
|
||||
}
|
||||
.modalokbutto{
|
||||
cursor:pointer;
|
||||
text-align:center;
|
||||
margin-right:45px;
|
||||
float:right;
|
||||
display: inline-block;
|
||||
padding: 6px 45px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
margin-bottom:30px;
|
||||
border-radius: 3px;width:90px;height:30px;background-color:white;border: 1px solid #82b92e;
|
||||
border-radius: 3px;
|
||||
background-color:white;
|
||||
border: 1px solid #82b92e;
|
||||
}
|
||||
.modalokbuttontex{
|
||||
color:#82b92e;font-family:Nunito;font-size:10pt;position:relative;top:6px;
|
||||
color:#82b92e;
|
||||
font-family:Nunito;
|
||||
font-size:13pt;
|
||||
}
|
||||
.modalgobutto{
|
||||
cursor:pointer;text-align:center;margin-right:15px;margin-bottom:30px;float:right;-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;border-radius: 3px;width:240px;height:30px;background-color:white;border: 1px solid #82b92e;
|
||||
cursor:pointer;
|
||||
text-align:center;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background-color:white;
|
||||
border: 1px solid #82b92e;
|
||||
}
|
||||
.modalgobuttontex{
|
||||
color:#82b92e;font-family:Nunito;font-size:10pt;position:relative;top:6px;
|
||||
color:#82b92e;
|
||||
font-family:Nunito;
|
||||
font-size:10pt;
|
||||
}
|
||||
|
||||
|
||||
#opacida{
|
||||
position:absolute;background:black;opacity:0.6;z-index:-1;left:0px;top:0px;width:100%;height:100%;
|
||||
#opacidad{
|
||||
position:fixed;
|
||||
background:black;
|
||||
opacity:0.6;
|
||||
z-index:-1;
|
||||
left:0px;
|
||||
top:0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
/*
|
||||
.textodialog{
|
||||
margin-left: 0px;
|
||||
color:#333;
|
||||
|
@ -101,52 +116,49 @@ position:absolute;background:black;opacity:0.6;z-index:-1;left:0px;top:0px;width
|
|||
|
||||
.cargatextodialog p, .cargatextodialog b, .cargatextodialog a{
|
||||
font-size:18pt;
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="alert_messages_na">
|
||||
<div id="alert_messages_na">
|
||||
|
||||
<div class='modalheade'>
|
||||
<span class='modalheadertex'>
|
||||
<?php echo __("You don't have access to this page"); ?>
|
||||
</span>
|
||||
<img class='modalclose cerrar' src='<?php echo $config['homeurl']; ?>images/icono_cerrar.png'>
|
||||
<div class='modalheade'>
|
||||
<img class='modalclose cerrar' src='<?php echo $config['homeurl']; ?>images/input_cross.png'>
|
||||
</div>
|
||||
|
||||
<div class='modalconten'>
|
||||
<div class='modalheadertex'>
|
||||
<?php echo __("You don't have access to this page"); ?>
|
||||
</div>
|
||||
|
||||
<div class='modalcontenttex'>
|
||||
<?php
|
||||
echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance.');
|
||||
echo '<br/> <br/>';
|
||||
echo __('Please know that all attempts to access this page are recorded in security logs of %s System Database', get_product_name());
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='modalokbutto cerrar'>
|
||||
<span class='modalokbuttontex'>OK</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='modalconten'>
|
||||
<img class='modalcontentim' src='<?php echo $config['homeurl']; ?>images/access_denied.png'>
|
||||
<div class='modalcontenttex'>
|
||||
<?php
|
||||
echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance.');
|
||||
echo '<br/> <br/>';
|
||||
echo __('Please know that all attempts to access this page are recorded in security logs of %s System Database', get_product_name());
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class='modalokbutto cerrar'>
|
||||
<span class='modalokbuttontex'>OK</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="opacida" style="position:fixed;background:black;opacity:0.6;z-index:-1;left:0px;top:0px;width:100%;height:100%;"></div>
|
||||
<div id="opacidad"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
|
||||
$(".cerrar").click(function(){
|
||||
window.location=".";
|
||||
});
|
||||
$(".cerrar").click(function(){
|
||||
window.location=".";
|
||||
});
|
||||
|
||||
$('div#page').css('background-color','#d3d3d3');
|
||||
|
||||
</script>
|
|
@ -183,10 +183,10 @@ if (empty($result)) {
|
|||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->size = [];
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
@ -246,7 +246,18 @@ foreach ($result as $row) {
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($table->rowclass as $key => $value) {
|
||||
if (strpos($value, 'limit_scroll') !== false) {
|
||||
$table->colspan[$key] = [7];
|
||||
} else {
|
||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||
$table->cellclass[$key][6] = 'action_buttons';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($count, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
|
||||
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
|
||||
enterprise_hook('enterpriseAuditFooter');
|
||||
|
|
|
@ -225,7 +225,7 @@ if ($result === false) {
|
|||
$table->width = '100%';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
$table->align = [];
|
||||
|
@ -253,9 +253,9 @@ foreach ($result as $row) {
|
|||
|
||||
$data[2] = mb_substr($row['descripcion'], 0, 60);
|
||||
|
||||
$data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a> ';
|
||||
|
||||
$data[3] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>';
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row['id_agente_modulo'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'onclick' => "if (!confirm('".__('Are you sure?')."')) return false;"]).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row['id_agente_modulo'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -97,11 +97,22 @@ if ($delete_field) {
|
|||
}
|
||||
}
|
||||
|
||||
$fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||
// Prepare pagination.
|
||||
$offset = (int) get_parameter('offset');
|
||||
$limit = $config['block_size'];
|
||||
$count_fields = db_get_value('count(*)', 'tagent_custom_fields');
|
||||
|
||||
$fields = db_get_all_rows_filter(
|
||||
'tagent_custom_fields',
|
||||
[
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
]
|
||||
);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
if ($fields) {
|
||||
$table->head = [];
|
||||
$table->head[0] = __('ID');
|
||||
|
@ -135,14 +146,17 @@ foreach ($fields as $field) {
|
|||
$data[2] = html_print_image('images/icono_stop.png', true, ['style' => 'width:21px;height:21px;']);
|
||||
}
|
||||
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$data[3] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">'.html_print_image('images/config.png', true, ['alt' => __('Edit'), 'title' => __('Edit'), 'border' => '0']).'</a>';
|
||||
$data[3] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0']).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete'), 'border' => '0']).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
if ($fields) {
|
||||
ui_pagination($count_fields, false, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($count_fields, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
|
||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">';
|
||||
|
|
|
@ -224,13 +224,13 @@ switch ($config['dbtype']) {
|
|||
break;
|
||||
}
|
||||
|
||||
$selected = 'border: 1px solid black;';
|
||||
$selectNameUp = '';
|
||||
$selectNameDown = '';
|
||||
$selectOsUp = '';
|
||||
$selectOsDown = '';
|
||||
$selectGroupUp = '';
|
||||
$selectGroupDown = '';
|
||||
$selected = true;
|
||||
$selectNameUp = false;
|
||||
$selectNameDown = false;
|
||||
$selectOsUp = false;
|
||||
$selectOsDown = false;
|
||||
$selectGroupUp = false;
|
||||
$selectGroupDown = false;
|
||||
switch ($sortField) {
|
||||
case 'remote':
|
||||
switch ($sort) {
|
||||
|
@ -441,18 +441,27 @@ if (($config['dbtype'] == 'oracle') && ($agents !== false)) {
|
|||
ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&recursion=$recursion&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset);
|
||||
|
||||
if ($agents !== false) {
|
||||
echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='100%' class='databox data'>";
|
||||
echo '<th>'.__('Agent name').' '.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).'</a>'.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).'</a>';
|
||||
echo '</th>';
|
||||
echo "<th title='".__('Remote agent configuration')."'>".__('R').' '.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectRemoteUp]).'</a>'.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectRemoteDown]).'</a>';
|
||||
echo '</th>';
|
||||
echo '<th>'.__('OS').' '.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=os&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectOsUp]).'</a>'.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=os&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectOsDown]).'</a>';
|
||||
echo '</th>';
|
||||
// Urls to sort the table.
|
||||
$url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled';
|
||||
$url_down_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled';
|
||||
$url_up_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=up&disabled=$disabled';
|
||||
$url_down_remote = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=remote&sort=down&disabled=$disabled';
|
||||
$url_up_os = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=os&sort=up&disabled=$disabled';
|
||||
$url_down_os = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=os&sort=down&disabled=$disabled';
|
||||
$url_up_group = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=group&sort=up&disabled=$disabled';
|
||||
$url_down_group = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=group&sort=down&disabled=$disabled';
|
||||
|
||||
|
||||
echo "<table cellpadding='0' id='agent_list' cellspacing='0' width='100%' class='info_table'>";
|
||||
echo '<thead><tr>';
|
||||
echo '<th>'.__('Agent name').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectNameUp, $selectNameDown).'</th>';
|
||||
echo "<th title='".__('Remote agent configuration')."'>".__('R').ui_get_sorting_arrows($url_up_remote, $url_down_remote, $selectRemoteUp, $selectRemoteDown).'</th>';
|
||||
echo '<th>'.__('OS').ui_get_sorting_arrows($url_up_os, $url_down_os, $selectOsUp, $selectOsDown).'</th>';
|
||||
echo '<th>'.__('Type').'</th>';
|
||||
echo '<th>'.__('Group').' '.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=group&sort=up&disabled=$disabled">'.html_print_image('images/sort_up.png', true, ['style' => $selectGroupUp]).'</a>'.'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=group&sort=down&disabled=$disabled">'.html_print_image('images/sort_down.png', true, ['style' => $selectGroupDown]).'</a>';
|
||||
echo '</th>';
|
||||
echo '<th>'.__('Group').ui_get_sorting_arrows($url_up_group, $url_down_group, $selectGroupUp, $selectGroupDown).'</th>';
|
||||
echo '<th>'.__('Description').'</th>';
|
||||
echo "<th style='text-align:left'>".__('Actions').'</th>';
|
||||
echo '</tr></thead>';
|
||||
$color = 1;
|
||||
|
||||
$rowPair = true;
|
||||
|
@ -628,7 +637,7 @@ if ($agents !== false) {
|
|||
$offsetArg = $offset;
|
||||
}
|
||||
|
||||
echo "<td class='$tdcolor' align='left' style='width:7%' valign='middle'>";
|
||||
echo "<td class='$tdcolor action_buttons' align='left' style='width:7%' valign='middle'>";
|
||||
|
||||
if ($agent['disabled']) {
|
||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||
|
@ -654,7 +663,7 @@ if ($agents !== false) {
|
|||
}
|
||||
|
||||
if ($check_aw) {
|
||||
echo " <a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
|
||||
borrar_agente=".$agent['id_agente']."&group_id=$ag_group&recursion=$recursion&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort&disabled=$disabled'";
|
||||
|
||||
if ($agent['id_os'] != 100) {
|
||||
|
@ -670,7 +679,7 @@ if ($agents !== false) {
|
|||
}
|
||||
|
||||
echo '</table>';
|
||||
ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset);
|
||||
ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo "<table width='100%'><tr><td align='right'>";
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined agents') ]);
|
||||
|
|
|
@ -358,17 +358,17 @@ if ($multiple_delete) {
|
|||
// TABLE LIST MODULES
|
||||
// ==================
|
||||
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente;
|
||||
$selectNameUp = '';
|
||||
$selectNameDown = '';
|
||||
$selectServerUp = '';
|
||||
$selectServerDown = '';
|
||||
$selectTypeUp = '';
|
||||
$selectTypeDown = '';
|
||||
$selectIntervalUp = '';
|
||||
$selectIntervalDown = '';
|
||||
$selectNameUp = false;
|
||||
$selectNameDown = false;
|
||||
$selectServerUp = false;
|
||||
$selectServerDown = false;
|
||||
$selectTypeUp = false;
|
||||
$selectTypeDown = false;
|
||||
$selectIntervalUp = false;
|
||||
$selectIntervalDown = false;
|
||||
$sortField = get_parameter('sort_field');
|
||||
$sort = get_parameter('sort', 'none');
|
||||
$selected = '';
|
||||
$selected = true;
|
||||
|
||||
$order[] = [
|
||||
'field' => 'tmodule_group.name',
|
||||
|
@ -482,13 +482,13 @@ switch ($sortField) {
|
|||
|
||||
default:
|
||||
$selectNameUp = $selected;
|
||||
$selectNameDown = '';
|
||||
$selectServerUp = '';
|
||||
$selectServerDown = '';
|
||||
$selectTypeUp = '';
|
||||
$selectTypeDown = '';
|
||||
$selectIntervalUp = '';
|
||||
$selectIntervalDown = '';
|
||||
$selectNameDown = false;
|
||||
$selectServerUp = false;
|
||||
$selectServerDown = false;
|
||||
$selectTypeUp = false;
|
||||
$selectTypeDown = false;
|
||||
$selectIntervalUp = false;
|
||||
$selectIntervalDown = false;
|
||||
switch ($config['dbtype']) {
|
||||
case 'mysql':
|
||||
case 'postgresql':
|
||||
|
@ -626,32 +626,39 @@ if ($paginate_module) {
|
|||
ui_pagination($total_modules, $url);
|
||||
}
|
||||
|
||||
$url_name = $url.'&sort_field=name&sort=';
|
||||
$url_server = $url.'&sort_field=server&sort=';
|
||||
$url_type = $url.'&sort_field=type&sort=';
|
||||
$url_interval = $url.'&sort_field=interval&sort=';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name').' '.'<a href="'.$url.'&sort_field=name&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).'</a>'.'<a href="'.$url.'&sort_field=name&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).'</a>';
|
||||
$table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[0] = __('Name').ui_get_sorting_arrows($url_name.'up', $url_name.'down', $selectNameUp, $selectNameDown);
|
||||
|
||||
// The access to the policy is granted only with AW permission
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && check_acl($config['id_user'], $agent['id_grupo'], 'AW')) {
|
||||
$table->head[1] = "<span title='".__('Policy')."'>".__('P.').'</span>';
|
||||
}
|
||||
|
||||
$table->head[2] = "<span title='".__('Server')."'>".__('S.').'</span>'.' '.'<a href="'.$url.'&sort_field=server&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectServerUp]).'</a>'.'<a href="'.$url.'&sort_field=server&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectServerDown]).'</a>';
|
||||
$table->head[3] = __('Type').' '.'<a href="'.$url.'&sort_field=type&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectTypeUp]).'</a>'.'<a href="'.$url.'&sort_field=type&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectTypeDown]).'</a>';
|
||||
$table->head[4] = __('Interval').' '.'<a href="'.$url.'&sort_field=interval&sort=up">'.html_print_image('images/sort_up.png', true, ['style' => $selectIntervalUp]).'</a>'.'<a href="'.$url.'&sort_field=interval&sort=down">'.html_print_image('images/sort_down.png', true, ['style' => $selectIntervalDown]).'</a>';
|
||||
$table->head[2] = "<span title='".__('Server')."'>".__('S.').'</span>'.ui_get_sorting_arrows($url_server.'up', $url_server.'down', $selectServerUp, $selectServerDown);
|
||||
$table->head[3] = __('Type').ui_get_sorting_arrows($url_type.'up', $url_type.'down', $selectTypeUp, $selectTypeDown);
|
||||
$table->head[4] = __('Interval').ui_get_sorting_arrows($url_interval.'up', $url_interval.'down', $selectIntervalUp, $selectIntervalDown);
|
||||
$table->head[5] = __('Description');
|
||||
$table->head[6] = __('Status');
|
||||
$table->head[7] = __('Warn');
|
||||
|
||||
|
||||
$table->head[8] = __('Action');
|
||||
$table->head[9] = '<span title="'.__('Delete').'">'.__('Del.').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[9] = '<span title="'.__('Delete').'">'.__('Del.').'</span>';
|
||||
|
||||
$table->rowstyle = [];
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->size = [];
|
||||
$table->size['checkbox'] = '20px';
|
||||
$table->size[2] = '70px';
|
||||
$table->align = [];
|
||||
$table->align[2] = 'left';
|
||||
|
@ -706,15 +713,19 @@ foreach ($modules as $module) {
|
|||
$table->rowstyle[($i - 1)] = 'text-align: center';
|
||||
$table->rowclass[($i - 1)] = 'datos3';
|
||||
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
|
||||
$table->colspan[($i - 1)][0] = 10;
|
||||
$table->colspan[($i - 1)][0] = 11;
|
||||
} else {
|
||||
$table->colspan[($i - 1)][0] = 9;
|
||||
$table->colspan[($i - 1)][0] = 10;
|
||||
}
|
||||
|
||||
$data = [];
|
||||
}
|
||||
}
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
$data['checkbox'] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
|
||||
}
|
||||
|
||||
$data[0] = '';
|
||||
|
||||
if (isset($module['deep']) && ($module['deep'] != 0)) {
|
||||
|
@ -858,7 +869,7 @@ foreach ($modules as $module) {
|
|||
}
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') && $module['id_tipo_modulo'] != 25) {
|
||||
$data[8] .= ' <a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
|
||||
$data[8] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
|
||||
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/copy.png',
|
||||
|
@ -870,7 +881,7 @@ foreach ($modules as $module) {
|
|||
// Make a data normalization
|
||||
if (isset($numericModules[$type])) {
|
||||
if ($numericModules[$type] === true) {
|
||||
$data[8] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[8] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/chart_curve.png',
|
||||
true,
|
||||
|
@ -879,18 +890,19 @@ foreach ($modules as $module) {
|
|||
$data[8] .= '</a>';
|
||||
}
|
||||
} else {
|
||||
$data[8] .= ' '.html_print_image(
|
||||
$data[8] .= html_print_image(
|
||||
'images/chart_curve.disabled.png',
|
||||
true,
|
||||
['title' => __('Normalize (Disabled)')]
|
||||
);
|
||||
$data[8] .= ' ';
|
||||
}
|
||||
|
||||
// create network component action
|
||||
if ((is_user_admin($config['id_user']))
|
||||
&& ($module['id_modulo'] == MODULE_NETWORK)
|
||||
) {
|
||||
$data[8] .= ' <a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'"
|
||||
$data[8] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_components&create_network_from_module=1&id_agente='.$id_agente.'&create_module_from='.$module['id_agente_modulo'].'"
|
||||
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/network.png',
|
||||
|
@ -899,11 +911,12 @@ foreach ($modules as $module) {
|
|||
);
|
||||
$data[8] .= '</a> ';
|
||||
} else {
|
||||
$data[8] .= ' '.html_print_image(
|
||||
$data[8] .= html_print_image(
|
||||
'images/network.disabled.png',
|
||||
true,
|
||||
['title' => __('Create network component (Disabled)')]
|
||||
);
|
||||
$data[8] .= ' ';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -917,10 +930,17 @@ foreach ($modules as $module) {
|
|||
['title' => __('Delete')]
|
||||
);
|
||||
$data[9] .= '</a> ';
|
||||
$data[9] .= html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
|
||||
}
|
||||
|
||||
$table->cellclass[] = [
|
||||
8 => 'action_buttons',
|
||||
9 => 'action_buttons',
|
||||
];
|
||||
array_push($table->data, $data);
|
||||
$table->cellclass[] = [
|
||||
8 => 'action_buttons',
|
||||
9 => 'action_buttons',
|
||||
];
|
||||
}
|
||||
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
|
||||
|
|
|
@ -393,7 +393,7 @@ else {
|
|||
|
||||
// View available downtimes present in database (if any of them)
|
||||
$table = new StdClass();
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->width = '100%';
|
||||
$table->cellstyle = [];
|
||||
|
||||
|
@ -518,9 +518,9 @@ else {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($downtimes_number, "index.php?sec=estado&sec2=godmode/agentes/planned_downtime.list&$filter_params_str", $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
|
||||
echo '<br>';
|
||||
// CSV export button
|
||||
echo '<div style="display: inline;">';
|
||||
html_print_button(
|
||||
|
|
|
@ -221,7 +221,7 @@ if ($delete_action) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
|
@ -281,6 +281,10 @@ foreach ($actions as $action) {
|
|||
}
|
||||
|
||||
if (check_acl($config['id_user'], $action['id_group'], 'LM')) {
|
||||
$table->cellclass[] = [
|
||||
2 => 'action_buttons',
|
||||
3 => 'action_buttons',
|
||||
];
|
||||
$data[2] = '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&copy_action=1&id='.$action['id'].'&pure='.$pure.'"
|
||||
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true).'</a>';
|
||||
$data[3] = '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&delete_action=1&id='.$action['id'].'&pure='.$pure.'"
|
||||
|
|
|
@ -388,7 +388,7 @@ if ($copy_command) {
|
|||
}
|
||||
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
@ -431,6 +431,7 @@ foreach ($commands as $command) {
|
|||
io_safe_output($command['description'])
|
||||
);
|
||||
$data['action'] = '';
|
||||
$table->cellclass[]['action'] = 'action_buttons';
|
||||
if (! $command['internal']) {
|
||||
$data['action'] = '<span style="display: inline-flex">';
|
||||
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&copy_command=1&id='.$command['id'].'&pure='.$pure.'"
|
||||
|
|
|
@ -226,17 +226,18 @@ $order = null;
|
|||
|
||||
$sortField = get_parameter('sort_field');
|
||||
$sort = get_parameter('sort', 'none');
|
||||
$selected = 'border: 1px solid black;';
|
||||
$selected = true;
|
||||
// 'border: 1px solid black;';
|
||||
$selectDisabledUp = '';
|
||||
$selectDisabledDown = '';
|
||||
$selectStandbyUp = '';
|
||||
$selectStandbyDown = '';
|
||||
$selectAgentUp = '';
|
||||
$selectAgentDown = '';
|
||||
$selectModuleUp = '';
|
||||
$selectModuleDown = '';
|
||||
$selectTemplateUp = '';
|
||||
$selectTemplateDown = '';
|
||||
$selectAgentUp = false;
|
||||
$selectAgentDown = false;
|
||||
$selectModuleUp = false;
|
||||
$selectModuleDown = false;
|
||||
$selectTemplateUp = false;
|
||||
$selectTemplateDown = false;
|
||||
|
||||
switch ($sortField) {
|
||||
case 'disabled':
|
||||
|
@ -346,11 +347,11 @@ switch ($sortField) {
|
|||
$selectStandbyUp = '';
|
||||
$selectStandbyDown = '';
|
||||
$selectAgentUp = $selected;
|
||||
$selectAgentDown = '';
|
||||
$selectModuleUp = '';
|
||||
$selectModuleDown = '';
|
||||
$selectTemplateUp = '';
|
||||
$selectTemplateDown = '';
|
||||
$selectAgentDown = false;
|
||||
$selectModuleUp = false;
|
||||
$selectModuleDown = false;
|
||||
$selectTemplateUp = false;
|
||||
$selectTemplateDown = false;
|
||||
$order = [
|
||||
'field' => 'agent_name',
|
||||
'order' => 'ASC',
|
||||
|
@ -360,12 +361,12 @@ switch ($sortField) {
|
|||
$selectDisabledDown = '';
|
||||
$selectStandbyUp = '';
|
||||
$selectStandbyDown = '';
|
||||
$selectAgentUp = '';
|
||||
$selectAgentDown = '';
|
||||
$selectAgentUp = false;
|
||||
$selectAgentDown = false;
|
||||
$selectModuleUp = $selected;
|
||||
$selectModuleDown = '';
|
||||
$selectTemplateUp = '';
|
||||
$selectTemplateDown = '';
|
||||
$selectModuleDown = false;
|
||||
$selectTemplateUp = false;
|
||||
$selectTemplateDown = false;
|
||||
$order = [
|
||||
'field' => 'agent_module_name',
|
||||
'order' => 'ASC',
|
||||
|
@ -402,12 +403,21 @@ if (!$id_agente) {
|
|||
$url = 'index.php?sec='.$sec.'&sec2=godmode/agentes/configurar_agente&pure='.$pure.'&tab=alert&id_agente='.$id_agente.'&offset='.$offset.$form_params;
|
||||
}
|
||||
|
||||
// Urls to sort the table.
|
||||
$url_up_agente = $url.'&sort_field=agent&sort=up&pure='.$pure;
|
||||
$url_down_agente = $url.'&sort_field=agent&sort=down&pure='.$pure;
|
||||
$url_up_module = $url.'&sort_field=module&sort=up&pure='.$pure;
|
||||
$url_down_module = $url.'&sort_field=module&sort=down&pure='.$pure;
|
||||
$url_up_template = $url.'&sort_field=template&sort=up&pure='.$pure;
|
||||
$url_down_template = $url.'&sort_field=template&sort=down&pure='.$pure;
|
||||
|
||||
|
||||
$table = new stdClass();
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$table->class = 'alert_list databox';
|
||||
} else {
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
}
|
||||
|
||||
$table->width = '100%';
|
||||
|
@ -427,7 +437,7 @@ $table->head = [];
|
|||
if (! $id_agente) {
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->head[0] = __('Agent').' '.'<a href="'.$url.'&sort_field=agent&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectAgentUp]).'</a>'.'<a href="'.$url.'&sort_field=agent&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectAgentDown]).'</a>';
|
||||
$table->head[0] = __('Agent').ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown);
|
||||
$table->size[0] = '4%';
|
||||
$table->size[1] = '8%';
|
||||
$table->size[2] = '8%';
|
||||
|
@ -439,7 +449,7 @@ if (! $id_agente) {
|
|||
$table->size[4] = '8%';
|
||||
}*/
|
||||
} else {
|
||||
$table->head[0] = __('Module').' '.'<a href="'.$url.'&sort_field=module&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectModuleUp]).'</a>'.'<a href="'.$url.'&sort_field=module&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectModuleDown]).'</a>';
|
||||
$table->head[0] = __('Module').ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown);
|
||||
// Different sizes or the layout screws up
|
||||
$table->size[0] = '0%';
|
||||
$table->size[1] = '10%';
|
||||
|
@ -452,7 +462,7 @@ if (! $id_agente) {
|
|||
$table->size[4] = '1%';
|
||||
}
|
||||
|
||||
$table->head[1] = __('Template').' '.'<a href="'.$url.'&sort_field=template&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectTemplateUp]).'</a>'.'<a href="'.$url.'&sort_field=template&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectTemplateDown]).'</a>';
|
||||
$table->head[1] = __('Template').ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown);
|
||||
$table->head[2] = __('Actions');
|
||||
$table->head[3] = __('Status');
|
||||
$table->head[4] = "<span title='".__('Operations')."'>".__('Op.').'</span>';
|
||||
|
@ -728,6 +738,10 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
$data[3] = ui_print_status_image($status, $title, true);
|
||||
|
||||
$table->cellclass[] = [
|
||||
3 => 'action_buttons',
|
||||
4 => 'action_buttons',
|
||||
];
|
||||
$data[4] = '<form class="disable_alert_form" action="'.$url.'" method="post" style="display: inline;">';
|
||||
if ($alert['disabled']) {
|
||||
$data[4] .= html_print_input_image('enable', 'images/lightbulb_off.png', 1, 'padding:0px', true);
|
||||
|
@ -742,7 +756,7 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
// To manage alert is necessary LW permissions in the agent group
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) {
|
||||
$data[4] .= ' <form class="standby_alert_form" action="'.$url.'" method="post" style="display: inline;">';
|
||||
$data[4] .= '<form class="standby_alert_form" action="'.$url.'" method="post" style="display: inline;">';
|
||||
if (!$alert['standby']) {
|
||||
$data[4] .= html_print_input_image('standby_off', 'images/bell.png', 1, 'padding:0px;', true);
|
||||
$data[4] .= html_print_input_hidden('standbyon_alert', 1, true);
|
||||
|
@ -771,7 +785,7 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
// To manage alert is necessary LW permissions in the agent group
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) {
|
||||
$data[4] .= ' <form class="delete_alert_form" action="'.$url.'" method="post" style="display: inline;">';
|
||||
$data[4] .= '<form class="delete_alert_form" action="'.$url.'" method="post" style="display: inline;">';
|
||||
$is_cluster = (bool) get_parameter('id_cluster');
|
||||
if (!$is_cluster) {
|
||||
if ($alert['disabled']) {
|
||||
|
@ -815,6 +829,11 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
if (isset($data)) {
|
||||
html_print_table($table);
|
||||
if ($id_agente) {
|
||||
ui_pagination($total, 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&id_agente='.$id_agente.$form_params.$sort_params, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_pagination($total, 'index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list'.$form_params.$sort_params, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No alerts defined') ]);
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@ if ($templates === false) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
|
@ -375,6 +375,7 @@ foreach ($templates as $template) {
|
|||
$data[3] = alerts_get_alert_templates_type_name($template['type']);
|
||||
|
||||
if (check_acl($config['id_user'], $template['id_group'], 'LM')) {
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
$data[4] = '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'" style="display: inline; float: left">';
|
||||
$data[4] .= html_print_input_hidden('duplicate_template', 1, true);
|
||||
$data[4] .= html_print_input_hidden('source_id', $template['id'], true);
|
||||
|
@ -396,6 +397,7 @@ foreach ($templates as $template) {
|
|||
ui_pagination($total_templates, $url);
|
||||
if (isset($data)) {
|
||||
html_print_table($table);
|
||||
ui_pagination($total_templates, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No alert templates defined') ]);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,13 @@ $filter['limit'] = (int) $config['block_size'];
|
|||
// Search action: This will filter the display category view
|
||||
$result = false;
|
||||
|
||||
$result = categories_get_all_categories();
|
||||
$result = db_get_all_rows_filter(
|
||||
'tcategory',
|
||||
[
|
||||
'limit' => $filter['limit'],
|
||||
'offset' => $filter['offset'],
|
||||
]
|
||||
);
|
||||
|
||||
// Display categories previously filtered or not
|
||||
$rowPair = true;
|
||||
|
@ -94,7 +100,7 @@ if (!empty($result)) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
@ -123,7 +129,8 @@ if (!empty($result)) {
|
|||
$data[1] .= '<a href="index.php?sec=advanced&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>';
|
||||
} else {
|
||||
$data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".$category['name'].'</a>';
|
||||
$data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a> ';
|
||||
$table->cellclass[][1] = 'action_buttons';
|
||||
$data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category['id'].'&pure='.(int) $config['pure']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>';
|
||||
$data[1] .= '<a href="index.php?sec=gmodules&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>';
|
||||
}
|
||||
|
||||
|
@ -131,6 +138,7 @@ if (!empty($result)) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($total_categories, $url, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
// No categories available or selected
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('No categories found') ]);
|
||||
|
|
|
@ -113,31 +113,33 @@ if ($filters === false) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[2] = __('Event type');
|
||||
$table->head[3] = __('Event status');
|
||||
$table->head[4] = __('Severity');
|
||||
$table->head[5] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[0] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[1] = __('Name');
|
||||
$table->head[2] = __('Group');
|
||||
$table->head[3] = __('Event type');
|
||||
$table->head[4] = __('Event status');
|
||||
$table->head[5] = __('Severity');
|
||||
$table->head[6] = __('Action');
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->style[1] = 'font-weight: bold';
|
||||
$table->align = [];
|
||||
$table->align[1] = 'left';
|
||||
$table->align[2] = 'left';
|
||||
$table->align[3] = 'left';
|
||||
|
||||
$table->align[4] = 'left';
|
||||
|
||||
$table->align[5] = 'left';
|
||||
$table->align[6] = 'left';
|
||||
$table->size = [];
|
||||
$table->size[0] = '50%';
|
||||
$table->size[1] = '5px';
|
||||
$table->size[2] = '80px';
|
||||
$table->size[0] = '20px';
|
||||
$table->size[1] = '50%';
|
||||
$table->size[2] = '5px';
|
||||
$table->size[3] = '80px';
|
||||
$table->size[4] = '80px';
|
||||
$table->size[5] = '40px';
|
||||
$table->size[5] = '80px';
|
||||
$table->size[6] = '40px';
|
||||
$table->data = [];
|
||||
|
||||
$total_filters = db_get_all_rows_filter('tevent_filter', false, 'COUNT(*) AS total');
|
||||
|
@ -147,13 +149,14 @@ $total_filters = $total_filters[0]['total'];
|
|||
foreach ($filters as $filter) {
|
||||
$data = [];
|
||||
|
||||
$data[0] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=edit_filter&id='.$filter['id_filter'].'&pure='.$config['pure'].'">'.$filter['id_name'].'</a>';
|
||||
$data[1] = ui_print_group_icon($filter['id_group_filter'], true);
|
||||
$data[2] = events_get_event_types($filter['event_type']);
|
||||
$data[3] = events_get_status($filter['status']);
|
||||
$data[4] = events_get_severity_types($filter['severity']);
|
||||
$data[5] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
|
||||
href='index.php?sec=geventos&sec2=godmode/events/events§ion=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $filter['id_filter'], false, false, '', 'class="check_delete"', true);
|
||||
$data[0] = html_print_checkbox_extended('delete_multiple[]', $filter['id_filter'], false, false, '', 'class="check_delete"', true);
|
||||
$data[1] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=edit_filter&id='.$filter['id_filter'].'&pure='.$config['pure'].'">'.$filter['id_name'].'</a>';
|
||||
$data[2] = ui_print_group_icon($filter['id_group_filter'], true);
|
||||
$data[3] = events_get_event_types($filter['event_type']);
|
||||
$data[4] = events_get_status($filter['status']);
|
||||
$data[5] = events_get_severity_types($filter['severity']);
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$data[6] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'href='index.php?sec=geventos&sec2=godmode/events/events§ion=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
@ -189,8 +192,6 @@ echo '</div>';
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("input[name=all_delete]").css("margin-left", "32px");
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('[id^=checkbox-delete_multiple]').change(function(){
|
||||
|
|
|
@ -36,7 +36,9 @@ if (empty($event_responses)) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
|
||||
$table->size = [];
|
||||
$table->size[0] = '200px';
|
||||
|
@ -57,8 +59,9 @@ foreach ($event_responses as $response) {
|
|||
$data[0] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&id_response='.$response['id'].'&pure='.$config['pure'].'">'.$response['name'].'</a>';
|
||||
$data[1] = $response['description'];
|
||||
$data[2] = ui_print_group_icon($response['id_group'], true);
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$data[3] = '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&action=delete_response&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
$data[3] .= ' <a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit')]).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=editor&id_response='.$response['id'].'&pure='.$config['pure'].'">'.html_print_image('images/pencil.png', true, ['title' => __('Edit')]).'</a>';
|
||||
$table->data[] = $data;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ $table->head[] = __('Operation');
|
|||
$table->width[] = '30%';
|
||||
*/
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->align = [];
|
||||
$table->align[] = 'left';
|
||||
|
@ -254,6 +254,7 @@ foreach ($extensions as $file => $extension) {
|
|||
|
||||
// Avoid to delete or disabled update_manager
|
||||
if ($file != 'update_manager.php') {
|
||||
$table->cellclass[][10] = 'action_buttons';
|
||||
if (!$extension['enabled']) {
|
||||
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true).'</a>';
|
||||
} else {
|
||||
|
|
|
@ -515,7 +515,7 @@ if ($tab == 'tree') {
|
|||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->head[0] = __('ID');
|
||||
$table->head[1] = __('Name');
|
||||
|
@ -559,6 +559,7 @@ if ($tab == 'tree') {
|
|||
$table->data[$key][3] = $group['disabled'] ? __('Disabled') : __('Enabled');
|
||||
$table->data[$key][4] = $group['parent_name'];
|
||||
$table->data[$key][5] = $group['description'];
|
||||
$table->cellclass[$key][6] = 'action_buttons';
|
||||
$table->data[$key][6] = "<a href='$url'>".html_print_image(
|
||||
'images/config.png',
|
||||
true,
|
||||
|
@ -574,7 +575,7 @@ if ($tab == 'tree') {
|
|||
$confirm_message = __('The child groups will be updated to use the parent id of the deleted group').'. '.$confirm_message;
|
||||
}
|
||||
|
||||
$table->data[$key][6] .= ' '.'<a href="'.$url_delete.'" onClick="if (!confirm(\' '.$confirm_message.'\')) return false;">'.html_print_image(
|
||||
$table->data[$key][6] .= '<a href="'.$url_delete.'" onClick="if (!confirm(\' '.$confirm_message.'\')) return false;">'.html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
[
|
||||
|
@ -592,7 +593,7 @@ if ($tab == 'tree') {
|
|||
$block_size,
|
||||
true,
|
||||
'offset',
|
||||
false
|
||||
true
|
||||
);
|
||||
html_print_table($table);
|
||||
echo ui_pagination(
|
||||
|
@ -602,7 +603,8 @@ if ($tab == 'tree') {
|
|||
$block_size,
|
||||
true,
|
||||
'offset',
|
||||
true
|
||||
true,
|
||||
'pagination-bottom'
|
||||
);
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined groups') ]);
|
||||
|
|
|
@ -212,14 +212,11 @@ if ($delete_group) {
|
|||
}
|
||||
}
|
||||
|
||||
// Prepare pagination.
|
||||
$total_groups = db_get_num_rows('SELECT * FROM tmodule_group');
|
||||
|
||||
$url = ui_get_url_refresh(['offset' => false]);
|
||||
|
||||
$offset = (int) get_parameter('offset', 0);
|
||||
|
||||
ui_pagination($total_groups, $url, $offset);
|
||||
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM tmodule_group
|
||||
|
@ -230,7 +227,7 @@ $groups = db_get_all_rows_sql($sql);
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
if (!empty($groups)) {
|
||||
$table->head = [];
|
||||
|
@ -251,13 +248,16 @@ if (!empty($groups)) {
|
|||
if (is_metaconsole()) {
|
||||
$data[2] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=module_group&id_group='.$id_group['id_mg'].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
|
||||
} else {
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
$data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/groups/modu_group_list&id_group='.$id_group['id_mg'].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a>';
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
ui_pagination($total_groups, $url, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($total_groups, $url, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message(
|
||||
[
|
||||
|
|
|
@ -219,17 +219,19 @@ $groups = component_groups_get_groups_tree_recursive($groups_clean, 0, 0);
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[1] = __('Action');
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->align = [];
|
||||
$table->align[1] = 'left';
|
||||
$table->size = [];
|
||||
$table->size[0] = '80%';
|
||||
$table->size[1] = '10%';
|
||||
$table->size['checkbox'] = '20px';
|
||||
// $table->size[0] = '80%';
|
||||
$table->size[1] = '60px';
|
||||
$table->data = [];
|
||||
|
||||
$total_groups = db_get_all_rows_filter('tnetwork_component_group', false, 'COUNT(*) AS total');
|
||||
|
@ -239,6 +241,9 @@ $total_groups = $total_groups[0]['total'];
|
|||
foreach ($groups as $group) {
|
||||
$data = [];
|
||||
|
||||
$data['checkbox'] = html_print_checkbox_extended('delete_multiple[]', $group['id_sg'], false, false, '', 'class="check_delete"', true);
|
||||
|
||||
|
||||
$tabulation = str_repeat(' ', $group['deep']);
|
||||
if (defined('METACONSOLE')) {
|
||||
$data[0] = $tabulation.'<a href="index.php?sec=advanced&sec2=godmode/modules/manage_nc_groups&id='.$group['id_sg'].'">'.$group['name'].'</a>';
|
||||
|
@ -246,8 +251,9 @@ foreach ($groups as $group) {
|
|||
$data[0] = $tabulation.'<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_nc_groups&id='.$group['id_sg'].'">'.$group['name'].'</a>';
|
||||
}
|
||||
|
||||
$table->cellclass[][1] = 'action_buttons';
|
||||
$data[1] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
|
||||
href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $group['id_sg'], false, false, '', 'class="check_delete"', true);
|
||||
href='index.php?sec=".$sec.'&sec2=godmode/modules/manage_nc_groups&delete=1&id='.$group['id_sg']."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -638,14 +638,16 @@ unset($table);
|
|||
|
||||
$table->width = '100%';
|
||||
$table->head = [];
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[0] = __('Module name');
|
||||
$table->head[1] = __('Type');
|
||||
$table->head[3] = __('Description');
|
||||
$table->head[4] = __('Group');
|
||||
$table->head[5] = __('Max/Min');
|
||||
$table->head[6] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[6] = __('Action');
|
||||
$table->size = [];
|
||||
$table->size['checkbox'] = '20px';
|
||||
$table->size[1] = '75px';
|
||||
$table->size[6] = '80px';
|
||||
$table->align[6] = 'left';
|
||||
|
@ -658,6 +660,8 @@ foreach ($components as $component) {
|
|||
$component['max'] = $component['min'] = __('N/A');
|
||||
}
|
||||
|
||||
$data['checkbox'] = html_print_checkbox_extended('delete_multiple[]', $component['id_nc'], false, false, '', 'class="check_delete"', true);
|
||||
|
||||
$data[0] = '<a href="index.php?sec='.$sec.'&'.'sec2=godmode/modules/manage_network_components&'.'id='.$component['id_nc'].'&pure='.$pure.'">';
|
||||
$data[0] .= io_safe_output($component['name']);
|
||||
$data[0] .= '</a>';
|
||||
|
@ -692,8 +696,9 @@ foreach ($components as $component) {
|
|||
$data[4] = network_components_get_group_name($component['id_group']);
|
||||
$data[5] = $component['max'].' / '.$component['min'];
|
||||
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$data[6] = '<a style="display: inline; float: left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image('images/copy.png', true, ['alt' => __('Duplicate'), 'title' => __('Duplicate')]).'</a>';
|
||||
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $component['id_nc'], false, false, '', 'class="check_delete"', true);
|
||||
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
@ -702,6 +707,7 @@ if (isset($data)) {
|
|||
echo "<form method='post' action='index.php?sec=".$sec.'&sec2=godmode/modules/manage_network_components&search_id_group=0search_string=&pure='.$pure."'>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table($table);
|
||||
ui_pagination($total_components, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo "<div style='float: right; margin-left: 5px;'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</div>';
|
||||
|
|
|
@ -189,7 +189,20 @@ if ($export_profile) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$result = db_get_all_rows_in_table('tnetwork_profile', 'name');
|
||||
// Prepare pagination.
|
||||
$offset = (int) get_parameter('offset');
|
||||
$limit = $config['block_size'];
|
||||
$count_network_templates = db_get_value('count(*)', 'tnetwork_profile');
|
||||
|
||||
$result = db_get_all_rows_filter(
|
||||
'tnetwork_profile',
|
||||
[
|
||||
'order' => 'name',
|
||||
'limit' => $limit,
|
||||
'offset' => $offset,
|
||||
]
|
||||
);
|
||||
|
||||
if ($result === false) {
|
||||
$result = [];
|
||||
}
|
||||
|
@ -197,26 +210,31 @@ if ($result === false) {
|
|||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Description');
|
||||
$table->head[2] = '<span style="margin-right:7%;">'.__('Action').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[0] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
;
|
||||
$table->head[1] = __('Name');
|
||||
$table->head[2] = __('Description');
|
||||
$table->head[3] = '<span style="margin-right:7%;">'.__('Action').'</span>';
|
||||
$table->size = [];
|
||||
$table->size[1] = '65%';
|
||||
$table->size[2] = '15%';
|
||||
$table->size[0] = '20px';
|
||||
$table->size[2] = '65%';
|
||||
$table->size[3] = '15%';
|
||||
|
||||
$table->align = [];
|
||||
$table->align[2] = 'left';
|
||||
$table->align[3] = 'left';
|
||||
|
||||
$table->data = [];
|
||||
|
||||
foreach ($result as $row) {
|
||||
$data = [];
|
||||
$data[0] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
|
||||
$data[1] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[…]');
|
||||
$data[2] = html_print_input_image(
|
||||
$data[0] = html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
|
||||
$data[1] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$row['id_np'].'">'.io_safe_output($row['name']).'</a>';
|
||||
$data[2] = ui_print_truncate_text(io_safe_output($row['description']), 'description', true, true, true, '[…]');
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$data[3] = html_print_input_image(
|
||||
'delete_profile',
|
||||
'images/cross.png',
|
||||
$row['id_np'],
|
||||
|
@ -224,7 +242,7 @@ foreach ($result as $row) {
|
|||
true,
|
||||
['onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;']
|
||||
);
|
||||
$data[2] .= html_print_input_image(
|
||||
$data[3] .= html_print_input_image(
|
||||
'export_profile',
|
||||
'images/csv.png',
|
||||
$row['id_np'],
|
||||
|
@ -232,8 +250,8 @@ foreach ($result as $row) {
|
|||
true,
|
||||
['title' => 'Export to CSV']
|
||||
);
|
||||
$data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
$data[2] .= ' <a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $row['id_np'], false, false, '', 'class="check_delete"', true);
|
||||
$data[3] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&delete_profile=1&delete_profile='.$row['id_np'].'" '.'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
$data[3] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates'.'&export_profile='.$row['id_np'].'">'.html_print_image('images/csv.png', true, ['title' => __('Export to CSV')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
@ -241,7 +259,9 @@ foreach ($result as $row) {
|
|||
if (!empty($table->data)) {
|
||||
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates">';
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
ui_pagination($count_network_templates, false, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($count_network_templates, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo "<div style='padding-left: 5px; float: right; '>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</div>';
|
||||
|
|
|
@ -52,11 +52,13 @@ if ($update_module) {
|
|||
}
|
||||
|
||||
|
||||
echo "<table cellpadding='4' cellspacing='4' width='100%' class='databox data'>";
|
||||
echo "<table cellpadding='0' cellspacing='0' width='100%' class='info_table'>";
|
||||
echo '<thead>';
|
||||
echo '<th>'.__('Icon').'</th>';
|
||||
echo '<th>'.__('ID').'</th>';
|
||||
echo '<th>'.__('Name').'</th>';
|
||||
echo '<th>'.__('Description').'</th>';
|
||||
echo '</thead';
|
||||
|
||||
$rows = db_get_all_rows_sql('SELECT * FROM ttipo_modulo ORDER BY nombre');
|
||||
if ($rows === false) {
|
||||
|
|
|
@ -133,20 +133,22 @@ if ($filters === false) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[2] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[0] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[1] = __('Name');
|
||||
$table->head[2] = __('Group');
|
||||
$table->head[3] = __('Action');
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold';
|
||||
$table->style[1] = 'font-weight: bold';
|
||||
$table->align = [];
|
||||
|
||||
$table->size = [];
|
||||
$table->size[0] = '60%';
|
||||
$table->size[1] = '30%';
|
||||
$table->size[2] = '80px';
|
||||
$table->size[0] = '10px';
|
||||
$table->size[1] = '60%';
|
||||
$table->size[2] = '30%';
|
||||
$table->size[3] = '80px';
|
||||
$table->data = [];
|
||||
|
||||
$total_filters = db_get_all_rows_filter('tnetflow_filter', false, 'COUNT(*) AS total');
|
||||
|
@ -156,10 +158,12 @@ $total_filters = $total_filters[0]['total'];
|
|||
foreach ($filters as $filter) {
|
||||
$data = [];
|
||||
|
||||
$data[0] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&id='.$filter['id_sg'].'&pure='.$pure.'">'.$filter['id_name'].'</a>';
|
||||
$data[1] = ui_print_group_icon($filter['id_group'], true, 'groups_small', '', !defined('METACONSOLE'));
|
||||
$data[2] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
|
||||
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $filter['id_sg'], false, false, '', 'class="check_delete"', true);
|
||||
$data[0] = html_print_checkbox_extended('delete_multiple[]', $filter['id_sg'], false, false, '', 'class="check_delete"', true);
|
||||
$data[1] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&id='.$filter['id_sg'].'&pure='.$pure.'">'.$filter['id_name'].'</a>';
|
||||
$data[2] = ui_print_group_icon($filter['id_group'], true, 'groups_small', '', !defined('METACONSOLE'));
|
||||
$table->cellclass[][3] = 'action_buttons';
|
||||
$data[3] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
|
||||
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&delete=1&id='.$filter['id_sg']."&offset=0&pure=$pure'>".html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -159,9 +159,17 @@ ui_pagination(count($graphs));
|
|||
if (!empty($graphs)) {
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->align = [];
|
||||
$table->head = [];
|
||||
if ($report_w || $report_m) {
|
||||
$table->align[5] = 'left';
|
||||
$table->head[5] = html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->size[5] = '20px';
|
||||
}
|
||||
|
||||
$table->head[0] = __('Graph name');
|
||||
$table->head[1] = __('Description');
|
||||
$table->head[2] = __('Number of Graphs');
|
||||
|
@ -175,7 +183,7 @@ if (!empty($graphs)) {
|
|||
if ($report_w || $report_m) {
|
||||
$op_column = true;
|
||||
$table->align[4] = 'left';
|
||||
$table->head[4] = __('Op.').html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->head[4] = __('Op.');
|
||||
$table->size[4] = '90px';
|
||||
}
|
||||
|
||||
|
@ -186,6 +194,10 @@ if (!empty($graphs)) {
|
|||
foreach ($result_graphs as $graph) {
|
||||
$data = [];
|
||||
|
||||
if ($report_m) {
|
||||
$data[5] .= html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true);
|
||||
}
|
||||
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text($graph['name'], 70).'</a>';
|
||||
|
||||
$data[1] = ui_print_truncate_text($graph['description'], 70);
|
||||
|
@ -194,15 +206,14 @@ if (!empty($graphs)) {
|
|||
$data[3] = ui_print_group_icon($graph['id_group'], true);
|
||||
|
||||
$data[4] = '';
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
if (($report_w || $report_m)) {
|
||||
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.$graph['id_graph'].'">'.html_print_image('images/config.png', true).'</a>';
|
||||
}
|
||||
|
||||
$data[4] .= ' ';
|
||||
|
||||
if ($report_m) {
|
||||
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
||||
return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>'.html_print_checkbox_extended('delete_multiple[]', $graph['id_graph'], false, false, '', 'class="check_delete" style="margin-left:2px;"', true);
|
||||
return false;">'.html_print_image('images/cross.png', true, ['alt' => __('Delete'), 'title' => __('Delete')]).'</a>';
|
||||
}
|
||||
|
||||
array_push($table->data, $data);
|
||||
|
@ -213,6 +224,7 @@ if (!empty($graphs)) {
|
|||
echo "<form method='post' style='' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
|
||||
html_print_input_hidden('multiple_delete', 1);
|
||||
html_print_table($table);
|
||||
ui_pagination(count($graphs), false, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
echo "<div style='float: right;'>";
|
||||
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
|
||||
echo '</div>';
|
||||
|
@ -228,7 +240,6 @@ if (!empty($graphs)) {
|
|||
}
|
||||
|
||||
echo '</div>';
|
||||
ui_pagination(count($graphs));
|
||||
} else {
|
||||
include_once $config['homedir'].'/general/firts_task/custom_graphs.php';
|
||||
}
|
||||
|
@ -237,8 +248,6 @@ if (!empty($graphs)) {
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("input[name=all_delete]").css("margin-left", "32px");
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('[id^=checkbox-delete_multiple]').change(function(){
|
||||
|
|
|
@ -327,7 +327,9 @@ echo '</tr></table>';
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
$table->head[0] = __('Map name');
|
||||
|
@ -447,6 +449,10 @@ if (!$maps && !is_metaconsole()) {
|
|||
// Fix: IW was the old ACL for report editing, now is RW
|
||||
if ($vconsoles_write || $vconsoles_manage) {
|
||||
if (!is_metaconsole()) {
|
||||
$table->cellclass[] = [
|
||||
3 => 'action_buttons',
|
||||
4 => 'action_buttons',
|
||||
];
|
||||
$data[3] = '<a class="copy_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&copy_layout=1">'.html_print_image('images/copy.png', true).'</a>';
|
||||
$data[4] = '<a class="delete_visualmap" href="index.php?sec=network&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">'.html_print_image('images/cross.png', true).'</a>';
|
||||
} else {
|
||||
|
@ -462,6 +468,7 @@ if (!$maps && !is_metaconsole()) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($total_maps, $url, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
|
||||
}
|
||||
|
||||
if ($maps) {
|
||||
|
|
|
@ -330,6 +330,12 @@ if ($items) {
|
|||
if (defined('METACONSOLE')) {
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$arrow_up = 'images/sort_up.png';
|
||||
$arrow_down = 'images/sort_down.png';
|
||||
} else {
|
||||
$table->class = 'info_table';
|
||||
$arrow_up = 'images/sort_up_black.png';
|
||||
$arrow_down = 'images/sort_down_black.png';
|
||||
}
|
||||
|
||||
$table->size = [];
|
||||
|
@ -342,18 +348,18 @@ if ($items) {
|
|||
$table->head[0] = '<span title="'.__('Position').'">'.__('P.').'</span>';
|
||||
$table->head[1] = __('Type');
|
||||
if (!$filterEnable) {
|
||||
$table->head[1] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_up.png', true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_down.png', true, ['title' => __('Descent')]).'</a>';
|
||||
$table->head[1] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>';
|
||||
}
|
||||
|
||||
$table->head[2] = __('Agent');
|
||||
if (!$filterEnable) {
|
||||
$table->head[2] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_up.png', true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_down.png', true, ['title' => __('Descent')]).'</a>';
|
||||
$table->head[2] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>';
|
||||
}
|
||||
|
||||
$table->head[3] = __('Module');
|
||||
|
||||
if (!$filterEnable) {
|
||||
$table->head[3] .= ' <a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_up.png', true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image('images/sort_down.png', true, ['title' => __('Descent')]).'</a>';
|
||||
$table->head[3] .= ' <span class="sort_arrow"><a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_up, true, ['title' => __('Ascendent')]).'</a>'.'<a onclick="return message_check_sort_items();" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report='.$idReport.$urlFilter.'&pure='.$config['pure'].'">'.html_print_image($arrow_down, true, ['title' => __('Descent')]).'</a></span>';
|
||||
}
|
||||
|
||||
$table->head[4] = __('Time lapse');
|
||||
|
@ -493,6 +499,7 @@ foreach ($items as $item) {
|
|||
$row[6] = '';
|
||||
|
||||
if (check_acl($config['id_user'], $item['id_group'], 'RM')) {
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$row[6] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report='.$idReport.'&id_item='.$item['id_rc'].'">'.html_print_image('images/wrench_orange.png', true, ['title' => __('Edit')]).'</a>';
|
||||
$row[6] .= ' ';
|
||||
$row[6] .= '<a onClick="if (!confirm (\'Are you sure?\')) return false;" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report='.$idReport.'&id_item='.$item['id_rc'].$urlFilter.'">'.html_print_image('images/cross.png', true, ['title' => __('Delete')]).'</a>';
|
||||
|
|
|
@ -675,7 +675,7 @@ switch ($action) {
|
|||
$table = new stdClass();
|
||||
$table->id = 'report_list';
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
|
||||
|
@ -857,6 +857,8 @@ switch ($action) {
|
|||
|
||||
if ($edit || $delete) {
|
||||
$columnview = true;
|
||||
$table->cellclass[][$next] = 'action_buttons';
|
||||
|
||||
if (!isset($table->head[$next])) {
|
||||
$table->head[$next] = '<span title="Operations">'.__('Op.').'</span>'.html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->size = [];
|
||||
|
@ -866,11 +868,6 @@ switch ($action) {
|
|||
|
||||
if ($edit) {
|
||||
$data[$next] = '<form method="post" action="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&pure='.$pure.'" style="display:inline">';
|
||||
$data[$next] .= html_print_input_hidden(
|
||||
'id_report',
|
||||
$report['id_report'],
|
||||
true
|
||||
);
|
||||
$data[$next] .= html_print_input_image(
|
||||
'edit',
|
||||
'images/config.png',
|
||||
|
@ -879,13 +876,16 @@ switch ($action) {
|
|||
true,
|
||||
['title' => __('Edit')]
|
||||
);
|
||||
$data[$next] .= html_print_input_hidden(
|
||||
'id_report',
|
||||
$report['id_report'],
|
||||
true
|
||||
);
|
||||
$data[$next] .= '</form>';
|
||||
}
|
||||
|
||||
if ($delete) {
|
||||
$data[$next] .= '<form method="post" style="display:inline;" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
|
||||
$data[$next] .= html_print_input_hidden('id_report', $report['id_report'], true);
|
||||
$data[$next] .= html_print_input_hidden('action', 'delete_report', true);
|
||||
$data[$next] .= html_print_input_image(
|
||||
'delete',
|
||||
'images/cross.png',
|
||||
|
@ -894,6 +894,8 @@ switch ($action) {
|
|||
true,
|
||||
['title' => __('Delete')]
|
||||
);
|
||||
$data[$next] .= html_print_input_hidden('id_report', $report['id_report'], true);
|
||||
$data[$next] .= html_print_input_hidden('action', 'delete_report', true);
|
||||
|
||||
$data[$next] .= html_print_checkbox_extended('massive_report_check', $report['id_report'], false, false, '', 'class="check_delete"', true);
|
||||
|
||||
|
@ -920,6 +922,7 @@ switch ($action) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($total_reports, $url, $offset, $pagination, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message([ 'no_close' => true, 'message' => __('No data found.') ]);
|
||||
}
|
||||
|
|
|
@ -954,9 +954,10 @@ if (($create != '') || ($view != '')) {
|
|||
if (defined('METACONSOLE')) {
|
||||
echo '<table width="100%" cellspacing="4" cellpadding="4" class="databox data">';
|
||||
} else {
|
||||
echo '<table width="100%" cellspacing="4" cellpadding="4" class="databox data">';
|
||||
echo '<table width="100%" cellspacing="4" cellpadding="4" class="info_table">';
|
||||
}
|
||||
|
||||
echo '<thead><tr>';
|
||||
echo '<th>'.__('Name').'</th>';
|
||||
echo '<th>'.__('Type').'</th>';
|
||||
echo '<th>'.__('Command').'</th>';
|
||||
|
@ -964,6 +965,8 @@ if (($create != '') || ($view != '')) {
|
|||
echo "<th style='width: 120px;'>".'<span title="Operations">'.__('Op.').'</span>'.'</th>';
|
||||
}
|
||||
|
||||
echo '</tr></thead>';
|
||||
|
||||
$color = 0;
|
||||
|
||||
foreach ($rows as $row) {
|
||||
|
@ -1202,4 +1205,6 @@ ui_require_javascript_file('pandora_modules');
|
|||
$('.command_macro').click(macros_click_locked_event);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@ if ($servers === false) {
|
|||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->size = [];
|
||||
|
||||
$table->style = [];
|
||||
|
@ -80,7 +82,11 @@ $names_servers = [];
|
|||
|
||||
foreach ($servers as $server) {
|
||||
$data = [];
|
||||
$table->cellclass[][3] = 'progress_bar';
|
||||
// $table->cellclass[][3] = 'progress_bar';
|
||||
$table->cellclass[] = [
|
||||
3 => 'progress_bar',
|
||||
8 => 'action_buttons',
|
||||
];
|
||||
$data[0] = '<span title="'.$server['version'].'">'.strip_tags($server['name']).'</span>';
|
||||
|
||||
// Status
|
||||
|
@ -155,7 +161,7 @@ foreach ($servers as $server) {
|
|||
'style' => 'width:21px;height:21px;',
|
||||
]
|
||||
);
|
||||
$data[8] .= '</a> ';
|
||||
$data[8] .= '</a>';
|
||||
}
|
||||
|
||||
if ($server['type'] == 'data') {
|
||||
|
@ -165,7 +171,7 @@ foreach ($servers as $server) {
|
|||
true,
|
||||
['title' => __('Reset module status and fired alert counts')]
|
||||
);
|
||||
$data[8] .= '</a> ';
|
||||
$data[8] .= '</a>';
|
||||
} else if ($server['type'] == 'enterprise snmp') {
|
||||
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&refr=0&server_reset_snmp_enterprise='.$server['id_server'].'">';
|
||||
$data[8] .= html_print_image(
|
||||
|
@ -173,7 +179,7 @@ foreach ($servers as $server) {
|
|||
true,
|
||||
['title' => __('Claim back SNMP modules')]
|
||||
);
|
||||
$data[8] .= '</a> ';
|
||||
$data[8] .= '</a>';
|
||||
}
|
||||
|
||||
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server='.$server['id_server'].'">';
|
||||
|
@ -195,7 +201,7 @@ foreach ($servers as $server) {
|
|||
$names_servers[$safe_server_name] = false;
|
||||
}
|
||||
|
||||
$data[8] .= ' <a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server['id_server'].'&delete=1">';
|
||||
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server['id_server'].'&delete=1">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/cross.png',
|
||||
true,
|
||||
|
|
|
@ -63,14 +63,15 @@ switch ($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
$table->class = 'info_table';
|
||||
$table->width = '98%';
|
||||
$table->head[0] = __('Map connection name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[3] = __('Delete');
|
||||
|
||||
$table->align[1] = 'center';
|
||||
$table->align[2] = 'center';
|
||||
$table->align[3] = 'center';
|
||||
$table->align[1] = 'left';
|
||||
$table->align[2] = 'left';
|
||||
$table->align[3] = 'left';
|
||||
|
||||
$mapsConnections = db_get_all_rows_in_table('tgis_map_connection', 'conection_name');
|
||||
|
||||
|
@ -84,6 +85,7 @@ if ($mapsConnections !== false) {
|
|||
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis&id_connection_map='.$mapsConnection['id_tmap_connection'].'&action=delete_connection"
|
||||
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>',
|
||||
];
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,9 +137,11 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
|
|||
if (empty($rows)) {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __("There isn't links") ]);
|
||||
} else {
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox data' style='width:100%'>";
|
||||
echo "<table cellpadding='0' cellspacing='0' class='info_table' style='width:100%'>";
|
||||
echo '<thead><tr>';
|
||||
echo "<th width='180px'>".__('Link name').'</th>';
|
||||
echo "<th width='10px'>".__('Delete').'</th>';
|
||||
echo '</tr></thead>';
|
||||
|
||||
$color = 1;
|
||||
foreach ($rows as $row) {
|
||||
|
@ -152,7 +154,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
|
|||
}
|
||||
|
||||
echo "<tr><td class='$tdcolor'><b><a href='index.php?sec=gsetup&sec2=godmode/setup/links&form_edit=1&id_link=".$row['id_link']."'>".$row['name'].'</a></b></td>';
|
||||
echo '<td class="'.$tdcolor.'"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a></td></tr>';
|
||||
echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/links&id_link='.$row['id_link'].'&borrar='.$row['id_link'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a></td></tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
|
|
@ -231,14 +231,15 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined news') ]);
|
||||
} else {
|
||||
// Main list view for Links editor
|
||||
echo "<table cellpadding='4' cellspacing='4' class='databox data' width=100%>";
|
||||
echo "<table cellpadding='0' cellspacing='0' class='info_table' width=100%>";
|
||||
echo '<thead><tr>';
|
||||
echo '<th>'.__('Subject').'</th>';
|
||||
echo '<th>'.__('Type').'</th>';
|
||||
echo '<th>'.__('Author').'</th>';
|
||||
echo '<th>'.__('Timestamp').'</th>';
|
||||
echo '<th>'.__('Expiration').'</th>';
|
||||
echo '<th>'.__('Delete').'</th>';
|
||||
|
||||
echo '</tr></thead>';
|
||||
|
||||
|
||||
$color = 1;
|
||||
|
@ -276,7 +277,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
|
|||
echo "<td class='$tdcolor'>".__('No').'</b></td>';
|
||||
}
|
||||
|
||||
echo '<td class="'.$tdcolor.'"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a></td></tr>';
|
||||
echo '<td class="'.$tdcolor.' action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['border' => '0']).'</a></td></tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
|
|
|
@ -25,7 +25,7 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
|||
$table = new stdClass();
|
||||
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->head[0] = '';
|
||||
$table->head[1] = __('ID');
|
||||
|
@ -37,7 +37,19 @@ $table->align[4] = 'center';
|
|||
$table->size[0] = '20px';
|
||||
$table->size[4] = '20px';
|
||||
|
||||
$osList = db_get_all_rows_in_table('tconfig_os');
|
||||
// Prepare pagination.
|
||||
$offset = (int) get_parameter('offset');
|
||||
$limit = $config['block_size'];
|
||||
$count_osList = db_get_value('count(*)', 'tconfig_os');
|
||||
|
||||
$osList = db_get_all_rows_filter(
|
||||
'tconfig_os',
|
||||
[
|
||||
'offset' => $offset,
|
||||
'limit' => $limit,
|
||||
]
|
||||
);
|
||||
|
||||
if ($osList === false) {
|
||||
$osList = [];
|
||||
}
|
||||
|
@ -54,6 +66,8 @@ foreach ($osList as $os) {
|
|||
}
|
||||
|
||||
$data[] = ui_print_truncate_text(io_safe_output($os['description']), 'description', true, true);
|
||||
|
||||
$table->cellclass[][4] = 'action_buttons';
|
||||
if ($os['id_os'] > 16) {
|
||||
if (is_metaconsole()) {
|
||||
$data[] = '<a href="index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=delete&tab2=list&id_os='.$os['id_os'].'">'.html_print_image('images/cross.png', true).'</a>';
|
||||
|
@ -69,7 +83,9 @@ foreach ($osList as $os) {
|
|||
}
|
||||
|
||||
if (isset($data)) {
|
||||
ui_pagination($count_osList, false, $offset);
|
||||
html_print_table($table);
|
||||
ui_pagination($count_osList, false, $offset, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]);
|
||||
}
|
||||
|
|
|
@ -226,13 +226,13 @@ if ($edit_filter > -2) {
|
|||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->align = [];
|
||||
|
||||
$table->head[0] = __('Description');
|
||||
$table->head[1] = __('Filter');
|
||||
$table->head[2] = __('Action');
|
||||
$table->size[2] = '50px';
|
||||
$table->size[2] = '65px';
|
||||
$table->align[2] = 'center';
|
||||
|
||||
foreach ($aglomerate_result as $ind => $row) {
|
||||
|
@ -263,6 +263,7 @@ if ($edit_filter > -2) {
|
|||
$data[0] = $compose_id;
|
||||
$data[1] = implode(' AND ', $compose_filter);
|
||||
$data[2] = $compose_action;
|
||||
$table->cellclass[][2] = 'action_buttons';
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ if (!empty($result)) {
|
|||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->data = [];
|
||||
$table->head = [];
|
||||
|
@ -278,12 +278,14 @@ if (!empty($result)) {
|
|||
|
||||
$data[5] = $output;
|
||||
|
||||
$data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a> ';
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
$data[6] = "<a href='index.php?sec=".$sec.'&sec2=godmode/tag/edit_tag&action=update&id_tag='.$tag['id_tag']."'>".html_print_image('images/config.png', true, ['title' => 'Edit']).'</a>';
|
||||
$data[6] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag='.$tag['id_tag'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image('images/cross.png', true, ['title' => 'Delete']).'</a>';
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination($total_tags, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
} else {
|
||||
if (is_metaconsole()) {
|
||||
ui_toggle($filter_form, __('Show Options'));
|
||||
|
|
|
@ -258,7 +258,7 @@ if ($create_profile) {
|
|||
$table = new stdClass();
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->class = 'databox profile_list data';
|
||||
$table->class = 'info_table profile_list';
|
||||
$table->width = '100%';
|
||||
|
||||
$table->head = [];
|
||||
|
@ -353,8 +353,9 @@ foreach ($profiles as $profile) {
|
|||
$data['VW'] = ($profile['vconsole_edit'] ? $img : '');
|
||||
$data['VM'] = ($profile['vconsole_management'] ? $img : '');
|
||||
$data['PM'] = ($profile['pandora_management'] ? $img : '');
|
||||
$table->cellclass[]['operations'] = 'action_buttons';
|
||||
$data['operations'] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/configure_profile&id='.$profile['id_perfil'].'&pure='.$pure.'">'.html_print_image('images/config.png', true, ['title' => __('Edit')]).'</a>';
|
||||
$data['operations'] .= ' <a href="index.php?sec='.$sec.'&sec2=godmode/users/profile_list&delete_profile=1&id='.$profile['id_perfil'].'&pure='.$pure.'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
|
||||
$data['operations'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/users/profile_list&delete_profile=1&id='.$profile['id_perfil'].'&pure='.$pure.'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true).'</a>';
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ $sort = get_parameter('sort', 'none');
|
|||
$tab = get_parameter('tab', 'user');
|
||||
$pure = get_parameter('pure', 0);
|
||||
|
||||
$selected = 'border: 1px solid black;';
|
||||
$selectUserIDUp = '';
|
||||
$selectUserIDDown = '';
|
||||
$selectFullnameUp = '';
|
||||
$selectFullnameDown = '';
|
||||
$selectLastConnectUp = '';
|
||||
$selectLastConnectDown = '';
|
||||
$selected = true;
|
||||
$selectUserIDUp = false;
|
||||
$selectUserIDDown = false;
|
||||
$selectFullnameUp = false;
|
||||
$selectFullnameDown = false;
|
||||
$selectLastConnectUp = false;
|
||||
$selectLastConnectDown = false;
|
||||
$order = null;
|
||||
|
||||
switch ($sortField) {
|
||||
|
@ -110,11 +110,11 @@ switch ($sortField) {
|
|||
|
||||
default:
|
||||
$selectUserIDUp = $selected;
|
||||
$selectUserIDDown = '';
|
||||
$selectFullnameUp = '';
|
||||
$selectFullnameDown = '';
|
||||
$selectLastConnectUp = '';
|
||||
$selectLastConnectDown = '';
|
||||
$selectUserIDDown = false;
|
||||
$selectFullnameUp = false;
|
||||
$selectFullnameDown = false;
|
||||
$selectLastConnectUp = false;
|
||||
$selectLastConnectDown = false;
|
||||
$order = [
|
||||
'field' => 'id_user',
|
||||
'order' => 'ASC',
|
||||
|
@ -300,11 +300,20 @@ if (defined('METACONSOLE')) {
|
|||
ui_toggle($form_filter, __('Users control filter'), __('Toggle filter(s)'), !$search);
|
||||
}
|
||||
|
||||
// Urls to sort the table.
|
||||
$url_up_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=up&pure='.$pure;
|
||||
$url_down_id = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=down&pure='.$pure;
|
||||
$url_up_name = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=up&pure='.$pure;
|
||||
$url_down_name = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=down&pure='.$pure;
|
||||
$url_up_last = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=up&pure='.$pure;
|
||||
$url_down_last = '?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=down&pure='.$pure;
|
||||
|
||||
|
||||
$table = new stdClass();
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
|
@ -312,9 +321,10 @@ $table->align = [];
|
|||
$table->size = [];
|
||||
$table->valign = [];
|
||||
|
||||
$table->head[0] = __('User ID').' '.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectUserIDUp]).'</a>'.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=id_user&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectUserIDDown]).'</a>';
|
||||
$table->head[1] = __('Name').' '.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectFullnameUp ]).'</a>'.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=fullname&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectFullnameDown]).'</a>';
|
||||
$table->head[2] = __('Last contact').' '.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=up&pure='.$pure.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectLastConnectUp ]).'</a>'.'<a href="?sec='.$sec.'&sec2=godmode/users/user_list&sort_field=last_connect&sort=down&pure='.$pure.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectLastConnectDown]).'</a>';
|
||||
$table->head[0] = __('User ID').ui_get_sorting_arrows($url_up_id, $url_down_id, $selectUserIDUp, $selectUserIDDown);
|
||||
$table->head[1] = __('Name').ui_get_sorting_arrows($url_up_name, $url_down_name, $selectFullnameUp, $selectFullnameDown);
|
||||
$table->head[2] = __('Last contact').ui_get_sorting_arrows($url_up_last, $url_down_last, $selectLastConnectUp, $selectLastConnectDown);
|
||||
|
||||
$table->head[3] = __('Admin');
|
||||
$table->head[4] = __('Profile / Group');
|
||||
$table->head[5] = __('Description');
|
||||
|
@ -514,6 +524,7 @@ foreach ($info as $user_id => $user_info) {
|
|||
|
||||
$data[5] = ui_print_string_substr($user_info['comments'], 24, true);
|
||||
|
||||
$table->cellclass[][6] = 'action_buttons';
|
||||
if ($user_info['disabled'] == 0) {
|
||||
$data[6] = '<a href="index.php?sec='.$sec.'&sec2=godmode/users/user_list&disable_user=1&pure='.$pure.'&id='.$user_info['id_user'].'">'.html_print_image('images/lightbulb.png', true, ['title' => __('Disable')]).'</a>';
|
||||
} else {
|
||||
|
@ -535,6 +546,7 @@ foreach ($info as $user_id => $user_info) {
|
|||
}
|
||||
|
||||
html_print_table($table);
|
||||
ui_pagination(count($info), false, 0, 0, false, 'offset', true, 'pagination-bottom');
|
||||
|
||||
echo '<div style="width: '.$table->width.'" class="action-buttons">';
|
||||
unset($table);
|
||||
|
|
|
@ -96,8 +96,20 @@ class DiscoveryTaskList extends Wizard
|
|||
]
|
||||
);
|
||||
|
||||
// Header
|
||||
ui_print_page_header(__('Task list'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
// Header.
|
||||
ui_print_page_header(
|
||||
__('Task list'),
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
$this->printHeader(true)
|
||||
);
|
||||
|
||||
// Show redirected messages from discovery.php.
|
||||
if ($status === 0) {
|
||||
|
@ -352,10 +364,10 @@ class DiscoveryTaskList extends Wizard
|
|||
$url_ajax = $config['homeurl'].'ajax.php';
|
||||
|
||||
$table = new StdClass();
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox data';
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
$table->align = [];
|
||||
|
@ -404,15 +416,30 @@ class DiscoveryTaskList extends Wizard
|
|||
// Exceptions: IPAM.
|
||||
$ipam = false;
|
||||
if ($task['id_recon_script'] != null) {
|
||||
$recon_script_name = db_get_value('name', 'trecon_script', 'id_recon_script', $task['id_recon_script']);
|
||||
if (io_safe_output($recon_script_name) == 'IPAM Recon'
|
||||
&& enterprise_installed()
|
||||
) {
|
||||
$subnet_obj = json_decode($task['macros'], true);
|
||||
$subnet = $subnet_obj['1']['value'];
|
||||
$tipam_task_id = db_get_value('id', 'tipam_network', 'id_recon_task', $task['id_rt']);
|
||||
$ipam = true;
|
||||
$recon_script_data = db_get_row(
|
||||
'trecon_script',
|
||||
'id_recon_script',
|
||||
$task['id_recon_script']
|
||||
);
|
||||
if ($recon_script_data !== false) {
|
||||
$recon_script_name = $recon_script_data['name'];
|
||||
if (io_safe_output($recon_script_name) == 'IPAM Recon'
|
||||
&& enterprise_installed()
|
||||
) {
|
||||
$subnet_obj = json_decode($task['macros'], true);
|
||||
$subnet = $subnet_obj['1']['value'];
|
||||
$tipam_task_id = db_get_value(
|
||||
'id',
|
||||
'tipam_network',
|
||||
'id_recon_task',
|
||||
$task['id_rt']
|
||||
);
|
||||
$ipam = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$recon_script_data = false;
|
||||
$recon_script_name = false;
|
||||
}
|
||||
|
||||
if ($task['disabled'] == 0 && $server_name !== '') {
|
||||
|
@ -464,15 +491,56 @@ class DiscoveryTaskList extends Wizard
|
|||
}
|
||||
|
||||
if ($task['id_recon_script'] == 0) {
|
||||
// Discovery NetScan.
|
||||
$data[6] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery NetScan')]
|
||||
).' ';
|
||||
$data[6] .= network_profiles_get_name(
|
||||
$task['id_network_profile']
|
||||
);
|
||||
// Internal discovery task.
|
||||
switch ($task['type']) {
|
||||
case DISCOVERY_CLOUD_AWS_RDS:
|
||||
// Discovery Applications MySQL.
|
||||
$data[6] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery Cloud RDS')]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.Cloud.Aws.RDS');
|
||||
break;
|
||||
|
||||
case DISCOVERY_APP_MYSQL:
|
||||
// Discovery Applications MySQL.
|
||||
$data[6] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery Applications MySQL')]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.MySQL');
|
||||
break;
|
||||
|
||||
case DISCOVERY_APP_ORACLE:
|
||||
// Discovery Applications Oracle.
|
||||
$data[6] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery Applications Oracle')]
|
||||
).' ';
|
||||
$data[6] .= __('Discovery.App.Oracle');
|
||||
break;
|
||||
|
||||
case DISCOVERY_HOSTDEVICES:
|
||||
default:
|
||||
// Discovery NetScan.
|
||||
$data[6] = html_print_image(
|
||||
'images/network.png',
|
||||
true,
|
||||
['title' => __('Discovery NetScan')]
|
||||
).' ';
|
||||
$str = network_profiles_get_name(
|
||||
$task['id_network_profile']
|
||||
);
|
||||
if (!empty($str)) {
|
||||
$data[6] .= $str;
|
||||
} else {
|
||||
$data[6] .= __('Discovery.NetScan');
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// APP recon task.
|
||||
$data[6] = html_print_image(
|
||||
|
@ -512,7 +580,11 @@ class DiscoveryTaskList extends Wizard
|
|||
$data[9] .= '</a>';
|
||||
}
|
||||
|
||||
if ($task['disabled'] != 2 && $task['utimestamp'] > 0) {
|
||||
if ($task['disabled'] != 2 && $task['utimestamp'] > 0
|
||||
&& $task['type'] != DISCOVERY_APP_MYSQL
|
||||
&& $task['type'] != DISCOVERY_APP_ORACLE
|
||||
&& $task['type'] != DISCOVERY_CLOUD_AWS_RDS
|
||||
) {
|
||||
$data[9] .= '<a href="#" onclick="show_map('.$task['id_rt'].',\''.$task['name'].'\')">';
|
||||
$data[9] .= html_print_image(
|
||||
'images/dynamic_network_icon.png',
|
||||
|
@ -548,7 +620,7 @@ class DiscoveryTaskList extends Wizard
|
|||
$data[9] .= '<a href="'.ui_get_full_url(
|
||||
sprintf(
|
||||
'index.php?sec=gservers&sec2=godmode/servers/discovery&%s&task=%d',
|
||||
$this->getTargetWiz($task),
|
||||
$this->getTargetWiz($task, $recon_script_data),
|
||||
$task['id_rt']
|
||||
)
|
||||
).'">'.html_print_image(
|
||||
|
@ -566,6 +638,8 @@ class DiscoveryTaskList extends Wizard
|
|||
$data[9] = '';
|
||||
}
|
||||
|
||||
$table->cellclass[][9] = 'action_buttons';
|
||||
|
||||
// Div neccesary for modal progress task.
|
||||
echo '<div id="progress_task_'.$task['id_rt'].'" style="display:none"></div>';
|
||||
|
||||
|
@ -606,28 +680,49 @@ class DiscoveryTaskList extends Wizard
|
|||
/**
|
||||
* Return target url sub-string to edit target task.
|
||||
*
|
||||
* @param array $task With all data.
|
||||
* @param array $task With all data.
|
||||
* @param array $script With all script data or false if undefined.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTargetWiz($task)
|
||||
public function getTargetWiz($task, $script=false)
|
||||
{
|
||||
// TODO: Do not use description. Use recon_script ID instead.
|
||||
switch ($task['description']) {
|
||||
case 'Discovery.Application.VMware':
|
||||
return 'wiz=app&mode=vmware&page=0';
|
||||
if ($script !== false) {
|
||||
switch ($script['type']) {
|
||||
case DISCOVERY_SCRIPT_CLOUD_AWS:
|
||||
return 'wiz=cloud&mode=amazonws&page=1';
|
||||
|
||||
case CLOUDWIZARD_AWS_DESCRIPTION:
|
||||
case DISCOVERY_SCRIPT_APP_VMWARE:
|
||||
return 'wiz=app&mode=vmware&page=0';
|
||||
|
||||
case DISCOVERY_SCRIPT_IPAM_RECON:
|
||||
return '';
|
||||
|
||||
case DISCOVERY_SCRIPT_IPMI_RECON:
|
||||
default:
|
||||
return 'wiz=hd&mode=customnetscan';
|
||||
}
|
||||
}
|
||||
|
||||
switch ($task['type']) {
|
||||
case DISCOVERY_APP_MYSQL:
|
||||
return 'wiz=app&mode=mysql&page=0';
|
||||
|
||||
case DISCOVERY_APP_ORACLE:
|
||||
return 'wiz=app&mode=oracle&page=0';
|
||||
|
||||
case DISCOVERY_CLOUD_AWS:
|
||||
case DISCOVERY_CLOUD_AWS_EC2:
|
||||
return 'wiz=cloud&mode=amazonws&page=1';
|
||||
|
||||
case 'console_task':
|
||||
return 'wiz=ctask';
|
||||
case DISCOVERY_CLOUD_AWS_RDS:
|
||||
return 'wiz=cloud&mode=amazonws&sub=rds&page=0';
|
||||
|
||||
default:
|
||||
if ($task['id_recon_script'] === null) {
|
||||
return 'wiz=hd&mode=netscan';
|
||||
if ($task['description'] == 'console_task') {
|
||||
return 'wiz=ctask';
|
||||
} else {
|
||||
return 'wiz=hd&mode=customnetscan';
|
||||
return 'wiz=hd&mode=netscan';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -149,7 +149,8 @@ class HostDevices extends Wizard
|
|||
),
|
||||
'label' => __('Discovery'),
|
||||
],
|
||||
]
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
ui_print_page_header(__('Host & devices'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
|
@ -533,7 +534,19 @@ class HostDevices extends Wizard
|
|||
if ($this->page < $this->maxPagesNetScan) {
|
||||
// Avoid to print header out of wizard.
|
||||
$this->prepareBreadcrum($breadcrum);
|
||||
ui_print_page_header(__('NetScan'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true));
|
||||
ui_print_page_header(
|
||||
__('NetScan'),
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
false,
|
||||
'',
|
||||
GENERIC_SIZE_TEXT,
|
||||
'',
|
||||
$this->printHeader(true)
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($this->page) === true
|
||||
|
@ -581,113 +594,83 @@ class HostDevices extends Wizard
|
|||
if (isset($this->page) === false
|
||||
|| $this->page == 0
|
||||
) {
|
||||
$form = [];
|
||||
|
||||
// Input task name.
|
||||
$form['inputs'][] = [
|
||||
'label' => '<b>'.__('Task name').'</b>',
|
||||
'arguments' => [
|
||||
// Comment input
|
||||
$comment_input ='<div class="label_select"><label>'.__('Comment').':</label></div>';
|
||||
|
||||
$comment_input .= $this->printInput([
|
||||
'name' => 'comment',
|
||||
'rows' => 1,
|
||||
'columns' => 1,
|
||||
'value' => $this->task['description'],
|
||||
'type' => 'textarea',
|
||||
'size' => 25,
|
||||
'class' => 'discovery_textarea_input',
|
||||
'return' => true
|
||||
]);
|
||||
|
||||
// Task input
|
||||
$taskname_input_label = '<div class="label_select"><label>'.__('Task name').':</label></div>';
|
||||
|
||||
$taskname_input = $this->printInput([
|
||||
'name' => 'taskname',
|
||||
'value' => $this->task['name'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
],
|
||||
];
|
||||
'class' => 'discovery_full_width_input'
|
||||
]);
|
||||
|
||||
if (isset($this->task['id_rt']) === true) {
|
||||
// Propagate id.
|
||||
$form['inputs'][] = [
|
||||
'arguments' => [
|
||||
'name' => 'task',
|
||||
'value' => $this->task['id_rt'],
|
||||
'type' => 'hidden',
|
||||
],
|
||||
];
|
||||
}
|
||||
// Network input
|
||||
$network_input_label .= '<div class="label_select discovery_label_hint"><label>'.__('Network').':</label>'.ui_print_help_tip(__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), true).'</div>';
|
||||
|
||||
// Input task name.
|
||||
$form['inputs'][] = [
|
||||
'label' => '<b>'.__('Comment').'</b>',
|
||||
'arguments' => [
|
||||
'name' => 'comment',
|
||||
'value' => $this->task['description'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
],
|
||||
];
|
||||
|
||||
// Input Discovery Server.
|
||||
$form['inputs'][] = [
|
||||
'label' => '<b>'.__('Discovery server').'</b>'.ui_print_help_tip(
|
||||
__('You must select a Discovery Server to run the Task, otherwise the Recon Task will never run'),
|
||||
true
|
||||
),
|
||||
'arguments' => [
|
||||
'type' => 'select_from_sql',
|
||||
'sql' => sprintf(
|
||||
'SELECT id_server, name
|
||||
FROM tserver
|
||||
WHERE server_type = %d
|
||||
ORDER BY name',
|
||||
SERVER_TYPE_DISCOVERY
|
||||
),
|
||||
'name' => 'id_recon_server',
|
||||
'selected' => $this->task['id_recon_server'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
// Input Network.
|
||||
$form['inputs'][] = [
|
||||
|
||||
'label' => '<b>'.__('Network').'</b>'.ui_print_help_tip(
|
||||
__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'),
|
||||
true
|
||||
),
|
||||
'arguments' => [
|
||||
$network_input = $this->printInput([
|
||||
'name' => 'network',
|
||||
'value' => $this->task['subnet'],
|
||||
'type' => 'text',
|
||||
'size' => 25,
|
||||
],
|
||||
];
|
||||
'class' => 'discovery_full_width_input',
|
||||
]);
|
||||
|
||||
// Input Group.
|
||||
$form['inputs'][] = [
|
||||
'label' => '<b>'.__('Group').'</b>',
|
||||
'arguments' => [
|
||||
'name' => 'id_group',
|
||||
'returnAllGroup' => false,
|
||||
'privilege' => 'PM',
|
||||
'type' => 'select_groups',
|
||||
'selected' => $this->task['id_group'],
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
// Interval and schedules.
|
||||
// Discovery server input
|
||||
$discovery_server_select_label = '<div class="label_select discovery_label_hint"><label>'.__('Discovery server').':</label>'.ui_print_help_tip(__('You must select a Discovery Server to run the Task, otherwise the Recon Task will never run'), true).'</div>';
|
||||
|
||||
$discovery_server_select = $this->printInput([
|
||||
'type' => 'select_from_sql',
|
||||
'sql' => sprintf(
|
||||
'SELECT id_server, name
|
||||
FROM tserver
|
||||
WHERE server_type = %d
|
||||
ORDER BY name',
|
||||
SERVER_TYPE_DISCOVERY
|
||||
),
|
||||
'name' => 'id_recon_server',
|
||||
'selected' => $this->task['id_recon_server'],
|
||||
'return' => true,
|
||||
'style' => 'width: 100%',
|
||||
]);
|
||||
|
||||
// Interval input
|
||||
$interv_manual = 0;
|
||||
if ((int) $this->task['interval_sweep'] == 0) {
|
||||
$interv_manual = 1;
|
||||
}
|
||||
|
||||
// Schedule.
|
||||
$form['inputs'][] = [
|
||||
'label' => '<b>'.__('Interval').'</b>'.ui_print_help_tip(
|
||||
__('Manual interval means that it will be executed only On-demand'),
|
||||
true
|
||||
),
|
||||
'arguments' => [
|
||||
'type' => 'select',
|
||||
'selected' => $interv_manual,
|
||||
'fields' => [
|
||||
0 => __('Defined'),
|
||||
1 => __('Manual'),
|
||||
],
|
||||
'name' => 'interval_manual_defined',
|
||||
'return' => true,
|
||||
$interval_input_label = '<div class="label_select discovery_label_hint" style="padding-top: 6px;"><label>'.__('Interval').':</label>'.ui_print_help_tip(__('Manual interval means that it will run only on demand.'), true).'</div>';
|
||||
|
||||
$interval_input = $this->printInput([
|
||||
'type' => 'select',
|
||||
'selected' => $interv_manual,
|
||||
'fields' => [
|
||||
0 => __('Defined'),
|
||||
1 => __('Manual'),
|
||||
],
|
||||
'extra' => '<span id="interval_manual_container">'.html_print_extended_select_for_time(
|
||||
'name' => 'interval_manual_defined',
|
||||
'return' => true,
|
||||
'style' => 'float: right;'
|
||||
]);
|
||||
|
||||
$interval_input_extra = '<span id="interval_manual_container">'.html_print_extended_select_for_time(
|
||||
'interval',
|
||||
$this->task['interval_sweep'],
|
||||
'',
|
||||
|
@ -700,36 +683,38 @@ class HostDevices extends Wizard
|
|||
).ui_print_help_tip(
|
||||
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
||||
true
|
||||
).'</span>',
|
||||
];
|
||||
).'</span>';
|
||||
|
||||
$str = __('Next');
|
||||
|
||||
if (isset($this->task['id_rt']) === true) {
|
||||
$str = __('Update and continue');
|
||||
// Group select
|
||||
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
|
||||
|
||||
$group_select .= $this->printInput([
|
||||
'name' => 'id_group',
|
||||
'returnAllGroup' => false,
|
||||
'privilege' => 'PM',
|
||||
'type' => 'select_groups',
|
||||
'selected' => $this->task['id_group'],
|
||||
'return' => true,
|
||||
'class' => 'discovery_list_input',
|
||||
'size' => 9,
|
||||
'simple_multiple_options' => true,
|
||||
]);
|
||||
|
||||
if (isset($this->task['id_rt']) === true) {
|
||||
//Propagate ID
|
||||
$task_hidden = $this->printInput([
|
||||
'name' => 'task',
|
||||
'value' => $this->task['id_rt'],
|
||||
'type' => 'hidden'
|
||||
]);
|
||||
}
|
||||
|
||||
// Submit button.
|
||||
$form['inputs'][] = [
|
||||
'arguments' => [
|
||||
'name' => 'submit',
|
||||
'label' => $str,
|
||||
'type' => 'submit',
|
||||
'attributes' => 'class="sub next"',
|
||||
'return' => true,
|
||||
],
|
||||
];
|
||||
|
||||
$task_url = '';
|
||||
if (isset($this->task['id_rt'])) {
|
||||
$task_url = '&task='.$this->task['id_rt'];
|
||||
}
|
||||
|
||||
$form['form'] = [
|
||||
'method' => 'POST',
|
||||
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).$task_url,
|
||||
];
|
||||
|
||||
// Default.
|
||||
$interval = 600;
|
||||
$unit = 60;
|
||||
|
@ -738,24 +723,62 @@ class HostDevices extends Wizard
|
|||
$unit = $this->getTimeUnit($interval);
|
||||
}
|
||||
|
||||
$form['js'] = '
|
||||
$("select#interval_manual_defined").change(function() {
|
||||
if ($("#interval_manual_defined").val() == 1) {
|
||||
$("#interval_manual_container").hide();
|
||||
$("#text-interval_text").val(0);
|
||||
$("#hidden-interval").val(0);
|
||||
}
|
||||
else {
|
||||
$("#interval_manual_container").show();
|
||||
$("#text-interval_text").val(10);
|
||||
$("#hidden-interval").val('.$interval.');
|
||||
$("#interval_units").val('.$unit.');
|
||||
}
|
||||
}).change();';
|
||||
|
||||
// XXX: Could be improved validating inputs before continue (JS)
|
||||
// Print NetScan page 0.
|
||||
$this->printForm($form);
|
||||
//$this->printForm($form);
|
||||
|
||||
echo '<form action="'.$this->url.'&mode=netscan&page='.($this->page + 1).$task_url.'" method="POST">';
|
||||
echo $task_hidden;
|
||||
|
||||
echo '<div class="white_box">
|
||||
<div class="edit_discovery_info" style="margin-bottom: 15px;">
|
||||
<div style="width: 25%; padding: 9px;">'
|
||||
.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image ("images/wizard/netscan_green.png", true, array ("title" => __('Close'), "style" => 'width: 60%;'), false).'</div>'
|
||||
.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'
|
||||
.'</div>
|
||||
|
||||
<div style="width: 40%; padding-left: 5%; padding-right: 12%;">
|
||||
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'
|
||||
.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'
|
||||
.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'
|
||||
.'</div>'
|
||||
.'<div style="width: 35%;">'.$group_select.'</div>'
|
||||
.'</div>'
|
||||
|
||||
.'<div class="edit_discovery_info">
|
||||
<div style="width: 100%;">
|
||||
'.$comment_input.'
|
||||
</div>
|
||||
</div>'
|
||||
.'</div>';
|
||||
|
||||
$str = __('Next');
|
||||
|
||||
if (isset($this->task['id_rt']) === true) {
|
||||
$str = __('Update and continue');
|
||||
}
|
||||
|
||||
echo '<div class="action-buttons" style="width: 100%; margin-top: 10px;">'.html_print_submit_button($str, 'submit', false, 'class="sub next"', true).'</div>';
|
||||
echo '</form>';
|
||||
|
||||
echo '<script>
|
||||
|
||||
$("select#interval_manual_defined").change(function() {
|
||||
if ($("#interval_manual_defined").val() == 1) {
|
||||
$("#interval_manual_container").hide();
|
||||
$("#text-interval_text").val(0);
|
||||
$("#hidden-interval").val(0);
|
||||
}
|
||||
else {
|
||||
$("#interval_manual_container").show();
|
||||
$("#text-interval_text").val(10);
|
||||
$("#hidden-interval").val('.$interval.');
|
||||
$("#interval_units").val('.$unit.');
|
||||
}
|
||||
}).change();
|
||||
|
||||
</script>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -783,7 +806,7 @@ $("select#interval_manual_defined").change(function() {
|
|||
];
|
||||
|
||||
$form['inputs'][] = [
|
||||
'extra' => '<p>Please, configure task <b>'.io_safe_output($this->task['name']).'</b></p>',
|
||||
'extra' => '<p><h3>Please, configure task <b>'.io_safe_output($this->task['name']).'</b></h3></p>',
|
||||
];
|
||||
|
||||
// Input: Module template.
|
||||
|
@ -799,7 +822,6 @@ $("select#interval_manual_defined").change(function() {
|
|||
'selected' => $this->task['id_network_profile'],
|
||||
'nothing_value' => 0,
|
||||
'nothing' => __('None'),
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -850,7 +872,7 @@ $("select#interval_manual_defined").change(function() {
|
|||
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).'&task='.$this->task['id_rt'],
|
||||
];
|
||||
|
||||
$this->printForm($form);
|
||||
$this->printForm($form, false, true);
|
||||
}
|
||||
|
||||
if ($this->page == 2) {
|
||||
|
|
|
@ -191,21 +191,19 @@ class Wizard
|
|||
* Builder for breadcrum
|
||||
*
|
||||
* @param array $urls Array of urls to be stored in breadcrum.
|
||||
* @param boolean $add True if breadcrum should be added instead of
|
||||
* overwrite it.
|
||||
* @param boolean $add True if breadcrum should be added
|
||||
* instead of overwrite it.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function prepareBreadcrum(array $urls, bool $add=false, bool $separator_beginning=false)
|
||||
{
|
||||
public function prepareBreadcrum(
|
||||
array $urls,
|
||||
bool $add=false
|
||||
) {
|
||||
$bc = [];
|
||||
$i = 0;
|
||||
$count = 0;
|
||||
$array_size = count($urls);
|
||||
|
||||
foreach ($urls as $url) {
|
||||
$count++;
|
||||
|
||||
if ($url['selected'] == 1) {
|
||||
$class = 'selected';
|
||||
} else {
|
||||
|
@ -213,20 +211,10 @@ class Wizard
|
|||
}
|
||||
|
||||
$bc[$i] = '';
|
||||
|
||||
if ($separator_beginning === true) {
|
||||
$bc[$i] .= '<span class="breadcrumb_link"> / </span>';
|
||||
}
|
||||
|
||||
$bc[$i] .= '<span><a class="breadcrumb_link '.$class.'" href="'.$url['link'].'">';
|
||||
$bc[$i] .= $url['label'];
|
||||
$bc[$i] .= '</a>';
|
||||
if ($count < $array_size) {
|
||||
$bc[$i] .= '<span class="breadcrumb_link"> / </span>';
|
||||
}
|
||||
|
||||
$bc[$i] .= '<span><a class="breadcrumb_link '.$class.'" href="'.$url['link'].'">';
|
||||
$bc[$i] .= $url['label'];
|
||||
$bc[$i] .= '</a>';
|
||||
$bc[$i] .= '</span>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
@ -235,7 +223,6 @@ class Wizard
|
|||
} else {
|
||||
$this->setBreadcrum($bc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -275,7 +262,10 @@ class Wizard
|
|||
*/
|
||||
public function printBreadcrum()
|
||||
{
|
||||
return implode('', $this->breadcrum);
|
||||
return implode(
|
||||
'<span class="breadcrumb_link"> / </span>',
|
||||
$this->breadcrum
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -483,7 +473,9 @@ class Wizard
|
|||
((isset($data['keys_field']) === true) ? $data['keys_field'] : 'id_grupo'),
|
||||
((isset($data['strict_user']) === true) ? $data['strict_user'] : false),
|
||||
((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false),
|
||||
((isset($data['include_groups']) === true) ? $data['include_groups'] : false)
|
||||
((isset($data['include_groups']) === true) ? $data['include_groups'] : false),
|
||||
((isset($data['size']) === true) ? $data['size'] : false),
|
||||
((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false)
|
||||
);
|
||||
|
||||
case 'submit':
|
||||
|
@ -640,7 +632,7 @@ class Wizard
|
|||
*
|
||||
* @return string HTML code.
|
||||
*/
|
||||
public function printForm(array $data, bool $return=false)
|
||||
public function printForm(array $data, bool $return=false, bool $print_white_box=false)
|
||||
{
|
||||
$form = $data['form'];
|
||||
$inputs = $data['inputs'];
|
||||
|
@ -666,13 +658,27 @@ class Wizard
|
|||
error_log('Error executing wizard callback: ', $e->getMessage());
|
||||
}
|
||||
|
||||
$output = '<ul class="wizard">';
|
||||
$output_submit = '';
|
||||
$output = '';
|
||||
|
||||
if ($print_white_box === true)
|
||||
$output .= '<div class="white_box">';
|
||||
|
||||
$output .= '<ul class="wizard">';
|
||||
|
||||
foreach ($inputs as $input) {
|
||||
$output .= $this->printBlock($input, true);
|
||||
if ($input['arguments']['type']!='submit')
|
||||
$output .= $this->printBlock($input, true);
|
||||
else
|
||||
$output_submit .= $this->printBlock($input, true);
|
||||
}
|
||||
|
||||
$output .= '</ul>';
|
||||
|
||||
if ($print_white_box === true)
|
||||
$output .= '</div>';
|
||||
|
||||
$output .= '<ul class="wizard">'.$output_submit.'</ul>';
|
||||
$output .= '</form>';
|
||||
$output .= '<script>'.$js.'</script>';
|
||||
|
||||
|
|
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 396 B |
After Width: | Height: | Size: 15 KiB |
|
@ -527,19 +527,19 @@ if (check_login()) {
|
|||
$show_notinit = (int) get_parameter('show_notinit', 0);
|
||||
$cluster_list = (int) get_parameter('cluster_list', 0);
|
||||
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agent;
|
||||
$selectTypeUp = '';
|
||||
$selectTypeDown = '';
|
||||
$selectNameUp = '';
|
||||
$selectNameDown = '';
|
||||
$selectStatusUp = '';
|
||||
$selectStatusDown = '';
|
||||
$selectDataUp = '';
|
||||
$selectDataDown = '';
|
||||
$selectLastContactUp = '';
|
||||
$selectLastContactDown = '';
|
||||
$selectTypeUp = false;
|
||||
$selectTypeDown = false;
|
||||
$selectNameUp = false;
|
||||
$selectNameDown = false;
|
||||
$selectStatusUp = false;
|
||||
$selectStatusDown = false;
|
||||
$selectDataUp = false;
|
||||
$selectDataDown = false;
|
||||
$selectLastContactUp = false;
|
||||
$selectLastContactDown = false;
|
||||
$sortField = get_parameter('sort_field');
|
||||
$sort = get_parameter('sort', 'none');
|
||||
$selected = 'border: 1px solid black;';
|
||||
$selected = true;
|
||||
|
||||
$order[] = [
|
||||
'field' => 'tmodule_group.name',
|
||||
|
@ -627,16 +627,16 @@ if (check_login()) {
|
|||
break;
|
||||
|
||||
default:
|
||||
$selectTypeUp = '';
|
||||
$selectTypeDown = '';
|
||||
$selectTypeUp = false;
|
||||
$selectTypeDown = false;
|
||||
$selectNameUp = $selected;
|
||||
$selectNameDown = '';
|
||||
$selectStatusUp = '';
|
||||
$selectStatusDown = '';
|
||||
$selectDataUp = '';
|
||||
$selectDataDown = '';
|
||||
$selectLastContactUp = '';
|
||||
$selectLastContactDown = '';
|
||||
$selectNameDown = false;
|
||||
$selectStatusUp = false;
|
||||
$selectStatusDown = false;
|
||||
$selectDataUp = false;
|
||||
$selectDataDown = false;
|
||||
$selectLastContactUp = false;
|
||||
$selectLastContactDown = false;
|
||||
|
||||
$order[] = [
|
||||
'field' => 'tagente_modulo.nombre',
|
||||
|
@ -756,11 +756,22 @@ if (check_login()) {
|
|||
$modules = [];
|
||||
}
|
||||
|
||||
// Urls to sort the table.
|
||||
$url_up_type = $url.'&sort_field=type&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_down_type = $url.'&sort_field=type&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_up_name = $url.'&sort_field=name&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_down_name = $url.'&sort_field=name&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_up_status = $url.'&sort_field=status&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_down_status = $url.'&sort_field=status&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_up_last = $url.'&sort_field=last_contact&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
$url_down_last = $url.'&sort_field=last_contact&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group;
|
||||
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
$table->class = 'databox data';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
$table->class = 'info_table';
|
||||
$table->head = [];
|
||||
$table->data = [];
|
||||
|
||||
|
@ -773,17 +784,15 @@ if (check_login()) {
|
|||
$table->head[1] = "<span title='".__('Policy')."'>".__('P.').'</span>';
|
||||
}
|
||||
|
||||
$table->head[2] = __('Type').' '.'<a href="'.$url.'&sort_field=type&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectTypeUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=type&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectTypeDown, 'alt' => 'down']).'</a>';
|
||||
$table->head[3] = __('Module name').' '.'<a href="'.$url.'&sort_field=name&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=name&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown, 'alt' => 'down']).'</a>';
|
||||
$table->head[2] = __('Type').ui_get_sorting_arrows($url_up_type, $url_down_type, $selectTypeUp, $selectTypeDown);
|
||||
$table->head[3] = __('Module name').ui_get_sorting_arrows($url_up_name, $url_down_name, $selectNameUp, $selectNameDown);
|
||||
$table->head[4] = __('Description');
|
||||
$table->head[5] = __('Status').' '.'<a href="'.$url.'&sort_field=status&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectStatusUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=status&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectStatusDown, 'alt' => 'down']).'</a>';
|
||||
$table->head[5] = __('Status').ui_get_sorting_arrows($url_up_status, $url_down_status, $selectStatusUp, $selectStatusDown);
|
||||
$table->head[6] = __('Thresholds');
|
||||
$table->head[7] = __('Data');
|
||||
$table->head[8] = __('Graph');
|
||||
$table->headstyle[8] = 'min-width: 60px';
|
||||
$table->head[9] = __('Last contact').' '.'<a href="'.$url.'&sort_field=last_contact&sort=up&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp, 'alt' => 'up']).'</a>'.'<a href="'.$url.'&sort_field=last_contact&sort=down&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.' &status_text_monitor='.$status_text_monitor.'&status_module_group= '.$status_module_group.'">'.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown, 'alt' => 'down']).'</a>';
|
||||
|
||||
|
||||
$table->head[9] = __('Last contact').ui_get_sorting_arrows($url_up_last, $url_down_last, $selectLastContactUp, $selectLastContactDown);
|
||||
$table->align = [
|
||||
'left',
|
||||
'left',
|
||||
|
@ -896,7 +905,7 @@ if (check_login()) {
|
|||
$data[2] = servers_show_type($module['id_modulo']).' ';
|
||||
|
||||
if (check_acl($config['id_user'], $id_grupo, 'AW')) {
|
||||
$data[2] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&id_agent_module='.$module['id_agente_modulo'].'&edit_module='.$module['id_modulo'].'">'.html_print_image('images/config.png', true, ['alt' => '0', 'border' => '', 'title' => __('Edit')]).'</a>';
|
||||
$data[2] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&id_agent_module='.$module['id_agente_modulo'].'&edit_module='.$module['id_modulo'].'">'.html_print_image('images/config.png', true, ['alt' => '0', 'border' => '', 'title' => __('Edit'), 'class' => 'action_button_img']).'</a>';
|
||||
}
|
||||
|
||||
|
||||
|
@ -1199,7 +1208,7 @@ if (check_login()) {
|
|||
false,
|
||||
'offset',
|
||||
true,
|
||||
'',
|
||||
'pagination-bottom',
|
||||
'pagination_list_modules(offset_param)',
|
||||
[
|
||||
'count' => '',
|
||||
|
|