Merge branch 'develop' into ent-9624-meter-soporte-a-sflow-en-nuestro-gestor-de-flujos

This commit is contained in:
Daniel Cebrian 2023-03-21 09:38:56 +01:00
commit 9dea38f440
313 changed files with 16278 additions and 9562 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.769-230308
Version: 7.0NG.769-230321
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.769';
use constant AGENT_BUILD => '230308';
use constant AGENT_BUILD => '230321';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@ -3749,6 +3749,7 @@ sub module_plugin ($) {
# Do not save the output if there was an error
if ($? != 0) {
log_message ('error', "plugin execution '". $command ."' exited with error code " . $?);
return ();
}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230308
%define release 230321
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.769
%define release 230308
%define release 230321
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.769"
PI_BUILD="230308"
PI_BUILD="230321"
OS_NAME=`uname -s`
FORCE=0

View File

@ -6,21 +6,22 @@
#
# (c) A. Kevin Rojas <kevin.rojas@pandorafms.com>
#
# Edited in 2023 by Alejandro Sánchez <alejandro.sanchez@pandorafms.com>
#
# TO DO LIST:
# - Enable child services detection (Windows)
# - Make CPU/Memory usage available for child services (Windows)
#
###################################################
try:
from sys import argv
from sys import stderr
from sys import exit
import psutil
from subprocess import Popen
from subprocess import PIPE
from subprocess import DEVNULL
from subprocess import getstatusoutput
import psutil
except ModuleNotFoundError as err:
print("{} error: {}. Exiting...".format(argv[0], err), file=stderr)
exit(1)
@ -28,99 +29,100 @@ except ModuleNotFoundError as err:
module_list = []
VERSION = "1.2"
def win_service(servicelist, option=False, memcpu=False):
#########################################################################################
# Powershell class
#########################################################################################
class PSCheck:
@staticmethod
def check_service(servicename, option=False, memcpu=False):
"""Check services with powershell by parsing their DisplayName. Returns a dict\
list with the name of the service and a boolean with its status.\n
Requires service name (case insensitive)."""
pscall = Popen(["powershell", "Get-Service", "-Name", "'*"+ str(servicename) + "*'",
"|", "Select-Object", "-ExpandProperty", "Name"],
stdout=PIPE, stdin=DEVNULL, stderr=DEVNULL, universal_newlines=True)
result = pscall.communicate()
result = str(result[0]).strip().split("\n")
procname = ''
if result != '':
output = []
for element in result:
if element != '':
# Get process name
procname = PSCheck.get_serviceprocess(element)
# Get process status
parstatus = PSCheck.getstatus(element)
if memcpu and parstatus == 1:
usage = get_memcpu(str(procname), str(element))
output += usage
# Generate module with name and status
parent = service_module(str(element), parstatus)
output += parent
if option:
children = PSCheck.getchildren(element, memcpu)
if isinstance(children, list) and len(children) > 1:
for child in children:
output += child
else:
output += children
else:
next
if output and element and procname:
return ({"name" : element, "process" : procname, "modules": output})
modules_default = []
modules_percentage=[]
## take all services
services=psutil.win_service_iter()
for service in services:
if service.name() in servicelist:
serv=service.as_dict()
if serv['status']=='running':
value=1
else:
return (None)
value=0
@staticmethod
def getchildren(servicename, memcpu=False):
"""Gets Dependent services of a given Windows service"""
pschild = Popen(["powershell", "Get-Service", "-Name '" + str(servicename) +
"' -DS", "|", "Select-Object", "-ExpandProperty", "Name"],
stdout=PIPE, stdin=DEVNULL, stderr=DEVNULL, universal_newlines=True)
children = pschild.communicate()[0].strip()
kids = []
for child in (children.split("\n") if children != "" else []):
status = PSCheck.getstatus(child)
kids += service_module(str(child), status, "Service " + str(servicename) + " - Status")
if status:
if memcpu:
kidsusage = get_memcpu(str(child))
for usage in kidsusage:
kids += usage
## create module for each service
parent = build_module("Service " + str(serv['name']) + " - Status", value,"generic_proc")
modules_default +=parent
# memory and cpu percentage
if memcpu:
## process
srv_pid = service.pid()
process = psutil.Process(srv_pid)
proc_name = process.name()
##cpu
value_cpu=process.cpu_percent(interval=0.5)
parent = build_module("Service " + str(proc_name) + " - CPU usage", value_cpu,"generic_data")
parent[0].update([("unit","%"),("module_parent",str(serv['name']))])
modules_percentage +=parent
##mem
value_mem=process.memory_percent()
parent = build_module("Service " + str(proc_name) + " - Memory usage", value_mem,"generic_data")
parent[0].update([("unit","%"),("module_parent",str(serv['name']))])
modules_percentage +=parent
for module in modules_default:
print_module(module, 1)
if memcpu:
for module in modules_percentage:
print_module(module, 1)
def lnx_service(services_list, memcpu=False):
"""Creates modules for Linux servers"""
modules = []
sysctl = getstatusoutput("command -v systemctl")[0]
servic = getstatusoutput("command -v service")[0]
for srvc in services_list:
status = None
if sysctl == 0:
### Systemd available
syscall = Popen(["systemctl", "show", "-pLoadState", "-pActiveState", srvc], stdout=PIPE,
stdin=DEVNULL, universal_newlines=True)
result = syscall.communicate()
srvstatus = result[0].strip().lower().split("\n")
if srvstatus[0] == "loadstate=not-found":
next
else:
if srvstatus[1] == "activestate=active":
modules += build_module("Service " + srvc + " - Status", 1, "generic_proc")
status = 1
elif srvstatus[1] == "activestate=inactive":
modules += build_module("Service " +srvc+ " - Status", 0, "generic_proc")
status = 0
elif sysctl != 0 and servic == 0:
### Systemd not available, switch to service command
syscall = Popen(["service", srvc, "status"], stdout=PIPE,
stdin=DEVNULL, stderr=DEVNULL, universal_newlines=True)
result = syscall.communicate()[0].lower()
if "is running" in result:
modules += build_module("Service " + srvc + " - Status", 1, "generic_proc")
status = 1
elif "is stopped" in result:
modules += build_module("Service " +srvc+ " - Status", 0, "generic_proc")
status = 0
else:
next
return kids
@staticmethod
def getstatus(servicename):
"""Gets the status of a given Windows service"""
running = Popen(["powershell", "Get-Service", "-Name '" + str(servicename) +
"' |", "Select-Object", "-ExpandProperty", "Status"],
stdout=PIPE, stdin=DEVNULL, stderr=DEVNULL, universal_newlines=True)
status = running.communicate()[0].strip()
return int(status == "Running")
@staticmethod
def get_serviceprocess(servicename):
"""Gets name of the process of the service"""
service = psutil.win_service_get(servicename)
srv_pid = service.pid()
process = psutil.Process(srv_pid)
proc_name = process.name()
return proc_name
else:
print("No systemd or service commands available. Exiting...", file=stderr)
exit()
if status:
module_list.append(srvc)
if memcpu:
modules += get_memcpu(srvc, None)
for m in modules:
print_module(m, 1)
#########################################################################################
# Services creation
#########################################################################################
def service_module(name, value, parent=None):
def build_module(name, value, module_type, parent=None):
#print ("service_module BEGIN "+str(now(0,1)))
module = [{
"name" : "Service "+ name + " - Status",
"type" : "generic_proc",
"name" : name ,
"type" : module_type,
"value" : value,
"module_parent" : parent,
}]
@ -167,74 +169,6 @@ def proc_percentbyname(procname): ############# 03/03/2020
next
#print ("proc_percentbyname END "+str(now(0,1)))
return [sum(memory),sum(cpu)]
def win_service(servicelist, option=False, memcpu=False):
"""Creates modules for Windows servers."""
modules = []
for srvc in servicelist:
if srvc and len(srvc) > 2:
output = PSCheck.check_service(srvc, option, memcpu)
if output is not None and output["modules"]:
modules += PSCheck.check_service(srvc.strip(), option, memcpu)["modules"]
module_list.append(srvc)
#winprocess = output["name"]
#if memcpu == True:
# modules += get_memcpu(winprocess) ## Only available for parent service ATM.
else:
next
else:
next
for module in modules:
print_module(module, 1)
def lnx_service(services_list, memcpu=False):
"""Creates modules for Linux servers"""
modules = []
sysctl = getstatusoutput("command -v systemctl")[0]
servic = getstatusoutput("command -v service")[0]
for srvc in services_list:
status = None
if sysctl == 0:
### Systemd available
syscall = Popen(["systemctl", "show", "-pLoadState", "-pActiveState", srvc], stdout=PIPE,
stdin=DEVNULL, universal_newlines=True)
result = syscall.communicate()
srvstatus = result[0].strip().lower().split("\n")
if srvstatus[0] == "loadstate=not-found":
next
else:
if srvstatus[1] == "activestate=active":
modules += service_module(srvc, 1)
status = 1
elif srvstatus[1] == "activestate=inactive":
modules += service_module(srvc, 0)
status = 0
elif sysctl != 0 and servic == 0:
### Systemd not available, switch to service command
syscall = Popen(["service", srvc, "status"], stdout=PIPE,
stdin=DEVNULL, stderr=DEVNULL, universal_newlines=True)
result = syscall.communicate()[0].lower()
if "is running" in result:
modules += service_module(srvc, 1)
status = 1
elif "is stopped" in result:
modules += service_module(srvc, 0)
status = 0
else:
next
else:
print("No systemd or service commands available. Exiting...", file=stderr)
exit()
if status:
module_list.append(srvc)
if memcpu:
modules += get_memcpu(srvc, None)
for m in modules:
print_module(m, 1)
#########################################################################################
# print_module function
#########################################################################################
@ -356,6 +290,7 @@ def main():
service_list = ["MySQL", "postgresql", "pgsql", "oracle", "MSSQL", "IISADMIN",
"apache", "nginx", "W3svc", "NTDS", "Netlogon", "DNS", "MSExchangeADTopology",
"MSExchangeServiceHost", "MSExchangeSA", "MSExchangeTransport"]
discover(OS, service_list)
elif psutil.LINUX:
OS = "Linux"

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230308}
{230321}
ViewReadme
{Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.769-230308
Version: 7.0NG.769-230321
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -195,140 +195,183 @@ function extension_api_checker()
);
}
ui_print_page_header(
__('API checker'),
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
''
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('API checker'),
],
]
);
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$row = [];
$row[] = __('IP');
$row[] = html_print_input_text('ip', $ip, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('IP'),
html_print_input_text('ip', $ip, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('%s Console URL', get_product_name()),
html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true)
);
$table->data[] = $row;
$row = [];
$row[] = __('%s Console URL', get_product_name());
$row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('API Token').ui_print_help_tip(__('Use API Token instead API Pass, User and Password.'), true),
html_print_input_text('token', $token, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('API Pass'),
html_print_input_password('apipass', $apipass, '', 50, 255, true)
);
$table->data[] = $row;
$row = [];
$row[] = __('API Token').ui_print_help_tip(__('Use API Token instead API Pass, User and Password.'), true);
$row[] = html_print_input_text('token', $token, '', 50, 255, true);
$table->data[] = $row;
$row[] = html_print_label_input_block(
__('User'),
html_print_input_text('user', $user, '', 50, 255, true)
);
$row = [];
$row[] = __('API Pass');
$row[] = html_print_input_password('apipass', $apipass, '', 50, 255, true);
$table->data[] = $row;
$row = [];
$row[] = __('User');
$row[] = html_print_input_text('user', $user, '', 50, 255, true);
$table->data[] = $row;
$row = [];
$row[] = __('Password');
$row[] = html_print_input_password('password', $password, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Password'),
html_print_input_password('password', $password, '', 50, 255, true)
);
$table->data[] = $row;
$table2 = new stdClass();
$table2->width = '100%';
$table2->class = 'databox filters filter-table-adv';
$table2->size[0] = '50%';
$table2->size[1] = '50%';
$table2->data = [];
$row = [];
$row[] = __('Action (get or set)');
$row[] = html_print_input_text('op', $op, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Action (get or set)'),
html_print_input_text('op', $op, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('Operation'),
html_print_input_text('op2', $op2, '', 50, 255, true)
);
$table2->data[] = $row;
$row = [];
$row[] = __('Operation');
$row[] = html_print_input_text('op2', $op2, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('ID'),
html_print_input_text('id', $id, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('ID 2'),
html_print_input_text('id2', $id2, '', 50, 255, true)
);
$table2->data[] = $row;
$row = [];
$row[] = __('ID');
$row[] = html_print_input_text('id', $id, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Return Type'),
html_print_input_text('return_type', $return_type, '', 50, 255, true)
);
$row[] = html_print_label_input_block(
__('Other'),
html_print_input_text('other', $other, '', 50, 255, true)
);
$table2->data[] = $row;
$row = [];
$row[] = __('ID 2');
$row[] = html_print_input_text('id2', $id2, '', 50, 255, true);
$table2->data[] = $row;
$row = [];
$row[] = __('Return Type');
$row[] = html_print_input_text('return_type', $return_type, '', 50, 255, true);
$table2->data[] = $row;
$row = [];
$row[] = __('Other');
$row[] = html_print_input_text('other', $other, '', 50, 255, true);
$table2->data[] = $row;
$row = [];
$row[] = __('Other Mode');
$row[] = html_print_input_text('other_mode', $other_mode, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('Other Mode'),
html_print_input_text('other_mode', $other_mode, '', 50, 255, true)
);
$table2->data[] = $row;
$table3 = new stdClass();
$table3->width = '100%';
$table3->class = 'databox filters filter-table-adv';
$table3->size[0] = '50%';
$table3->size[1] = '50%';
$table3->data = [];
$row = [];
$row[] = __('Raw URL');
$row[] = html_print_input_text('url', $url, '', 50, 2048, true);
$row[] = html_print_label_input_block(
__('Raw URL'),
html_print_input_text('url', $url, '', 50, 2048, true)
);
$table3->data[] = $row;
echo "<form method='post'>";
echo '<fieldset>';
echo "<form method='post' class='max_floating_element_size'>";
echo '<fieldset class="mrgn_btn_10px">';
echo '<legend>'.__('Credentials').'</legend>';
html_print_table($table);
echo '</fieldset>';
echo '<fieldset>';
echo '<fieldset class="mrgn_btn_10px">';
echo '<legend>'.__('Call parameters').' '.ui_print_help_tip(__('Action: get Operation: module_last_value id: 63'), true).'</legend>';
html_print_table($table2);
echo '</fieldset>';
echo "<div class='right'>";
echo '</div>';
echo '<fieldset>';
echo '<fieldset class="mrgn_btn_10px">';
echo '<legend>'.__('Custom URL').'</legend>';
html_print_table($table3);
echo '</fieldset>';
html_print_input_hidden('api_execute', 1);
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Call'),
'submit',
false,
[ 'icon' => 'next' ],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Call'),
'submit',
false,
[ 'icon' => 'next' ],
true
)
);
echo '</form>';
if ($api_execute === true) {
echo '<fieldset>';
echo '<fieldset class="mrgn_0px mrgn_btn_10px pdd_15px" style="max-width: 1122px;">';
echo '<legend>'.__('Result').'</legend>';
echo __('URL').'<br />';
html_print_input_password('url', $return_call_api['url'], '', 150, 255, false, true);
echo "&nbsp;<a id='show_icon' title='".__('Show URL')."' href='javascript: show_url();'>";
html_print_image('images/input_zoom.png');
echo '</a>';
echo html_print_label_input_block(
__('URL'),
html_print_input_password('url', $return_call_api['url'], '', 150, 255, true, true, false, 'mrgn_top_10px'),
['label_class' => 'font-title-font']
);
echo '<br />';
echo __('Result').'<br />';
html_print_textarea('result', 30, 20, $return_call_api['result'], 'readonly="readonly"');
echo html_print_label_input_block(
__('Result'),
html_print_textarea('result', 30, 20, $return_call_api['result'], 'readonly="readonly"', true, 'w100p mrgn_top_10px'),
['label_class' => 'font-title-font']
);
echo '</fieldset>';
}
?>

View File

@ -21,13 +21,23 @@ function extension_db_status()
$db_name = get_parameter('db_name', '');
$db_status_execute = (bool) get_parameter('db_status_execute', false);
ui_print_page_header(
ui_print_standard_header(
__('DB Schema check'),
'images/extensions.png',
false,
'db_status_tab',
true,
''
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Run test'),
],
]
);
if (!is_user_admin($config['id_user'])) {
@ -46,38 +56,86 @@ function extension_db_status()
__('At the moment the checks is for MySQL/MariaDB.')
);
echo "<form method='post'>";
echo "<form method='post' class='max_floating_element_size'>";
echo '<fieldset>';
echo '<legend>'.__('DB settings').'</legend>';
$table = new stdClass();
$table->data = [];
$row = [];
$row[] = __('DB User with privileges');
$row[] = html_print_input_text('db_user', $db_user, '', 50, 255, true);
$row[] = __('DB Password for this user');
$row[] = html_print_input_password('db_password', $db_password, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('DB User with privileges'),
html_print_input_text(
'db_user',
$db_user,
'',
50,
255,
true,
false,
false,
'',
'w100p mrgn_top_10px'
)
);
$row[] = html_print_label_input_block(
__('DB Password for this user'),
html_print_input_password(
'db_password',
$db_password,
'',
50,
255,
true,
false,
false,
'w100p mrgn_top_10px'
)
);
$table->data[] = $row;
$row = [];
$row[] = __('DB Hostname');
$row[] = html_print_input_text('db_host', $db_host, '', 50, 255, true);
$row[] = __('DB Name (temporal for testing)');
$row[] = html_print_input_text('db_name', $db_name, '', 50, 255, true);
$row[] = html_print_label_input_block(
__('DB Hostname'),
html_print_input_text(
'db_host',
$db_host,
'',
50,
255,
true,
false,
false,
'',
'w100p mrgn_top_10px'
)
);
$row[] = html_print_label_input_block(
__('DB Name (temporal for testing)'),
html_print_input_text(
'db_name',
$db_name,
'',
50,
255,
true,
false,
false,
'',
'w100p mrgn_top_10px'
)
);
$table->data[] = $row;
html_print_table($table);
echo '</fieldset>';
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Execute Test'),
'submit',
false,
[ 'icon' => 'cog' ],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Execute Test'),
'submit',
false,
[ 'icon' => 'cog' ],
true
)
);
html_print_input_hidden('db_status_execute', 1);

View File

@ -132,47 +132,37 @@ function dbmgr_extension_main()
echo $warning_message;
}
ui_print_warning_message(
__(
"This is an advanced extension to interface with %s database directly from WEB console
using native SQL sentences. Please note that <b>you can damage</b> your %s installation
if you don't know </b>exactly</b> what are you are doing,
this means that you can severily damage your setup using this extension.
This extension is intended to be used <b>only by experienced users</b>
with a depth knowledge of %s internals.",
get_product_name(),
get_product_name(),
get_product_name()
)
);
echo "<form method='post' action=''>";
$table = new stdClass();
$table->id = 'db_interface';
$table->class = 'databox';
$table->class = 'databox no_border filter-table-adv';
$table->width = '100%';
$table->data = [];
$table->head = [];
$table->colspan = [];
$table->rowstyle = [];
$table->style[0] = 'width: 30%;';
$table->style[1] = 'width: 70%;';
$table->colspan[0][0] = 2;
$table->colspan[1][0] = 2;
$table->rowspan[2][0] = 3;
$table->rowclass[0] = 'notify';
$table->rowclass[3] = 'pdd_5px';
$table->rowclass[3] = 'flex-content-right';
$table->rowclass[4] = 'flex-content-right';
$data[0][0] = __(
"This is an advanced extension to interface with %s database directly from WEB console
using native SQL sentences. Please note that <b>you can damage</b> your %s installation
if you don't know </b>exactly</b> what are you are doing,
this means that you can severily damage your setup using this extension.
This extension is intended to be used <b>only by experienced users</b>
with a depth knowledge of %s internals.",
get_product_name(),
get_product_name(),
get_product_name()
);
$data[1][0] = "Some samples of usage: <blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>";
$data[2][0] = html_print_textarea(
'sql',
5,
50,
html_entity_decode($sql, ENT_QUOTES),
'',
true
$data[0][0] = "<b>Some samples of usage:</b> <blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>";
$data[0][0] = html_print_label_input_block(
__('Some samples of usage:'),
"<blockquote><em>SHOW STATUS;<br />DESCRIBE tagente<br />SELECT * FROM tserver<br />UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'</em></blockquote>"
);
if (is_metaconsole() === true) {
@ -191,35 +181,57 @@ function dbmgr_extension_main()
$servers = [];
}
$data[3][2] = html_print_input(
[
'name' => 'node_id',
'type' => 'select',
'fields' => $servers,
'selected' => $node_id,
'nothing' => __('This metaconsole'),
'nothing_value' => -1,
'return' => true,
'label' => _('Select query target'),
]
$data[0][1] = html_print_label_input_block(
__('Select query target'),
html_print_select(
$servers,
'node_id',
$node_id,
'',
__('This metaconsole'),
-1,
true,
false,
false,
'w40p',
false,
'width: 40%;'
)
);
}
$data[4][2] = html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Execute SQL'),
'',
false,
[ 'icon' => 'cog' ],
true
),
]
$data[1][0] = html_print_textarea(
'sql',
3,
50,
html_entity_decode($sql, ENT_QUOTES),
'placeholder="'.__('Type your query here...').'"',
true,
'w100p'
);
$execute_button = html_print_submit_button(
__('Execute SQL'),
'',
false,
[ 'icon' => 'cog' ],
true
);
$table->data = $data;
html_print_table($table);
// html_print_table($table);
html_print_action_buttons($execute_button);
ui_toggle(
html_print_table($table, true),
'<span class="subsection_header_title">'.__('SQL query').'</span>',
__('SQL query'),
'query',
false,
false,
'',
'white-box-content no_border',
'box-flat white_table_graph fixed_filter_bar'
);
echo '</form>';
// Processing SQL Code.
@ -227,10 +239,6 @@ function dbmgr_extension_main()
return;
}
echo '<br />';
echo '<hr />';
echo '<br />';
try {
if (\is_metaconsole() === true && $node_id !== -1) {
$node = new Node($node_id);

View File

@ -24,7 +24,6 @@ table.dbmanager th {
}
textarea {
min-height: 50px;
height: 50px;
width: 95%;
width: 100% !important;
max-width: 100% !important;
}

View File

@ -25,13 +25,28 @@ function extension_uploader_extensions()
return;
}
ui_print_page_header(
__('Uploader extension'),
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
''
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Uploader extension'),
],
]
);
$upload = (bool) get_parameter('upload', 0);
@ -77,20 +92,52 @@ function extension_uploader_extensions()
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '20%';
$table->size[1] = '20%';
$table->size[2] = '60%';
$table->data = [];
$table->data[0][0] = __('Upload extension');
$table->data[0][1] = html_print_input_file('extension', true).ui_print_help_tip(__('Upload the extension as a zip file.'), true);
$table->data[0][0] = html_print_label_input_block(
__('Upload extension').ui_print_help_tip(__('Upload the extension as a zip file.'), true),
html_print_input_file(
'extension',
true,
[
'required' => true,
'accept' => '.zip',
]
)
);
if (enterprise_installed()) {
$table->data[0][2] = __('Upload enterprise extension').'&nbsp;'.html_print_checkbox('upload_enterprise', 1, false, true);
$table->data[0][1] = html_print_label_input_block(
__('Upload enterprise extension'),
html_print_checkbox(
'upload_enterprise',
1,
false,
true
)
);
} else {
$table->data[0][1] = '';
}
$table->data[0][2] = '';
echo "<form method='post' enctype='multipart/form-data'>";
html_print_table($table);
echo "<div class='right' style='width: ".$table->width."'>";
html_print_input_hidden('upload', 1);
html_print_submit_button(__('Upload'), 'submit', false, 'class="sub add"');
echo '</div>';
html_print_action_buttons(
html_print_submit_button(
__('Upload'),
'submit',
false,
['icon' => 'wand'],
true
)
);
echo '</form>';
}

View File

@ -115,19 +115,41 @@ function pandora_files_repo_godmode()
}
// Header tabs.
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view'), 'class' => 'invert_filter']).'</a>';
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Administration view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$godmode['godmode'] = 1;
$godmode['active'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/eye_show.png', true, ['title' => __('Operation view'), 'class' => 'invert_filter']).'</a>';
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('Operation view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$operation['operation'] = 1;
$onheader = [
'godmode' => $godmode,
'operation' => $operation,
];
// Header.
ui_print_page_header(__('Files repository manager'), 'images/extensions.png', false, '', true, $onheader);
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
$onheader,
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Files repository manager'),
],
]
);
$full_extensions_dir = $config['homedir'].'/'.EXTENSIONS_DIR.'/';
include_once $full_extensions_dir.'files_repo/functions_files_repo.php';
@ -204,10 +226,10 @@ function pandora_files_repo_operation()
// Header tabs.
$onheader = [];
if (check_acl($config['id_user'], 0, 'PM')) {
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/setup.png', true, ['title' => __('Administration view'), 'class' => 'invert_filter']).'</a>';
$godmode['text'] = '<a href="index.php?sec=godmode/extensions&sec2=extensions/files_repo">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Administration view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$godmode['godmode'] = 1;
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/eye_show.png', true, ['title' => __('Operation view'), 'class' => 'invert_filter']).'</a>';
$operation['text'] = '<a href="index.php?sec=extensions&sec2=extensions/files_repo">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('Operation view'), 'class' => 'main_menu_icon invert_filter']).'</a>';
$operation['operation'] = 1;
$operation['active'] = 1;

View File

@ -32,17 +32,15 @@ if (isset($file_id) && $file_id > 0) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->style = [];
$table->style[0] = 'font-weight: bold;';
$table->style[2] = 'text-align: center;';
$table->colspan = [];
$table->class = 'databox filters filter-table-adv';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
// GROUPS
// GROUPS.
$groups = groups_get_all();
// Add the All group to the beginning to be always the first
// Use this instead array_unshift to keep the array keys
// Add the All group to the beginning to be always the first.
// Use this instead array_unshift to keep the array keys.
$groups = ([0 => __('All')] + $groups);
$groups_selected = [];
foreach ($groups as $id => $name) {
@ -52,66 +50,110 @@ foreach ($groups as $id => $name) {
}
$row = [];
$row[0] = __('Groups');
$row[1] = '<div class="w290px">'.html_print_select_groups(
// Id_user.
false,
// Privilege.
'AR',
// ReturnAllGroup.
true,
// Name.
'groups[]',
// Selected.
$groups_selected,
// Script.
'',
// Nothing.
'',
// Nothing_value.
0,
// Return.
true,
// Multiple.
true
).'</div>';
$table->data[] = $row;
$table->colspan[][1] = 3;
$row[0] = html_print_label_input_block(
__('Groups'),
html_print_select_groups(
// Id_user.
false,
// Privilege.
'AR',
// ReturnAllGroup.
true,
// Name.
'groups[]',
// Selected.
$groups_selected,
// Script.
'',
// Nothing.
'',
// Nothing_value.
0,
// Return.
true,
// Multiple.
true
)
);
// DESCRIPTION
$row = [];
$row[0] = __('Description');
$row[0] .= ui_print_help_tip(__('Only 200 characters are permitted'), true);
$row[1] = html_print_textarea('description', 3, 20, $file['description'], 'class="file_repo_description"', true);
// DESCRIPTION.
$row[1] = html_print_label_input_block(
__('Description').ui_print_help_tip(__('Only 200 characters are permitted'), true),
html_print_textarea(
'description',
4,
20,
$file['description'],
'class="file_repo_description" style="min-height: 60px; max-height: 60px;"',
true
)
);
$table->data[] = $row;
$table->colspan[][1] = 3;
// FILE and SUBMIT BUTTON
// FILE and SUBMIT BUTTON.
$row = [];
// Public checkbox
// Public checkbox.
$checkbox = html_print_checkbox('public', 1, (bool) !empty($file['hash']), true);
$style = 'class="inline padding-2-10"';
$row[0] = __('File');
if ($file_id > 0) {
$row[1] = $file['name'];
$row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>";
$row[3] = html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"', true);
$row[3] .= html_print_input_hidden('update_file', 1, true);
$row[3] .= html_print_input_hidden('file_id', $file_id, true);
$submit_button = html_print_submit_button(
__('Update'),
'submit',
false,
['icon' => 'wand'],
true
);
$row[0] = html_print_label_input_block(
__('File'),
$file['name']
);
$row[1] = html_print_label_input_block(
__('Public link'),
$checkbox.html_print_input_hidden(
'file_id',
$file_id,
true
)
);
} else {
$row[1] = html_print_input_file('upfile', true);
$row[2] = "<div $style>".__('Public link')."&nbsp;$checkbox</div>";
$row[3] = html_print_submit_button(__('Add'), 'submit', false, 'class="sub add"', true);
$row[3] .= html_print_input_hidden('add_file', 1, true);
$submit_button = html_print_submit_button(
__('Add'),
'submit',
false,
['icon' => 'wand'],
true
);
$row[0] = html_print_label_input_block(
__('File'),
html_print_input_file(
'upfile',
true
)
);
$row[1] = html_print_label_input_block(
__('Public link'),
$checkbox.html_print_input_hidden(
'add_file',
1,
true
)
);
}
$table->data[] = $row;
$table->colspan[][1] = 1;
$url = ui_get_full_url('index.php?sec=godmode/extensions&sec2=extensions/files_repo');
echo "<form method='post' action='$url' enctype='multipart/form-data'>";
html_print_table($table);
html_print_action_buttons($submit_button);
echo '</form>';
?>

View File

@ -133,9 +133,12 @@ if (!empty($files)) {
);
$data[4] .= "<a href=\"$config_url\">";
$data[4] .= html_print_image(
'images/config.png',
'images/edit.svg',
true,
['title' => __('Edit')]
[
'title' => __('Edit'),
'class' => 'main_menu_icon invert_filter',
]
);
// Edit image
$data[4] .= '</a>';
@ -145,11 +148,11 @@ if (!empty($files)) {
);
$data[4] .= " <a href=\"$delete_url\" onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\">";
$data[4] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
// Delete image

View File

@ -11,11 +11,12 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
function view_logfile($file_name)
function view_logfile($file_name, $toggle=false)
{
global $config;
$memory_limit = ini_get('memory_limit');
$code = '';
if (strstr($memory_limit, 'M') !== false) {
$memory_limit = str_replace('M', '', $memory_limit);
@ -31,21 +32,37 @@ function view_logfile($file_name)
$file_size = filesize($file_name);
if ($memory_limit < $file_size) {
echo "<h2>$file_name (".__('File is too large than PHP memory allocated in the system.').')</h2>';
echo '<h2>'.__('The preview file is imposible.').'</h2>';
$code .= '<pre><h2>'.$file_name.' ('.__('File is too large than PHP memory allocated in the system.').')</h2>';
$code .= '<h2>'.__('The preview file is imposible.').'</h2>';
} else if ($file_size > ($config['max_log_size'] * 1000)) {
$data = file_get_contents($file_name, false, null, ($file_size - ($config['max_log_size'] * 1000)));
echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
echo "<textarea class='pandora_logs' name='$file_name'>";
echo '... ';
echo $data;
echo '</textarea><br><br>';
$code .= "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
$code .= "<textarea class='pandora_logs' name='$file_name'>";
$code .= '... ';
$code .= $data;
$code .= '</textarea><br><br>';
} else {
$data = file_get_contents($file_name);
echo "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
echo "<textarea class='pandora_logs' name='$file_name'>";
echo $data;
echo '</textarea><br><br>';
$code .= "<h2>$file_name (".format_numeric(filesize($file_name) / 1024).' KB) '.ui_print_help_tip(__('The folder /var/log/pandora must have pandora:apache and its content too.'), true).' </h2>';
$code .= "<textarea class='pandora_logs' name='$file_name'>";
$code .= $data;
$code .= '</textarea><br><br></pre>';
}
if ($toggle === true) {
ui_toggle(
$code,
'<span class="subsection_header_title">'.$file_name.'</span>',
$file_name,
'a',
false,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph'
);
} else {
echo $code;
}
}
}
@ -64,21 +81,45 @@ function pandoralogs_extension_main()
return;
}
ui_print_page_header(__('System logfile viewer'), 'images/extensions.png', false, '', true, '');
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('System logfile viewer'),
],
]
);
echo '<p>'.__('Use this tool to view your %s logfiles directly on the console', get_product_name()).'</p>';
echo '<p>'.__('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), '.($config['max_log_size'] * 1000).'B at the moment').'</p>';
ui_print_info_message(
__('Use this tool to view your %s logfiles directly on the console', get_product_name()).'<br>
'.__('You can choose the amount of information shown in general setup (Log size limit in system logs viewer extension), '.($config['max_log_size'] * 1000).'B at the moment')
);
$logs_directory = (!empty($config['server_log_dir'])) ? io_safe_output($config['server_log_dir']) : '/var/log/pandora';
// Do not attempt to show console log if disabled.
if ($config['console_log_enabled']) {
view_logfile($config['homedir'].'/log/console.log');
view_logfile($config['homedir'].'/log/console.log', true);
}
view_logfile($logs_directory.'/pandora_server.log');
view_logfile($logs_directory.'/pandora_server.error');
view_logfile($logs_directory.'/pandora_server.log', true);
view_logfile($logs_directory.'/pandora_server.error', true);
}

View File

@ -140,25 +140,26 @@ function quickShell()
ui_print_error_message(__('WebService engine has not been started, please check documentation.'));
$wiz->printForm(
[
'form' => [
'form' => [
'method' => 'POST',
'action' => '#',
],
'inputs' => [
[
'class' => 'w100p',
'arguments' => [
'name' => 'submit',
'label' => __('Retry'),
'type' => 'submit',
'attributes' => ['icon' => 'next'],
'return' => true,
],
],
'id' => 'retry_form',
],
]
);
html_print_action_buttons(
html_print_submit_button(
__('Retry'),
'submit',
false,
[
'icon' => 'next',
'form' => 'retry_form',
],
true
)
);
return;
}
@ -168,6 +169,7 @@ function quickShell()
'action' => '#',
'class' => 'wizard',
'method' => 'post',
'id' => 'connect_form',
],
'inputs' => [
[
@ -198,19 +200,24 @@ function quickShell()
'script' => "p=22; if(this.value == 'telnet') { p=23; } $('#text-port').val(p);",
],
],
[
'arguments' => [
'type' => 'submit',
'label' => __('Connect'),
'attributes' => ['icon' => 'cog'],
],
],
],
],
false,
true
);
html_print_action_buttons(
html_print_submit_button(
__('Connect'),
'submit',
false,
[
'icon' => 'cog',
'form' => 'connect_form',
],
true
)
);
return;
}
@ -434,84 +441,95 @@ function quickShellSettings()
}
// Form. Using old style.
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('Quickshell').'</legend>';
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->class = 'filter-table-adv';
$t->data = [];
$t->style = [];
$t->style[0] = 'font-weight: bold; width: 40%;';
$t->style[0] = 'width: 50%;';
$t->data[0][0] = __('Gotty path');
$t->data[0][1] = html_print_input_text(
'gotty',
$config['gotty'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Gotty path'),
html_print_input_text(
'gotty',
$config['gotty'],
'',
30,
100,
true
)
);
$t->data[1][0] = __('Gotty host');
$t->data[1][1] = html_print_input_text(
'gotty_host',
$config['gotty_host'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Gotty host'),
html_print_input_text(
'gotty_host',
$config['gotty_host'],
'',
30,
100,
true
)
);
$t->data[2][0] = __('Gotty ssh port');
$t->data[2][1] = html_print_input_text(
'gotty_ssh_port',
$config['gotty_ssh_port'],
'',
30,
100,
true
$t->data[1][] = html_print_label_input_block(
__('Gotty ssh port'),
html_print_input_text(
'gotty_ssh_port',
$config['gotty_ssh_port'],
'',
30,
100,
true
)
);
$t->data[3][0] = __('Gotty telnet port');
$t->data[3][1] = html_print_input_text(
'gotty_telnet_port',
$config['gotty_telnet_port'],
'',
30,
100,
true
$t->data[1][] = html_print_label_input_block(
__('Gotty telnet port'),
html_print_input_text(
'gotty_telnet_port',
$config['gotty_telnet_port'],
'',
30,
100,
true
)
);
$hidden = new StdClass();
$hidden = new stdClass();
$hidden->data = [];
$hidden->width = '100%';
$hidden->class = 'databox filters';
$hidden->class = 'filter-table-adv';
$hidden->data = [];
$hidden->style[0] = 'font-weight: bold;width: 40%;';
$hidden->style[0] = 'width: 50%;';
$hidden->data[0][0] = __('Gotty user');
$hidden->data[0][1] = html_print_input_text(
'gotty_user',
$config['gotty_user'],
'',
30,
100,
true
$hidden->data[0][] = html_print_label_input_block(
__('Gotty user'),
html_print_input_text(
'gotty_user',
$config['gotty_user'],
'',
30,
100,
true
)
);
$hidden->data[1][0] = __('Gotty password');
$hidden->data[1][1] = html_print_input_password(
'gotty_pass',
io_output_password($config['gotty_pass']),
'',
30,
100,
true
$hidden->data[0][] = html_print_label_input_block(
__('Gotty password'),
html_print_input_password(
'gotty_pass',
io_output_password($config['gotty_pass']),
'',
30,
100,
true
)
);
$hidden->data[1][1] .= ui_print_reveal_password('gotty_pass', true);
html_print_table($t);

View File

@ -87,4 +87,83 @@ CREATE INDEX idx_disabled ON talert_template_modules (disabled);
INSERT INTO `treport_custom_sql` (`name`, `sql`) VALUES ('Agent&#x20;safe&#x20;mode&#x20;not&#x20;enable', 'select&#x20;alias&#x20;from&#x20;tagente&#x20;where&#x20;safe_mode_module&#x20;=&#x20;0');
CREATE TABLE IF NOT EXISTS `twelcome_tip` (
`id` INT NOT NULL AUTO_INCREMENT,
`id_lang` VARCHAR(20) NULL,
`id_profile` INT NOT NULL,
`title` VARCHAR(255) NOT NULL,
`text` TEXT NOT NULL,
`url` VARCHAR(255) NULL,
`enable` TINYINT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
CREATE TABLE IF NOT EXISTS `twelcome_tip_file` (
`id` INT NOT NULL AUTO_INCREMENT,
`twelcome_tip_file` INT NOT NULL,
`filename` VARCHAR(255) NOT NULL,
`path` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `twelcome_tip_file`
FOREIGN KEY (`twelcome_tip_file`)
REFERENCES `twelcome_tip` (`id`)
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
INSERT INTO `twelcome_tip` VALUES
(1,'es',0,'¿Sab&iacute;as&#x20;que&#x20;puedes&#x20;monitorizar&#x20;webs?','De&#x20;manera&#x20;sencilla&#x20;a&#x20;trav&eacute;s&#x20;de&#x20;chequeos&#x20;HTTP&#x20;est&aacute;ndar&#x20;o&#x20;transaccional&#x20;mediante&#x20;transacciones&#x20;centralizadas&#x20;WUX,&#x20;o&#x20;descentralizadas&#x20;con&#x20;el&#x20;plugin&#x20;UX&#x20;de&#x20;agente.','https://pandorafms.com/manual/es/documentation/03_monitoring/06_web_monitoring','1'),
(2,'es',0,'Monitorizaci&oacute;n&#x20;remota&#x20;de&#x20;dispositivos&#x20;SNMP','Los&#x20;dispositivos&#x20;de&#x20;red&#x20;como&#x20;switches,&#x20;AP,&#x20;routers&#x20;y&#x20;firewalls&#x20;se&#x20;pueden&#x20;monitorizar&#x20;remotamente&#x20;usando&#x20;el&#x20;protocolo&#x20;SNMP.&#x20;Basta&#x20;con&#x20;saber&#x20;su&#x20;IP,&#x20;la&#x20;comunidad&#x20;SNMP&#x20;y&#x20;lanzar&#x20;un&#x20;wizard&#x20;SNMP&#x20;desde&#x20;la&#x20;consola.','https://pandorafms.com/manual/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_snmp','1'),
(3,'es',0,'Monitorizar&#x20;rutas&#x20;desde&#x20;una&#x20;IP&#x20;a&#x20;otra','Existe&#x20;un&#x20;plugin&#x20;especial&#x20;que&#x20;sirve&#x20;para&#x20;monitorizar&#x20;visualmente&#x20;las&#x20;rutas&#x20;desde&#x20;una&#x20;IP&#x20;a&#x20;otra&#x20;de&#x20;manera&#x20;visual&#x20;y&#x20;din&aacute;mica,&#x20;seg&uacute;n&#x20;va&#x20;cambiando&#x20;con&#x20;el&#x20;tiempo.','https://pandorafms.com/manual/es/documentation/03_monitoring/03_remote_monitoring#monitorizacion_de_rutas','1'),
(4,'es',0,'¿Tu&#x20;red&#x20;pierde&#x20;paquetes?','Se&#x20;puede&#x20;medir&#x20;la&#x20;p&eacute;rdida&#x20;de&#x20;paquetes&#x20;en&#x20;tu&#x20;red&#x20;usando&#x20;un&#x20;agente&#x20;y&#x20;un&#x20;plugin&#x20;libre&#x20;llamado&#x20;&ldquo;Packet&#x20;Loss&rdquo;.&#x20;Esto&#x20;es&#x20;especialmente&#x20;&uacute;til&#x20;en&#x20;redes&#x20;Wifi&#x20;o&#x20;redes&#x20;compartidas&#x20;con&#x20;muchos&#x20;usuarios.&#x20;Escribimos&#x20;un&#x20;art&iacute;culo&#x20;en&#x20;nuestro&#x20;blog&#x20;hablando&#x20;de&#x20;ello,&#x20;echale&#x20;un&#x20;vistazo','https://pandorafms.com/blog/es/perdida-de-paquetes/','1'),
(5,'es',0,'Usar&#x20;Telegram&#x20;con&#x20;Pandora&#x20;FMS','Perfecto&#x20;para&#x20;recibir&#x20;alertas&#x20;con&#x20;gr&aacute;ficas&#x20;empotradas&#x20;y&#x20;personalizar&#x20;as&iacute;&#x20;la&#x20;recepci&oacute;n&#x20;de&#x20;avisos&#x20;de&#x20;manera&#x20;individual&#x20;o&#x20;en&#x20;un&#x20;canal&#x20;com&uacute;n&#x20;con&#x20;mas&#x20;personas.&#x20;','https://pandorafms.com/library/telegram-bot-cli/','1'),
(6,'es',0,'Monitorizar&#x20;JMX&#x20;&#40;Tomcat,&#x20;Websphere,&#x20;Weblogic,&#x20;Jboss,&#x20;Apache&#x20;Kafka,&#x20;Jetty,&#x20;GlassFish&hellip;&#41;','Existe&#x20;un&#x20;plugin&#x20;Enterprise&#x20;que&#x20;sirve&#x20;para&#x20;monitorizar&#x20;cualquier&#x20;tecnolog&iacute;a&#x20;JMX.&#x20;Se&#x20;puede&#x20;usar&#x20;de&#x20;manera&#x20;local&#x20;&#40;como&#x20;plugin&#x20;local&#41;&#x20;o&#x20;de&#x20;manera&#x20;remota&#x20;con&#x20;el&#x20;plugin&#x20;server.','https://pandorafms.com/library/jmx-monitoring/','1'),
(7,'es',0,'¿Sabes&#x20;que&#x20;cada&#x20;usuario&#x20;puede&#x20;tener&#x20;su&#x20;propia&#x20;Zona&#x20;Horaria?','Se&#x20;puede&#x20;establecer&#x20;zonas&#x20;horarias&#x20;diferentes&#x20;para&#x20;cada&#x20;usuario,&#x20;de&#x20;manera&#x20;que&#x20;interprete&#x20;los&#x20;datos&#x20;teniendo&#x20;en&#x20;cuenta&#x20;la&#x20;diferencia&#x20;horaria.&#x20;Pandora&#x20;FMS&#x20;tambi&eacute;n&#x20;puede&#x20;tener&#x20;servidores&#x20;y&#x20;agentes&#x20;en&#x20;diferentes&#x20;zonas&#x20;horarias.&#x20;¡Por&#x20;todo&#x20;el&#x20;mundo!','','1'),
(8,'es',0,'Paradas&#x20;planificadas','Se&#x20;puede&#x20;definir,&#x20;a&#x20;nivel&#x20;de&#x20;agente&#x20;y&#x20;a&#x20;nivel&#x20;de&#x20;m&oacute;dulo,&#x20;per&iacute;odos&#x20;en&#x20;los&#x20;cuales&#x20;se&#x20;ignoren&#x20;las&#x20;alertas&#x20;y/o&#x20;los&#x20;datos&#x20;recogidos.&#x20;Es&#x20;perfecto&#x20;para&#x20;planificar&#x20;paradas&#x20;de&#x20;servicio&#x20;o&#x20;desconexi&oacute;n&#x20;de&#x20;los&#x20;sistemas&#x20;monitorizados.&#x20;Tambi&eacute;n&#x20;afecta&#x20;a&#x20;los&#x20;informes&#x20;SLA,&#x20;evitando&#x20;que&#x20;se&#x20;tengan&#x20;en&#x20;cuenta&#x20;esos&#x20;intervalos&#x20;de&#x20;tiempo.&#x20;&#x20;&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/11_managing_and_administration#paradas_de_servicio_planificadas','1'),
(9,'es',0,'Personalizar&#x20;los&#x20;emails&#x20;de&#x20;alerta&#x20;','¿Sab&iacute;as&#x20;que&#x20;se&#x20;pueden&#x20;personalizar&#x20;los&#x20;mails&#x20;de&#x20;alertas&#x20;de&#x20;Pandora?&#x20;Solo&#x20;tienes&#x20;que&#x20;editar&#x20;el&#x20;c&oacute;digo&#x20;HTML&#x20;por&#x20;defecto&#x20;de&#x20;las&#x20;acciones&#x20;de&#x20;alerta&#x20;de&#x20;tipo&#x20;email.&#x20;&#x20;','https://pandorafms.com/manual/en/documentation/04_using/01_alerts#editing_an_action','1'),
(10,'es',0,'Usando&#x20;iconos&#x20;personalizados&#x20;en&#x20;consolas&#x20;visuales&#x20;','Gracias&#x20;a&#x20;los&#x20;iconos&#x20;personalizados&#x20;se&#x20;pueden&#x20;crear&#x20;vistas&#x20;muy&#x20;personalizadas,&#x20;como&#x20;la&#x20;de&#x20;la&#x20;imagen,&#x20;que&#x20;representa&#x20;racks&#x20;con&#x20;los&#x20;tipos&#x20;de&#x20;servidores&#x20;en&#x20;el&#x20;orden&#x20;que&#x20;est&aacute;n&#x20;colocados&#x20;dentro&#x20;del&#x20;rack.&#x20;Perfecto&#x20;para&#x20;que&#x20;un&#x20;t&eacute;cnico&#x20;sepa&#x20;exactamente&#x20;qu&eacute;&#x20;m&aacute;quina&#x20;esta&#x20;fallando.&#x20;M&aacute;s&#x20;visual&#x20;no&#x20;puede&#x20;ser,&#x20;de&#x20;ahi&#x20;el&#x20;nombre.&#x20;&#x20;','https://pandorafms.com/manual/start?id=es/documentation/04_using/05_data_presentation_visual_maps','1'),
(11,'es',0,'Consolas&#x20;visuales:&#x20;mapas&#x20;de&#x20;calor&#x20;','La&#x20;consola&#x20;permite&#x20;integrar&#x20;en&#x20;un&#x20;fondo&#x20;personalizado&#x20;una&#x20;serie&#x20;de&#x20;datos,&#x20;que&#x20;en&#x20;funci&oacute;n&#x20;de&#x20;su&#x20;valor&#x20;se&#x20;representen&#x20;con&#x20;unos&#x20;colores&#x20;u&#x20;otros,&#x20;en&#x20;tiempo&#x20;real.&#x20;Las&#x20;aplicaciones&#x20;son&#x20;infinitas,&#x20;solo&#x20;depende&#x20;de&#x20;tu&#x20;imaginaci&oacute;n.&#x20;&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/05_data_presentation_visual_maps#mapa_de_calor_o_nube_de_color','1'),
(12,'es',0,'Auditor&iacute;a&#x20;interna&#x20;de&#x20;la&#x20;consola&#x20;','La&#x20;consola&#x20;registra&#x20;todas&#x20;las&#x20;actividades&#x20;relevantes&#x20;de&#x20;cada&#x20;usuario&#x20;conectado&#x20;a&#x20;la&#x20;consola.&#x20;Esto&#x20;incluye&#x20;la&#x20;aplicaci&oacute;n&#x20;de&#x20;configuraciones,&#x20;validaciones&#x20;de&#x20;eventos&#x20;y&#x20;alertas,&#x20;conexi&oacute;n&#x20;y&#x20;desconexi&oacute;n&#x20;y&#x20;cientos&#x20;de&#x20;otras&#x20;operaciones.&#x20;La&#x20;seguridad&#x20;en&#x20;Pandora&#x20;FMS&#x20;ha&#x20;sido&#x20;siempre&#x20;una&#x20;de&#x20;las&#x20;caracter&iacute;sticas&#x20;del&#x20;dise&ntilde;o&#x20;de&#x20;su&#x20;arquitectura.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/11_managing_and_administration#log_de_auditoria','1'),
(13,'es',0,'Sistema&#x20;de&#x20;provisi&oacute;n&#x20;autom&aacute;tica&#x20;de&#x20;agentes&#x20;','El&#x20;sistema&#x20;de&#x20;autoprovisi&oacute;n&#x20;de&#x20;agentes,&#x20;permite&#x20;que&#x20;un&#x20;agente&#x20;reci&eacute;n&#x20;ingresado&#x20;en&#x20;el&#x20;sistema&#x20;aplique&#x20;autom&aacute;ticamente&#x20;cambios&#x20;en&#x20;su&#x20;configuraci&oacute;n&#x20;&#40;como&#x20;moverlo&#x20;de&#x20;grupo,&#x20;asignarle&#x20;ciertos&#x20;valores&#x20;en&#x20;campos&#x20;personalizados&#41;&#x20;y&#x20;por&#x20;supuesto&#x20;aplicarle&#x20;determinadas&#x20;politicas&#x20;de&#x20;monitorizaci&oacute;n.&#x20;Es&#x20;una&#x20;de&#x20;las&#x20;funcionalidades&#x20;m&aacute;s&#x20;potentes,&#x20;orientadas&#x20;a&#x20;gestionar&#x20;parques&#x20;de&#x20;sistemas&#x20;muy&#x20;extensos.&#x20;&#x20;','https://pandorafms.com/manual/start?id=es/documentation/02_installation/05_configuration_agents#configuracion_automatica_de_agentes','1'),
(14,'es',0,'Modo&#x20;oscuro&#x20;','¿Sabes&#x20;que&#x20;existe&#x20;un&#x20;modo&#x20;oscuro&#x20;en&#x20;Pandora&#x20;FMS?&#x20;Un&#x20;administrador&#x20;lo&#x20;puede&#x20;activar&#x20;a&#x20;nivel&#x20;global&#x20;desde&#x20;las&#x20;opciones&#x20;de&#x20;configuraci&oacute;n&#x20;visuales&#x20;o&#x20;cualquier&#x20;usuario&#x20;a&#x20;nivel&#x20;individual,&#x20;en&#x20;las&#x20;opciones&#x20;de&#x20;usuario.&#x20;','','1'),
(15,'es',0,'Google&#x20;Sheet&#x20;','¿Sabes&#x20;que&#x20;se&#x20;puede&#x20;coger&#x20;el&#x20;valor&#x20;de&#x20;una&#x20;celda&#x20;de&#x20;una&#x20;hoja&#x20;de&#x20;c&aacute;lculo&#x20;de&#x20;Google&#x20;Sheet?,&#x20;utilizamos&#x20;la&#x20;API&#x20;para&#x20;pedir&#x20;el&#x20;dato&#x20;a&#x20;trav&eacute;s&#x20;de&#x20;un&#x20;plugin&#x20;remoto.&#x20;Es&#x20;perfecto&#x20;para&#x20;construir&#x20;cuadros&#x20;de&#x20;mando&#x20;de&#x20;negocio,&#x20;obtener&#x20;alertas&#x20;en&#x20;tiempo&#x20;real&#x20;y&#x20;crear&#x20;tus&#x20;propios&#x20;informes&#x20;a&#x20;medida.&#x20;&#x20;','https://pandorafms.com/library/google-sheets-plugin/','1'),
(16,'es',0,'Tablas&#x20;de&#x20;ARP','¿Sabes&#x20;que&#x20;existe&#x20;un&#x20;m&oacute;dulo&#x20;de&#x20;inventario&#x20;para&#x20;sacar&#x20;las&#x20;tablas&#x20;ARP&#x20;de&#x20;tus&#x20;servidores&#x20;windows?&#x20;Es&#x20;f&aacute;cil&#x20;de&#x20;instalar&#x20;y&#x20;puede&#x20;darte&#x20;informaci&oacute;n&#x20;muy&#x20;detallada&#x20;de&#x20;tus&#x20;equipos.','https://pandorafms.com/library/arp-table-windows-local/','1'),
(17,'es',0,'Enlaces&#x20;de&#x20;red&#x20;en&#x20;la&#x20;consola&#x20;visual&#x20;','Existe&#x20;un&#x20;elemento&#x20;de&#x20;consola&#x20;visual&#x20;llamado&#x20;&ldquo;Network&#x20;link&rdquo;&#x20;que&#x20;permite&#x20;mostrar&#x20;visualmente&#x20;la&#x20;uni&oacute;n&#x20;de&#x20;dos&#x20;interfaces&#x20;de&#x20;red,&#x20;su&#x20;estado&#x20;y&#x20;el&#x20;tr&aacute;fico&#x20;de&#x20;subida/bajada,&#x20;de&#x20;una&#x20;manera&#x20;muy&#x20;visual.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/05_data_presentation_visual_maps#enlace_de_red','1'),
(18,'es',0,'¿Conoces&#x20;los&#x20;informes&#x20;de&#x20;disponibilidad?&#x20;','Son&#x20;muy&#x20;&uacute;tiles&#x20;ya&#x20;que&#x20;te&#x20;dicen&#x20;el&#x20;tiempo&#x20;&#40;%&#41;&#x20;que&#x20;un&#x20;chequeo&#x20;ha&#x20;estado&#x20;en&#x20;diferentes&#x20;estados&#x20;a&#x20;lo&#x20;largo&#x20;de&#x20;un&#x20;lapso&#x20;de&#x20;tiempo,&#x20;por&#x20;ejemplo,&#x20;una&#x20;semana.&#x20;Ofrece&#x20;datos&#x20;crudos&#x20;completos&#x20;de&#x20;lo&#x20;que&#x20;se&#x20;ha&#x20;hecho&#x20;con&#x20;el&#x20;detalle&#x20;suficiente&#x20;para&#x20;convencer&#x20;a&#x20;un&#x20;proveedor&#x20;o&#x20;un&#x20;cliente.&#x20;&#x20;','','1'),
(19,'es',0,'Gr&aacute;ficas&#x20;de&#x20;disponibilidad&#x20;','Parecidos&#x20;a&#x20;los&#x20;informes&#x20;de&#x20;disponibilidad,&#x20;pero&#x20;mucho&#x20;mas&#x20;visuales,&#x20;ofrecen&#x20;el&#x20;detalle&#x20;de&#x20;estado&#x20;de&#x20;un&#x20;monitor&#x20;a&#x20;lo&#x20;largo&#x20;del&#x20;tiempo.&#x20;Se&#x20;pueden&#x20;agrupar&#x20;con&#x20;otro&#x20;m&oacute;dulo&#x20;para&#x20;ofrecer&#x20;datos&#x20;finales&#x20;teniendo&#x20;en&#x20;cuenta&#x20;la&#x20;alta&#x20;disponibilidad&#x20;de&#x20;un&#x20;servicio.&#x20;Son&#x20;perfectos&#x20;para&#x20;su&#x20;uso&#x20;en&#x20;informes&#x20;a&#x20;proveedores&#x20;y/o&#x20;clientes.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/08_data_presentation_reports#grafico_de_disponibilidad','1'),
(20,'es',0,'Zoom&#x20;en&#x20;gr&aacute;ficas&#x20;de&#x20;datos&#x20;','¿Sabes&#x20;que&#x20;Pandora&#x20;FMS&#x20;permite&#x20;hacer&#x20;zoom&#x20;en&#x20;una&#x20;parte&#x20;de&#x20;la&#x20;gr&aacute;fica.&#x20;Con&#x20;eso&#x20;ampliar&aacute;s&#x20;la&#x20;informaci&oacute;n&#x20;de&#x20;la&#x20;gr&aacute;fica.&#x20;Si&#x20;est&aacute;s&#x20;viendo&#x20;una&#x20;gr&aacute;fica&#x20;de&#x20;un&#x20;mes&#x20;y&#x20;ampl&iacute;as,&#x20;podr&aacute;s&#x20;ver&#x20;los&#x20;datos&#x20;de&#x20;ese&#x20;intervalo.&#x20;Si&#x20;utilizas&#x20;una&#x20;gr&aacute;fica&#x20;con&#x20;datos&#x20;de&#x20;resoluci&oacute;n&#x20;completa&#x20;&#40;los&#x20;llamamos&#x20;gr&aacute;ficas&#x20;TIP&#41;&#x20;podr&aacute;s&#x20;ver&#x20;el&#x20;detalle&#x20;de&#x20;cada&#x20;dato,&#x20;aunque&#x20;tu&#x20;gr&aacute;fica&#x20;tenga&#x20;miles&#x20;de&#x20;muestras.&#x20;&#x20;','','1'),
(21,'es',0,'Gr&aacute;ficas&#x20;de&#x20;resoluci&oacute;n&#x20;completa&#x20;','Pandora&#x20;FMS&#x20;y&#x20;otras&#x20;herramientas&#x20;cuando&#x20;tienen&#x20;que&#x20;mostrar&#x20;una&#x20;gr&aacute;fica&#x20;obtienen&#x20;los&#x20;datos&#x20;de&#x20;la&#x20;fuente&#x20;de&#x20;datos&#x20;y&#x20;luego&#x20;&ldquo;simplifican&rdquo;&#x20;la&#x20;gr&aacute;fica,&#x20;ya&#x20;que&#x20;si&#x20;la&#x20;serie&#x20;de&#x20;datos&#x20;tiene&#x20;10,000&#x20;elementos&#x20;y&#x20;la&#x20;gr&aacute;fica&#x20;solo&#x20;tiene&#x20;300&#x20;pixeles&#x20;de&#x20;ancho&#x20;no&#x20;pueden&#x20;caber&#x20;todos,&#x20;asi&#x20;que&#x20;se&#x20;&ldquo;simplifican&rdquo;&#x20;esos&#x20;10,000&#x20;puntos&#x20;en&#x20;solo&#x20;300.&#x20;&#x20;&#x20;Sin&#x20;embargo&#x20;al&#x20;simplificar&#x20;se&#x20;pierde&#x20;&ldquo;detalle&rdquo;&#x20;en&#x20;la&#x20;gr&aacute;fica,&#x20;y&#x20;por&#x20;supuesto&#x20;no&#x20;podemos&#x20;&ldquo;hacer&#x20;zoom&rdquo;.&#x20;Las&#x20;gr&aacute;ficas&#x20;de&#x20;Pandora&#x20;FMS&#x20;permiten&#x20;mostrar&#x20;y&#x20;usar&#x20;todos&#x20;los&#x20;datos&#x20;en&#x20;una&#x20;gr&aacute;fica,&#x20;que&#x20;llamamos&#x20;&ldquo;TIP&rdquo;&#x20;que&#x20;muestra&#x20;todos&#x20;los&#x20;puntos&#x20;superpuestos&#x20;y&#x20;adem&aacute;s&#x20;permite&#x20;que&#x20;al&#x20;hacer&#x20;zoom&#x20;no&#x20;se&#x20;pierda&#x20;resoluci&oacute;n.&#x20;&#x20;&#x20;','','1'),
(22,'es',0,'Pol&iacute;tica&#x20;de&#x20;contrase&ntilde;as','La&#x20;consola&#x20;de&#x20;Pandora&#x20;FMS&#x20;tiene&#x20;un&#x20;sistema&#x20;de&#x20;gesti&oacute;n&#x20;de&#x20;pol&iacute;tica&#x20;de&#x20;credenciales,&#x20;para&#x20;reforzar&#x20;la&#x20;seguridad&#x20;local&#x20;&#40;adem&aacute;s&#x20;de&#x20;permitir&#x20;la&#x20;autenticaci&oacute;n&#x20;externa&#x20;contra&#x20;un&#x20;LDAP,&#x20;Active&#x20;Directory&#x20;o&#x20;SAML&#41;.&#x20;A&#x20;trav&eacute;s&#x20;de&#x20;este&#x20;sistema&#x20;podemos&#x20;forzar&#x20;cambios&#x20;de&#x20;password&#x20;cada&#x20;X&#x20;d&iacute;as,&#x20;guardar&#x20;un&#x20;hist&oacute;rico&#x20;de&#x20;passwords&#x20;usadas&#x20;o&#x20;evitar&#x20;el&#x20;uso&#x20;de&#x20;ciertas&#x20;contrase&ntilde;as&#x20;entre&#x20;otras&#x20;acciones.&#x20;&#x20;','https://pandorafms.com/manual/es/documentation/04_using/12_console_setup?s%5B%5D%3Dcontrase%25C3%25B1as#password_policy','1'),
(23,'es',0,'Autenticaci&oacute;n&#x20;de&#x20;doble&#x20;factor&#x20;','Es&#x20;posible&#x20;activar&#x20;&#40;y&#x20;forzar&#x20;su&#x20;uso&#x20;a&#x20;todos&#x20;los&#x20;usuarios&#41;&#x20;un&#x20;sistema&#x20;de&#x20;doble&#x20;autenticaci&oacute;n&#x20;&#40;usando&#x20;Google&#x20;Auth&#41;&#x20;para&#x20;que&#x20;cualquier&#x20;usuario&#x20;se&#x20;autentique&#x20;adem&aacute;s&#x20;de&#x20;con&#x20;una&#x20;contrase&ntilde;a,&#x20;con&#x20;un&#x20;sistema&#x20;de&#x20;token&#x20;de&#x20;un&#x20;solo&#x20;uso,&#x20;dando&#x20;al&#x20;sistema&#x20;mucha&#x20;m&aacute;s&#x20;seguridad.&#x20;&#x20;','https://pandorafms.com/manual/en/documentation/04_using/12_console_setup?s%5B%5D%3Dgoogle%26s%5B%5D%3Dauth#authentication','1');
INSERT INTO `twelcome_tip_file` (`twelcome_tip_file`, `filename`, `path`) VALUES
(1, 'monitorizar_web.png', 'images/tips/'),
(2, 'monitorizar_snmp.png', 'images/tips/'),
(3, 'monitorizar_desde_ip.png', 'images/tips/'),
(4, 'tu_red_pierde_paquetes.png', 'images/tips/'),
(5, 'telegram_con_pandora.png', 'images/tips/'),
(6, 'monitorizar_con_jmx.png', 'images/tips/'),
(7, 'usuario_zona_horaria.png', 'images/tips/'),
(8, 'paradas_planificadas.png', 'images/tips/'),
(9, 'personalizar_los_emails.png', 'images/tips/'),
(10, 'iconos_personalizados.png', 'images/tips/'),
(11, 'mapa_de_calor.png', 'images/tips/'),
(12, 'auditoria.png', 'images/tips/'),
(15, 'google_sheets.png', 'images/tips/'),
(17, 'enlaces_consola_visual.png', 'images/tips/'),
(18, 'informe_disponibiliad.png', 'images/tips/'),
(19, 'graficas_disponibilidad.png', 'images/tips/'),
(20, 'zoom_en_graficas.png', 'images/tips/'),
(22, 'politica_de_pass.png', 'images/tips/');
ALTER TABLE `tusuario` ADD COLUMN `show_tips_startup` TINYINT UNSIGNED NOT NULL DEFAULT 1;
CREATE TABLE IF NOT EXISTS `tfavmenu_user` (
`id` INT NOT NULL AUTO_INCREMENT,
`id_user` VARCHAR(255) NOT NULL,
`id_element` TEXT,
`url` TEXT NOT NULL,
`label` VARCHAR(255) NOT NULL,
`section` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`));
COMMIT;

View File

@ -117,6 +117,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
}
}
$search_bar .= '<div id="result_order" class="result_order"></div>';
$search_bar .= '<input id="keywords" name="keywords"';
if (!isset($config['search_keywords'])) {
$search_bar .= "value='".__('Enter keywords to search')."'";
@ -126,15 +127,11 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$search_bar .= "value='".$config['search_keywords']."'";
}
$search_bar .= 'type="search" onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');"
onkeyup="showinterpreter()" class="search_input"/>';
$search_bar .= 'type="search" onfocus="javascript: if (fieldKeyWordEmpty) $(\'#keywords\').val(\'\');" onkeyup="showinterpreter()" class="search_input"/>';
$search_bar .= '<div id="result_order" class="result_order"></div>';
// $search_bar .= 'onClick="javascript: document.quicksearch.submit()"';
$search_bar .= "<input type='hidden' name='head_search_keywords' value='abc' />";
$search_bar .= '</form>';
$header_searchbar = '<div id="header_searchbar">'.$search_bar.'</div>';
}
@ -410,7 +407,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
// User.
// $headerUserImage = (is_user_admin($config['id_user']) === true) ? 'images/header_user_admin_green.png' : 'images/header_user_green.png';
$headerUser = [];
$headerUser[] = html_print_image(
'images/edit_user@header.svg',
@ -471,10 +467,6 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
</div> <!-- Closes #table_header_inner -->
</div> <!-- Closes #table_header -->
<!-- Notifications content wrapper-->
<div id='notification-content' class='invisible'/></div>
<!-- Old style div wrapper -->
<div id="alert_messages" class="invisible"></div>

View File

@ -29,8 +29,9 @@ require_once __DIR__.'/../include/functions_html.php';
if ($config['visual_animation']) {
// form#login_form, div.login_data {
echo '<style>
div.container_login {
div.container_login {
animation: container_login 3s ease;
}
@ -185,7 +186,7 @@ echo '</div>';
echo '<div class="container_login">';
echo '<div class="login_page">';
echo '<form method="post" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">';
echo '<form method="post" id="login_form" action="'.ui_get_full_url('index.php'.$url).'" ><div class="login_logo_icon">';
echo '<a href="'.$logo_link.'">';
if (is_metaconsole() === true) {
if (!isset($config['custom_logo_login'])) {
@ -307,8 +308,9 @@ switch ($login_screen) {
'',
false,
'',
'autocomplete="off" placeholder="'.__('User').'"'
'autocomplete="off" class="input" placeholder=" "'
);
echo '<label for="nick" class="placeholder">'.__('User').'</label>';
echo '</div>';
echo '<div class="login_pass">';
html_print_input_text_extended(
@ -320,20 +322,18 @@ switch ($login_screen) {
'',
false,
'',
'autocomplete="off" placeholder="'.__('Password').'"',
'autocomplete="off" class="input" placeholder=" "',
false,
true
);
echo '<label for="pass" class="placeholder">'.__('Password').'</label>';
echo '</div>';
echo '<div class="login_button">';
html_print_submit_button(
__('Login'),
__('Let&#39;s go'),
'login_button',
false,
[
'fixed_id' => 'submit-login_button',
'icon' => 'signin',
]
['fixed_id' => 'submit-login_button']
);
echo '</div>';
}
@ -350,11 +350,32 @@ switch ($login_screen) {
echo '<div>';
echo '</div>';
html_print_input_text_extended('auth_code', '', 'auth_code', '', '', '', false, '', 'class="login login_password" placeholder="'.__('Authentication code').'"', false, true);
html_print_input_text_extended(
'auth_code',
'',
'auth_code',
'',
'',
'',
false,
'',
'class="login login_password input" placeholder=" "',
false,
true
);
echo '<label for="pass" class="placeholder">'.__('Authentication code').'</label>';
echo '</div>';
echo '<div class="login_button">';
// html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, 'class="next_login"');
html_print_submit_button(__('Check code').'&nbsp;&nbsp;>', 'login_button', false, [ 'fixed_id' => 'submit-login_button', 'class' => 'next_login']);
html_print_submit_button(
__('Check code'),
'login_button',
false,
[
'fixed_id' => 'submit-login_button',
'class' => 'next_login',
]
);
echo '</div>';
break;
@ -425,19 +446,66 @@ html_print_csrf_hidden();
echo '</form></div>';
echo '<div class="login_data">';
echo '<div class ="text_banner_login">';
echo '<div><span class="span1">';
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title1_login']) {
echo io_safe_output($config['custom_title1_login']);
if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'class' => 'splash-logo',
'alt' => 'splash',
'border' => 0,
],
false,
false
);
} else {
echo __('WELCOME TO %s', get_product_name());
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
} else {
echo __('WELCOME TO %s', get_product_name());
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
echo '</span></div>';
echo '</div>';
echo '<div class ="text_banner_login">';
// echo '<div><span class="span1">';
// if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
// if ($config['custom_title1_login']) {
// echo io_safe_output($config['custom_title1_login']);
// } else {
// echo __('WELCOME TO %s', get_product_name());
// }
// } else {
// echo __('WELCOME TO %s', get_product_name());
// }
// echo '</span></div>';
echo '<div><span class="span2">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if ($config['custom_title2_login']) {
@ -451,51 +519,6 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
echo '</span></div>';
echo '</div>';
echo '<div class ="img_banner_login">';
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
if (empty($config['custom_splash_login']) === false && $config['custom_splash_login'] !== 'default') {
html_print_image(
'enterprise/images/custom_splash_login/'.$config['custom_splash_login'],
false,
[
'alt' => 'splash',
'border' => 0,
],
false,
false
);
} else {
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
} else {
echo '
<div class="loginimg-container">
<div class="lineone"></div>
<div class="linetwo"></div>
<div class="linethree"></div>
<div style="display:flex;">
<div class="towerone"></div>
<div class="towertwo"></div>
<div class="towerthree"></div>
<div class="towerfour"></div>
</div>
</div>
';
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';

View File

@ -98,6 +98,7 @@ echo '</div>';
?>
<script type="text/javascript">
$(document).ready(function() {
menuActionButtonResizing();
const menuTypeClass = '<?php echo $menuTypeClass; ?>';
if (menuTypeClass === 'classic' && menuTypeClass !== localStorage.getItem('menuType')) {
localStorage.setItem('menuType', 'classic');

View File

@ -31,6 +31,7 @@ global $config;
require_once $config['homedir'].'/include/functions_register.php';
require_once $config['homedir'].'/include/class/WelcomeWindow.class.php';
require_once $config['homedir'].'/include/class/TipsWindow.class.php';
if ((bool) is_ajax() === true) {
@ -109,6 +110,16 @@ try {
$welcome = false;
}
try {
if (isset($_SESSION['showed_tips_window']) === false) {
$tips_window = new TipsWindow();
if ($tips_window !== null) {
$tips_window->run();
}
}
} catch (Exception $e) {
}
$double_auth_enabled = (bool) db_get_value('id', 'tuser_double_auth', 'id_user', $config['id_user']);
if (isset($config['2FA_all_users']) === false) {

View File

@ -61,79 +61,110 @@ ui_print_warning_message(
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox filter-table-adv mrgn_top_15px pdd_t_0px_important';
$table->data = [];
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head[0] = __('Agent position');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align:center';
$table->style[0] = 'font-weight: bold; ';
$table->style[2] = 'font-weight: bold; ';
$table->size[0] = '50%';
$table->size[2] = '50%';
$table->data[1][0] = __('Latitude: ');
$table->data[1][1] = html_print_input_text_extended(
'latitude',
$agentData['stored_latitude'],
'text-latitude',
'',
20,
20,
false,
'',
[
'onchange' => 'setIgnoreGISDataEnabled()',
'onkeyup' => 'setIgnoreGISDataEnabled()',
],
true
$table->data[1][0] = html_print_label_input_block(
__('Latitude: '),
html_print_input_text_extended(
'latitude',
$agentData['stored_latitude'],
'text-latitude',
'',
20,
20,
false,
'',
[
'onchange' => 'setIgnoreGISDataEnabled()',
'onkeyup' => 'setIgnoreGISDataEnabled()',
],
true
)
);
$table->data[1][2] = __('Longitude: ');
$table->data[1][3] = html_print_input_text_extended(
'longitude',
$agentData['stored_longitude'],
'text-longitude',
'',
20,
20,
false,
'',
[
'onchange' => 'setIgnoreGISDataEnabled()',
'onkeyup' => 'setIgnoreGISDataEnabled()',
],
true
$table->data[1][1] = html_print_label_input_block(
__('Longitude: '),
html_print_input_text_extended(
'longitude',
$agentData['stored_longitude'],
'text-longitude',
'',
20,
20,
false,
'',
[
'onchange' => 'setIgnoreGISDataEnabled()',
'onkeyup' => 'setIgnoreGISDataEnabled()',
],
true
)
);
$table->data[2][0] = __('Altitude: ');
$table->data[2][1] = html_print_input_text_extended(
'altitude',
$agentData['stored_altitude'],
'text-altitude',
'',
10,
10,
false,
'',
[
'onchange' => 'setIgnoreGISDataEnabled()',
'onkeyup' => 'setIgnoreGISDataEnabled()',
],
true
$table->data[2][0] = html_print_label_input_block(
__('Altitude: '),
html_print_input_text_extended(
'altitude',
$agentData['stored_altitude'],
'text-altitude',
'',
10,
10,
false,
'',
[
'onchange' => 'setIgnoreGISDataEnabled()',
'onkeyup' => 'setIgnoreGISDataEnabled()',
],
true
)
);
$table->data[2][2] = __('Ignore new GIS data:');
$table->data[2][3] = __('Yes').' '.html_print_radio_button_extended('update_gis_data', 0, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true);
$table->data[2][3] .= __('No').' '.html_print_radio_button_extended('update_gis_data', 1, '', $updateGisData, false, '', 'class="mrgn_right_40px"', true);
$table->data[2][1] = html_print_label_input_block(
__('Ignore new GIS data: '),
'<div class="flex mrgn_top_5px">'.__('Yes').' '.html_print_radio_button_extended(
'update_gis_data',
0,
'',
$updateGisData,
false,
'',
'class="mrgn_right_40px"',
true
).__('No').' '.html_print_radio_button_extended(
'update_gis_data',
1,
'',
$updateGisData,
false,
'',
'class="mrgn_right_40px"',
true
).'</div>'
);
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente;
echo "<form method='post' action='".$url."' onsubmit ='return validateFormFields();'>";
echo "<form method='post' action='".$url."' onsubmit ='return validateFormFields();' class='max_floating_element_size'>";
html_print_input_hidden('update_gis', 1);
html_print_table($table);
echo '<div class="action-buttons float-left" style="width: '.$table->width.';">';
html_print_submit_button(__('Update'), '', false, 'class="sub upd"');
echo '</div>';
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'',
false,
['icon' => 'wand'],
true
)
);
echo '</form>';
?>
<script type="text/javascript">

View File

@ -487,21 +487,18 @@ if (isset($groups[$grupo]) === true || $new_agent === true) {
$tableAgent->data['primary_group'][0] .= html_print_input_hidden('grupo', $grupo, true);
}
$tableAgent->data['primary_group'][0] .= html_print_div(
[
'content' => ui_print_group_icon(
$grupo,
true,
'',
($id_agente === 0) ? 'display: none;' : '',
true,
false,
false,
'after_input_icon'
),
],
true
$tableAgent->data['primary_group'][0] .= '<span id="group_preview">';
$tableAgent->data['primary_group'][0] .= ui_print_group_icon(
$grupo,
true,
'',
($id_agente === 0) ? 'display: none;' : '',
true,
false,
false,
'after_input_icon'
);
$tableAgent->data['primary_group'][0] .= '</span>';
$tableAgent->data['caption_interval'][0] = __('Interval');
// $tableAgent->rowstyle['interval'] = 'width: 260px';
@ -974,7 +971,7 @@ foreach ($fields as $field) {
$data_field[1] .= html_print_textarea(
'customvalue_'.$field['id_field'].'[]',
2,
65,
1000,
$link_text,
'class="min-height-30px w100p"',
true
@ -985,7 +982,7 @@ foreach ($fields as $field) {
$data_field[1] .= html_print_textarea(
'customvalue_'.$field['id_field'].'[]',
2,
65,
1000,
$link_url,
'class="min-height-30px w100p"',
true
@ -994,7 +991,7 @@ foreach ($fields as $field) {
$customContent = html_print_textarea(
'customvalue_'.$field['id_field'],
2,
65,
1000,
$custom_value,
'class="min-height-30px w100p"',
true
@ -1039,7 +1036,7 @@ if (empty($fields) === false) {
'',
true,
false,
'white_box white_box_opened white_table_graph_fixed',
'white_box white_box_opened white_table_graph_fixed no_border',
'no-border custom_fields_elements'
);
}

View File

@ -196,29 +196,52 @@ foreach ($nps as $row) {
$filterTable = new stdClass();
$filterTable->width = '100%';
$filterTable->class = 'fixed_filter_bar';
$filterTable->class = 'filter-table-adv';
$filterTable->size[0] = '100%';
$filterTable->data = [];
$filterTable->data[0][0] = __('Module templates');
$filterTable->data[1][0] = html_print_select($select, 'template_id', '', '', '', 0, true, false, true, '', false, 'max-width: 200px !important');
$filterTable->data[1][1] = html_print_div(
$filterTable->data[0][0] = html_print_label_input_block(
__('Module templates'),
html_print_select(
$select,
'template_id',
'',
'',
'',
0,
true,
false,
true,
'',
false,
'width: 250px '
)
);
$filterTable->data[1][0] = html_print_submit_button(
__('Assign'),
'crt',
false,
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Assign'),
'crt',
false,
[
'icon' => 'wand',
'mode' => 'secondary mini',
],
true
),
'class' => 'float-right',
'icon' => 'wand',
'mode' => 'mini',
],
true
);
$outputFilterTable = '<form style="border:0" class="fixed_filter_bar" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">';
$outputFilterTable .= html_print_table($filterTable, true);
$outputFilterTable = '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">';
$outputFilterTable .= ui_toggle(
html_print_table($filterTable, true),
'<span class="subsection_header_title">'.__('Assign').'</span>',
__('Assign'),
'assign',
true,
true,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
);
$outputFilterTable .= '</form>';
echo $outputFilterTable;

View File

@ -462,11 +462,11 @@ if ($id_agente) {
// Inventory.
$inventorytab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
'images/page_white_text.png',
'images/hardware-software-component@svg.svg',
true,
[
'title' => __('Inventory'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
@ -476,11 +476,6 @@ if ($id_agente) {
$inventorytab['active'] = false;
}
$inventorytab = enterprise_hook('inventory_tab');
if ($inventorytab === ENTERPRISE_NOT_HOOK) {
$inventorytab = '';
}
$has_remote_conf = enterprise_hook(
'config_agents_has_remote_configuration',
[$id_agente]
@ -813,7 +808,7 @@ if ($id_agente) {
$pure = (int) get_parameter('pure');
if ($pure === 0) {
ui_print_standard_header(
__('Agent setup view'),
__('Agent setup view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
'images/agent.png',
false,
$helper,

View File

@ -174,7 +174,7 @@ foreach ($fields as $field) {
$data[1] = $field['name'];
$data[2] = html_print_image(
((bool) $field['display_on_front'] === true) ? 'images/validate.svg' : 'images/icono_stop.png',
((bool) $field['display_on_front'] === true) ? 'images/validate.svg' : 'images/fail@svg.svg',
true,
['class' => 'main_menu_icon invert_filter']
);

View File

@ -180,14 +180,26 @@ if ($load_inventory_module) {
$form_buttons = '';
if ($load_inventory_module) {
$form_buttons .= html_print_input_hidden('id_agent_module_inventory', $id_agent_module_inventory, true);
$form_buttons .= html_print_submit_button(__('Update'), 'update_inventory_module', false, 'class="sub next"', true);
$form_buttons .= html_print_submit_button(
__('Update'),
'update_inventory_module',
false,
['icon' => 'wand'],
true
);
} else {
$form_buttons .= html_print_submit_button(__('Add'), 'add_inventory_module', false, 'class="sub next"', true);
$form_buttons .= html_print_submit_button(
__('Add'),
'add_inventory_module',
false,
['icon' => 'wand'],
true
);
}
echo ui_get_inventory_module_add_form(
'index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente,
$form_buttons,
html_print_action_buttons($form_buttons, [], true),
$load_inventory_module,
$id_os,
$target,
@ -213,10 +225,10 @@ if (db_get_num_rows($sql) == 0) {
} else {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'databox info_trable';
$table->data = [];
$table->head = [];
$table->styleTable = 'margin-top: 20px;';
$table->styleTable = '';
$table->head[0] = "<span title='".__('Policy')."'>".__('P.').'</span>';
$table->head[1] = __('Name');
$table->head[2] = __('Description');
@ -235,7 +247,7 @@ if (db_get_num_rows($sql) == 0) {
if ($id_policy) {
$policy = policies_get_policy($id_policy);
$data[0] = '<a href="index.php?sec=gmodules&sec2='.ENTERPRISE_DIR.'/godmode/policies/policies&id='.$id_policy.'">';
$data[0] .= html_print_image('images/policies_mc.png', true, ['border' => '0', 'title' => $policy['name']]);
$data[0] .= html_print_image('images/policy@svg.svg', true, ['border' => '0', 'title' => $policy['name'], 'class' => 'main_menu_icon invert_filter']);
$data[0] .= '</a>';
} else {
$data[0] = '';
@ -247,15 +259,15 @@ if (db_get_num_rows($sql) == 0) {
$data[4] = human_time_description_raw($row['interval']);
// Delete module
$data[5] = '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&delete_inventory_module='.$row['id_agent_module_inventory'].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">';
$data[5] .= html_print_image('images/cross.png', true, ['border' => '0', 'title' => __('Delete'), 'class' => 'invert_filter']);
$data[5] .= html_print_image('images/delete.svg', true, ['border' => '0', 'title' => __('Delete'), 'class' => 'main_menu_icon invert_filter']);
$data[5] .= '</b></a>&nbsp;&nbsp;';
// Update module
$data[5] .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&load_inventory_module='.$row['id_module_inventory'].'">';
$data[5] .= html_print_image('images/config.png', true, ['border' => '0', 'title' => __('Update'), 'class' => 'invert_filter']);
$data[5] .= html_print_image('images/edit.svg', true, ['border' => '0', 'title' => __('Update'), 'class' => 'main_menu_icon invert_filter']);
$data[5] .= '</b></a>&nbsp;&nbsp;';
// Force refresh module
$data[5] .= '<a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&tab=inventory&id_agente='.$id_agente.'&force_inventory_module='.$row['id_agent_module_inventory'].'">';
$data[5] .= html_print_image('images/target.png', true, ['border' => '0', 'title' => __('Force'), 'class' => 'invert_filter']).'</b></a>';
$data[5] .= html_print_image('images/change-active.svg', true, ['border' => '0', 'title' => __('Force'), 'class' => 'main_menu_icon invert_filter']).'</b></a>';
array_push($table->data, $data);
}

View File

@ -302,93 +302,122 @@ foreach ($pre_fields as $key => $value) {
// Filter table.
$filterTable = new stdClass();
$filterTable->class = 'fixed_filter_bar';
$filterTable->class = 'filter-table-adv w100p';
$filterTable->size[0] = '20%';
$filterTable->size[1] = '20%';
$filterTable->size[2] = '20%';
$filterTable->size[3] = '20%';
$filterTable->size[4] = '20%';
$filterTable->data = [];
$filterTable->cellstyle[0][0] = 'width:0';
$filterTable->cellstyle[0][1] = 'width:0';
$filterTable->cellstyle[0][2] = 'width:0';
$filterTable->cellstyle[0][3] = 'width:0';
$filterTable->data[0][0] = __('Group');
$filterTable->data[1][0] = html_print_select_groups(
false,
'AR',
$return_all_group,
'ag_group',
$ag_group,
'this.form.submit();',
'',
0,
true,
false,
true,
'',
false
$filterTable->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'AR',
$return_all_group,
'ag_group',
$ag_group,
'this.form.submit();',
'',
0,
true,
false,
true,
'',
false
)
);
$filterTable->data[0][1] = __('Recursion');
$filterTable->data[1][1] = html_print_checkbox_switch(
'recursion',
1,
$recursion,
true,
false,
'this.form.submit()'
$filterTable->data[0][1] = html_print_label_input_block(
__('Recursion'),
'<div class="mrgn_top_10px">'.html_print_checkbox_switch(
'recursion',
1,
$recursion,
true,
false,
'this.form.submit()'
).'</div>'
);
$filterTable->data[0][2] = __('Show agents');
$filterTable->data[1][2] = html_print_select(
$showAgentFields,
'disabled',
$disabled,
'this.form.submit()',
'',
0,
true
$filterTable->data[0][2] = html_print_label_input_block(
__('Show agents'),
html_print_select(
$showAgentFields,
'disabled',
$disabled,
'this.form.submit()',
'',
0,
true,
false,
true,
'w100p',
false,
'width: 100%'
)
);
$filterTable->data[0][3] = __('Operating System');
$filterTable->data[1][3] = html_print_select(
$fields,
'os',
$os,
'this.form.submit()',
'All',
0,
true
$filterTable->data[0][3] = html_print_label_input_block(
__('Operating System'),
html_print_select(
$fields,
'os',
$os,
'this.form.submit()',
'All',
0,
true,
false,
true,
'w100p',
false,
'width: 100%'
)
);
$filterTable->data[0][4] = __('Free search');
$filterTable->data[0][4] .= ui_print_help_tip(
__('Search filter by alias, name, description, IP address or custom fields content'),
true
);
$filterTable->data[1][4] = html_print_input_text(
'search',
$search,
'',
12,
255,
true
$filterTable->data[0][4] = html_print_label_input_block(
__('Free search').ui_print_help_tip(
__('Search filter by alias, name, description, IP address or custom fields content'),
true
),
html_print_input_text(
'search',
$search,
'',
12,
255,
true
)
);
$filterTable->cellstyle[1][5] = 'vertical-align: bottom';
$filterTable->data[1][5] = html_print_submit_button(
$filterTable->colspan[1][0] = 5;
$filterTable->data[1][0] = html_print_submit_button(
__('Filter'),
'srcbutton',
false,
[
'icon' => 'search',
'class' => 'float-right',
'mode' => 'secondary mini',
'class' => 'float-right mrgn_right_10px',
'mode' => 'mini',
],
true
);
// Print filter table.
echo '<form method=\'post\' action=\'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente\'>';
html_print_table($filterTable);
echo '</form>';
$form = '<form method=\'post\' action=\'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente\'>';
ui_toggle(
$form.html_print_table($filterTable, true).'</form>',
'<span class="subsection_header_title">'.__('Filter').'</span>',
__('Filter'),
'filter',
true,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
);
// Data table.
$selected = true;
@ -878,12 +907,12 @@ if ($agents !== false) {
$agentDisableEnableTitle = __('Enable agent');
$agentDisableEnableAction = 'enable_agent';
$agentDisableEnableCaption = __('You are going to enable a cluster agent. Are you sure?');
$agentDisableEnableIcon = 'change-pause.svg';
$agentDisableEnableIcon = 'change-active.svg';
} else {
$agentDisableEnableTitle = __('Disable agent');
$agentDisableEnableAction = 'disable_agent';
$agentDisableEnableCaption = __('You are going to disable a cluster agent. Are you sure?');
$agentDisableEnableIcon = 'change-active.svg';
$agentDisableEnableIcon = 'change-pause.svg';
}
$agentActionButtons[] = html_print_menu_button(

View File

@ -34,7 +34,6 @@ $url = sprintf(
$url_id_agente
);
enterprise_include('godmode/agentes/module_manager.php');
$isFunctionPolicies = enterprise_include_once('include/functions_policies.php');
require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_agents.php';
@ -51,196 +50,10 @@ if (isset($policy_page) === false) {
$checked = (bool) get_parameter('checked');
$sec2 = (string) get_parameter('sec2');
// Table for filter bar.
$filterTable = new stdClass();
$filterTable->class = 'fixed_filter_bar';
$filterTable->data = [];
$filterTable->cellstyle[0][0] = 'width:0';
$filterTable->data[0][0] = __('Search');
$filterTable->data[1][0] .= html_print_input_text(
'search_string',
$search_string,
'',
30,
255,
true,
false,
false,
'',
''
);
$filterTable->data[0][0] .= html_print_input_hidden('search', 1, true);
if ((bool) $policy_page === false) {
$filterTable->data[0][1] = __('Show in hierachy mode');
$filterTable->data[1][1] = html_print_checkbox_switch(
'status_hierachy_mode',
'',
((string) $checked === 'true'),
true,
false,
'onChange=change_mod_filter();'
);
}
$filterTable->data[1][2] = html_print_submit_button(
__('Filter'),
'filter',
false,
[
'icon' => 'search',
'class' => 'float-right',
'mode' => 'secondary mini',
],
true
);
// Print filter table.
echo '<form id="create_module_type" method="post" action="'.$url.'">';
html_print_table($filterTable);
echo '</form>';
// Check if there is at least one server of each type available to assign that
// kind of modules. If not, do not show server type in combo.
$network_available = db_get_sql(
'SELECT count(*)
FROM tserver
WHERE server_type = '.SERVER_TYPE_NETWORK
);
// POSTGRESQL AND ORACLE COMPATIBLE.
$wmi_available = db_get_sql(
'SELECT count(*)
FROM tserver
WHERE server_type = '.SERVER_TYPE_WMI
);
// POSTGRESQL AND ORACLE COMPATIBLE.
$plugin_available = db_get_sql(
'SELECT count(*)
FROM tserver
WHERE server_type = '.SERVER_TYPE_PLUGIN
);
// POSTGRESQL AND ORACLE COMPATIBLE.
$prediction_available = db_get_sql(
'SELECT count(*)
FROM tserver
WHERE server_type = '.SERVER_TYPE_PREDICTION
);
// POSTGRESQL AND ORACLE COMPATIBLE.
$web_available = db_get_sql(
'SELECT count(*)
FROM tserver
WHERE server_type = '.SERVER_TYPE_WEB
);
// POSTGRESQL AND ORACLE COMPATIBLE.
// Development mode to use all servers.
if ($develop_bypass || is_metaconsole()) {
$network_available = 1;
$wmi_available = 1;
$plugin_available = 1;
// FIXME when prediction predictions server modules can be configured.
// on metaconsole.
$prediction_available = (is_metaconsole() === true) ? 0 : 1;
}
$modules = [];
$modules['dataserver'] = __('Create a new data server module');
if ($network_available) {
$modules['networkserver'] = __('Create a new network server module');
}
if ($plugin_available) {
$modules['pluginserver'] = __('Create a new plugin server module');
}
if ($wmi_available) {
$modules['wmiserver'] = __('Create a new WMI server module');
}
if ($prediction_available) {
$modules['predictionserver'] = __('Create a new prediction server module');
}
if (is_metaconsole() === true || $web_available >= '1') {
$modules['webserver'] = __('Create a new web Server module');
}
if (enterprise_installed() === true) {
set_enterprise_module_types($modules);
}
if (strstr($sec2, 'enterprise/godmode/policies/policies') !== false) {
// It is unset because the policies haven't a table tmodule_synth and the
// some part of code to apply this kind of modules in policy agents.
// But in the future maybe will be good to make this feature, but remember
// the modules to show in syntetic module policy form must be the policy
// modules from the same policy.
unset($modules['predictionserver']);
if (enterprise_installed() === true) {
unset($modules['webux']);
}
}
if (($policy_page === true) || (isset($agent) === true)) {
if ($policy_page === true) {
$show_creation = is_management_allowed();
} else {
if (isset($all_groups) === false) {
$all_groups = agents_get_all_groups_agent(
$agent['id_agente'],
$agent['id_grupo']
);
}
$show_creation = check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === true;
}
} else {
$show_creation = false;
}
if ($show_creation === true) {
// Create module/type combo.
$tableCreateModule = new stdClass();
$tableCreateModule->id = 'create';
$tableCreateModule->class = 'create_module_dialog';
$tableCreateModule->width = '100%';
$tableCreateModule->data = [];
$tableCreateModule->style = [];
$tableCreateModule->data['caption_type'] = html_print_input_hidden('edit_module', 1);
$tableCreateModule->data['caption_type'] .= __('Type');
$tableCreateModule->data['type'] = html_print_select(
$modules,
'moduletype',
'',
'',
'',
'',
true,
false,
false,
'',
false,
'width:380px;'
);
// Link for get more modules.
if ((bool) $config['disable_help'] === false) {
$tableCreateModule->data['get_more_modules'] = html_print_anchor(
[
'href' => 'https://pandorafms.com/Library/Library/',
'target' => '_blank',
'class' => 'color-black-grey',
'content' => __('Get more modules on Monitoring Library'),
],
true
);
}
}
if (isset($id_agente) === false) {
return;
}
$module_action = (string) get_parameter('module_action');
if ($module_action === 'delete') {
@ -1256,43 +1069,80 @@ if ((bool) check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') === tr
[ 'type' => 'data_table' ]
);
echo '</form>';
}
// Form table for Module creation.
$createModuleTable = new stdClass();
$createModuleTable->id = 'module_creation_modal';
$createModuleTable->class = 'filter-table-adv';
$createModuleTable->data = [];
$modalCreateModule = '<form name="create_module_form" method="post">';
$modalCreateModule .= html_print_table($tableCreateModule, true);
$modalCreateModule .= html_print_div(
$createModuleTable->data[0][] = html_print_label_input_block(
__('Select module type'),
html_print_select(
policies_type_modules_availables($sec2),
'moduletype',
'',
'',
'',
'',
true,
false,
false,
'',
false,
'max-width:300px;'
)
);
$createModuleTable->data[1][] = html_print_label_input_block(
'',
html_print_anchor(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Create'),
'create_module',
false,
[
'icon' => 'next',
'mode' => 'mini secondary',
],
true
),
'href' => 'https://pandorafms.com/Library/Library/',
'class' => 'color-black-grey invert_filter',
'content' => __('Get more modules on Monitoring Library'),
],
true
);
$modalCreateModule .= '</form>';
)
);
html_print_div(
[
'id' => 'modal',
'style' => 'display: none',
'content' => $modalCreateModule,
]
);
}
$createModuleFormTable = html_print_input_hidden('edit_module', 1, true);
$createModuleFormTable .= html_print_table($createModuleTable, true);
// Form definition.
$modalCreateModule = '<form name="create_module_form" method="post">';
$modalCreateModule .= $createModuleFormTable;
$modalCreateModule .= html_print_div(
[
'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button(
__('Create'),
'modal_button_create',
false,
[
'icon' => 'next',
'mode' => 'mini secondary',
],
true
),
],
true
);
$modalCreateModule .= '</form>';
html_print_div(
[
'id' => 'modal',
'style' => 'display: none',
'content' => $modalCreateModule,
]
);
?>
<script type="text/javascript">
function create_module_dialog(){
$('#modal')
.dialog({
$('#modal').dialog({
title: '<?php echo __('Create Module'); ?>',
resizable: true,
draggable: true,

View File

@ -290,7 +290,7 @@ $table_simple->rowclass['captions_module_n_type'] = 'field_half_width pdd_t_10px
$table_simple->rowclass['module_n_type'] = 'field_half_width';
$table_simple->data['captions_module_n_type'][0] = html_print_input_hidden('id_module_type_hidden', $id_module_type, true);
$table_simple->data['captions_module_n_type'][0] .= __('Module group');
$table_simple->data['captions_module_n_type'][1] = __('Type').ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help');
$table_simple->data['captions_module_n_type'][1] = __('Type').ui_print_help_icon($help_type, true, '', '', '', 'module_type_help');
// Module group and Type.
$table_simple->rowclass['module_n_type'] = 'field_half_width';
$table_simple->data['module_n_type'][0] .= html_print_select_from_sql(
@ -325,7 +325,7 @@ if ($edit === false) {
$table_simple->data['module_n_type'][1] = '<span class="result_info_text">'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</span>';
} else {
$idModuleType = (isset($id_module_type) === true) ? $idModuleType : '';
$idModuleType = (isset($id_module_type) === true) ? $id_module_type : '';
// Removed web analysis and log4x from select.
$tipe_not_in = '24, 25';
if (is_metaconsole() === true) {
@ -444,7 +444,8 @@ $tableBasicThresholds->data = [];
$tableBasicThresholds->rowclass['caption_warning_threshold'] = 'field_half_width pdd_t_10px';
$tableBasicThresholds->rowclass['warning_threshold'] = 'field_half_width';
$tableBasicThresholds->data['caption_warning_threshold'][0] .= __('Warning threshold').'&nbsp;';
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === false)) {
if ((isset($stringTypeModule) === false || $stringTypeModule === false)) {
$tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_minmax_warning">('.__('Min / Max').')</span>';
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
'min_warning',
@ -482,7 +483,7 @@ if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeM
);
}
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === true)) {
if (isset($stringTypeModule) === true && $stringTypeModule === true) {
$basicThresholdsIntervalWarning = [];
$basicThresholdsIntervalWarning[] = '<span>'.__('Inverse interval').'</span>';
$basicThresholdsIntervalWarning[] = html_print_checkbox_switch(
@ -531,7 +532,7 @@ $tableBasicThresholds->data['switch_warning_threshold'][0] .= html_print_div(
$tableBasicThresholds->rowclass['caption_critical_threshold'] = 'field_half_width pdd_t_10px';
$tableBasicThresholds->rowclass['critical_threshold'] = 'field_half_width';
$tableBasicThresholds->data['caption_critical_threshold'][0] .= __('Critical threshold').'&nbsp;';
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === false)) {
if ((isset($stringTypeModule) === false || $stringTypeModule === false)) {
$tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_minmax_critical">('.__('Min / Max').')</span>';
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
'min_critical',
@ -569,7 +570,7 @@ if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeM
);
}
if ($edit_module === false || (isset($stringTypeModule) === true && $stringTypeModule === true)) {
if (isset($stringTypeModule) === true && $stringTypeModule === true) {
$basicThresholdsIntervalCritical = [];
$basicThresholdsIntervalCritical[] = '<span>'.__('Inverse interval').'</span>';
$basicThresholdsIntervalCritical[] = html_print_checkbox_switch(
@ -1437,7 +1438,7 @@ if (isset($module_macros)) {
$table_macros->data[$macro_count][2] = __('Value');
$table_macros->data[$macro_count][3] = html_print_input_text('module_macro_values[]', $macro_value, '', 50, 60, true, $disabledBecauseInPolicy, false, '', $classdisabledBecauseInPolicy);
if (!$disabledBecauseInPolicy) {
$table_macros->data[$macro_count][4] = '<a href="javascript: delete_macro('.$macro_count.');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>';
$table_macros->data[$macro_count][4] = '<a href="javascript: delete_macro('.$macro_count.');">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
}
$macro_count++;
@ -1446,7 +1447,7 @@ if (isset($module_macros)) {
}
if (!$disabledBecauseInPolicy) {
$table_macros->data[$macro_count][0] = '<span>'.__('Custom macros').'</span> <a href="javascript:add_macro();">'.html_print_image('images/add.png', true, ['class' => 'invert_filter']).'</a>';
$table_macros->data[$macro_count][0] = '<span>'.__('Custom macros').'</span> <a href="javascript:add_macro();">'.html_print_image('images/fail@svg.svg', true, ['style' => 'rotate:45deg', 'class' => 'main_menu_icon invert_filter']).'</a>';
$table_macros->colspan[$macro_count][0] = 5;
}
@ -1535,14 +1536,15 @@ $table_relations->data[-1][1] = '';
$table_relations->data[-1][2] = '';
$table_relations->data[-1][3] = '<a id="disable_updates_button" class="alpha50" href="">';
$table_relations->data[-1][3] .= html_print_image(
'images/lock_mc.png',
true
'images/policy@svg.svg',
true,
['class' => 'main_menu_icon invert_filter']
).'</a>';
$table_relations->data[-1][4] = '<a id="delete_relation_button" href="">';
$table_relations->data[-1][4] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'</a>';
@ -1598,15 +1600,15 @@ if ($id_agent_module) {
$table_relations->data[$relations_count][2] = ($module_relation['type'] === 'direct') ? __('Direct') : __('Failover');
// Lock relationship updates.
$table_relations->data[$relations_count][3] = '<a id="disable_updates_button" class="'.$disabled_update_class.'"href="javascript: change_lock_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image(
'images/lock_mc.png',
'images/policy@svg.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'</a>';
// Delete relationship.
$table_relations->data[$relations_count][4] = '<a id="delete_relation_button" href="javascript: delete_relation('.$relations_count.', '.$module_relation['id'].');">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'</a>';
$relations_count++;
}
@ -1905,77 +1907,50 @@ $(document).ready (function () {
$('.switch_radio_button label').on('click', function(){
var thisLabel = $(this).attr('for');
$('#'+thisLabel).attr('checked', 'checked');
$('#'+thisLabel).siblings().attr('checked', false);
$('#'+thisLabel).prop('checked', true);
$('#'+thisLabel).siblings().prop('checked', false);
if ($('#radius-warning_inverse').prop('checked') === true) {
//$('#percentage_warning').hide();
$("#svg_dinamic").show();
}
if ($('#radius-critical_inverse').prop('checked') === true) {
//$('#percentage_critical').hide();
if ($('#radius-percentage_warning').prop('checked') === true || $('#radius-percentage_critical').prop('checked') === true) {
$("#svg_dinamic").hide();
} else {
paint_graph_values();
$("#svg_dinamic").show();
}
if ($('#radius-percentage_warning').prop('checked') === true) {
//$('#warning_inverse').hide();
$("#svg_dinamic").hide();
$('#radius-warning_inverse').hide();
$('#label-radius-warning_inverse').hide();
}
if ($('#radius-warning_inverse').prop('checked') === true) {
$('#radius-percentage_warning').hide();
$('#label-radius-percentage_warning').hide();
}
if ($('#radius-normal_warning').prop('checked') === true) {
$('#radius-warning_inverse').show();
$('#label-radius-warning_inverse').show();
$('#radius-percentage_warning').show();
$('#label-radius-percentage_warning').show();
}
if ($('#radius-percentage_critical').prop('checked') === true) {
//$('#critical_inverse').hide();
$("#svg_dinamic").hide();
$('#radius-critical_inverse').hide();
$('#label-radius-critical_inverse').hide();
}
$('#radius-warning_inverse').change (function() {
paint_graph_values();
if ($('#radius-warning_inverse').prop('checked') === true){
$('#radius-percentage_warning').prop('checked', false);
$('#percentage_warning').attr('onClick', 'return false;');
$('#percentage_warning>em').addClass('color_666');
} else {
$('#percentage_warning').removeAttr('onClick');
$('#percentage_warning>em').removeClass('color_666');
}
});
if ($('#radius-critical_inverse').prop('checked') === true) {
$('#radius-percentage_critical').hide();
$('#label-radius-percentage_critical').hide();
}
$('#radius-critical_inverse').change (function() {
paint_graph_values();
if ($('#radius-critical_inverse').prop('checked') === true){
$('#radius-percentage_critical').prop('checked', false);
$('#percentage_critical').attr('onClick', 'return false;');
$('#percentage_critical>em').addClass('color_666');
} else {
$('#percentage_critical').removeAttr('onClick');
$('#percentage_critical>em').removeClass('color_666');
}
});
$('#radius-percentage_warning').change (function() {
paint_graph_values();
if ($('#radius-percentage_warning').prop('checked') === true){
$('#radius-warning_inverse').prop('checked', false);
$('#warning_inverse').attr('onClick', 'return false;');
$('#warning_inverse>em').addClass('color_666');
} else {
$('#warning_inverse').removeAttr('onClick');
$('#warning_inverse>em').removeClass('color_666');
}
});
$('#radius-percentage_critical').change (function() {
paint_graph_values();
if ($('#radius-percentage_critical').prop('checked') === true){
$('#radius-critical_inverse').prop('checked', false);
$('#critical_inverse').attr('onClick', 'return false;');
$('#critical_inverse>em').addClass('color_666');
} else {
$('#critical_inverse').removeAttr('onClick');
$('#critical_inverse>em').removeClass('color_666');
}
});
if ($('#radius-normal_critical').prop('checked') === true) {
$('#radius-critical_inverse').show();
$('#label-radius-critical_inverse').show();
$('#radius-percentage_critical').show();
$('#label-radius-percentage_critical').show();
}
});
@ -2035,7 +2010,7 @@ function change_modules_autocomplete_input () {
var id_agent = parseInt($("#hidden-autocomplete_id_agent").val());
var module_autocomplete = $("#module_autocomplete");
var load_icon = '<?php html_print_image('images/spinner.gif', false); ?>';
var error_icon = '<?php html_print_image('images/error_red.png', false); ?>';
var error_icon = '<?php html_print_image('images/error-red@svg.svg', false, ['class' => 'main_menu_icon invert_filter']); ?>';
if (!module_autocomplete.hasClass('working')) {
module_autocomplete.addClass('working');
module_autocomplete.html(load_icon);
@ -2086,8 +2061,8 @@ function add_new_relation () {
var button = $("#button-add_relation");
var iconPlaceholder = $("#add_relation_status");
var load_icon = '<?php html_print_image('images/spinner.gif', false, ['style' => 'vertical-align:middle;']); ?>';
var suc_icon = '<?php html_print_image('images/ok.png', false, ['style' => 'vertical-align:middle;']); ?>';
var error_icon = '<?php html_print_image('images/error_red.png', false, ['style' => 'vertical-align:middle;']); ?>';
var suc_icon = '<?php html_print_image('images/validate.svg', false, ['class' => 'main_menu_icon invert_filter', 'style' => 'vertical-align:middle;']); ?>';
var error_icon = '<?php html_print_image('images/error-red@svg.svg', false, ['class' => 'main_menu_icon invert_filter', 'style' => 'vertical-align:middle;']); ?>';
if (!button.hasClass('working')) {
button.addClass('working');
@ -2129,12 +2104,12 @@ function add_new_relation () {
'<td id="module_relations-' + relationsCount + '-2">' + relation_type + '</td>' +
'<td id="module_relations-' + relationsCount + '-3" class="w10p center">' +
'<a id="disable_updates_button" class="alpha50" href="javascript: change_lock_relation(' + relationsCount + ', ' + data + ');">' +
'<?php echo html_print_image('images/lock_mc.png', true, ['class' => 'invert_filter']); ?>' +
'<?php echo html_print_image('images/policy@svg.svg', true, ['class' => 'main_menu_icon invert_filter']); ?>' +
'</a>' +
'</td>' +
'<td id="module_relations-' + relationsCount + '-4" class="w10p center">' +
'<a id="delete_relation_button" href="javascript: delete_relation(' + relationsCount + ', ' + data + ');">' +
'<?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?>' +
'<?php echo html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']); ?>' +
'</a>' +
'</td>' +
'</tr>';
@ -2234,91 +2209,66 @@ function validate_post_process() {
}
}
//function paint graph
//function paint graph.
function paint_graph_values(){
//Parse integrer
var min_w = parseFloat($('#text-min_warning').val());
if(min_w == '0.00'){ min_w = 0; }
var max_w = parseFloat($('#text-max_warning').val());
if(max_w == '0.00'){ max_w = 0; }
var min_c = parseFloat($('#text-min_critical').val());
if(min_c =='0.00'){ min_c = 0; }
var max_c = parseFloat($('#text-max_critical').val());
if(max_c =='0.00'){ max_c = 0; }
var inverse_w = $('input:radio[name=warning_inverse]:checked').val();
if(!inverse_w){ inverse_w = 0; }
var inverse_c = $('input:radio[name=critical_inverse]:checked').val();
if(!inverse_c){ inverse_c = 0; }
if(min_w == '0.00' || isNaN(min_w)){ min_w = 0; }
//inicialiced error
var max_w = parseFloat($('#text-max_warning').val());
if(max_w == '0.00' || isNaN(max_w)){ max_w = 0; }
var min_c = parseFloat($('#text-min_critical').val());
if(min_c =='0.00' || isNaN(min_c)){ min_c = 0; }
var max_c = parseFloat($('#text-max_critical').val());
if(max_c =='0.00' || isNaN(max_c)){ max_c = 0; }
var inverse_w = $('input:radio[value=warning_inverse]:checked').val();
if(!inverse_w){ inverse_w = 0; }
var inverse_c = $('input:radio[value=critical_inverse]:checked').val();
if(!inverse_c){ inverse_c = 0; }
//inicialiced error.
var error_w = 0;
var error_c = 0;
//messages legend
//messages legend.
var legend_normal = '<?php echo __('Normal Status'); ?>';
var legend_warning = '<?php echo __('Warning Status'); ?>';
var legend_critical = '<?php echo __('Critical Status'); ?>';
//messages error
//messages error.
var message_error_warning = '<?php echo __('Please introduce a maximum warning higher than the minimun warning'); ?>';
var message_error_critical = '<?php echo __('Please introduce a maximum critical higher than the minimun critical'); ?>';
var message_error_percentage = '<?php echo __('Please introduce a positive percentage value'); ?>';
//Percentage selector
var percentage_w = $('#checkbox-percentage_warning').prop('checked');
var percentage_c = $('#checkbox-percentage_critical').prop('checked');
if(percentage_w == true || percentage_c == true) {
d3.select("#svg_dinamic rect").remove();
//create svg
var svg = d3.select("#svg_dinamic");
svg.selectAll("g").remove();
if (percentage_w === true) {
if(max_w < 0 || min_w < 0) {
paint_graph_status(0,0,0,0,0,0,1,0,legend_normal,legend_warning,legend_critical,message_error_percentage,message_error_percentage);
} else {
$("#text-max_warning").removeClass("input_error");
$("#text-min_warning").removeClass("input_error");
}
}
if(percentage_c === true) {
if(max_c < 0 || min_c < 0) {
paint_graph_status(0,0,0,0,0,0,0,1,legend_normal,legend_warning,legend_critical,message_error_percentage,message_error_percentage);
} else {
$("#text-min-critical").removeClass("input_error");
$("#text-max_critical").removeClass("input_error");
}
}
return;
} else {
$('#svg_dinamic').show();
}
//if haven't error
if(max_w == 0 || max_w > min_w){
if(max_c == 0 || max_c > min_c){
paint_graph_status(min_w, max_w, min_c, max_c, inverse_w,
inverse_c, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical);
paint_graph_status(
min_w, max_w, min_c, max_c, inverse_w,
inverse_c, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical
);
} else {
error_c = 1;
paint_graph_status(0,0,0,0,0,0, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical);
paint_graph_status(
0,0,0,0,0,0, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical
);
}
} else {
error_w = 1;
paint_graph_status(0,0,0,0,0,0, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical);
paint_graph_status(
0,0,0,0,0,0, error_w, error_c,
legend_normal, legend_warning, legend_critical,
message_error_warning, message_error_critical
);
}
}
/* End of relationship javascript */
/* ]]> */
</script>

View File

@ -128,6 +128,7 @@ if ($page === 'enterprise/godmode/policies/policy_modules') {
// In ICMP modules, port is not configurable.
if ($id_module_type !== 6 && $id_module_type !== 7) {
$tcp_port = (empty($tcp_port) === false) ? $tcp_port : get_parameter('tcp_port');
$data[1] = html_print_input_text(
'tcp_port',
$tcp_port,

View File

@ -15,7 +15,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -29,8 +29,6 @@
global $config;
check_login();
$agent_d = check_acl($config['id_user'], 0, 'AD');
@ -54,23 +52,33 @@ require_once $config['homedir'].'/include/functions_cron.php';
// Buttons.
$buttons = [
'text' => "<a href='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list'>".html_print_image(
'images/list.png',
'images/logs@svg.svg',
true,
[
'title' => __('List'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Scheduled Downtime'),
'images/gm_monitoring.png',
false,
'',
true,
$buttons
$buttons,
[
[
'link' => '',
'label' => __('Tools'),
],
[
'link' => '',
'label' => __('Scheduled Downtime'),
],
]
);
// Recursion group filter.
@ -813,227 +821,7 @@ if (users_can_manage_group_all('AW') === true || $disabled) {
$return_all_group = true;
}
$table = new StdClass();
$table->class = 'databox filters';
$table->width = '100%';
$table->data = [];
$table->data[0][0] = __('Name');
$table->data[0][1] = html_print_input_text(
'name',
$name,
'',
25,
40,
true,
$disabled_in_execution
);
$table->data[1][0] = __('Group');
$table->data[1][1] = '<div class="w250px">'.html_print_select_groups(
false,
$access,
$return_all_group,
'id_group',
$id_group,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).'</div>';
$table->data[2][0] = __('Description');
$table->data[2][1] = html_print_textarea(
'description',
3,
35,
$description,
'',
true
);
$table->data[3][0] = __('Type').ui_print_help_tip(
__('Quiet: Modules will not generate events or fire alerts.').'<br>'.__('Disable Agents: Disables the selected agents.').'<br>'.__('Disable Alerts: Disable alerts for the selected agents.'),
true
);
$table->data[3][1] = html_print_select(
[
'quiet' => __('Quiet'),
'disable_agents' => __('Disabled Agents'),
'disable_agent_modules' => __('Disable Modules'),
'disable_agents_alerts' => __('Disabled only Alerts'),
],
'type_downtime',
$type_downtime,
'change_type_downtime()',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
);
$table->data[4][0] = __('Execution');
$table->data[4][1] = html_print_select(
[
'once' => __('Once'),
'periodically' => __('Periodically'),
'cron' => __('Cron from/to'),
],
'type_execution',
$type_execution,
'change_type_execution();',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
);
$days = array_combine(range(1, 31), range(1, 31));
$table->data[5][0] = __('Configure the time').'&nbsp;';
;
$table->data[5][1] = "
<div id='once_time' style='display: none;'>
<table>
<tr>
<td>".__('From:').'</td>
<td>'.html_print_input_text('once_date_from', $once_date_from, '', 10, 10, true, $disabled_in_execution).html_print_input_text('once_time_from', $once_time_from, '', 9, 9, true, $disabled_in_execution).'</td>
</tr>
<tr>
<td>'.__('To:').'</td>
<td>'.html_print_input_text('once_date_to', $once_date_to, '', 10, 10, true).html_print_input_text('once_time_to', $once_time_to, '', 9, 9, true)."</td>
</tr>
</table>
</div>
<div id='periodically_time' style='display: none;'>
<table>
<tr><td>".ui_get_using_system_timezone_warning().'</td></tr>
<tr>
<td>'.__('Type Periodicity:').'&nbsp;'.html_print_select(
[
'weekly' => __('Weekly'),
'monthly' => __('Monthly'),
],
'type_periodicity',
$type_periodicity,
'change_type_periodicity();',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
)."</td>
</tr>
<tr>
<td colspan='2'>
<table id='weekly_item' style='display: none;'>
<tr>
<td>".__('Mon').html_print_checkbox('monday', 1, $monday, true, $disabled_in_execution).'</td>
<td>'.__('Tue').html_print_checkbox('tuesday', 1, $tuesday, true, $disabled_in_execution).'</td>
<td>'.__('Wed').html_print_checkbox('wednesday', 1, $wednesday, true, $disabled_in_execution).'</td>
<td>'.__('Thu').html_print_checkbox('thursday', 1, $thursday, true, $disabled_in_execution).'</td>
<td>'.__('Fri').html_print_checkbox('friday', 1, $friday, true, $disabled_in_execution).'</td>
<td>'.__('Sat').html_print_checkbox('saturday', 1, $saturday, true, $disabled_in_execution).'</td>
<td>'.__('Sun').html_print_checkbox('sunday', 1, $sunday, true, $disabled_in_execution)."</td>
</tr>
</table>
<table id='monthly_item' style='display: none;'>
<tr>
<td>".__('From day:').'</td>
<td>'.html_print_select(
$days,
'periodically_day_from',
$periodically_day_from,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).'</td>
<td>'.__('To day:').'</td>
<td>'.html_print_select(
$days,
'periodically_day_to',
$periodically_day_to,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).'</td>
<td>'.ui_print_help_tip(__('The end day must be higher than the start day'), true).'</td>
</tr>
</table>
<table>
<tr>
<td>'.__('From hour:').'</td>
<td>'.html_print_input_text(
'periodically_time_from',
$periodically_time_from,
'',
7,
7,
true,
$disabled_in_execution
).ui_print_help_tip(
__('The end time must be higher than the start time'),
true
).'</td>
<td>'.__('To hour:').'</td>
<td>'.html_print_input_text(
'periodically_time_to',
$periodically_time_to,
'',
7,
7,
true,
$disabled_in_execution
).ui_print_help_tip(
__('The end time must be higher than the start time'),
true
).'</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="cron_time" style="display: none;">
<table class="w100p">
<tr>
<td>'.__('Cron from:').'</td>
<td>'.html_print_extended_select_for_cron($hour_from, $minute_from, $mday_from, $month_from, $wday_from, true, false, false, true, 'from').'</td>
</tr>
<tr>
<td>'.__('Cron to:').'</td>
<td>'.html_print_extended_select_for_cron($hour_to, $minute_to, $mday_to, $month_to, $wday_to, true, false, true, true, 'to').'</td>
</tr>
</table>
</div>';
if ($id_downtime > 0) {
echo "<form method=post action='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&insert_downtime_agent=1&id_downtime=$id_downtime'>";
} else {
echo '<form method="POST" action="index.php?sec=extensions&amp;sec2=godmode/agentes/planned_downtime.editor">';
}
// Editor form.
html_print_table($table);
echo "<td valign=top style='width:300px;padding-left:20px;'>";
$filter_group = (int) get_parameter('filter_group', 0);
@ -1074,105 +862,467 @@ if (empty($agents) || $disabled_in_execution) {
$disabled_add_button = true;
}
// Show available agents to include into downtime
$table = new StdClass();
$table->class = 'databox filters';
$table->class = 'databox filter-table-adv';
$table->id = 'principal_table_scheduled';
$table->width = '100%';
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$table->size[0] = '25%';
$table->data[0][0] = __('Group filter');
$table->data[0][1] = html_print_select_groups(
false,
$access,
$return_all_group,
'filter_group',
$filter_group,
'',
'',
'',
true,
false,
true,
'',
false,
'min-width:180px;margin-right:15px;'
);
$table->data[0][2] = __('Recursion').'&nbsp&nbsp'.html_print_checkbox('recursion', 1, $recursion, true, false, '');
$table->data[1][0] = __('Available agents');
$table->data[1][1] = html_print_select($agents, 'id_agents[]', -1, '', _('Any'), -2, true, true, true, '', false, 'min-width: 250px;width: 70%;');
$table->rowid[2] = 'available_modules_selection_mode';
$table->data[2][1] = html_print_select(
$table->data['first_title'][] = html_print_div(
[
'common' => __('Show common modules'),
'all' => __('Show all modules'),
'class' => 'section_table_title',
'content' => __('Editor'),
],
'modules_selection_mode',
'common',
false,
'',
'',
true,
false,
true,
'',
false,
'min-width:180px;'
true
);
$table->data[0][] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
$name,
'',
25,
40,
true,
$disabled_in_execution
)
);
$table->data[0][] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
$access,
$return_all_group,
'id_group',
$id_group,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
)
);
$table->rowid[3] = 'available_modules';
$table->data[3][0] = __('Available modules:').ui_print_help_tip(
__('Only for type Quiet for downtimes.'),
$table->data[1][] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
3,
35,
$description,
'',
true
)
);
$table->data[1][] = html_print_label_input_block(
__('Type'),
html_print_select(
[
'quiet' => __('Quiet'),
'disable_agents' => __('Disabled Agents'),
'disable_agent_modules' => __('Disable Modules'),
'disable_agents_alerts' => __('Disabled only Alerts'),
],
'type_downtime',
$type_downtime,
'change_type_downtime()',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).ui_print_input_placeholder(
__('Quiet: Modules will not generate events or fire alerts.').'<br>'.__('Disable Agents: Disables the selected agents.').'<br>'.__('Disable Alerts: Disable alerts for the selected agents.'),
true
)
);
$table->data[2][] = html_print_label_input_block(
__('Execution'),
html_print_select(
[
'once' => __('Once'),
'periodically' => __('Periodically'),
'cron' => __('Cron from/to'),
],
'type_execution',
$type_execution,
'change_type_execution();',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
)
);
$timeInputs = [];
$timeInputs[] = html_print_div(
[
'id' => 'once_time',
'style' => 'display: none',
'content' => html_print_div(
[
'class' => '',
'content' => html_print_input_text(
'once_date_from',
$once_date_from,
'',
10,
10,
true,
$disabled_in_execution
).html_print_input_text(
'once_time_from',
$once_time_from,
'',
9,
9,
true,
$disabled_in_execution
).'<span class="margin-lr-10 result_info_text">'.__(
'To'
).'</span>'.html_print_input_text(
'once_date_to',
$once_date_to,
'',
10,
10,
true
).html_print_input_text(
'once_time_to',
$once_time_to,
'',
9,
9,
true
),
],
true
),
],
true
);
$table->data[3][1] = html_print_select(
[],
'module[]',
'',
'',
'',
0,
true,
true,
true,
'',
false,
'min-width: 250px;width: 70%;'
$timeInputs[] = html_print_div(
[
'id' => 'periodically_time',
'style' => 'display: none',
'content' => html_print_div(
[
'class' => 'filter-table-adv-manual w50p',
'content' => html_print_label_input_block(
__('Type Periodicity'),
html_print_select(
[
'weekly' => __('Weekly'),
'monthly' => __('Monthly'),
],
'type_periodicity',
$type_periodicity,
'change_type_periodicity();',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
)
),
],
true
).html_print_div(
[
'id' => 'weekly_item',
'class' => '',
'content' => '<ul class="flex-row-center mrgn_top_15px mrgn_btn_15px">
<li class="flex">'.__('Mon').html_print_checkbox('monday', 1, $monday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
<li class="flex">'.__('Tue').html_print_checkbox('tuesday', 1, $tuesday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
<li class="flex">'.__('Wed').html_print_checkbox('wednesday', 1, $wednesday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
<li class="flex">'.__('Thu').html_print_checkbox('thursday', 1, $thursday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
<li class="flex">'.__('Fri').html_print_checkbox('friday', 1, $friday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
<li class="flex">'.__('Sat').html_print_checkbox('saturday', 1, $saturday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
<li class="flex">'.__('Sun').html_print_checkbox('sunday', 1, $sunday, true, $disabled_in_execution, '', false, ['label_style' => 'margin: 0 5px;' ]).'</li>
</ul>',
],
true
).html_print_div(
[
'id' => 'monthly_item',
'style' => 'margin-top: 12px;',
'class' => 'filter-table-adv-manual flex-row-start w50p',
'content' => html_print_label_input_block(
__('From day'),
html_print_select(
$days,
'periodically_day_from',
$periodically_day_from,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
),
[ 'div_style' => 'flex: 50; margin-right: 5px;' ]
).html_print_label_input_block(
__('To day'),
html_print_select(
$days,
'periodically_day_to',
$periodically_day_to,
'',
'',
0,
true,
false,
true,
'',
$disabled_in_execution
).ui_print_input_placeholder(
__('The end day must be higher than the start day'),
true
),
[ 'div_style' => 'flex: 50; margin-left: 5px;' ]
),
],
true
).html_print_div(
[
'class' => 'filter-table-adv-manual flex-row-start w50p',
'content' => html_print_label_input_block(
__('From hour'),
html_print_input_text(
'periodically_time_from',
$periodically_time_from,
'',
7,
7,
true,
$disabled_in_execution
).ui_print_input_placeholder(
__('The start time must be lower than the end time'),
true
),
[ 'div_style' => 'flex: 50; margin-right: 5px;' ]
).html_print_label_input_block(
__('To hour'),
html_print_input_text(
'periodically_time_to',
$periodically_time_to,
'',
7,
7,
true,
$disabled_in_execution
).ui_print_input_placeholder(
__('The end time must be higher than the start time'),
true
),
[ 'div_style' => 'flex: 50; margin-left: 5px;' ]
),
],
true
).ui_get_using_system_timezone_warning(),
],
true
);
$timeInputs[] = html_print_div(
[
'id' => 'cron_time',
'style' => 'display: none',
'content' => html_print_label_input_block(
__('Cron from'),
html_print_extended_select_for_cron($hour_from, $minute_from, $mday_from, $month_from, $wday_from, true, false, false, true, 'from')
).html_print_label_input_block(
__('Cron to'),
html_print_extended_select_for_cron($hour_to, $minute_to, $mday_to, $month_to, $wday_to, true, false, true, true, 'to')
),
],
true
);
$table->colspan[3][0] = 2;
$table->data[3][0] = html_print_label_input_block(
__('Configure the time'),
implode('', $timeInputs)
);
$table->data[4][] = html_print_div(
[
'class' => 'section_table_title',
'content' => __('Filtering'),
],
true
);
$table->data[5][] = html_print_label_input_block(
__('Group filter'),
html_print_select_groups(
false,
$access,
$return_all_group,
'filter_group',
$filter_group,
'',
'',
'',
true,
false,
true,
'',
false,
'min-width:180px;margin-right:15px;'
)
);
$table->data[5][] = html_print_label_input_block(
__('Recursion'),
html_print_checkbox_switch(
'recursion',
1,
$recursion,
true,
false,
''
)
);
$table->colspan[6][0] = 2;
$availableModules = html_print_label_input_block(
__('Available agents'),
html_print_select(
$agents,
'id_agents[]',
-1,
'',
__('Any'),
-2,
true,
true,
true,
'',
false,
'min-width: 250px;width: 70%;'
),
[
'div_class' => 'flex-column',
'div_style' => 'flex: 33',
]
);
$availableModules .= html_print_label_input_block(
__('Selection mode'),
html_print_select(
[
'common' => __('Show common modules'),
'all' => __('Show all modules'),
],
'modules_selection_mode',
'common',
false,
'',
'',
true,
false,
true,
'',
false,
'min-width:180px;'
),
[
'div_class' => 'available_modules_selection_mode flex-column',
'div_style' => 'flex: 33',
]
);
$availableModules .= html_print_label_input_block(
__('Available modules'),
html_print_select(
[],
'module[]',
'',
'',
'',
0,
true,
true,
true,
'',
false,
'min-width: 250px;width: 70%;'
).ui_print_input_placeholder(
__('Only for type Quiet for downtimes.'),
true
),
[
'div_class' => 'available_modules flex-column',
'div_style' => 'flex: 33',
]
);
$table->data[6][0] = html_print_div(
[
'style' => 'flex-direction: row;align-items: flex-start;',
'content' => $availableModules,
],
true
);
// Print agent table.
if ($id_downtime > 0) {
echo "<form method=post action='index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.editor&insert_downtime_agent=1&id_downtime=$id_downtime'>";
} else {
echo '<form method="POST" action="index.php?sec=extensions&amp;sec2=godmode/agentes/planned_downtime.editor">';
}
html_print_table($table);
echo '<br /><br /><br />';
$buttons = '';
html_print_input_hidden('id_agent', $id_agent);
echo '<div class="action-buttons w100p" >';
if ($id_downtime > 0) {
html_print_input_hidden('update_downtime', 1);
html_print_input_hidden('id_downtime', $id_downtime);
html_print_submit_button(
$buttons .= html_print_submit_button(
__('Update'),
'updbutton',
false,
'class="sub upd"'
['icon' => 'update'],
true
);
} else {
html_print_input_hidden('create_downtime', 1);
html_print_submit_button(
$buttons .= html_print_submit_button(
__('Add'),
'crtbutton',
false,
'class="sub wand"'
['icon' => 'wand'],
true
);
}
echo '</div>';
html_print_action_buttons(
$buttons
);
html_print_input_hidden('all_common_modules', '');
echo '</form>';
@ -1208,11 +1358,17 @@ if (empty($downtimes_agents)) {
$table->head[2] = __('OS');
$table->head[3] = __('Last contact');
$table->head['count_modules'] = __('Modules');
$table->align = [];
$table->align[0] = 'center';
$table->align[1] = 'center';
$table->align[2] = 'center';
$table->align[3] = 'center';
$table->align[4] = 'center';
if (!$running) {
$table->head[5] = __('Actions');
$table->align[5] = 'center';
$table->size[5] = '5%';
$table->align[5] = 'right';
$table->size[5] = '10%';
}
foreach ($downtimes_agents as $downtime_agent) {
@ -1232,7 +1388,13 @@ if (empty($downtimes_agents)) {
WHERE id_grupo = '.$downtime_agent['id_grupo']
);
$data[2] = ui_print_os_icon($downtime_agent['id_os'], true, true);
$data[2] = html_print_div(
[
'class' => 'main_menu_icon invert_filter',
'content' => ui_print_os_icon($downtime_agent['id_os'], false, true),
],
true
);
$data[3] = $downtime_agent['ultimo_contacto'];
@ -1251,10 +1413,10 @@ if (empty($downtimes_agents)) {
if (!$running) {
$data[5] = '';
if ($type_downtime !== 'disable_agents') {
$data[5] = '<a href="javascript:show_editor_module('.$downtime_agent['id_agente'].');">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter']).'</a>';
$data[5] = '<a href="javascript:show_editor_module('.$downtime_agent['id_agente'].');">'.html_print_image('images/edit.svg', true, ['alt' => __('Edit'), 'class' => 'main_menu_icon invert_filter']).'</a>';
}
$data[5] .= '<a href="index.php?sec=extensions&amp;sec2=godmode/agentes/planned_downtime.editor&id_agent='.$downtime_agent['id_agente'].'&delete_downtime_agent=1&id_downtime_agent='.$downtime_agent['id'].'&id_downtime='.$id_downtime.'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter']).'</a>';
$data[5] .= '<a href="index.php?sec=extensions&amp;sec2=godmode/agentes/planned_downtime.editor&id_agent='.$downtime_agent['id_agente'].'&delete_downtime_agent=1&id_downtime_agent='.$downtime_agent['id'].'&id_downtime='.$id_downtime.'">'.html_print_image('images/delete.svg', true, ['alt' => __('Delete'), 'class' => 'main_menu_icon invert_filter']).'</a>';
}
$table->data['agent_'.$downtime_agent['id_agente']] = $data;
@ -1263,17 +1425,7 @@ if (empty($downtimes_agents)) {
html_print_table($table);
}
$table = new stdClass();
$table->id = 'loading';
$table->width = '100%';
$table->colspan['loading'][0] = '6';
$table->style[0] = 'text-align: center;';
$table->data = [];
$table->data['loading'] = [];
$table->data['loading'][0] = html_print_image('images/spinner.gif', true);
echo "<div class='invisible'>";
html_print_table($table);
echo '</div>';
ui_print_spinner('Loading');
$table = new stdClass();
$table->id = 'editor';
@ -1300,7 +1452,7 @@ $table->data['module'][1] = "
<td class='cell_delete_button' style='text-align: right; width:10%;' id=''>".'<a class="link_delete"
onclick="if(!confirm(\''.__('Are you sure?').'\')) return false;"
href="">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'border' => '0',
@ -1577,13 +1729,13 @@ function insert_downtime_agent($id_downtime, $user_groups_ad)
switch ($("#type_downtime").val()) {
case 'disable_agents_alerts':
case 'disable_agents':
$("#available_modules").hide();
$("#available_modules_selection_mode").hide();
$(".available_modules").hide();
$(".available_modules_selection_mode").hide();
break;
case 'quiet':
case 'disable_agent_modules':
$("#available_modules_selection_mode").show();
$("#available_modules").show();
$(".available_modules_selection_mode").show();
$(".available_modules").show();
break;
}
}

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -89,7 +89,7 @@ if (is_ajax() === true) {
[
'id' => 'agent_modules_affected_planned_downtime',
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'godmode/agentes/planned_downtime.list',
@ -103,6 +103,7 @@ if (is_ajax() === true) {
],
'search_button_class' => 'sub filter float-right',
'form' => [
'class' => 'filter-table-adv',
'inputs' => [
[
'label' => __('Agents'),
@ -207,13 +208,23 @@ if ($migrate_malformed === true) {
}
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Scheduled Downtime'),
'images/gm_monitoring.png',
false,
'',
true,
''
[],
[
[
'link' => '',
'label' => __('Tools'),
],
[
'link' => '',
'label' => __('Scheduled Downtime'),
],
],
);
$id_downtime = (int) get_parameter('id_downtime', 0);
@ -308,34 +319,8 @@ $filter_params['module_name'] = $module_name;
$filter_params_str = http_build_query($filter_params);
// Table filter.
$table_form = new StdClass();
$table_form->class = 'databox filters';
$table_form->width = '100%';
$table_form->rowstyle = [];
$table_form->cellstyle[0] = ['width: 100px;'];
$table_form->cellstyle[1] = ['width: 100px;'];
$table_form->cellstyle[1][2] = 'display: flex; align-items: center;';
$table_form->cellstyle[2] = ['width: 100px;'];
$table_form->cellstyle[3] = ['text-align: right;'];
$table_form->colspan[3][0] = 3;
$table_form->data = [];
$row = [];
// Search text.
$row[] = __('Search');
$row[] = html_print_input_text(
'search_text',
$search_text,
'',
50,
250,
true
);
// Dates.
$date_inputs = __('From').'&nbsp;'.html_print_input_text(
// From/To inputs.
$date_inputs = html_print_input_text(
'date_from',
$date_from,
'',
@ -343,8 +328,8 @@ $date_inputs = __('From').'&nbsp;'.html_print_input_text(
10,
true
);
$date_inputs .= '&nbsp;&nbsp;';
$date_inputs .= __('To').'&nbsp;'.html_print_input_text(
$date_inputs .= '&nbsp;'.__('To').'&nbsp;';
$date_inputs .= html_print_input_text(
'date_to',
$date_to,
'',
@ -352,11 +337,6 @@ $date_inputs .= __('To').'&nbsp;'.html_print_input_text(
10,
true
);
$row[] = $date_inputs;
$table_form->data[] = $row;
$row = [];
// Execution type.
$execution_type_fields = [
@ -364,29 +344,6 @@ $execution_type_fields = [
'periodically' => __('Periodically'),
'cron' => __('Cron'),
];
$row[] = __('Execution type');
$row[] = html_print_select(
$execution_type_fields,
'execution_type',
$execution_type,
'',
__('Any'),
'',
true,
false,
false
);
// Show past downtimes.
$row[] = __('Show past downtimes').'&nbsp;&nbsp;&nbsp;&nbsp;'.html_print_switch(
[
'name' => 'archived',
'value' => $show_archived,
]
);
$table_form->data[] = $row;
$row = [];
// Agent.
$params = [];
@ -397,36 +354,89 @@ $params['return'] = true;
$params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_name'] = 'agent_id';
$params['hidden_input_idagent_value'] = $agent_id;
$row[] = __('Agent');
$row[] = ui_print_agent_autocomplete_input($params);
// Module.
$row[] = __('Module').'&nbsp;'.html_print_autocomplete_modules(
'module_name',
$module_name,
false,
true,
'',
[],
true
);
$table_form->data[] = $row;
$row = [];
$row[] = html_print_submit_button(
// Table filter.
$table_form = new stdClass();
$table_form->class = 'filter-table-adv';
$table_form->id = 'filter_scheduled_downtime';
$table_form->width = '100%';
$table_form->rowstyle = [];
$table_form->cellstyle[0] = ['width: 100px;'];
$table_form->cellstyle[1] = ['width: 100px;'];
$table_form->cellstyle[1][2] = 'display: flex; align-items: center;';
$table_form->cellstyle[2] = ['width: 100px;'];
$table_form->cellstyle[3] = ['text-align: right;'];
$table_form->data = [];
// Search text.
$table_form->data[0][] = html_print_label_input_block(
__('Search'),
'search',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
html_print_input_text(
'search_text',
$search_text,
'',
50,
250,
true
)
);
// From / To.
$table_form->data[0][] = html_print_label_input_block(
__('Between dates'),
html_print_div(
[
'class' => 'flex-content-left',
'content' => $date_inputs,
],
true
)
);
// Show past downtimes.
$table_form->data[0][] = html_print_label_input_block(
__('Show past downtimes'),
html_print_switch(
[
'name' => 'archived',
'value' => $show_archived,
]
)
);
// Execution type.
$table_form->data[1][] = html_print_label_input_block(
__('Execution type'),
html_print_select(
$execution_type_fields,
'execution_type',
$execution_type,
'',
__('Any'),
'',
true,
false,
false
)
);
$table_form->data[1][] = html_print_label_input_block(
__('Agent'),
ui_print_agent_autocomplete_input($params)
);
$table_form->data[1][] = html_print_label_input_block(
__('Module'),
html_print_autocomplete_modules(
'module_name',
$module_name,
false,
true,
'',
[],
true,
0,
30,
true
)
);
$table_form->data[] = $row;
// End of table filter.
// Useful to know if the user has done a form filtering.
$filter_performed = false;
@ -629,41 +639,86 @@ if ($downtimes === false && $filter_performed === false) {
// No downtimes cause the user performed a search.
// Filter form.
echo '<form method="post" action="'.$url_list.'">';
html_print_table($table_form);
$outputTable = html_print_table($table_form, true);
$outputTable .= html_print_div(
[
'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button(
__('Filter'),
'search',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
),
],
true
);
ui_toggle(
$outputTable,
'<span class="subsection_header_title">'.__('Filters').'</span>',
__('Filters'),
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
echo '</form>';
// Info message.
echo '<div class="nf">'.__('No scheduled downtime').'</div>';
ui_print_info_message(__('No scheduled downtime'));
// Create button.
if ($write_permisson === true) {
echo '<form method="post" class="display_in" action="'.$url_editor.'">';
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Create'),
'create',
false,
['icon' => 'next'],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Create'),
'create',
false,
['icon' => 'next'],
true
)
);
echo '</form>';
}
} else {
// Has downtimes.
echo '<form method="post" action="'.$url_list.'">';
html_print_table($table_form);
$outputTable = html_print_table($table_form, true);
$outputTable .= html_print_div(
[
'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button(
__('Search'),
'search',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
),
],
true
);
ui_toggle(
$outputTable,
'<span class="subsection_header_title">'.__('Filters').'</span>',
__('Filters'),
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
echo '</form>';
ui_pagination(
$downtimes_number,
$url_list.'&'.$filter_params_str,
$offset
);
// User groups with AR, AD or AW permission.
$groupsAD = users_get_groups($config['id_user'], $access);
$groupsAD = array_keys($groupsAD);
@ -762,17 +817,17 @@ if ($downtimes === false && $filter_performed === false) {
$settings = [
'url' => ui_get_full_url('ajax.php', false, false, false),
'loadingText' => __('Loading, this operation might take several minutes...'),
'title' => __('Agents / Modules affected'),
'title' => __('Elements affected'),
'id' => $downtime['id'],
];
$data['agents_modules'] = '<a href="#" onclick=\'dialogAgentModulesAffected('.json_encode($settings).')\'>';
$data['agents_modules'] .= html_print_image(
'images/search_big.png',
'images/details.svg',
true,
[
'title' => __('Agents and modules affected'),
'style' => 'width:22px; height: 22px;',
'class' => 'main_menu_icon invert_filter',
]
);
$data['agents_modules'] .= '</a>';
@ -789,15 +844,21 @@ if ($downtimes === false && $filter_performed === false) {
$url_list_params = $url_list.'&stop_downtime=1&id_downtime='.$downtime['id'].'&'.$filter_params_str;
$data['stop'] = '<a href="'.$url_list_params.'">';
$data['stop'] .= html_print_image(
'images/cancel.png',
'images/fail@svg.svg',
true,
['title' => __('Stop downtime')]
[
'title' => __('Stop downtime'),
'class' => 'main_menu_icon invert_filter',
]
);
} else {
$data['stop'] = html_print_image(
'images/cancel.png',
'images/fail@svg.svg',
true,
['title' => __('Stop downtime')]
[
'title' => __('Stop downtime'),
'class' => 'main_menu_icon invert_filter',
]
);
}
} else {
@ -812,11 +873,11 @@ if ($downtimes === false && $filter_performed === false) {
// Copy.
$data['copy'] = '<a href="'.$url_editor.'&downtime_copy=1&id_downtime='.$downtime['id'].'">';
$data['copy'] .= html_print_image(
'images/copy.png',
'images/copy.svg',
true,
[
'title' => __('Copy'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data['copy'] .= '</a>';
@ -824,11 +885,11 @@ if ($downtimes === false && $filter_performed === false) {
// Edit.
$data['edit'] = '<a href="'.$url_editor.'&edit_downtime=1&id_downtime='.$downtime['id'].'">';
$data['edit'] .= html_print_image(
'images/config.png',
'images/configuration@svg.svg',
true,
[
'title' => __('Update'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data['edit'] .= '</a>';
@ -837,11 +898,11 @@ if ($downtimes === false && $filter_performed === false) {
$url_delete = $url_list.'&delete_downtime=1&id_downtime='.$downtime['id'].'&'.$filter_params_str;
$data['delete'] = '<a id="delete_downtime" href="'.$url_delete.'">';
$data['delete'] .= html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data['delete'] .= '</a>';
@ -858,22 +919,22 @@ if ($downtimes === false && $filter_performed === false) {
// Copy.
$data['copy'] = '<a href="'.$url_editor.'&downtime_copy=1&id_downtime='.$downtime['id'].'">';
$data['copy'] .= html_print_image(
'images/copy.png',
'images/copy.svg',
true,
[
'title' => __('Copy'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data['copy'] .= '</a>';
// Edit.
$data['edit'] = '<a href="'.$url_editor.'&edit_downtime=1&id_downtime='.$downtime['id'].'">';
$data['edit'] .= html_print_image(
'images/config.png',
'images/configuration@svg.svg',
true,
[
'title' => __('Update'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data['edit'] .= '</a>';
@ -910,44 +971,47 @@ if ($downtimes === false && $filter_performed === false) {
}
html_print_table($table);
ui_pagination(
$tablePagination = ui_pagination(
$downtimes_number,
$url_list.'&'.$filter_params_str,
$offset,
0,
false,
'offset',
true,
'pagination-bottom'
'offset',
false
);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
// CSV export button.
echo '<div class="display_in">';
html_print_button(
__('Export to CSV'),
'csv_export',
false,
'blockResubmit($(this)); location.href=\'godmode/agentes/planned_downtime.export_csv.php?'.$filter_params_str.'\'',
'class="sub next"'
);
echo '</div>';
$actionsButtons = '';
// Create button.
if ($write_permisson === true) {
echo '&nbsp;';
echo '<form method="post" action="'.$url_editor.'" class="display_in" >';
html_print_submit_button(
$actionsButtons .= '<form method="post" action="'.$url_editor.'" class="display_in" >';
$actionsButtons .= html_print_submit_button(
__('Create'),
'create',
false,
'class="sub next"'
['icon' => 'next'],
true
);
echo '</form>';
$actionsButtons .= '</form>';
}
echo '</div>';
// CSV export button.
$actionsButtons .= html_print_button(
__('Export to CSV'),
'csv_export',
false,
'blockResubmit($(this)); location.href="godmode/agentes/planned_downtime.export_csv.php?'.$filter_params_str.'"',
[
'icon' => 'load',
'mode' => 'secondary',
],
true
);
html_print_action_buttons(
$actionsButtons,
[ 'right_content' => $tablePagination ]
);
}
ui_require_jquery_file(

View File

@ -174,7 +174,7 @@ if (is_ajax()) {
5,
1,
'',
'class="fields"',
'class="fields w100p"',
true,
'',
$is_management_allowed
@ -307,7 +307,8 @@ if (is_ajax()) {
false,
false,
'fields',
$is_management_allowed
$is_management_allowed,
'width: 100%;'
);
$rfield .= html_print_select(
@ -321,7 +322,8 @@ if (is_ajax()) {
false,
false,
'fields',
$is_management_allowed
$is_management_allowed,
'width: 100%;'
);
$ffield .= html_print_input_text('field'.$i.'_value[]', '', '', 10, 10, true, false, false, '', 'datepicker');
@ -487,7 +489,7 @@ if (is_ajax()) {
5,
1,
$fv[0],
'style="'.$style.'" class="fields min-height-40px"',
'style="'.$style.'" class="fields min-height-40px w100p"',
true,
'',
$is_management_allowed
@ -497,7 +499,7 @@ if (is_ajax()) {
5,
1,
$fv[0],
'style="'.$style.'" class="fields_recovery min-height-40px',
'style="'.$style.'" class="fields_recovery min-height-40px w100p',
true,
'',
$is_management_allowed
@ -510,7 +512,7 @@ if (is_ajax()) {
5,
1,
'',
'style="'.$style.'" class="fields min-height-40px"',
'style="'.$style.'" class="fields min-height-40px w100p"',
true,
'',
$is_management_allowed
@ -520,7 +522,7 @@ if (is_ajax()) {
5,
1,
'',
'style="'.$style.'" class="fields_recovery min-height-40px"',
'style="'.$style.'" class="fields_recovery min-height-40px w100p"',
true,
'',
$is_management_allowed
@ -807,10 +809,10 @@ foreach ($commands as $command) {
if (is_user_admin($config['id_user']) === true) {
$data['action'] = '<span class="inline_flex">';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&amp;copy_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).'</a>';
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/copy.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
$data['action'] .= '<a href="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'&pure='.$pure.'&offset='.$offset_delete.'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>';
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>';
$data['action'] .= '</span>';
}
}

View File

@ -123,7 +123,7 @@ $table->data[1][0] = html_print_label_input_block(
'w100p',
false,
'width: 100%;'
).'<span id="advanced_action" class="advanced_actions invisible"><br>'.__('Number of alerts match from').' '.html_print_input_text('fires_min', '', '', 4, 10, true).' '.__('to').' '.html_print_input_text('fires_max', '', '', 4, 10, true).'</span>'.$create_action
).'<span id="advanced_action" class="advanced_actions invisible"><br>'.__('Number of alerts match from').' '.html_print_input_text('fires_min', '', '', 4, 10, true).' '.__('to').' '.html_print_input_text('fires_max', '', '', 4, 10, true).'</span><div class="flex_justify_end">'.$create_action.'</div>'
);
$own_info = get_user_info($config['id_user']);
@ -162,7 +162,7 @@ $table->data[1][1] = html_print_label_input_block(
'w100p',
false,
'width: 100%;'
).' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a>'.$create_template
).' <a class="template_details invisible" href="#">'.html_print_image('images/zoom.png', true, ['class' => 'img_help']).'</a><div class="flex_justify_end">'.$create_template.'</div>'
);
$table->data[2][0] = html_print_label_input_block(

View File

@ -672,10 +672,10 @@ foreach ($simple_alerts as $alert) {
'[&hellip;]',
''
);
$data[2] .= ' <a class="template_details patatas"
$data[2] .= ' <a class="template_details"
href="'.ui_get_full_url(false, false, false, false).'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$alert['id_alert_template'].'">';
$data[2] .= html_print_image(
'images/zoom.png',
'images/details.svg',
true,
[
'id' => 'template-details-'.$alert['id_alert_template'],
@ -753,7 +753,7 @@ foreach ($simple_alerts as $alert) {
'delete',
'images/delete.svg',
1,
'padding:0px; margin-left:5px; margin-right:5px;',
'padding:0px; margin-left:5px; margin-right:5px; width: 22px;',
true,
[
'title' => __('Delete action'),
@ -766,7 +766,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '</form>';
$data[3] .= html_print_input_image(
'update_action',
'images/config.png',
'images/edit.svg',
1,
'padding:0px;',
true,
@ -913,7 +913,7 @@ foreach ($simple_alerts as $alert) {
'enable',
'images/lightbulb_off.png',
1,
'padding:0px',
'padding:0px; width: 22px; height: 22px;',
true,
['class' => 'filter_none main_menu_icon']
);
@ -923,7 +923,7 @@ foreach ($simple_alerts as $alert) {
'disable',
'images/lightbulb.png',
1,
'padding:0px;',
'padding:0px; width: 22px; height: 22px;',
true,
['class' => 'main_menu_icon']
);
@ -941,7 +941,7 @@ foreach ($simple_alerts as $alert) {
'standby_off',
'images/bell.png',
1,
'padding:0px;',
'padding:0px; width: 22px; height: 22px;',
true,
['class' => 'invert_filter main_menu_icon']
);
@ -951,7 +951,7 @@ foreach ($simple_alerts as $alert) {
'standby_on',
'images/bell_pause.png',
1,
'padding:0px;',
'padding:0px; width: 22px; height: 22px;',
true,
['class' => 'invert_filter main_menu_icon']
);
@ -1053,7 +1053,7 @@ foreach ($simple_alerts as $alert) {
$data[4] .= '<form class="view_alert_form display_in" method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_view">';
$data[4] .= html_print_input_image(
'view_alert',
'images/operation.png',
'images/details.svg',
1,
'',
true,

View File

@ -478,17 +478,17 @@ if ($standbyoff_alert) {
$searchFlag = true;
if (!is_metaconsole()) {
if (is_metaconsole() === false) {
// The tabs will be shown only with manage alerts permissions
if (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], 0, 'LM')) {
$buttons = [
'list' => [
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List alerts'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list&pure='.$pure.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('List alerts'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
'builder' => [
'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'.html_print_image('images/pencil.png', true, ['title' => __('Builder alert'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'.html_print_image('images/edit.svg', true, ['title' => __('Builder alert'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
];
@ -497,44 +497,46 @@ if (!is_metaconsole()) {
$buttons = '';
}
if ($tab == 'list') {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
$buttons,
[
if ($tab !== 'alert') {
if ($tab === 'list') {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
$buttons,
[
'link' => '',
'label' => __('Manage alerts'),
],
[
'link' => '',
'label' => __('Manage alerts'),
],
[
'link' => '',
'label' => __('List'),
],
]
);
} else {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
$buttons,
[
'link' => '',
'label' => __('List'),
],
]
);
} else {
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true,
$buttons,
[
[
'link' => '',
'label' => __('Manage alerts'),
],
[
'link' => '',
'label' => __('Create'),
],
]
);
[
'link' => '',
'label' => __('Manage alerts'),
],
[
'link' => '',
'label' => __('Create'),
],
]
);
}
}
} else {
alerts_meta_print_header();

View File

@ -450,7 +450,7 @@ foreach ($templates as $template) {
$data[4] .= html_print_input_hidden('source_id', $template['id'], true);
$data[4] .= html_print_input_image(
'dup',
'images/copy.png',
'images/copy.svg',
1,
'',
true,

View File

@ -61,13 +61,19 @@ if ($default_action != 0) {
}
// Header.
ui_print_page_header(
ui_print_standard_header(
__('Alert details'),
'images/op_alerts.png',
false,
'',
false,
''
[],
[
[
'link' => '',
'label' => __('Alerts'),
],
]
);
// TABLE DETAILS.

View File

@ -262,10 +262,7 @@ if ($is_management_allowed === true) {
[ 'icon' => 'next' ],
true
),
[
'type' => 'form_action',
'right_content' => $tablePagination,
]
[ 'right_content' => $tablePagination ]
);
echo '</form>';

View File

@ -132,7 +132,8 @@ $table->data[1][1] = '<a href="javascript:">'.html_print_image(
[
'id' => 'right',
'title' => __('Add fields to select'),
'style' => 'rotate: 180deg; width: 40px',
'style' => 'rotate: 180deg;',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
@ -141,7 +142,7 @@ $table->data[1][1] .= '<br><br><br><br><a href="javascript:">'.html_print_image(
[
'id' => 'left',
'title' => __('Delete fields to select'),
'style' => 'width: 40px',
'style' => '',
]
).'</a>';
@ -169,6 +170,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
[
'onclick' => 'sortUpDown(\'up\');',
'title' => __('Move up selected fields'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[1][2] .= '<a href="javascript:">'.html_print_image(
@ -177,6 +179,7 @@ $table->data[1][2] .= '<a href="javascript:">'.html_print_image(
[
'onclick' => 'sortUpDown(\'down\');',
'title' => __('Move down selected fields'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$table->data[1][2] .= '</div></div>';

View File

@ -778,7 +778,7 @@ $table->data[12][0] = html_print_label_input_block(
if (!is_metaconsole()) {
$table->data[12][1] = html_print_label_input_block(
__('Module search'),
'<div class="w100p">'.html_print_autocomplete_modules(
'<div class="w100p module-search">'.html_print_autocomplete_modules(
'module_search',
$text_module,
false,

View File

@ -59,6 +59,14 @@ if ($delete) {
}
if ($result !== false) {
db_process_sql_delete(
'tfavmenu_user',
[
'id_element' => $id_filter,
'section' => 'Events',
'id_user' => $config['id_user'],
]
);
$result = true;
} else {
$result = false;
@ -186,7 +194,7 @@ foreach ($filters as $filter) {
) {
$table->cellclass[][6] = 'table_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&section=filter&delete=1&id=".$filter['id_filter'].'&offset=0&pure='.$config['pure']."'>".html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete'),
@ -243,11 +251,7 @@ $submitButtons .= html_print_submit_button(
);
html_print_action_buttons(
$submitButtons,
[
'type' => 'form_action',
'id' => 'list-events-filters',
]
$submitButtons
);
?>

View File

@ -24,8 +24,29 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
exit;
}
// Header
ui_print_page_header(__('Extensions').' &raquo; '.__('Defined extensions'), 'images/extensions.png', false, '', true, '');
// Header.
ui_print_standard_header(
__('Extensions'),
'images/extensions.png',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Admin tools'),
],
[
'link' => '',
'label' => __('Extension manager'),
],
[
'link' => '',
'label' => __('Defined extensions'),
],
]
);
if (count($config['extensions']) == 0) {
$extensions = extensions_get_extension_info();
@ -132,7 +153,7 @@ if ($disabled != '') {
$extensions = extensions_get_extension_info();
$table = new StdClass;
$table->width = '98%';
$table->width = '100%';
$table->head = [];
$table->head[] = __('File');
@ -146,7 +167,7 @@ $table->head[] = __('Login Function');
$table->head[] = __('Agent operation tab');
$table->head[] = __('Agent godmode tab');
$table->head[] = __('Operation');
$table->width = '100%';
$table->class = 'info_table';
$table->align = [];
@ -254,9 +275,40 @@ foreach ($extensions as $file => $extension) {
if ($file != 'update_manager.php') {
$table->cellclass[][10] = 'table_action_buttons';
if (!$extension['enabled']) {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.disabled.png', true, ['class' => 'filter_none']).'</a>'.' <a title="'.__('Enable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file.'" class="mn">'.html_print_image('images/lightbulb_off.png', true, ['class' => 'filter_none']).'</a>';
$data[] = html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file,
'image' => 'images/cross.disabled.png',
'title' => __('Delete'),
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
],
true
).html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&enabled='.$file,
'image' => 'images/lightbulb_off.png',
'title' => __('Delete'),
],
true
);
} else {
$data[] = '<a title="'.__('Delete').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file.'" class="mn">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>'.' <a title="'.__('Disable').'" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file.'" class="mn">'.html_print_image('images/lightbulb.png', true).'</a>';
$data[] = html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&delete='.$file,
'image' => 'images/delete.svg',
'class' => 'main_menu_icon invert_filter',
'title' => __('Delete'),
'onClick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;',
],
true
).html_print_menu_button(
[
'href' => 'index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise='.(int) $extension['enterprise'].'&disabled='.$file,
'image' => 'images/lightbulb.png',
'title' => __('Delete'),
],
true
);
}
} else {
$data[] = '';

View File

@ -698,7 +698,7 @@ echo '</form>';
<td><a id="delete_row" href="none">
<?php
html_print_image(
'images/cross.png',
'images/delete.svg',
false,
[
'alt' => '',
@ -1005,7 +1005,7 @@ function getAgentRow (layerId, agentId, agentAlias) {
var $deleteCol = $("<td />");
var $agentAlias = $("<span class=\"agent_alias\" data-agent-id=\"" + agentId + "\">" + agentAlias + "</span>");
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/cross.png', false, ['class' => 'invert_filter']); ?> </a>');
var $removeBtn = $('<a class="delete_row" href="javascript:" <?php echo html_print_image('images/delete.svg', false, ['class' => 'invert_filter']); ?> </a>');
$removeBtn.click(function (event) {
var $layerRow = $("tr#layer_row_" + layerId);
@ -1061,7 +1061,7 @@ function getGroupRow (layerId, groupId, groupName, agentId, agentAlias) {
+ "<i>" + agentAlias + "</i>"
+ ")"
+ "</span>");
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>');
$removeBtn.click(function (event) {
var $layerRow = $("tr#layer_row_" + layerId);
@ -1139,8 +1139,8 @@ function getLayerRow (layerId, layerData) {
var $layerName = $("<span class=\"layer_name\">" + layerData.name + "</span>");
var $sortUpBtn = $("<a class=\"up_arrow\" href=\"javascript:;\" />");
var $sortDownBtn = $("<a class=\"down_arrow\" href=\"javascript:;\" />");
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/config.png', true, ['class' => 'invert_filter']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']); ?></a>');
var $editBtn = $('<a class="edit_layer" href="javascript:;"><?php echo html_print_image('images/edit.svg', true, ['class' => 'invert_filter']); ?></a>');
var $removeBtn = $('<a class="delete_row" href="javascript:;"><?php echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']); ?></a>');
$sortUpBtn.click(moveLayerRowUpOnClick);
$sortDownBtn.click(moveLayerRowDownOnClick);

View File

@ -714,6 +714,14 @@ if ($is_management_allowed === true
);
if ($result && (!$usedGroup['return'])) {
db_process_sql_delete(
'tfavmenu_user',
[
'id_element' => $id_group,
'section' => 'Groups',
'id_user' => $config['id_user'],
]
);
ui_print_success_message(__('Group successfully deleted'));
} else {
ui_print_error_message(
@ -898,7 +906,6 @@ if ($tab == 'tree') {
foreach ($groups as $key => $group) {
$url_edit = 'index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'];
$url_tactical = 'index.php?sec=gagente&sec2=godmode/groups/tactical&id_group='.$group['id_grupo'];
if (is_metaconsole()) {
$url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo'].'&tab=groups';
} else {
@ -907,7 +914,7 @@ if ($tab == 'tree') {
$table->data[$key][0] = $group['id_grupo'];
if ($is_management_allowed === true) {
$table->data[$key][1] = '<a href="'.$url_tactical.'">'.$group['nombre'].'</a>';
$table->data[$key][1] = '<a href="'.$url_edit.'">'.$group['nombre'].'</a>';
} else {
$table->data[$key][1] = $group['nombre'];
}
@ -918,7 +925,7 @@ if ($tab == 'tree') {
true,
[
'style' => '',
'class' => 'bot',
'class' => 'bot main_menu_icon invert_filter',
'alt' => io_safe_input($group['nombre']),
'title' => io_safe_input($group['nombre']),
],

View File

@ -72,8 +72,14 @@ if (is_metaconsole() === false) {
],
[
'link' => '',
'label' => __('Tactic group'),
'label' => __('Tactical group view'),
],
],
[
'id_element' => $id_group,
'url' => 'gagent&sec2=godmode/groups/tactical&id_group='.$id_group,
'label' => groups_get_name($id_group),
'section' => 'Groups',
]
);
}
@ -181,7 +187,7 @@ try {
[
'id' => 'list_agents_tactical',
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $columnNames,
'return' => true,
@ -190,6 +196,7 @@ try {
'method' => 'getAgentsByGroup',
'id_group' => $id_group,
],
'dom_elements' => 'lpfti',
'no_sortable_columns' => [-1],
'order' => [
'field' => 'alias',

View File

@ -216,7 +216,7 @@ if ($option == '') {
$alertstab = [
'text' => '<a href="'.$url.'&tab=massive_alerts">'.html_print_image(
'images/bell.png',
'images/alert@svg.svg',
true,
[
'title' => __('Alerts operations'),
@ -228,7 +228,7 @@ $alertstab = [
$userstab = [
'text' => '<a href="'.$url.'&tab=massive_users">'.html_print_image(
'images/user.png',
'images/user.svg',
true,
[
'title' => __('Users operations'),
@ -240,7 +240,7 @@ $userstab = [
$agentstab = [
'text' => '<a href="'.$url.'&tab=massive_agents">'.html_print_image(
'images/agent.png',
'images/agents@svg.svg',
true,
[
'title' => __('Agents operations'),
@ -252,7 +252,7 @@ $agentstab = [
$modulestab = [
'text' => '<a href="'.$url.'&tab=massive_modules">'.html_print_image(
'images/module.png',
'images/modules@svg.svg',
true,
[
'title' => __('Modules operations'),
@ -264,7 +264,7 @@ $modulestab = [
$pluginstab = [
'text' => '<a href="'.$url.'&tab=massive_plugins">'.html_print_image(
'images/plugin.png',
'images/plugins@svg.svg',
true,
[
'title' => __('Plugins operations'),

View File

@ -388,6 +388,9 @@ if ($access_console_node === true) {
$sub2['godmode/setup/setup&section=external_tools']['text'] = __('External Tools');
$sub2['godmode/setup/setup&section=external_tools']['refr'] = 0;
$sub2['godmode/setup/setup&section=welcome_tips']['text'] = __('Welcome Tips');
$sub2['godmode/setup/setup&section=welcome_tips']['refr'] = 0;
if ((bool) $config['activate_gis'] === true) {
$sub2['godmode/setup/setup&section=gis']['text'] = __('Map conections GIS');
}

View File

@ -45,18 +45,18 @@ if (! check_acl($config['id_user'], 0, 'AR')) {
if (check_acl($config['id_user'], 0, 'PM') && enterprise_installed()) {
$buttons['setup'] = [
'active' => false,
'text' => '<a href="index.php?sec=general&sec2=godmode/setup/setup&amp;section=module_library">'.html_print_image('images/gm_setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=general&sec2=godmode/setup/setup&amp;section=module_library">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
}
$buttons['categories'] = [
'active' => false,
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.html_print_image('images/list.png', true, ['title' => __('Categories'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view&tab=categories">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Categories'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
$buttons['view'] = [
'active' => false,
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view">'.html_print_image('images/eye_show.png', true, ['title' => __('View'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=gmodule_library&sec2=godmode/module_library/module_library_view">'.html_print_image('images/see-details@svg.svg', true, ['title' => __('View'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];

View File

@ -43,7 +43,7 @@ if (is_metaconsole() === true) {
ui_print_standard_header(
__('Inventory modules'),
'images/page_white_text.png',
'images/hardware-software-component@svg.svg',
false,
'',
true,
@ -293,6 +293,7 @@ $table->head[3] = __('Interpreter');
if ($management_allowed === true) {
$table->head[4] = __('Action').html_print_checkbox('all_delete', 0, false, true, false);
$table->size[4] = '80px';
}
$result = inventory_get_modules_list($offset);
@ -414,30 +415,14 @@ if (is_metaconsole() === true) {
?>
<script type="text/javascript">
$( document ).ready(function() {
$('[id^=checkbox-delete_multiple]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete]').change(function() {
if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected');
$(".check_delete").prop("checked", true);
if ($("input[name=all_delete]").prop("checked")) {
$(".custom_checkbox_input").prop("checked", true);
}
else {
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected');
$(".check_delete").prop("checked", false);
$(".custom_checkbox_input").prop("checked", false);
}
});
});
</script>

View File

@ -104,7 +104,7 @@ function generateExtraFields($extra_fields, $protocol)
'class' => 'float-right',
'style' => $cntFields <= 1 ? 'opacity: 0.5;' : '',
'content' => html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Remove last macro oid'),

View File

@ -266,7 +266,7 @@ foreach ($result as $row) {
$table->cellclass[][3] = 'table_action_buttons';
$data[3] = html_print_input_image(
'delete_profile',
'images/cross.png',
'images/delete.svg',
$row['id_np'],
'',
true,
@ -286,7 +286,7 @@ foreach ($result as $row) {
'class' => 'invert_filter',
]
);
$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'), 'class' => 'invert_filter']).'</a>';
$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/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
$data[3] .= '<a onclick="blockResubmit($(this))" 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'), 'class' => 'invert_filter']).'</a>';
array_push($table->data, $data);

View File

@ -1,16 +1,31 @@
<?php
/**
* Netflow Filter view
*
* @category Netflow
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
require_once $config['homedir'].'/include/functions_ui.php';
@ -30,35 +45,25 @@ if (! check_acl($config['id_user'], 0, 'AW')) {
$pure = get_parameter('pure', 0);
// Header
if (! defined('METACONSOLE')) {
ui_print_page_header(
__('Manage Netflow Filter'),
'images/gm_netflow.png',
false,
'',
true
);
$is_windows = strtoupper(substr(PHP_OS, 0, 3)) == 'WIN';
if ($is_windows) {
ui_print_error_message(__('Not supported in Windows systems'));
}
} else {
$nav_bar = [
// Header.
ui_print_standard_header(
__('Manage Filters'),
'images/gm_netflow.png',
false,
'',
true,
[],
[
[
'link' => 'index.php?sec=main',
'text' => __('Main'),
'link' => '',
'label' => __('Netflow'),
],
[
'link' => 'index.php?sec=netf&sec2=godmode/netflow/nf_edit',
'text' => __('Netflow filters'),
],
];
],
);
ui_meta_print_page_header($nav_bar);
ui_meta_print_header(__('Netflow filters'));
$is_windows = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
if ($is_windows === true) {
ui_print_error_message(__('Not supported in Windows systems'));
}
$delete = (bool) get_parameter('delete');
@ -190,30 +195,36 @@ foreach ($filters as $filter) {
if (check_acl_restricted_all($config['id_user'], $filter['id_group'], 'AW')) {
$table->cellclass[][3] = 'table_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'), 'class' => 'invert_filter']).'</a>';
$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.'">';
$data[3] .= html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'main_menu_icon invert_filter']);
$data[3] .= '</a>';
}
array_push($table->data, $data);
}
if (isset($data)) {
echo "<form method='post' action='".$config['homeurl']."index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure=$pure'>";
$buttons = html_print_submit_button(
__('Create filter'),
'crt',
false,
['icon' => 'wand'],
true
);
if (empty($filters) === false) {
echo '<form id="multiple_delete" method="POST" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit&pure='.$pure.'">';
html_print_input_hidden('multiple_delete', 1);
html_print_table($table);
echo "<div class='right'>";
html_print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"');
echo '</div>';
echo '</form>';
$buttons .= html_print_submit_button(__('Delete'), 'delete_btn', false, ['icon' => 'delete', 'mode' => 'secondary', 'form' => 'multiple_delete'], true);
} else {
ui_print_info_message(['no_close' => true, 'message' => __('There are no defined filters') ]);
}
echo '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&pure='.$pure.'">';
echo "<div class='mrgn_right_5px right'>";
html_print_submit_button(__('Create filter'), 'crt', false, 'class="sub wand"');
echo '</div>';
html_print_action_buttons(
$buttons
);
echo '</form>';
?>
@ -221,27 +232,14 @@ echo '</form>';
<script type="text/javascript">
$( document ).ready(function() {
$('[id^=checkbox-delete_multiple]').change(function(){
if($(this).parent().parent().hasClass('checkselected')){
$(this).parent().parent().removeClass('checkselected');
$('[id^=checkbox-all_delete]').change(function() {
if ($("input[name=all_delete]").prop("checked")) {
$(".custom_checkbox_input").prop("checked", true);
}
else{
$(this).parent().parent().addClass('checkselected');
else {
$(".custom_checkbox_input").prop("checked", false);
}
});
$('[id^=checkbox-all_delete]').change(function(){
if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected');
$(".check_delete").prop("checked", true);
}
else{
$('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected');
$(".check_delete").prop("checked", false);
}
});
});

View File

@ -1,16 +1,31 @@
<?php
/**
* Netflow Filter Editor.
*
* @category Netflow
* @package Pandora FMS
* @subpackage Community
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
require_once $config['homedir'].'/include/functions_ui.php';
@ -46,40 +61,28 @@ if ($id) {
}
}
// Header
if (! defined('METACONSOLE')) {
$buttons['edit']['text'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'.html_print_image('images/list.png', true, ['title' => __('Filter list')]).'</a>';
// Header Buttons.
$buttons = [];
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit">'.html_print_image('images/logs@svg.svg', true, ['title' => __('Filter list')]).'</a>'];
$buttons[] = ['text' => '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'.html_print_image('images/plus@svg.svg', true, ['title' => __('Add filter')]).'</a>'];
// Header Caption.
$headerTitle = ($id) ? __('Update filter') : __('Create filter');
$buttons['add']['text'] = '<a href="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">'.html_print_image('images/add_mc.png', true, ['title' => __('Add filter')]).'</a>';
ui_print_page_header(
__('Netflow Filter'),
'images/gm_netflow.png',
false,
'',
true,
$buttons
);
} else {
$nav_bar = [
// Header.
ui_print_standard_header(
$headerTitle,
'images/gm_netflow.png',
false,
'',
true,
$buttons,
[
[
'link' => 'index.php?sec=main',
'text' => __('Main'),
'link' => '',
'label' => __('Netflow'),
],
[
'link' => 'index.php?sec=netf&sec2=godmode/netflow/nf_edit',
'text' => __('Netflow filters'),
],
[
'link' => 'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form',
'text' => __('Add filter'),
],
];
ui_meta_print_page_header($nav_bar);
ui_meta_print_header(__('Netflow filters'));
}
],
);
if ($id) {
$filter = netflow_filter_get_filter($id);
@ -127,7 +130,7 @@ if ($update) {
'advanced_filter' => $advanced_filter,
];
// Save filter args
// Save filter args.
$values['filter_args'] = netflow_get_filter_arguments($values, true);
$result = db_process_sql_update('tnetflow_filter', $values, ['id_sg' => $id]);
@ -172,83 +175,8 @@ if ($create) {
}
}
$table = new stdClass();
$table->id = 'table1';
$table->width = '100%';
$table->border = 0;
$table->cellspacing = 0;
$table->cellpadding = 0;
$table->class = 'databox filters';
$table->style[0] = 'font-weight: bold';
if (defined('METACONSOLE')) {
if ($id) {
$table->head[0] = __('Update filter');
} else {
$table->head[0] = __('Create filter');
}
$table->head_colspan[0] = 5;
$table->headstyle[0] = 'text-align: center';
}
$table->data = [];
$table->data[0][0] = '<b>'.__('Name').'</b>';
$table->data[0][1] = html_print_input_text('name', $name, false, 20, 80, true);
$own_info = get_user_info($config['id_user']);
$table->data[1][0] = '<b>'.__('Group').'</b>';
// Fix: Netflow filters have to check RW ACL
$table->data[1][1] = html_print_select_groups(
$config['id_user'],
'RW',
$own_info['is_admin'],
'assign_group',
$assign_group,
'',
'',
-1,
true,
false,
false,
'',
false,
false,
false,
false,
'id_grupo',
false,
false,
false,
'250px'
);
if ($advanced_filter != '') {
$filter_type = 1;
} else {
$filter_type = 0;
}
$table->data[2][0] = '<b>'.__('Filter:').'</b>';
$table->data[2][1] = __('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'class="mrgn_right_40px"', true);
$table->data[2][1] .= __('Advanced').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'class="mrgn_right_40px"', true);
$table->data[3][0] = __('Dst Ip').ui_print_help_tip(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true);
$table->data[3][1] = html_print_input_text('ip_dst', $ip_dst, false, 40, 80, true);
$table->data[4][0] = __('Src Ip').ui_print_help_tip(__('Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true);
$table->data[4][1] = html_print_input_text('ip_src', $ip_src, false, 40, 80, true);
$table->data[5][0] = __('Dst Port').ui_print_help_tip(__('Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true);
$table->data[5][1] = html_print_input_text('dst_port', $dst_port, false, 40, 80, true);
$table->data[6][0] = __('Src Port').ui_print_help_tip(__('Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true);
$table->data[6][1] = html_print_input_text('src_port', $src_port, false, 40, 80, true);
$table->data[7][1] = html_print_textarea('advanced_filter', 4, 40, $advanced_filter, '', true);
$table->data[8][0] = '<b>'.__('Aggregate by').'</b>';
$filter_type = (empty($advanced_filter) === false) ? 1 : 0;
$aggregate_list = [
'srcip' => __('Src Ip Address'),
'dstip' => __('Dst Ip Address'),
@ -256,27 +184,194 @@ $aggregate_list = [
'dstport' => __('Dst Port'),
];
$table->data[8][1] = html_print_select($aggregate_list, 'aggregate', $aggregate, '', '', 0, true, false, true, '', false);
echo '<form method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&pure='.$pure.'">';
html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">';
$table = new stdClass();
$table->id = 'table1';
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->size = [];
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$table->data['first_line'][] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
$name,
false,
20,
80,
true
)
);
$table->data['first_line'][] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
$config['id_user'],
'RW',
$own_info['is_admin'],
'assign_group',
$assign_group,
'',
'',
-1,
true,
false,
false,
'',
false,
false,
false,
false,
'id_grupo',
false,
false,
false,
'250px'
)
);
$table->data['filter_line'][] = html_print_label_input_block(
__('Filter'),
html_print_div(
[
'class' => 'flex',
'content' => html_print_div(
[
'class' => 'flex-row-end',
'content' => __('Normal').' '.html_print_radio_button_extended('filter_type', 0, '', $filter_type, false, 'displayNormalFilter();', 'class="mrgn_right_40px"', true),
],
true
).html_print_div(
[
'class' => 'flex-row-end',
'content' => __('Advanced').' '.html_print_radio_button_extended('filter_type', 1, '', $filter_type, false, 'displayAdvancedFilter();', 'class="mrgn_right_40px"', true),
],
true
),
],
true
),
);
$table->data['filter_line'][] = html_print_label_input_block(
__('Aggregate by'),
html_print_select(
$aggregate_list,
'aggregate',
$aggregate,
'',
'',
0,
true,
false,
true,
'',
false
)
);
$table->data['ip_line'][] = html_print_label_input_block(
__('Dst Ip'),
html_print_input_text(
'ip_dst',
$ip_dst,
false,
40,
80,
true
).ui_print_input_placeholder(__('Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true)
);
$table->data['ip_line'][] = html_print_label_input_block(
__('Src Ip'),
html_print_input_text(
'ip_src',
$ip_src,
false,
40,
80,
true
).ui_print_input_placeholder(__('Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:<br>25.46.157.214,160.253.135.249'), true)
);
$table->data['ports_line'][] = html_print_label_input_block(
__('Dst Port'),
html_print_input_text(
'dst_port',
$dst_port,
false,
40,
80,
true
).ui_print_input_placeholder(__('Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true)
);
$table->data['ports_line'][] = html_print_label_input_block(
__('Src Port'),
html_print_input_text(
'src_port',
$src_port,
false,
40,
80,
true
).ui_print_input_placeholder(__('Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:<br>80,22'), true)
);
$table->colspan['advanced_filters'][] = 2;
$table->data['advanced_filters'][] = html_print_label_input_block(
__('Advanced filters'),
html_print_textarea('advanced_filter', 4, 40, $advanced_filter, '', true, 'w50p')
);
$hiddens = '';
if ($id) {
html_print_input_hidden('update', 1);
html_print_input_hidden('id', $id);
html_print_submit_button(__('Update'), 'crt', false, 'class="sub upd"');
$buttonTitle = __('Update');
$hiddens .= html_print_input_hidden('update', 1, true);
$hiddens .= html_print_input_hidden('id', $id, true);
} else {
html_print_input_hidden('create', 1);
html_print_submit_button(__('Create'), 'crt', false, 'class="sub wand"');
$buttonTitle = __('Create');
$hiddens .= html_print_input_hidden('create', 1, true);
}
echo '</div>';
echo '<form class="max_floating_element_size" id="nf_edit_form" method="post" action="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_edit_form&pure='.$pure.'">';
echo $hiddens;
html_print_table($table);
echo '</form>';
html_print_action_buttons(
html_print_submit_button(
$buttonTitle,
'crt',
false,
[
'icon' => 'upd',
'form' => 'nf_edit_form',
],
true
)
);
?>
<script type="text/javascript">
$(document).ready(function(){
var filter_type = <?php echo $filter_type; ?>;
if (filter_type == 0) {
displayNormalFilter ();
}
else {
displayAdvancedFilter ();
}
});
function displayAdvancedFilter () {
console.log('papapa advanced filter');
// Erase the normal filter
document.getElementById("text-ip_dst").value = '';
document.getElementById("text-ip_src").value = '';
@ -284,34 +379,32 @@ echo '</form>';
document.getElementById("text-src_port").value = '';
// Hide the normal filter
document.getElementById("table1-3").style.display = 'none';
document.getElementById("table1-4").style.display = 'none';
document.getElementById("table1-5").style.display = 'none';
document.getElementById("table1-6").style.display = 'none';
//document.getElementById("table1-3").style.display = 'none';
//document.getElementById("table1-4").style.display = 'none';
//document.getElementById("table1-5").style.display = 'none';
//document.getElementById("table1-6").style.display = 'none';
$("#table1-ip_line").css("display", "none");
$("#table1-ports_line").css("display", "none");
// Show the advanced filter
document.getElementById("table1-7").style.display = '';
$("#table1-advanced_filters").css("display", "table-row");
//document.getElementById("table1-7").style.display = '';
};
function displayNormalFilter () {
console.log('papapa normal filter');
// Erase the advanced filter
document.getElementById("textarea_advanced_filter").value = '';
// Hide the advanced filter
document.getElementById("table1-7").style.display = 'none';
//document.getElementById("table1-7").style.display = 'none';
$("#table1-advanced_filters").css("display", "none");
// Show the normal filter
$("#table1-ip_line").css("display", "table-row");
$("#table1-ports_line").css("display", "table-row");
/*
document.getElementById("table1-3").style.display = '';
document.getElementById("table1-4").style.display = '';
document.getElementById("table1-5").style.display = '';
document.getElementById("table1-6").style.display = '';
*/
};
var filter_type = <?php echo $filter_type; ?>;
if (filter_type == 0) {
displayNormalFilter ();
}
else {
displayAdvancedFilter ();
}
</script>

View File

@ -30,7 +30,7 @@ $buttons['report_items']['active'] = true;
$buttons['report_items']['text'] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$id.'">'.html_print_image('images/god6.png', true, ['title' => __('Report items')]).'</a>';
$buttons['edit_report']['active'] = false;
$buttons['edit_report']['text'] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$id.'">'.html_print_image('images/config.png', true, ['title' => __('Edit report')]).'</a>';
$buttons['edit_report']['text'] = '<a href="'.$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_report_form&id='.$id.'">'.html_print_image('images/edit.svg', true, ['title' => __('Edit report')]).'</a>';
// Header
if (! defined('METACONSOLE')) {
@ -260,7 +260,7 @@ foreach ($reports_item as $item) {
}
$data[5] = "<a onclick='if(confirm(\"".__('Are you sure?')."\")) return true; else return false;'
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc='.$item['id_rc'].'&id='.$id."&offset=0'>".html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true);
href='".$config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&delete=1&id_rc='.$item['id_rc'].'&id='.$id."&offset=0'>".html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>'.html_print_checkbox_extended('delete_multiple[]', $item['id_rc'], false, false, '', 'class="check_delete"', true);
array_push($table->data, $data);
}

View File

@ -189,6 +189,14 @@ if ($delete_layout || $copy_layout) {
'tlayout',
['id' => $id_layout]
);
db_process_sql_delete(
'tfavmenu_user',
[
'id_element' => $id_layout,
'section' => 'Visual_Console',
'id_user' => $config['id_user'],
]
);
$auditMessage = ((bool) $result === true) ? 'Delete visual console' : 'Fail try to delete visual console';
db_pandora_audit(

View File

@ -923,6 +923,12 @@ switch ($action) {
$selected_agent_group_filter = $es['agent_group_filter'];
$selected_module_group = $es['module_group'];
$search_module_name = $es['search_module_name'];
$tags = $es['tags'];
$alias = $es['alias'];
$description_switch = $es['description_switch'];
$last_status_change = $es['last_status_change'];
break;
case 'inventory':
@ -2633,7 +2639,8 @@ $class = 'databox filters';
'render_definition',
3,
25,
$render_definition
$render_definition,
'style=width:100%'
);
?>
</td>
@ -3920,38 +3927,93 @@ $class = 'databox filters';
<?php
$rows_select = [];
$rows_select[0] = __('Not assigned');
if ($is_metaconsole === false) {
$rows = db_get_all_rows_sql(
'SELECT * FROM tmodule_group ORDER BY name'
);
$rows = io_safe_output($rows);
if (empty($rows) === false) {
foreach ($rows as $module_group) {
$rows_select[$module_group['id_mg']] = $module_group['name'];
}
}
} else {
$rows_select = modules_get_modulegroups();
}
$rows_select = modules_get_modulegroups();
html_print_select($rows_select, 'modulegroup', $modulegroup, '', __($is_none), -1, true, false, true, '', false, 'width: 120px;');
html_print_select(
$rows_select,
'module_group',
'module_group[]',
$selected_module_group,
'',
__('All'),
-1,
false,
'',
'',
false,
true,
true,
'',
false,
'width: 120px;'
'width: 200px;'
);
?>
</td>
</tr>
<tr id="row_search_module_name" class="datos">
<td class="bolder">
<?php echo __('Search module name'); ?>
</td>
<td >
<?php
html_print_input_text('search_module_name', $search_module_name, '', 40, 100);
?>
</td>
</tr>
<tr id="row_tags" class="datos">
<td class="bolder">
<?php
echo __('Tags');
?>
</td>
<td>
<?php
$rows_select = [];
$rows_select = tags_get_user_tags();
html_print_select(
$rows_select,
'tags[]',
$tags,
'',
'',
'',
false,
true,
true,
'',
false,
'width: 200px;'
);
?>
</td>
</tr>
<tr id="row_alias" class="datos">
<td class="bolder">
<?php
echo __('Alias');
?>
</td>
<td><?php html_print_checkbox_switch('alias', 1, $alias); ?></td>
</tr>
<tr id="row_description_switch" class="datos">
<td class="bolder">
<?php
echo __('Description');
?>
</td>
<td><?php html_print_checkbox_switch('description_switch', 1, $description_switch); ?></td>
</tr>
<tr id="row_last_status_change" class="datos">
<td class="bolder">
<?php
echo __('Last status change');
?>
</td>
<td><?php html_print_checkbox_switch('last_status_change', 1, $last_status_change); ?></td>
</tr>
</tbody>
</table>
@ -4210,7 +4272,7 @@ function print_SLA_list($width, $action, $idItem=null)
echo '</td>';
echo '<td class="sla_list_action_col center">';
echo '<a href="javascript: deleteSLARow('.$item['id'].');">';
echo html_print_image('images/cross.png', true, ['class' => 'invert_filter']);
echo html_print_image('images/delete.svg', true, ['class' => 'invert_filter']);
echo '</a>';
echo '</td>';
echo '</tr>';
@ -4251,7 +4313,7 @@ function print_SLA_list($width, $action, $idItem=null)
<a class="delete_button" href="javascript: deleteSLARow(0);">
<?php
html_print_image(
'images/cross.png',
'images/delete.svg',
false,
['class' => 'invert_filter']
);
@ -4677,7 +4739,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgentFailover).$server_name_element.'</td>
<td>'.printSmallFont($nameModuleFailover).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
</td>
</tr>';
} else {
@ -4685,7 +4747,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameAgent).$server_name_element.'</td>
<td>'.printSmallFont($nameModule).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
</td>
</tr>';
}
@ -4695,7 +4757,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<td>'.printSmallFont($nameModule).'</td>
<td>'.printSmallFont($operation[$item['operation']]).'</td>
<td class="center">
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>
<a href="javascript: deleteGeneralRow('.$item['id'].');">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>
</td>
</tr>';
}
@ -4733,7 +4795,7 @@ function print_General_list($width, $action, $idItem=null, $type='general')
<a class="delete_button" href="javascript: deleteGeneralRow(0);">
<?php
html_print_image(
'images/cross.png',
'images/delete.svg',
false,
['class' => 'invert_filter']
);
@ -6421,6 +6483,11 @@ function chooseType() {
$("#row_agent_group_filter").hide();
$("#row_module_group_filter").hide();
$("#row_module_group_filter").hide();
$("#row_alias").hide();
$("#row_search_module_name").hide();
$("#row_description_switch").hide();
$("#row_last_status_change").hide();
$("#row_tags").hide();
$("#row_os").hide();
$("#row_custom_field_filter").hide();
$("#row_custom_field").hide();
@ -7047,7 +7114,6 @@ function chooseType() {
$("#row_agents_inventory_display_options").show();
$("#row_agent_server_filter").show();
$("#row_agent_group_filter").show();
$("#row_group").show();
$("#row_os").show();
$("#row_custom_field").show();
$("#row_custom_field_filter").show();
@ -7073,10 +7139,14 @@ function chooseType() {
break;
case 'modules_inventory':
$("#row_group").show();
$("#row_agent_server_filter").show();
$("#row_agent_group_filter").show();
$("#row_module_group_filter").show();
$("#row_alias").show();
$("#row_search_module_name").show();
$("#row_description_switch").show();
$("#row_last_status_change").show();
$("#row_tags").show();
break;

View File

@ -875,7 +875,7 @@ if (defined('METACONSOLE')) {
],
true
);
$form .= html_print_input_hidden('action', 'filter', true);
$form .= html_print_input_hidden('action', 'sort_items', true);
$form .= '</form>';
ui_toggle($form, __('Sort items'), '', '', false);

View File

@ -176,6 +176,31 @@ if (is_metaconsole() === true) {
);
}
if (is_metaconsole() === true) {
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
2,
80,
$description,
'',
true
);
} else {
$table->colspan[1][0] = 2;
$table->data[1][0] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
2,
1,
$description,
'',
true
)
);
}
if ($report_id_user == $config['id_user']
|| is_user_admin($config['id_user'])
) {
@ -222,7 +247,7 @@ if ($report_id_user == $config['id_user']
$table->data['access'][1] .= '</div>';
$table->data['access'][1] .= '</span>';
} else {
$table->data[1][0] = html_print_label_input_block(
$table->data[2][0] = html_print_label_input_block(
__('Write Access').ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
@ -244,7 +269,7 @@ if ($report_id_user == $config['id_user']
$options['div_class'] = '';
}
$table->data[1][1] = html_print_label_input_block(
$table->data[2][1] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
@ -277,7 +302,7 @@ if ($enterpriseEnable) {
true
);
} else {
$table->data[2][0] = html_print_label_input_block(
$table->data[2][1] = html_print_label_input_block(
__('Non interactive report'),
html_print_checkbox_switch(
'non_interactive',
@ -289,29 +314,6 @@ if ($enterpriseEnable) {
}
}
if (is_metaconsole() === true) {
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
2,
80,
$description,
'',
true
);
} else {
$table->data[2][1] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
2,
1,
$description,
'',
true
)
);
}
if (enterprise_installed() === true) {
if (is_metaconsole() === true) {

View File

@ -2411,6 +2411,11 @@ switch ($action) {
$es['agent_server_filter'] = get_parameter('agent_server_filter');
$es['module_group'] = get_parameter('module_group');
$es['agent_group_filter'] = get_parameter('agent_group_filter');
$es['search_module_name'] = get_parameter('search_module_name');
$es['tags'] = get_parameter('tags');
$es['alias'] = get_parameter('alias', '');
$es['description_switch'] = get_parameter('description_switch', '');
$es['last_status_change'] = get_parameter('last_status_change', '');
$values['external_source'] = json_encode($es);
break;
@ -3199,6 +3204,11 @@ switch ($action) {
$es['agent_server_filter'] = get_parameter('agent_server_filter');
$es['module_group'] = get_parameter('module_group');
$es['agent_group_filter'] = get_parameter('agent_group_filter');
$es['search_module_name'] = get_parameter('search_module_name');
$es['tags'] = get_parameter('tags');
$es['alias'] = get_parameter('alias', '');
$es['description_switch'] = get_parameter('description_switch', '');
$es['last_status_change'] = get_parameter('last_status_change', '');
$values['external_source'] = json_encode($es);
break;
@ -3670,21 +3680,21 @@ $buttons = [
true,
[
'title' => __('Reports list'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
],
'main' => [
'active' => false,
'text' => '<a href="'.$urlB.'&tab=main&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="'.$urlB.'&tab=main&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/op_reporting.png', true, ['title' => __('Main data'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
'list_items' => [
'active' => false,
'text' => '<a href="'.$urlB.'&tab=list_items&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/list.png', true, ['title' => __('List items'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="'.$urlB.'&tab=list_items&action=edit&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/logs@svg.svg', true, ['title' => __('List items'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
'item_editor' => [
'active' => false,
'text' => '<a href="'.$urlB.'&tab=item_editor&action=new&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/pencil.png', true, ['title' => __('Item editor'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="'.$urlB.'&tab=item_editor&action=new&id_report='.$idReport.'&pure='.$pure.'">'.html_print_image('images/edit.svg', true, ['title' => __('Item editor'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
];
@ -3698,11 +3708,11 @@ if ($enterpriseEnable) {
$buttons['view'] = [
'active' => false,
'text' => '<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$idReport.'&pure='.$pure.'">'.html_print_image(
'images/eye.png',
'images/see-details@svg.svg',
true,
[
'title' => __('View report'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>',
];
@ -3717,7 +3727,7 @@ if ($idReport != 0) {
$buttons = [
'main' => [
'active' => true,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'invert_filter']).'</a>',
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">'.html_print_image('images/report_list.png', true, ['title' => __('Reports list'), 'class' => 'main_menu_icon invert_filter']).'</a>',
],
];
$textReportName = __('Create Custom Report');

View File

@ -165,7 +165,7 @@ switch ($activeTab) {
$background_color = (string) get_parameter('background_color');
$width = (int) get_parameter('width');
$height = (int) get_parameter('height');
$visualConsoleName = io_safe_input((string) get_parameter('name'));
$visualConsoleName = (string) get_parameter('name');
$is_favourite = (int) get_parameter('is_favourite_sent');
$auto_adjust = (int) get_parameter('auto_adjust_sent');

View File

@ -389,7 +389,7 @@ if (empty($create) === false || empty($view) === false) {
$disabled = ($locked === true) ? 'readonly="readonly"' : '';
if (empty($create) === true) {
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&update_plugin=$plugin_id&pure='.$config['pure'];
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&update_plugin='.$plugin_id.'&pure='.$config['pure'];
} else {
$formAction = 'index.php?sec=gservers&sec2=godmode/servers/plugin&tab=$tab&create_plugin=1&pure='.$config['pure'];
}
@ -403,69 +403,61 @@ if (empty($create) === false || empty($view) === false) {
$table = new stdClass();
$table->id = 'table-form';
$table->class = 'floating_form';
$table->class = 'filter-table-adv';
$table->style = [];
$table->data['plugin_name_captions'] = $data;
$table->style[0] = 'vertical-align: top';
$table->style[1] = 'vertical-align: top';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
// General title.
$generalTitleContent = [];
$generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
$generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('General')], true);
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true);
$data[0] = html_print_div([ 'class' => 'section_table_title', 'content' => __('General')], true);
$table->data['general_title'] = $data;
$data = [];
$data[0] = __('Name');
$data[0] = html_print_label_input_block(
__('Name'),
html_print_input_text('form_name', $form_name, '', 100, 255, true, false, false, '')
);
$table->data['plugin_name_captions'] = $data;
$data = [];
$data[0] = html_print_input_text('form_name', $form_name, '', 100, 255, true, false, false, '', 'w100p');
$table->data['plugin_name_inputs'] = $data;
$table->colspan['plugin_name_inputs'][0] = 3;
$data[0] = html_print_label_input_block(
__('Plugin type'),
html_print_select($formPluginType, 'form_plugin_type', $form_plugin_type, '', '', 0, true, false, true, '', false, 'width: 100%')
);
$data = [];
$data[0] = __('Plugin type');
$data[1] = __('Max. timeout');
$table->data['plugin_type_timeout_captions'] = $data;
// $table->colspan['plugin_type'][1] = 3;
$data = [];
$data[0] = html_print_select($formPluginType, 'form_plugin_type', $form_plugin_type, '', '', 0, true);
$timeoutContent = [];
$timeoutContent[] = '<div>'.html_print_extended_select_for_time('form_max_timeout', $form_max_timeout, '', '', '0', false, true).'</div>';
$timeoutContent[] = ui_print_input_placeholder(__('This value only will be applied if is minor than the server general configuration plugin timeout').'<br>'.__('If you set a 0 seconds timeout, the server plugin timeout will be used'), true);
$data[1] = html_print_div(
[
'class' => 'flex flex_column',
'content' => implode('', $timeoutContent),
],
true
$data[1] = html_print_label_input_block(
__('Max. timeout'),
html_print_div(
[
'class' => 'flex flex_column',
'content' => implode('', $timeoutContent),
],
true
)
);
$table->data['plugin_type_timeout_inputs'] = $data;
$table->data['plugin_type_timeout'] = $data;
$data = [];
$data[0] = __('Description');
$table->data['plugin_desc_captions'] = $data;
$data[0] = html_print_label_input_block(
__('Description'),
html_print_textarea('form_description', 4, 50, $form_description, '', true)
);
$data = [];
$data[0] = html_print_textarea('form_description', 4, 50, $form_description, '', true, 'w100p');
$table->colspan['plugin_desc_inputs'][0] = 3;
$table->colspan['plugin_desc_inputs'][0] = 2;
$table->data['plugin_desc_inputs'] = $data;
// Command title.
$commandTitleContent = [];
$commandTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
$commandTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Command')], true);
$data = [];
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $commandTitleContent) ], true);
$table->data['command_title'] = $data;
// Command title.
$data = [];
$data[0] = __('Plugin command').ui_print_help_tip(__('Specify interpreter and plugin path. The server needs permissions to run it.'), true);
$table->data['plugin_command_caption'] = $data;
$data[0] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Command')], true);
$table->data['command_title'] = $data;
$data = [];
$formExecuteContent = [];
@ -480,45 +472,53 @@ if (empty($create) === false || empty($view) === false) {
true
);
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $formExecuteContent)], true);
$data[0] = html_print_label_input_block(
__('Plugin command'),
html_print_div(['class' => 'flex-row-center', 'content' => implode('', $formExecuteContent)], true).ui_print_input_placeholder(
__('Specify interpreter and plugin path. The server needs permissions to run it.'),
true
)
);
// $data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $formExecuteContent)], true);
$table->data['plugin_command_inputs'] = $data;
$table->colspan['plugin_command_inputs'][0] = 2;
$data = [];
$data[0] = __('Plug-in parameters');
$table->data['plugin_parameters_caption'] = $data;
$data = [];
$data[0] = html_print_input_text(
'form_parameters',
$parameters,
'',
100,
255,
true,
false,
false,
'',
'command_component command_advanced_conf text_input w100p'
$data[0] = html_print_label_input_block(
__('Plug-in parameters'),
html_print_input_text(
'form_parameters',
$parameters,
'',
100,
255,
true,
false,
false,
'',
'command_component command_advanced_conf text_input'
)
);
$table->data['plugin_parameters_inputs'] = $data;
$table->colspan['plugin_parameters_inputs'][0] = 2;
$data = [];
$data[0] = __('Command preview');
$table->data['plugin_preview_captions'] = $data;
$data = [];
$data[0] = html_print_div(['id' => 'command_preview', 'class' => 'mono'], true);
// $data[0] = __('Command preview');
// $table->data['plugin_preview_captions'] = $data;
// $data = [];
// $data[0] = html_print_div(['id' => 'command_preview', 'class' => 'mono'], true);
$data[0] = html_print_label_input_block(
__('Command preview'),
html_print_div(['id' => 'command_preview', 'class' => 'mono'], true)
);
$table->data['plugin_preview_inputs'] = $data;
$table->colspan['plugin_preview_inputs'][0] = 2;
// Parameters macros title.
$macrosTitleContent = [];
$macrosTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
$macrosTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Parameters macros')], true);
$data = [];
$data[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $macrosTitleContent) ], true);
$data[0] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Parameters macros')], true);
$table->data['parameters_macros_title'] = $data;
$macros = json_decode($macros, true);
@ -563,53 +563,59 @@ if (empty($create) === false || empty($view) === false) {
}
$datam = [];
$datam[0] = __('Description')."<span class='normal_weight'> ($macro_name)</span>";
$datam[0] = html_print_label_input_block(
__('Description').'<span class="normal_weight">('.$macro_name.')</span>',
html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, false, '', "class='command_macro text_input'", true)
);
$datam[0] .= html_print_input_hidden($macro_name_name, $macro_name, true);
$datam[1] = html_print_input_text_extended($macro_desc_name, $macro_desc_value, 'text-'.$macro_desc_name, '', 30, 255, false, '', "class='command_macro text_input'", true);
$datam[2] = __('Default value')."<span class='normal_weight'> ($macro_name)</span>";
$datam[3] = html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, false, '', "class='command_component command_macro text_input'", true);
$datam[1] = html_print_label_input_block(
__('Default value').'<span class="normal_weight">('.$macro_name.')</span>',
html_print_input_text_extended($macro_value_name, $macro_value_value, 'text-'.$macro_value_name, '', 30, 255, false, '', "class='command_component command_macro text_input'", true)
);
$table->data['plugin_'.$next_name_number] = $datam;
$next_name_number++;
$table->colspan['plugin_'.$next_name_number][1] = 3;
$table->colspan['plugin_'.$next_name_number][1] = 2;
$datam = [];
$datam[0] = __('Hide value').ui_print_help_tip(
__('This field will show up as dots like a password'),
true
);
$datam[1] = html_print_checkbox_extended(
$macro_hide_value_name,
1,
$macro_hide_value_value,
0,
'',
['class' => 'command_macro'],
true,
'checkbox-'.$macro_hide_value_name
$datam = html_print_label_input_block(
__('Hide value'),
html_print_checkbox_switch(
$macro_hide_value_name,
1,
$macro_hide_value_value,
0,
'',
['class' => 'command_macro'],
true,
'checkbox-'.$macro_hide_value_name
).ui_print_input_placeholder(
__('This field will show up as dots like a password'),
true
)
);
$table->data['plugin_'.$next_name_number] = $datam;
$next_name_number++;
$table->colspan['plugin_'.$next_name_number][1] = 3;
// $table->colspan['plugin_'.$next_name_number][1] = 3;
$datam = [];
$datam[0] = __('Help')."<span class='normal_weight'> ($macro_name)</span><br><br><br>";
$datam[1] = html_print_textarea(
$macro_help_name,
6,
100,
$macro_help_value,
'class="command_macro" class="w97p"',
true
$datam[0] = html_print_label_input_block(
__('Help').'<span class="normal_weight"> ('.$macro_name.')</span>',
html_print_textarea(
$macro_help_name,
6,
100,
$macro_help_value,
'class="command_macro" class="w97p"',
true
)
);
$datam[1] .= '<br><br><br>';
$table->colspan['plugin_'.$next_name_number][0] = 2;
$table->data['plugin_'.$next_name_number] = $datam;
$next_name_number++;
$i++;
@ -617,7 +623,7 @@ if (empty($create) === false || empty($view) === false) {
// Add/Delete buttons
$datam = [];
$buttons = '';
if (!$locked) {
$datam[0] = '<a id="add_macro_btn" href="javascript:;">'.'<span class="bolder">'.__('Add macro').'</span>'.'&nbsp;'.html_print_image(
'images/add.png',
@ -627,20 +633,55 @@ if (empty($create) === false || empty($view) === false) {
$datam[0] .= '<div id="next_macro" class="invisible">'.$i.'</div>';
$datam[0] .= '<div id="next_row" class="invisible">'.$next_name_number.'</div>';
$buttons = html_print_anchor(
[
'id' => 'add_macro_btn',
'href' => 'javascript:;',
'content' => html_print_image(
'images/plus@svg.svg',
true,
['class' => 'invert_filter']
),
],
true
);
$buttons .= html_print_div(['id' => 'next_macro', 'class' => 'invisible', 'content' => $i], true);
$buttons .= html_print_div(['id' => 'next_row', 'class' => 'invisible', 'content' => $next_name_number], true);
$delete_macro_style = '';
if ($i <= 2) {
$delete_macro_style = 'display:none;';
}
$datam[2] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.'&nbsp;'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>'.'</div>';
// $datam[1] = '<div id="delete_macro_button" style="'.$delete_macro_style.'">'.'<a href="javascript:;">'.'<span class="bolder">'.__('Delete macro').'</span>'.'&nbsp;'.html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).'</a>'.'</div>';
$buttons .= html_print_anchor(
[
'id' => 'delete_macro_button',
'style' => $delete_macro_style,
'href' => 'javascript:;',
'content' => html_print_image(
'images/delete.svg',
true,
['class' => 'main_menu_icon invert_filter']
),
],
true
);
$datam[0] = html_print_div(
[
'style' => 'flex-direction: row-reverse;justify-content: flex-start;',
'content' => $buttons,
],
true
);
$table->colspan['plugin_action'][0] = 2;
$table->colspan['plugin_action'][2] = 2;
} else {
$table->colspan['plugin_action'][0] = 4;
// $table->colspan['plugin_action'][0] = 4;
}
$table->rowstyle['plugin_action'] = 'text-align:center';
// $table->rowstyle['plugin_action'] = 'text-align:center';
$table->data['plugin_action'] = $datam;

View File

@ -80,7 +80,7 @@ if (empty($directory) === true) {
$real_directory = realpath($config['homedir'].'/'.$directory);
echo '<h4>'.__('Index of %s', io_safe_input($directory)).'</h4>';
echo '<h4 class="mrgn_0px">'.__('Index of %s', io_safe_input($directory)).'</h4>';
$upload_file = (bool) get_parameter('upload_file');
$create_text_file = (bool) get_parameter('create_text_file');

View File

@ -84,7 +84,7 @@ if ($mapsConnections !== false) {
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis_step_2&amp;action=edit_connection_map&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'">'.$mapsConnection['conection_name'].'</a>',
ui_print_group_icon($mapsConnection['group_id'], true),
'<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=gis&amp;id_connection_map='.$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/cross.png', true, ['class' => 'invert_filter']).'</a>',
onClick="javascript: if (!confirm(\''.__('Do you wan delete this connection?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['class' => 'invert_filter']).'</a>',
];
$table->cellclass[][2] = 'table_action_buttons';
}

View File

@ -25,7 +25,20 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
}
// Header
ui_print_page_header(__('Link management'), 'images/extensions.png', false, '', true, '');
ui_print_standard_header(
__('Admin tools'),
'images/extensions.png',
false,
'',
true,
[],
[
[
'link' => '',
'label' => __('Link management'),
],
]
);
if (isset($_POST['create'])) {
@ -98,7 +111,7 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
$link = '';
}
echo '<table class="databox filters" cellpadding="4" cellspacing="4" width="100%">';
echo '<table class="databox filters filter-table-adv max_floating_element_size" cellpadding="4" cellspacing="4" width="100%">';
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/links">';
if ($creation_mode == 1) {
echo "<input type='hidden' name='create' value='1'>";
@ -112,17 +125,42 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
}
echo "'>";
echo '<tr>
<td class="datos">'.__('Link name').'</td>
<td class="datos"><input type="text" class="text_input" name="name" size="50" value="'.$nombre.'"></td>';
echo '</tr><tr>
<td class="datos2">'.__('Link').'</td>
<td class="datos2">
<input type="text" class="text_input" name="link" size="50" value="'.$link.'"></td>';
echo '</tr>';
echo '<tr>';
echo '<td class="w50p">';
echo html_print_label_input_block(
__('Link name'),
html_print_input_text(
'name',
$nombre,
'',
50,
255,
true,
false,
true,
'',
'text_input'
)
);
echo '</td>';
echo '<td class="w50p">';
echo html_print_label_input_block(
__('Link'),
html_print_input_text(
'link',
$link,
'',
50,
255,
true,
false,
true,
'',
'text_input'
)
);
echo '</td></tr>';
echo '</table>';
echo "<table width='100%'>";
echo "<tr><td align='right'>";
if (isset($_GET['form_add']) === true) {
$actionForPerform = __('Create');
$iconForPerform = 'wand';
@ -131,16 +169,14 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
$iconForPerform = 'update';
}
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
$actionForPerform,
'crtbutton',
false,
[ 'icon' => $iconForPerform ]
),
],
html_print_action_buttons(
html_print_submit_button(
$actionForPerform,
'crtbutton',
false,
[ 'icon' => $iconForPerform ],
true
)
);
echo '</form></td></tr></table>';
@ -172,7 +208,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.' table_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',
'images/delete.svg',
true,
['class' => 'invert_filter']
).'</a></td></tr>';
@ -185,16 +221,14 @@ if ((isset($_GET['form_add'])) or (isset($_GET['form_edit']))) {
echo "<tr><td align='right'>";
echo "<form method='post' action='index.php?sec=gsetup&sec2=godmode/setup/links&form_add=1'>";
html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Add'),
'form_add',
false,
[ 'icon' => 'wand' ]
),
],
html_print_action_buttons(
html_print_submit_button(
__('Add'),
'form_add',
false,
[ 'icon' => 'wand' ],
true
)
);
echo '</form></table>';

View File

@ -170,46 +170,118 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
$table->id = 'news';
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->class = 'databox filters';
$table->class = 'databox filters filter-table-adv';
$table->head = [];
$table->data = [];
$table->style[0] = 'font-weight: bold;';
$table->style[1] = 'font-weight: bold;';
$table->style[2] = 'font-weight: bold;';
$table->style[3] = 'font-weight: bold;';
$table->style[4] = 'font-weight: bold;';
$table->size[0] = '33%';
$table->size[1] = '33%';
$table->colspan[2][0] = 2;
$table->rowclass[2] = 'w100p';
$data = [];
$data[0] = __('Subject').'<br>';
$data[0] .= '<input type="text" class="text_input" name="subject" size="35" value="'.$subject.'" >';
$data[0] = html_print_label_input_block(
__('Subject'),
html_print_input_text(
'subject',
$subject,
'',
35,
255,
true
)
);
$data[1] = __('Group').'<br>';
$data[1] .= '<div class="w250px">';
$data[1] .= html_print_select_groups($config['id_user'], 'ER', users_can_manage_group_all(), 'id_group', $id_group, '', '', 0, true, false, false, '');
$data[1] .= '</div>';
$data[1] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
$config['id_user'],
'ER',
users_can_manage_group_all(),
'id_group',
$id_group,
'',
'',
0,
true,
false,
false,
'w100p',
false,
'width: 100%;'
)
);
$table->data[] = $data;
$data[2] = __('Modal screen').'<br>';
$data[2] .= html_print_checkbox_extended('modal', 1, $modal, false, '', 'class="mrgn_top_5 mrg_btt_7"', true);
$data = [];
$data[0] = html_print_label_input_block(
__('Modal screen'),
html_print_checkbox_extended(
'modal',
1,
$modal,
false,
'',
'class="w100p"',
true
)
);
$data[3] = __('Expire').'<br>';
$data[3] .= html_print_checkbox_extended('expire', 1, $expire, false, '', 'class="mrgn_top_5 mrg_btt_7"', true);
$data[4] = __('Expiration').'<br>';
$data[4] .= html_print_input_text('expire_date', $expire_date, '', 12, 10, true).' ';
$data[4] .= html_print_input_text('expire_time', $expire_time, '', 10, 7, true).' ';
$data[1] = '<div style="display: inline-flex; flex-direction: row;">'.html_print_label_input_block(
__('Expire'),
html_print_checkbox_extended(
'expire',
1,
$expire,
false,
'',
'class="w100p"',
true
),
['div_class' => 'display-grid']
);
$data[1] .= html_print_label_input_block(
__('Expiration'),
'<div>'.html_print_input_text(
'expire_date',
$expire_date,
'',
12,
10,
true
).' '.html_print_input_text(
'expire_time',
$expire_time,
'',
10,
7,
true
).'</div>',
[
'div_class' => 'display-grid mrgn_lft_20px',
'div_id' => 'news-0-4',
]
).'</div>';
$table->rowclass[] = '';
$table->data[] = $data;
$data = [];
$data[0] = __('Text').'<br>';
$data[0] .= html_print_textarea('text', 25, 15, $text, '', true);
$table->rowclass[] = '';
$table->colspan[1][0] = 5;
$data[0] = html_print_label_input_block(
__('Text'),
html_print_textarea(
'text',
25,
100,
$text,
'',
true,
'w100p'
)
);
$table->data[] = $data;
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/news">';
echo '<form name="ilink" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/news" class="max_floating_element_size">';
if ($creation_mode == 1) {
echo "<input type='hidden' name='create' value='1'>";
} else {
@ -228,11 +300,25 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo "<table width='".$table->width."'>";
echo "<tr><td align='right'>";
if (isset($_GET['form_add'])) {
echo "<input name='crtbutton' type='submit' class='sub wand' value='".__('Create')."'>";
$submit_button = html_print_submit_button(
__('Create'),
'crtbutton',
false,
['icon' => 'wand'],
true
);
} else {
echo "<input name='crtbutton' type='submit' class='sub upd' value='".__('Update')."'>";
$submit_button = html_print_submit_button(
__('Update'),
'crtbutton',
false,
['icon' => 'wand'],
true
);
}
html_print_action_buttons($submit_button);
echo '</form></td></tr></table>';
} else {
$rows = db_get_all_rows_in_table('tnews', 'timestamp');
@ -287,17 +373,23 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo "<td class='$tdcolor'>".__('No').'</b></td>';
}
echo '<td class="'.$tdcolor.' table_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', 'class' => 'invert_filter']).'</a></td></tr>';
echo '<td class="'.$tdcolor.' table_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/delete.svg', true, ['border' => '0', 'class' => 'invert_filter']).'</a></td></tr>';
}
echo '</table>';
}
echo "<table width='100%'>";
echo "<tr><td align='right'>";
echo "<form method='post' action='index.php?sec=gsetup&sec2=godmode/setup/news&form_add=1'>";
echo "<input type='submit' class='sub next' name='form_add' value='".__('Add')."'>";
echo '</form></table>';
html_print_action_buttons(
html_print_submit_button(
__('Add'),
'form_add',
false,
['icon' => 'wand'],
true
)
);
echo '</form>';
}
/*

View File

@ -55,7 +55,7 @@ $iconData[] = html_print_select(
$iconData[] = html_print_div(
[
'id' => 'icon_image',
'class' => 'inverse_filter main_menu_icon',
'class' => 'invert_filter main_menu_icon',
'style' => 'margin-left: 10px',
'content' => ui_print_os_icon($idOS, false, true),
],

View File

@ -133,7 +133,7 @@ foreach ($osList as $os) {
$data[] = html_print_anchor(
[
'href' => $hrefDelete,
'class' => 'inverse_filter main_menu_icon',
'class' => 'invert_filter main_menu_icon',
'content' => html_print_image('images/delete.svg', true),
],
true

View File

@ -254,188 +254,187 @@ if ($config['history_db_enabled'] == 1) {
$table = new StdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->class = 'filter-table-adv';
$table->data = [];
$table->style[0] = 'font-weight: bold';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->size[0] = '70%';
$table->size[1] = '30%';
$table->data[1][0] = __('Max. days before delete events');
$table->data[1][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['event_purge']->max,
'name' => 'event_purge',
'value' => $config['event_purge'],
'return' => true,
'min' => $performance_variables_control['event_purge']->min,
'style' => 'width:43px',
]
$table->data[0][0] = html_print_label_input_block(
__('Max. days before delete events'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['event_purge']->max,
'name' => 'event_purge',
'value' => $config['event_purge'],
'return' => true,
'min' => $performance_variables_control['event_purge']->min,
]
)
);
$table->data[2][0] = __('Max. days before delete traps');
$table->data[2][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['trap_purge']->max,
'name' => 'trap_purge',
'value' => $config['trap_purge'],
'return' => true,
'min' => $performance_variables_control['trap_purge']->min,
'style' => 'width:43px',
]
$table->data[0][1] = html_print_label_input_block(
__('Max. days before delete traps'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['trap_purge']->max,
'name' => 'trap_purge',
'value' => $config['trap_purge'],
'return' => true,
'min' => $performance_variables_control['trap_purge']->min,
]
)
);
$table->data[3][0] = __('Max. days before delete audit events');
$table->data[3][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['audit_purge']->max,
'name' => 'audit_purge',
'value' => $config['audit_purge'],
'return' => true,
'min' => $performance_variables_control['audit_purge']->min,
'style' => 'width:43px',
]
$table->data[1][0] = html_print_label_input_block(
__('Max. days before delete audit events'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['audit_purge']->max,
'name' => 'audit_purge',
'value' => $config['audit_purge'],
'return' => true,
'min' => $performance_variables_control['audit_purge']->min,
]
)
);
$table->data[4][0] = __('Max. days before delete string data');
$table->data[4][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['string_purge']->max,
'name' => 'string_purge',
'value' => $config['string_purge'],
'return' => true,
'min' => $performance_variables_control['string_purge']->min,
'style' => 'width:43px',
]
$table->data[1][1] = html_print_label_input_block(
__('Max. days before delete string data'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['string_purge']->max,
'name' => 'string_purge',
'value' => $config['string_purge'],
'return' => true,
'min' => $performance_variables_control['string_purge']->min,
]
)
);
$table->data[5][0] = __('Max. days before delete GIS data');
$table->data[5][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['gis_purge']->max,
'name' => 'gis_purge',
'value' => $config['gis_purge'],
'return' => true,
'min' => $performance_variables_control['gis_purge']->min,
'style' => 'width:43px',
]
$table->data[2][0] = html_print_label_input_block(
__('Max. days before delete GIS data'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['gis_purge']->max,
'name' => 'gis_purge',
'value' => $config['gis_purge'],
'return' => true,
'min' => $performance_variables_control['gis_purge']->min,
]
)
);
$table->data[6][0] = __('Max. days before purge');
$table->data[6][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_purge']->max,
'name' => 'days_purge',
'value' => $config['days_purge'],
'return' => true,
'min' => $performance_variables_control['days_purge']->min,
'style' => 'width:43px',
]
$table->data[2][1] = html_print_label_input_block(
__('Max. days before purge'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_purge']->max,
'name' => 'days_purge',
'value' => $config['days_purge'],
'return' => true,
'min' => $performance_variables_control['days_purge']->min,
]
)
);
$table->data[7][0] = __('Max. days before compact data');
$table->data[7][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_compact']->max,
'name' => 'days_compact',
'value' => $config['days_compact'],
'return' => true,
'min' => $performance_variables_control['days_compact']->min,
'style' => 'width:43px',
]
$table->data[3][0] = html_print_label_input_block(
__('Max. days before compact data'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_compact']->max,
'name' => 'days_compact',
'value' => $config['days_compact'],
'return' => true,
'min' => $performance_variables_control['days_compact']->min,
]
)
);
$table->data[8][0] = __('Max. days before delete unknown modules');
$table->data[8][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_delete_unknown']->max,
'name' => 'days_delete_unknown',
'value' => $config['days_delete_unknown'],
'return' => true,
'min' => $performance_variables_control['days_delete_unknown']->min,
'style' => 'width:43px',
]
$table->data[3][1] = html_print_label_input_block(
__('Max. days before delete unknown modules'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_delete_unknown']->max,
'name' => 'days_delete_unknown',
'value' => $config['days_delete_unknown'],
'return' => true,
'min' => $performance_variables_control['days_delete_unknown']->min,
]
)
);
$table->data[9][0] = __('Max. days before delete not initialized modules');
$table->data[9][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_delete_not_initialized']->max,
'name' => 'days_delete_not_initialized',
'value' => $config['days_delete_not_initialized'],
'return' => true,
'min' => $performance_variables_control['days_delete_not_initialized']->min,
'style' => 'width:43px',
]
$table->data[4][0] = html_print_label_input_block(
__('Max. days before delete not initialized modules'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_delete_not_initialized']->max,
'name' => 'days_delete_not_initialized',
'value' => $config['days_delete_not_initialized'],
'return' => true,
'min' => $performance_variables_control['days_delete_not_initialized']->min,
]
)
);
$table->data[10][0] = __('Max. days before delete autodisabled agents');
$table->data[10][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_autodisable_deletion']->max,
'name' => 'days_autodisable_deletion',
'value' => $config['days_autodisable_deletion'],
'return' => true,
'min' => $performance_variables_control['days_autodisable_deletion']->min,
'style' => 'width:43px',
]
$table->data[4][1] = html_print_label_input_block(
__('Max. days before delete autodisabled agents'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['days_autodisable_deletion']->max,
'name' => 'days_autodisable_deletion',
'value' => $config['days_autodisable_deletion'],
'return' => true,
'min' => $performance_variables_control['days_autodisable_deletion']->min,
]
)
);
$table->data[11][0] = __('Retention period of past special days');
$table->data[11][1] = html_print_input_text(
'num_past_special_days',
$config['num_past_special_days'],
'',
5,
5,
true
);
$table->data[12][0] = __('Max. macro data fields');
$table->data[12][1] = html_print_input_text(
'max_macro_fields',
$config['max_macro_fields'],
'',
5,
5,
true,
false,
false,
'onChange="change_macro_fields()"'
);
if (enterprise_installed()) {
$table->data[13][0] = __('Max. days before delete inventory data');
$table->data[13][1] = html_print_input_text(
'inventory_purge',
$config['inventory_purge'],
$table->data[5][0] = html_print_label_input_block(
__('Retention period of past special days'),
html_print_input_text(
'num_past_special_days',
$config['num_past_special_days'],
'',
5,
false,
5,
true
);
}
)
);
$table->data[5][1] = html_print_label_input_block(
__('Max. macro data fields'),
html_print_input_text(
'max_macro_fields',
$config['max_macro_fields'],
'',
false,
5,
true,
false,
false,
'onChange="change_macro_fields()"'
)
);
if ($config['history_db_enabled'] == 1) {
if (! isset($config['history_db_connection'])
@ -459,86 +458,94 @@ if ($config['history_db_enabled'] == 1) {
$table_historical = new StdClass();
$table_historical->width = '100%';
$table_historical->class = 'databox filters';
$table_historical->class = 'filter-table-adv';
$table_historical->data = [];
$table_historical->style[0] = 'font-weight: bold';
$table_historical->size[0] = '70%';
$table_historical->size[1] = '30%';
$table_historical->size[0] = '50%';
$table_historical->size[1] = '50%';
enterprise_hook('enterprise_warnings_history_days');
$table_historical->data[0][0] = __('Max. days before purge');
$table_historical->data[0][1] = html_print_input_text(
'historical_days_purge',
$config_history['days_purge'],
'',
5,
5,
true
$table_historical->data[0][0] = html_print_label_input_block(
__('Max. days before purge'),
html_print_input_text(
'historical_days_purge',
$config_history['days_purge'],
'',
false,
5,
true
)
);
$table_historical->data[1][0] = __('Max. days before compact data');
$table_historical->data[1][1] = html_print_input_text(
'historical_days_compact',
$config_history['days_compact'],
'',
5,
5,
true
$table_historical->data[0][1] = html_print_label_input_block(
__('Max. days before compact data'),
html_print_input_text(
'historical_days_compact',
$config_history['days_compact'],
'',
false,
5,
true
)
);
$table_historical->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
$table_historical->data[2][1] = html_print_input_text(
'historical_step_compact',
$config_history['step_compact'],
'',
5,
5,
true
$table_historical->data[1][0] = html_print_label_input_block(
__('Compact interpolation in hours (1 Fine-20 bad)'),
html_print_input_text(
'historical_step_compact',
$config_history['step_compact'],
'',
false,
5,
true
)
);
$table_historical->data[3][0] = __('Max. days before delete events');
$table_historical->data[3][1] = html_print_input_text(
'historical_event_purge',
$config_history['event_purge'],
'',
5,
5,
true
$table_historical->data[1][1] = html_print_label_input_block(
__('Max. days before delete events'),
html_print_input_text(
'historical_event_purge',
$config_history['event_purge'],
'',
false,
5,
true
)
);
$table_historical->data[4][0] = __('Max. days before delete string data');
$table_historical->data[4][1] = html_print_input_text(
'historical_string_purge',
$config_history['string_purge'],
'',
5,
5,
true
$table_historical->data[2][0] = html_print_label_input_block(
__('Max. days before delete string data'),
html_print_input_text(
'historical_string_purge',
$config_history['string_purge'],
'',
5,
5,
true
)
);
$table_historical->data[4][1] .= html_print_input_hidden(
$table_historical->data[2][0] .= html_print_input_hidden(
'historical_history_db_enabled',
0,
true
);
}
$table->data[] = [
$table->data[6][0] = html_print_label_input_block(
__('Max. days before delete old messages'),
html_print_input_text(
'delete_old_messages',
$config['delete_old_messages'],
'',
5,
false,
5,
true
),
];
)
);
$table->data[] = [
$table->data[6][1] = html_print_label_input_block(
__('Max. days before delete old network matrix data'),
html_print_input(
[
@ -549,55 +556,71 @@ $table->data[] = [
'value' => $config['delete_old_network_matrix'],
'return' => true,
'min' => $performance_variables_control['delete_old_network_matrix']->min,
'style' => 'width:43px',
]
),
];
)
);
if (enterprise_installed()) {
$table->data[7][0] = html_print_label_input_block(
__('Max. days before delete inventory data'),
html_print_input_text(
'inventory_purge',
$config['inventory_purge'],
'',
false,
5,
true
)
);
}
$table_other = new stdClass();
$table_other->width = '100%';
$table_other->class = 'databox filters';
$table_other->class = 'filter-table-adv';
$table_other->data = [];
$table_other->style[0] = 'font-weight: bold';
$table_other->size[0] = '70%';
$table_other->size[1] = '30%';
$i = 0;
$table_other->data[$i][0] = __('Item limit for realtime reports');
$table_other->data[$i++][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['report_limit']->max,
'name' => 'report_limit',
'value' => $config['report_limit'],
'return' => true,
'min' => $performance_variables_control['report_limit']->min,
'style' => 'width:43px',
]
$table_other->size[0] = '50%';
$table_other->size[1] = '50%';
$table_other->data[0][0] = html_print_label_input_block(
__('Item limit for realtime reports'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['report_limit']->max,
'name' => 'report_limit',
'value' => $config['report_limit'],
'return' => true,
'min' => $performance_variables_control['report_limit']->min,
]
)
);
$table_other->data[$i][0] = __('Limit of events per query');
$table_other->data[$i++][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => 10000,
'name' => 'events_per_query',
'value' => $config['events_per_query'],
'return' => true,
'style' => 'width:50px',
]
$table_other->data[0][1] = html_print_label_input_block(
__('Limit of events per query'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => 10000,
'name' => 'events_per_query',
'value' => $config['events_per_query'],
'return' => true,
]
)
);
$table_other->data[$i][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
$table_other->data[$i++][1] = html_print_input_text(
'step_compact',
$config['step_compact'],
'',
5,
5,
true
$table_other->data[1][0] = html_print_label_input_block(
__('Compact interpolation in hours (1 Fine-20 bad)'),
html_print_input_text(
'step_compact',
$config['step_compact'],
'',
false,
5,
true
)
);
$intervals = [];
@ -610,140 +633,172 @@ $intervals[SECONDS_1WEEK] = __('Last week');
$intervals[SECONDS_2WEEK] = __('2 weeks');
$intervals[SECONDS_1MONTH] = __('Last month');
$table_other->data[$i][0] = __('Default hours for event view');
$table_other->data[$i++][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['event_view_hr']->max,
'name' => 'event_view_hr',
'value' => $config['event_view_hr'],
'return' => true,
'min' => $performance_variables_control['event_view_hr']->min,
'style' => 'width:43px',
]
$table_other->data[1][1] = html_print_label_input_block(
__('Default hours for event view'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['event_view_hr']->max,
'name' => 'event_view_hr',
'value' => $config['event_view_hr'],
'return' => true,
'min' => $performance_variables_control['event_view_hr']->min,
]
)
);
$table_other->data[$i][0] = __('Use realtime statistics');
$table_other->data[$i++][1] = html_print_checkbox_switch(
'realtimestats',
1,
$config['realtimestats'],
true
$table_other->data[2][0] = html_print_label_input_block(
__('Use realtime statistics'),
html_print_checkbox_switch(
'realtimestats',
1,
$config['realtimestats'],
true
)
);
$table_other->data[$i][0] = __('Batch statistics period (secs)');
$table_other->data[$i++][1] = html_print_input_text(
'stats_interval',
$config['stats_interval'],
'',
5,
5,
true
$table_other->data[2][1] = html_print_label_input_block(
__('Batch statistics period (secs)'),
html_print_input_text(
'stats_interval',
$config['stats_interval'],
'',
false,
5,
true
)
);
$table_other->data[$i][0] = __('Use agent access graph');
$table_other->data[$i++][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true, $disable_agentaccess);
$table_other->data[$i][0] = __('Max. recommended number of files in attachment directory');
$table_other->data[$i++][1] = html_print_input_text(
'num_files_attachment',
$config['num_files_attachment'],
'',
5,
5,
true
$table_other->data[3][0] = html_print_label_input_block(
__('Use agent access graph'),
html_print_checkbox_switch(
'agentaccess',
1,
$config['agentaccess'],
true,
$disable_agentaccess
)
);
$table_other->data[$i][0] = __('Delete not init modules');
$table_other->data[$i++][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true);
$table_other->data[$i][0] = __('Big Operation Step to purge old data');
$table_other->data[$i++][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['big_operation_step_datos_purge']->max,
'name' => 'big_operation_step_datos_purge',
'value' => $config['big_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
'style' => 'width:50px',
]
$table_other->data[3][1] = html_print_label_input_block(
__('Max. recommended number of files in attachment directory'),
html_print_input_text(
'num_files_attachment',
$config['num_files_attachment'],
'',
false,
5,
true
)
);
$table_other->data[$i][0] = __('Small Operation Step to purge old data');
$table_other->data[$i++][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['small_operation_step_datos_purge']->max,
'name' => 'small_operation_step_datos_purge',
'value' => $config['small_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
'style' => 'width:50px',
]
$table_other->data[4][0] = html_print_label_input_block(
__('Delete not init modules'),
html_print_checkbox_switch(
'delete_notinit',
1,
$config['delete_notinit'],
true
)
);
$table_other->data[$i][0] = __('Graph container - Max. Items');
$table_other->data[$i++][1] = html_print_input_text(
'max_graph_container',
$config['max_graph_container'],
'',
5,
5,
true
$table_other->data[4][1] = html_print_label_input_block(
__('Big Operation Step to purge old data'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['big_operation_step_datos_purge']->max,
'name' => 'big_operation_step_datos_purge',
'value' => $config['big_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
]
)
);
$table_other->data[$i][0] = __('Events response max. execution');
$table_other->data[$i++][1] = html_print_input_text(
'max_execution_event_response',
$config['max_execution_event_response'],
'',
5,
5,
true
$table_other->data[5][0] = html_print_label_input_block(
__('Small Operation Step to purge old data'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['small_operation_step_datos_purge']->max,
'name' => 'small_operation_step_datos_purge',
'value' => $config['small_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
]
)
);
$table_other->data[$i][0] = __('Row limit in csv log');
$table_other->data[$i++][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['row_limit_csv']->max,
'name' => 'row_limit_csv',
'value' => $config['row_limit_csv'],
'return' => true,
'min' => $performance_variables_control['row_limit_csv']->min,
'style' => 'width:63px',
]
$table_other->data[5][1] = html_print_label_input_block(
__('Graph container - Max. Items'),
html_print_input_text(
'max_graph_container',
$config['max_graph_container'],
'',
false,
5,
true
)
);
$table_other->data[$i][0] = __('SNMP walk binary');
$table_other->data[$i++][1] = html_print_input_text(
'snmpwalk',
$config['snmpwalk'],
'',
50,
10,
true
$table_other->data[6][0] = html_print_label_input_block(
__('Events response max. execution'),
html_print_input_text(
'max_execution_event_response',
$config['max_execution_event_response'],
'',
false,
5,
true
)
);
$table_other->data[6][1] = html_print_label_input_block(
__('Row limit in csv log'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['row_limit_csv']->max,
'name' => 'row_limit_csv',
'value' => $config['row_limit_csv'],
'return' => true,
'min' => $performance_variables_control['row_limit_csv']->min,
]
)
);
$table_other->data[7][0] = html_print_label_input_block(
__('SNMP walk binary'),
html_print_input_text(
'snmpwalk',
$config['snmpwalk'],
'',
false,
10,
true
)
);
$tip = ui_print_help_tip(
__('SNMP bulk walk is not able to request V1 SNMP, this option will be used instead (by default snmpwalk, slower).'),
true
);
$table_other->data[$i][0] = __('SNMP walk binary (fallback)').$tip;
$table_other->data[$i++][1] = html_print_input_text(
'snmpwalk_fallback',
$config['snmpwalk_fallback'],
'',
50,
10,
true
$table_other->data[7][1] = html_print_label_input_block(
__('SNMP walk binary (fallback)').$tip,
html_print_input_text(
'snmpwalk_fallback',
$config['snmpwalk_fallback'],
'',
false,
10,
true
)
);
$tip = ui_print_help_tip(
@ -754,36 +809,40 @@ $tip = ui_print_help_tip(
true
);
$table_other->data[$i][0] = __('WMI binary');
$table_other->data[$i++][1] = html_print_input_text(
'wmiBinary',
$config['wmiBinary'],
'',
50,
50,
true
$table_other->data[8][0] = html_print_label_input_block(
__('WMI binary'),
html_print_input_text(
'wmiBinary',
$config['wmiBinary'],
'',
false,
50,
true
)
);
// Agent Wizard defaults.
$defaultAgentWizardOptions = json_decode(io_safe_output($config['agent_wizard_defaults']));
$tableSnmpWizard = new stdClass();
$tableSnmpWizard->width = '100%';
$tableSnmpWizard->class = 'databox filters';
$tableSnmpWizard->class = 'filter-table-adv';
$tableSnmpWizard->data = [];
$tableSnmpWizard->style[0] = 'font-weight: bold';
$tableSnmpWizard->style[2] = 'font-weight: bold';
$tableSnmpWizard->size[0] = '30%';
$tableSnmpWizard->size[2] = '30%';
$tableSnmpWizard->size[0] = '50%';
$tableSnmpWizard->size[1] = '50%';
$i = 0;
$j = 0;
foreach ($defaultAgentWizardOptions as $key => $value) {
$tableSnmpWizard->data[$i][$j++] = $key;
$tableSnmpWizard->data[$i][$j++] = html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true);
if ($j >= 3) {
$j = 0;
$i++;
if ($i > 1) {
$i = 0;
$j++;
}
$tableSnmpWizard->data[$j][$i] = html_print_label_input_block(
$key,
html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true)
);
$i++;
}
echo '<form id="form_setup" method="post">';
@ -817,18 +876,14 @@ echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_input_hidden('update_config', 1);
html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
),
]
$actionButtons = html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
);
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
echo '</form>';
?>

View File

@ -238,6 +238,11 @@ $buttons['external_tools'] = [
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=external_tools').'">'.html_print_image('images/nettool.png', true, ['title' => __('External Tools'), 'class' => 'invert_filter']).'</a>',
];
$buttons['welcome_tips'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=welcome_tips').'">'.html_print_image('images/inventory.png', true, ['title' => __('Welcome tips'), 'class' => 'invert_filter']).'</a>',
];
if ($config['activate_gis']) {
$buttons['gis'] = [
'active' => false,
@ -260,29 +265,29 @@ if (enterprise_installed()) {
switch ($section) {
case 'general':
$buttons['general']['active'] = true;
$subpage = ' &raquo '.__('General');
$subpage = __('General');
$help_header = 'setup_general_tab';
break;
case 'auth':
$buttons['auth']['active'] = true;
$subpage = ' &raquo '.__('Authentication');
$subpage = __('Authentication');
break;
case 'perf':
$buttons['perf']['active'] = true;
$subpage = ' &raquo '.__('Performance');
$subpage = __('Performance');
$help_header = '';
break;
case 'vis':
$buttons['vis']['active'] = true;
$subpage = ' &raquo '.__('Visual styles');
$subpage = __('Visual styles');
break;
case 'net':
$buttons['net']['active'] = true;
$subpage = ' &raquo '.__('Netflow');
$subpage = __('Netflow');
$help_header = 'setup_netflow_tab';
break;
@ -294,73 +299,97 @@ switch ($section) {
case 'ehorus':
$buttons['ehorus']['active'] = true;
$subpage = ' &raquo '.__('eHorus');
$subpage = __('eHorus');
$help_header = 'setup_ehorus_tab';
break;
case 'integria':
$buttons['integria']['active'] = true;
$subpage = ' &raquo '.__('Integria IMS');
$subpage = __('Integria IMS');
$help_header = 'setup_integria_tab';
break;
case 'module_library':
$buttons['module_library']['active'] = true;
$subpage = ' &raquo '.__('Module Library');
$subpage = __('Module Library');
$help_header = 'setup_module_library_tab';
break;
case 'gis':
$buttons['gis']['active'] = true;
$subpage = ' &raquo '.__('Map conections GIS');
$subpage = __('Map conections GIS');
break;
case 'notifications':
$buttons['notifications']['active'] = true;
$subpage = ' &raquo '.__('Notifications');
$subpage = __('Notifications');
break;
case 'websocket_engine':
$buttons['websocket_engine']['active'] = true;
$subpage = ' &raquo '.__('Pandora Websocket Engine');
$subpage = __('Pandora Websocket Engine');
$help_header = 'quickshell_settings';
break;
case 'external_tools':
$buttons['external_tools']['active'] = true;
$subpage = ' &raquo '.__('External Tools');
$subpage = __('External Tools');
$help_header = '';
break;
case 'welcome_tips':
$view = get_parameter('view', '');
$title = __('Welcome tips');
if ($view === 'create') {
$title = __('Create tip');
} else if ($view === 'edit') {
$title = __('Edit tip');
}
$buttons['welcome_tips']['active'] = true;
$subpage = $title;
$help_header = '';
break;
case 'enterprise':
$buttons['enterprise']['active'] = true;
$subpage = ' &raquo '.__('Enterprise');
$subpage = __('Enterprise');
$help_header = 'setup_enterprise_tab';
break;
case 'hist_db':
$buttons['hist_db']['active'] = true;
$subpage = __('Historical database');
$help_header = '';
break;
case 'pass':
$buttons['pass']['active'] = true;
$subpage = __('Password policies');
$help_header = '';
break;
default:
$subpage = 'seccion: '.$section;
// Default.
break;
}
// Put header inside div for special sizing.(No right margin).
echo '<div id="header_configuration" style="width: calc(100%);">';
// Header.
ui_print_page_header(
__('Configuration').$subpage,
ui_print_standard_header(
$subpage,
'',
false,
$help_header,
true,
$buttons,
false,
'',
GENERIC_SIZE_TEXT,
'',
'',
true
[
[
'link' => '',
'label' => __('Setup'),
],
]
);
echo '</div>';
if (isset($config['error_config_update_config'])) {
if ($config['error_config_update_config']['correct'] == false) {
@ -433,6 +462,10 @@ switch ($section) {
include_once $config['homedir'].'/godmode/setup/setup_external_tools.php';
break;
case 'welcome_tips':
include_once $config['homedir'].'/godmode/setup/welcome_tips.php';
break;
default:
enterprise_hook('setup_enterprise_select_tab', [$section]);
break;

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2022 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -37,47 +37,67 @@ $update = (bool) get_parameter('update');
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filter-table-adv';
$table->border = 0;
$table->cellspacing = 3;
$table->cellpadding = 5;
$table->class = 'databox filters';
$table->data = [];
$table->data[0][0] = '<b>'.__('Data storage path').'</b>';
$table->data[0][1] = html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true);
$table->data[0][1] .= '<script>$("input[name=netflow_name_dir]").on("input", function() {$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));});</script>';
$table->data[0][] = html_print_label_input_block(
__('Data storage path'),
html_print_input_text('netflow_name_dir', $config['netflow_name_dir'], false, 50, 200, true)
);
$table->data[0][] = '<script>$("input[name=netflow_name_dir]").on("input", function() {$(this).val($(this).val().replace(/[^a-z0-9]/gi, ""));});</script>';
$table->data[1][0] = '<b>'.__('Daemon interval').'</b>';
$table->data[1][1] = html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true);
$table->data[0][] = html_print_label_input_block(
__('Daemon interval'),
html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true)
);
$table->data[2][0] = '<b>'.__('Daemon binary path').'</b>';
$table->data[2][1] = html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true);
$table->data[1][] = html_print_label_input_block(
__('Daemon binary path'),
html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true)
);
$table->data[3][0] = '<b>'.__('Nfdump binary path').'</b>';
$table->data[3][1] = html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true);
$table->data[1][] = html_print_label_input_block(
__('Nfdump binary path'),
html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true)
);
$table->data[4][0] = '<b>'.__('Nfexpire binary path').'</b>';
$table->data[4][1] = html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true);
$table->data[2][] = html_print_label_input_block(
__('Nfexpire binary path'),
html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true)
);
$table->data[5][0] = '<b>'.__('Maximum chart resolution').'</b>';
$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true);
$table->data[2][] = html_print_label_input_block(
__('Maximum chart resolution'),
html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true)
);
$table->data[6][0] = '<b>'.__('Disable custom live view filters').'</b>';
$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true);
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>';
$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true);
$table->data[3][] = html_print_label_input_block(
__('Disable custom live view filters'),
html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true)
);
$table->data[3][] = html_print_label_input_block(
__('Netflow max lifetime'),
html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true)
);
$table->data[8][0] = '<b>'.__('Name resolution for IP address').'</b>';
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true);
echo '<form id="netflow_setup" method="post">';
$table->data[4][] = html_print_label_input_block(
__('Name resolution for IP address'),
html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true)
);
echo '<form class="max_floating_element_size" id="netflow_setup" method="post">';
html_print_table($table);
// Update button.
echo '<div class="action-buttons w100p">';
html_print_input_hidden('update_config', 1);
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
echo '</div></form>';
html_print_input_hidden('update_config', 1);
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'upd_button',
false,
['icon' => 'update'],
true
)
);
echo '</form>';

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -32,68 +32,70 @@ $url = ui_get_full_url(
'index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=websocket_engine&amp;pure='.$config['pure']
);
echo '<form id="form_setup" method="post" action="'.$url.'">';
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="'.$url.'">';
echo '<fieldset>';
echo '<fieldset class="margin-bottom-10">';
echo '<legend>'.__('WebSocket settings').'</legend>';
$t = new StdClass();
$t->data = [];
$t->width = '100%';
$t->class = 'databox filters';
$t->class = 'databox filter-table-adv';
$t->data = [];
$t->style[0] = 'font-weight: bold';
$t->data[0][0] = __('Bind address');
$t->data[0][1] = html_print_input_text(
'ws_bind_address',
$config['ws_bind_address'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Bind address'),
html_print_input_text(
'ws_bind_address',
$config['ws_bind_address'],
'',
30,
100,
true
)
);
$t->data[1][0] = __('Bind port');
$t->data[1][2] = html_print_input_text(
'ws_port',
$config['ws_port'],
'',
30,
100,
true
$t->data[0][] = html_print_label_input_block(
__('Bind port'),
html_print_input_text(
'ws_port',
$config['ws_port'],
'',
30,
100,
true
)
);
$t->data[2][0] = __('WebSocket proxy url');
$t->data[2][2] = html_print_input_text(
'ws_proxy_url',
$config['ws_proxy_url'],
'',
30,
100,
true
$t->data[1][] = html_print_label_input_block(
__('WebSocket proxy url'),
html_print_input_text(
'ws_proxy_url',
$config['ws_proxy_url'],
'',
30,
100,
true
)
);
html_print_input_hidden('update_config', 1);
html_print_table($t);
echo '</fieldset>';
if (function_exists('quickShellSettings') === true) {
quickShellSettings();
}
html_print_div(
[
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
),
]
html_print_action_buttons(
html_print_submit_button(
__('Update'),
'update_button',
false,
[ 'icon' => 'update' ],
true
)
);
echo '</form>';

View File

@ -107,7 +107,7 @@ html_print_table($table);
function cell_op($oid='')
{
return '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_edit_snmp" href="javascript: edit_snmp(\''.$oid.'\');">'.html_print_image('images/cog.png', true, ['class' => 'invert_filter', 'title' => __('Edit')]).'</a>'.'<a class="delete_button_snmp" href="javascript: delete_snmp(\''.$oid.'\');">'.html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
return '<img class="loading invisible" src="'.'images/spinner.gif'.'" />'.'<a class="button_edit_snmp" href="javascript: edit_snmp(\''.$oid.'\');">'.html_print_image('images/cog.png', true, ['class' => 'invert_filter', 'title' => __('Edit')]).'</a>'.'<a class="delete_button_snmp" href="javascript: delete_snmp(\''.$oid.'\');">'.html_print_image('images/delete.svg', true, ['title' => __('Delete'), 'class' => 'invert_filter']).'</a>';
}

View File

@ -0,0 +1,161 @@
<?php
/**
* Controller View tips in setup
*
* @category Console Class
* @package Pandora FMS
* @subpackage Dashboards
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
// Begin.
global $config;
require_once $config['homedir'].'/include/class/TipsWindow.class.php';
$view = get_parameter('view', '');
$action = get_parameter('action', '');
try {
$tipsWindow = new TipsWindow();
} catch (Exception $e) {
echo '[TipsWindow]'.$e->getMessage();
return;
}
if ($view === 'create' || $view === 'edit') {
// IF exists actions
if ($action === 'create' || $action === 'edit') {
$files = $_FILES;
$id_lang = get_parameter('id_lang', '');
$id_profile = get_parameter('id_profile', '');
$title = get_parameter('title', '');
$text = get_parameter('text', '');
$url = get_parameter('url', '');
$enable = get_parameter_switch('enable', '');
$errors = [];
if (count($files) > 0) {
$e = $tipsWindow->validateImages($files);
if ($e !== false) {
$errors = $e;
}
}
if (empty($id_lang) === true) {
$errors[] = __('Language is empty');
}
if (empty($title) === true) {
$errors[] = __('Title is empty');
}
if (empty($text) === true) {
$errors[] = __('Text is empty');
}
switch ($action) {
case 'create':
if (count($errors) === 0) {
if (count($files) > 0) {
$uploadImages = $tipsWindow->uploadImages($files);
}
$response = $tipsWindow->createTip($id_lang, $id_profile, $title, $text, $url, $enable, $uploadImages);
if ($response === 0) {
$errors[] = __('Error in insert tip');
}
}
$tipsWindow->viewCreate($errors);
return;
case 'edit':
$idTip = get_parameter('idTip', '');
$imagesToDelete = get_parameter('images_to_delete', '');
if (empty($idTip) === false) {
if (count($errors) === 0) {
if (empty($imagesToDelete) === false) {
$imagesToDelete = json_decode(io_safe_output($imagesToDelete), true);
$tipsWindow->deleteImagesFromTip($idTip, $imagesToDelete);
}
if (count($files) > 0) {
$uploadImages = $tipsWindow->uploadImages($files);
}
$response = $tipsWindow->updateTip($idTip, $id_profile, $id_lang, $title, $text, $url, $enable, $uploadImages);
if ($response === 0) {
$errors[] = __('Error in update tip');
}
}
$tipsWindow->viewEdit($idTip, $errors);
}
return;
default:
$tipsWindow->draw();
return;
}
return;
}
// If not exists actions
switch ($view) {
case 'create':
$tipsWindow->viewCreate();
return;
case 'edit':
$idTip = get_parameter('idTip', '');
if (empty($idTip) === false) {
$tipsWindow->viewEdit($idTip);
}
return;
default:
$tipsWindow->draw();
return;
}
}
if ($action === 'delete') {
$idTip = get_parameter('idTip', '');
$errors = [];
if (empty($idTip) === true) {
$errors[] = __('Tip required');
}
if (count($errors) === 0) {
$response = $tipsWindow->deleteTip($idTip);
if ($response === 0) {
$errors[] = __('Error in delete tip');
}
}
$tipsWindow->draw($errors);
return;
}
$tipsWindow->draw();

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
<?php
/**
* User creation / update.
*
@ -60,7 +59,7 @@ if ($enterprise_include === true) {
$id = get_parameter('id', get_parameter('id_user', ''));
// Check if we are the same user for edit or we have a proper profile for edit users.
if ($id !== $config['id_user']) {
if ((is_centralized() === true) || (bool) check_acl($config['id_user'], 0, 'UM') === false) {
if ((bool) check_acl($config['id_user'], 0, 'UM') === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access User Management'
@ -393,6 +392,7 @@ if ($create_user === true) {
$values['timezone'] = (string) get_parameter('timezone');
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh', 0);
$dashboard = get_parameter('dashboard', '');
$visual_console = get_parameter('visual_console', '');
@ -653,6 +653,8 @@ if ($update_user) {
$values['timezone'] = (string) get_parameter('timezone');
$values['default_event_filter'] = (int) get_parameter('default_event_filter');
$values['default_custom_view'] = (int) get_parameter('default_custom_view');
$values['show_tips_startup'] = (int) get_parameter_switch('show_tips_startup');
$values['time_autorefresh'] = (int) get_parameter('time_autorefresh');
// API Token information.
$apiTokenRenewed = (bool) get_parameter('renewAPIToken');
$values['api_token'] = ($apiTokenRenewed === true) ? api_token_generate() : users_get_API_token($values['id_user']);
@ -995,28 +997,19 @@ if (!users_is_admin() && $config['id_user'] !== $id && $new_user === false) {
}
}
if (is_metaconsole() === true) {
html_print_div(
[
'class' => 'user_form_title',
'content' => ((bool) $id === true) ? sprintf('%s [ %s ]', __('Update User'), $id) : __('Create User'),
]
);
}
if (!$new_user) {
$user_id = '<div class="label_select_simple"><p class="edit_user_labels">'.__('User ID').': </p>';
$user_id .= '<span>'.$id.'</span>';
$user_id .= html_print_input_hidden('id_user', $id, true);
$user_id .= '</div>';
$apiTokenContentElements[] = '<span style="height: 15px;font-size: 14px;">'.__('API Token').'</span>';
$apiTokenContentElements[] = '<span style="line-height: 15px; height: 15px;font-size: 14px;">'.__('API Token').'</span>';
$apiTokenContentElements[] = html_print_button(
__('Renew'),
'renew_api_token',
false,
sprintf(
'javascript:renewAPIToken(\'%s\', \'%s\', \'%s\')',
'javascript:renewAPIToken("%s", "%s", "%s")',
__('Warning'),
__('The API token will be renewed. After this action, the last token you were using will not work. Are you sure?'),
'user_profile_form',
@ -1032,7 +1025,7 @@ if (!$new_user) {
'show_api_token',
false,
sprintf(
'javascript:showAPIToken(\'%s\', \'%s\')',
'javascript:showAPIToken("%s", "%s")',
__('API Token'),
base64_encode(__('Your API Token is:').'&nbsp;<br><span class="font_12pt bolder">'.users_get_API_token($id).'</span><br>&nbsp;'.__('Please, avoid share this string with others.')),
),
@ -1281,8 +1274,9 @@ if (is_metaconsole() === false) {
if (is_metaconsole() === true) {
$array_filters = get_filters_custom_fields_view(0, true);
$search_custom_fields_view = '<div class="label_select"><p class="edit_user_labels">'.__('Search custom field view').' '.ui_print_help_tip(__('Load by default the selected view in custom field view'), true).'</p>';
$search_custom_fields_view .= html_print_select(
$searchCustomFieldView = [];
$searchCustomFieldView[] = __('Search custom field view');
$searchCustomFieldView[] = html_print_select(
$array_filters,
'default_custom_view',
$user_info['default_custom_view'],
@ -1294,7 +1288,10 @@ if (is_metaconsole() === true) {
true,
'',
false
).'</div>';
).ui_print_input_placeholder(
__('Load by default the selected view in custom field view'),
true
);
}
$values = [
@ -1376,6 +1373,8 @@ $home_screen .= html_print_input_text(
false
);
$home_screen = '';
$size_pagination = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Block size for pagination').'</p>';
$size_pagination .= html_print_input_text(
'block_size',
@ -1394,19 +1393,20 @@ if ($id === $config['id_user']) {
);
}
if (enterprise_installed() && is_metaconsole() === true) {
if (enterprise_installed() === true && is_metaconsole() === true) {
$user_info_metaconsole_access = 'only_console';
if (isset($user_info['metaconsole_access'])) {
$user_info_metaconsole_access = $user_info['metaconsole_access'];
}
// TODO review help tips on meta.
$meta_access = '<div class="label_select"><p class="edit_user_labels">'.__('Metaconsole access').' './* ui_print_help_icon('meta_access', true). */ '</p>';
$metaconsole_accesses = [
'basic' => __('Basic'),
'advanced' => __('Advanced'),
];
$meta_access .= html_print_select(
$outputMetaAccess = [];
$outputMetaAccess[] = __('Metaconsole access');
$outputMetaAccess[] = html_print_select(
$metaconsole_accesses,
'metaconsole_access',
$user_info_metaconsole_access,
@ -1416,51 +1416,9 @@ if (enterprise_installed() && is_metaconsole() === true) {
true,
false,
false
).'</div>';
);
}
/*
$not_login = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Not Login').'</p>';
$not_login .= ui_print_help_tip(
__('The user with not login set only can access to API.'),
true
);
$not_login .= html_print_checkbox_switch(
'not_login',
1,
$user_info['not_login'],
true
).'</div>';
$local_user = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Local user').'</p>';
$local_user .= ui_print_help_tip(
__('The user with local authentication enabled will always use local authentication.'),
true
);
$local_user .= html_print_checkbox_switch(
'local_user',
1,
$user_info['local_user'],
true
).'</div>';
$session_time = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Session Time');
$session_time .= ui_print_help_tip(
__('This is defined in minutes, If you wish a permanent session should putting -1 in this field.'),
true
).'</p>';
$session_time .= html_print_input_text(
'session_time',
$user_info['session_time'],
'',
5,
5,
true.false,
false,
'',
'class="input_line_small"'
).'</div>';
*/
$user_groups = implode(',', array_keys((users_get_groups($id, 'AR', $display_all_group))));
if (empty($user_groups) === false) {
@ -1581,31 +1539,6 @@ if (empty($doubleAuthElementsContent) === false) {
$doubleAuthentication = '';
}
/*
if (isset($double_authentication)) {
$double_authentication .= '</div>';
}*/
$autorefresh_list_out = [];
if (is_metaconsole() === false || is_centralized() === true) {
$autorefresh_list_out['operation/agentes/estado_agente'] = 'Agent detail';
@ -1631,8 +1564,8 @@ $autorefresh_list_out['operation/visual_console/render_view'] = 'Visual console'
$autorefresh_list_out['operation/events/events'] = 'Events';
if (isset($autorefresh_list) === false) {
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$config['id_user']."'");
if (isset($autorefresh_list) === false || empty($autorefresh_list) === true || empty($autorefresh_list[0]) === true) {
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$id."'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
if ($autorefresh_list === null) {
$autorefresh_list[0] = __('None');
@ -1664,31 +1597,32 @@ if (isset($autorefresh_list) === false) {
}
}
if (is_metaconsole() === true) {
enterprise_include_once('include/functions_metaconsole.php');
$access_node = db_get_value('metaconsole_access_node', 'tusuario', 'id_user', $id);
$metaconsole_agents_manager = '<div class="label_select_simple" id="metaconsole_agents_manager_div"><p class="edit_user_labels">'.__('Enable agents managment').'</p>';
$metaconsole_agents_manager .= html_print_checkbox_switch(
$metaconsoleAgentManager = [];
$metaconsoleAgentManager[] = __('Enable agents managment');
$metaconsoleAgentManager[] = html_print_checkbox_switch(
'metaconsole_agents_manager',
1,
$user_info['metaconsole_agents_manager'],
true
).'</div>';
);
$metaconsole_access_node = '<div class="label_select_simple" id="metaconsole_access_node_div"><p class="edit_user_labels">'.__('Enable node access').ui_print_help_tip(__('With this option enabled, the user will can access to nodes console'), true).'</p>';
$metaconsole_access_node .= html_print_checkbox(
$metaconsoleAgentManager[] = __('Enable node access').ui_print_help_tip(
__('With this option enabled, the user will can access to nodes console'),
true
);
$metaconsoleAgentManager[] = html_print_checkbox_switch(
'metaconsole_access_node',
1,
$access_node,
true
).'</div>';
);
}
echo '<div class="max_floating_element_size">';
echo '<form id="user_profile_form" name="user_profile_form" method="post" autocomplete="off" action="#">';
@ -1700,137 +1634,8 @@ if (!$id) {
$user_id_create = $user_id;
}
if (is_metaconsole() === true) {
$access_or_pagination = $meta_access;
if ($id != '' && !$is_err) {
$div_user_info = '<div class="edit_user_info_left">'.$avatar.$user_id_create.'</div>
<div class="edit_user_info_right">'.$user_id_update_view.$full_name.$new_pass.$new_pass_confirm.$own_pass_confirm.$global_profile.'</div>';
} else {
$div_user_info = '<div class="edit_user_info_left">'.$avatar.'</div>
<div class="edit_user_info_right">'.$user_id_create.$user_id_update_view.$full_name.$new_pass.$new_pass_confirm.$global_profile.'</div>';
}
echo '<div id="user_form">
<div class="user_edit_first_row">
<div class="edit_user_info white_box">'.$div_user_info.'</div>
<div class="edit_user_autorefresh white_box"><p class="bolder">Extra info</p>'.$email.$phone.$not_login.$local_user.$session_time.'</div>
</div>
<div class="user_edit_second_row white_box">
<div class="edit_user_options">'.$language.$access_or_pagination.$skin.$default_event_filter.$double_authentication.'</div>
<div class="edit_user_timezone">'.$timezone;
echo $search_custom_fields_view.$metaconsole_agents_manager.$metaconsole_access_node;
$autorefresh_show = '<p class="edit_user_labels">'._('Autorefresh').ui_print_help_tip(
__('This will activate autorefresh in selected pages'),
true
).'</p>';
$select_out = html_print_select(
$autorefresh_list_out,
'autorefresh_list_out[]',
'',
'',
'',
'',
true,
true,
true,
'',
false,
'width:100%'
);
$arrows = ' ';
$select_in = html_print_select(
$autorefresh_list,
'autorefresh_list[]',
'',
'',
'',
'',
true,
true,
true,
'',
false,
'width:100%'
);
$table_ichanges = '<div class="autorefresh_select">
<div class="autorefresh_select_list_out">
<p class="autorefresh_select_text">'.__('Full list of pages').': </p>
<div>'.$select_out.'</div>
</div>
<div class="autorefresh_select_arrows" style="display:grid">
<a href="javascript:">'.html_print_image(
'images/darrowright_green.png',
true,
[
'id' => 'right_autorefreshlist',
'alt' => __('Push selected pages into autorefresh list'),
'title' => __('Push selected pages into autorefresh list'),
]
).'</a>
<a href="javascript:">'.html_print_image(
'images/darrowleft_green.png',
true,
[
'id' => 'left_autorefreshlist',
'alt' => __('Pop selected pages out of autorefresh list'),
'title' => __('Pop selected pages out of autorefresh list'),
]
).'</a>
</div>
<div class="autorefresh_select_list">
<p class="autorefresh_select_text">'.__('List of pages with autorefresh').': </p>
<div>'.$select_in.'</div>
</div>
</div>';
$autorefresh_show .= $table_ichanges;
// Time autorefresh.
$times = get_refresh_time_array();
$time_autorefresh = '<div class="label_select"><p class="edit_user_labels">'.__('Time autorefresh');
$time_autorefresh .= ui_print_help_tip(
__('Interval of autorefresh of the elements, by default they are 30 seconds, needing to enable the autorefresh first'),
true
).'</p>';
$time_autorefresh .= html_print_select(
$times,
'time_autorefresh',
$user_info['time_autorefresh'],
'',
'',
'',
true,
false,
false
).'</div>';
echo '</div>
</div>
<div class="edit_user_autorefresh white_box">'.$autorefresh_show.$time_autorefresh.'</div>
<div class="user_edit_third_row white_box">
<div class="edit_user_comments">'.$comments.'</div>
</div>';
if (empty($ehorus) === false) {
html_print_div(
[
'class' => 'user_edit_third_row white_box',
'content' => $ehorus,
],
true
);
}
} else {
$access_or_pagination = $size_pagination;
// WIP: Only for node.
include_once 'user_management.php';
}
// User management form.
require_once 'user_management.php';
if ((bool) $config['admin_can_add_user'] === true) {
html_print_csrf_hidden();
@ -1842,9 +1647,13 @@ if ($new_user === true) {
html_print_input_hidden('json_profile', $json_profile);
}
echo '</div>';
echo '</form>';
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}
echo '</div>';
$actionButtons = [];
@ -1887,7 +1696,7 @@ echo '</div>';
// This is an image generated for JS.
$delete_image = html_print_input_image(
'del',
'images/cross.png',
'images/delete.svg',
1,
'',
true,
@ -1911,7 +1720,7 @@ if (is_metaconsole() === false) {
$(document).ready(function() {
// Set up the picker to update target timezone and country select lists.
$('#timezone-image').timezonePicker({
target: '#timezone',
target: '#timezone1',
});
// Optionally an auto-detect button to trigger JavaScript geolocation.
@ -1933,23 +1742,13 @@ if (is_metaconsole() === false) {
var json_profile = $('#hidden-json_profile');
/* <![CDATA[ */
$(document).ready(function() {
// Set up the picker to update target timezone and country select lists.
$('#timezone-image').timezonePicker({
target: '#timezone1',
});
// Optionally an auto-detect button to trigger JavaScript geolocation.
$('#timezone-detect').click(function() {
$('#timezone-image').timezonePicker('detectLocation');
});
$("#right_autorefreshlist").click(function() {
jQuery.each($("select[name='autorefresh_list_out[]'] option:selected"), function(key, value) {
imodule_name = $(value).html();
if (imodule_name != <?php echo "'".__('None')."'"; ?>) {
id_imodule = $(value).attr('value');
$("select[name='autorefresh_list[]']").append($("<option></option>").val(id_imodule).html('<i>' + imodule_name + '</i>'));
$("select[name='autorefresh_list[]'] option").each(function() { $(this).attr("selected", true) });
$("select[name='autorefresh_list[]']").append($("<option></option>").val(id_imodule).html('<i>' + imodule_name + '</i>').attr("selected", true));
$("#autorefresh_list_out").find("option[value='" + id_imodule + "']").remove();
$("#autorefresh_list").find("option[value='']").remove();
$("#autorefresh_list").find("option[value='0']").remove();
@ -1976,6 +1775,13 @@ if (is_metaconsole() === false) {
});
});
$("#button-uptbutton").click (function () {
console.log('aaaaaaaaaaaaa');
if($("#autorefresh_list option").length > 0) {
$('#autorefresh_list option').prop('selected', true);
}
});
$("input#checkbox-double_auth").change(function(e) {
e.preventDefault();
if (this.checked) {

View File

@ -395,8 +395,6 @@ if ($delete_user === true) {
__('There was a problem deleting the user from %s', io_safe_input($server['server_name']))
);
}
header('Refresh:1');
}
} else {
ui_print_error_message(__('There was a problem deleting the user'));
@ -453,9 +451,9 @@ if ($delete_user === true) {
}
}
$filter_group = (int) get_parameter('filter_group', 0);
$filter_search = get_parameter('filter_search', '');
$search = (bool) get_parameter('search', false);
$filter_group = (int) get_parameter('filter_group', 0);
$filter_search = get_parameter('filter_search', '');
$search = (bool) get_parameter('search', false);
if (($filter_group == 0) && ($filter_search == '')) {
$search = false;
@ -463,43 +461,72 @@ if (($filter_group == 0) && ($filter_search == '')) {
$filterTable = new stdClass();
$filterTable->width = '100%';
$filterTable->class = 'fixed_filter_bar';
$filterTable->class = 'filter-table-adv';
$filterTable->rowclass[0] = '';
$filterTable->cellstyle[0][0] = 'width:0';
$filterTable->cellstyle[0][1] = 'width:0';
$filterTable->data[0][0] = __('Group');
$filterTable->data[1][0] = html_print_select_groups(
false,
'AR',
true,
'filter_group',
$filter_group,
'',
'',
0,
true
$filterTable->data[0][] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'AR',
true,
'filter_group',
$filter_group,
'',
'',
0,
true
)
);
$filterTable->data[0][1] = __('Search').ui_print_help_tip(__('Search by username, fullname or email'), true);
$filterTable->data[1][1] = html_print_input_text(
'filter_search',
$filter_search,
__('Search by username, fullname or email'),
30,
90,
true
);
$filterTable->cellstyle[1][2] = 'vertical-align: bottom';
$filterTable->data[1][2] = html_print_submit_button(
$filterTable->data[0][] = html_print_label_input_block(
__('Search'),
'search',
false,
html_print_input_text(
'filter_search',
$filter_search,
__('Search by username, fullname or email'),
30,
90,
true
).ui_print_input_placeholder(
__('Search by username, fullname or email'),
true
)
);
$form_filter = "<form method='post'>";
$form_filter .= html_print_table($filterTable, true);
$form_filter .= html_print_div(
[
'icon' => 'search',
'class' => 'float-right',
'mode' => 'secondary mini',
'class' => 'action-buttons-right-forced',
'content' => html_print_submit_button(
__('Search'),
'search',
false,
[
'icon' => 'search',
'class' => 'float-right',
'mode' => 'secondary mini',
],
true
),
],
true
);
$form_filter .= '</form>';
ui_toggle(
$form_filter,
'<span class="subsection_header_title">'.__('Filter').'</span>',
__('Filter'),
'filter',
true,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph fixed_filter_bar'
);
$is_management_allowed = true;
if (is_metaconsole() === false && is_management_allowed() === false) {
@ -520,20 +547,6 @@ if (is_metaconsole() === false && is_management_allowed() === false) {
);
}
if (is_metaconsole() === true) {
$filterTable->width = '96%';
$form_filter = "<form class='filters_form' method='post'>";
$form_filter .= html_print_table($filterTable, true);
$form_filter .= '</form>';
ui_toggle($form_filter, __('Show Options'));
} else {
$form_filter = "<form method='post'>";
$form_filter .= html_print_table($filterTable, true);
$form_filter .= '</form>';
echo $form_filter;
}
// 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;
@ -790,7 +803,6 @@ foreach ($info as $user_id => $user_info) {
);
}
$data[4] .= '<br/>';
$data[4] .= '<br/>';
$total_profile++;

View File

@ -325,53 +325,57 @@ if ($new_user === false) {
$userManagementTable->data['passwordManage_table'] = html_print_table($passwordManageTable, true);
if (users_is_admin() === true) {
$userManagementTable->rowclass['captions_loginErrorUser'] = 'field_half_width w50p';
$userManagementTable->cellclass['captions_loginErrorUser'][0] = 'wrap';
$userManagementTable->cellclass['captions_loginErrorUser'][1] = 'wrap';
$notLoginCheckContent = [];
$notLoginCheckContent[] = '<span>'.__('Not Login').'</span>';
$notLoginCheckContent[] = html_print_checkbox_switch(
'not_login',
1,
$user_info['not_login'],
true
);
$userManagementTable->rowclass['captions_loginErrorUser'] = 'field_half_width w50p';
$userManagementTable->cellclass['captions_loginErrorUser'][0] = 'wrap';
$userManagementTable->cellclass['captions_loginErrorUser'][1] = 'wrap';
$notLoginCheckContent = [];
$notLoginCheckContent[] = '<span>'.__('Not Login').'</span>';
$notLoginCheckContent[] = html_print_checkbox_switch(
'not_login',
1,
$user_info['not_login'],
true
);
$userManagementTable->data['captions_loginErrorUser'][0] = html_print_div(
[
'class' => 'margin-top-10',
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
'content' => implode('', $notLoginCheckContent),
],
true
);
$userManagementTable->data['captions_loginErrorUser'][0] .= ui_print_input_placeholder(
__('The user with not login set only can access to API.'),
true
);
$userManagementTable->data['captions_loginErrorUser'][0] = html_print_div(
[
'class' => 'margin-top-10',
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
'content' => implode('', $notLoginCheckContent),
],
true
);
$userManagementTable->data['captions_loginErrorUser'][0] .= ui_print_input_placeholder(
__('The user with not login set only can access to API.'),
true
);
$localUserCheckContent = [];
$localUserCheckContent[] = '<span>'.__('Local User').'</span>';
$localUserCheckContent[] = html_print_checkbox_switch(
'local_user',
1,
$user_info['local_user'],
true
);
$localUserCheckContent = [];
$localUserCheckContent[] = '<span>'.__('Local User').'</span>';
$localUserCheckContent[] = html_print_checkbox_switch(
'local_user',
1,
$user_info['local_user'],
true
);
$userManagementTable->data['captions_loginErrorUser'][1] = html_print_div(
[
'class' => 'margin-top-10',
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
'content' => implode('', $localUserCheckContent),
],
true
);
$userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_input_placeholder(
__('The user with local authentication enabled will always use local authentication.'),
true
);
}
$userManagementTable->data['captions_loginErrorUser'][1] = html_print_div(
[
'class' => 'margin-top-10',
'style' => 'display: flex; flex-direction: row-reverse; align-items: center;',
'content' => implode('', $localUserCheckContent),
],
true
);
$userManagementTable->data['captions_loginErrorUser'][1] .= ui_print_input_placeholder(
__('The user with local authentication enabled will always use local authentication.'),
true
);
$userManagementTable->data['show_tips_startup'][0] = html_print_checkbox_switch('show_tips_startup', 1, ($user_info['show_tips_startup'] === null) ? true : $user_info['show_tips_startup'], true);
$userManagementTable->data['show_tips_startup'][1] = '<span>'.__('Show usage tips at startup').'</span>';
// Session time input.
$userManagementTable->rowclass['captions_userSessionTime'] = 'field_half_width';
@ -549,10 +553,10 @@ $userManagementTable->data['fields_autorefreshTime'][0] .= ui_print_input_placeh
// Title for Language and Appearance.
$userManagementTable->data['title_lookAndFeel'] = html_print_subtitle_table(__('Language and Appearance'));
// Language and color scheme.
$userManagementTable->rowclass['captions_lang_colorscheme'] = 'field_half_width';
$userManagementTable->rowclass['fields_lang_colorscheme'] = 'field_half_width';
$userManagementTable->data['captions_lang_colorscheme'][0] = __('Language');
$userManagementTable->data['fields_lang_colorscheme'][0] = html_print_select_from_sql(
$userManagementTable->rowclass['line1_looknfeel'] = 'field_half_width';
$userManagementTable->rowclass['line2_looknfeel'] = 'field_half_width';
$userManagementTable->data['line1_looknfeel'][0] = __('Language');
$userManagementTable->data['line2_looknfeel'][0] = html_print_select_from_sql(
'SELECT id_language, name FROM tlanguage',
'language',
$user_info['language'],
@ -562,8 +566,15 @@ $userManagementTable->data['fields_lang_colorscheme'][0] = html_print_select_fro
true
);
$userManagementTable->data['captions_lang_colorscheme'][1] = __('User color scheme');
$userManagementTable->data['fields_lang_colorscheme'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
if (is_metaconsole() === true) {
if (users_is_admin() === true) {
$userManagementTable->data['line1_looknfeel'][1] = $outputMetaAccess[0];
$userManagementTable->data['line2_looknfeel'][1] = $outputMetaAccess[1];
}
} else {
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
}
$userManagementTable->rowclass['captions_blocksize_eventfilter'] = 'field_half_width';
$userManagementTable->rowclass['fields_blocksize_eventfilter'] = 'field_half_width';
@ -589,41 +600,55 @@ $userManagementTable->data['fields_blocksize_eventfilter'][1] = html_print_selec
false,
false
);
if (is_metaconsole() === false) {
// Home screen table.
$homeScreenTable = new stdClass();
$homeScreenTable->class = 'w100p table_section full_section';
$homeScreenTable->id = 'home_screen_table';
$homeScreenTable->style = [];
$homeScreenTable->rowclass = [];
$homeScreenTable->data = [];
// Home screen.
$homeScreenTable->data['captions_homescreen'][0] = __('Home screen');
$homeScreenTable->colspan['captions_homescreen'][0] = 2;
$homeScreenTable->rowclass['captions_homescreen'] = 'field_half_width';
$homeScreenTable->rowclass['fields_homescreen'] = 'field_half_width flex';
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
$homeScreenValues,
'section',
io_safe_output($user_info['section']),
'show_data_section();',
'',
-1,
true,
false,
false
);
$homeScreenTable->data['fields_homescreen'][1] = html_print_div(
[
'class' => 'w100p',
'content' => $customHomeScreenDataField,
],
true
);
// Home screen table.
$homeScreenTable = new stdClass();
$homeScreenTable->class = 'w100p table_section full_section';
$homeScreenTable->id = 'home_screen_table';
$homeScreenTable->style = [];
$homeScreenTable->rowclass = [];
$homeScreenTable->data = [];
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
}
// Home screen.
$homeScreenTable->data['captions_homescreen'][0] = __('Home screen');
$homeScreenTable->colspan['captions_homescreen'][0] = 2;
$homeScreenTable->rowclass['captions_homescreen'] = 'field_half_width';
$homeScreenTable->rowclass['fields_homescreen'] = 'field_half_width flex';
$homeScreenTable->data['fields_homescreen'][0] = html_print_select(
$homeScreenValues,
'section',
io_safe_output($user_info['section']),
'show_data_section();',
'',
-1,
true,
false,
false
);
$homeScreenTable->data['fields_homescreen'][1] = html_print_div(
[
'class' => 'w100p',
'content' => $customHomeScreenDataField,
],
true
);
if (is_metaconsole() === true && users_is_admin() === true) {
$userManagementTable->rowclass['search_custom1_looknfeel'] = 'field_half_width';
$userManagementTable->rowclass['search_custom2_looknfeel'] = 'field_half_width flex-column';
$userManagementTable->data['search_custom1_looknfeel'][0] = $searchCustomFieldView[0];
$userManagementTable->data['search_custom2_looknfeel'][0] = $searchCustomFieldView[1];
$userManagementTable->rowclass['homescreen_table'] = 'w100p';
$userManagementTable->data['homescreen_table'] = html_print_table($homeScreenTable, true);
$userManagementTable->rowclass['agent_manager1_looknfeel'] = 'field_half_width';
$userManagementTable->rowclass['agent_manager2_looknfeel'] = 'field_half_width flex-column';
$userManagementTable->data['agent_manager1_looknfeel'][0] = $metaconsoleAgentManager[0];
$userManagementTable->data['agent_manager1_looknfeel'][1] = $metaconsoleAgentManager[2];
$userManagementTable->data['agent_manager2_looknfeel'][0] = $metaconsoleAgentManager[1];
$userManagementTable->data['agent_manager2_looknfeel'][1] = $metaconsoleAgentManager[3];
}
// Timezone.
$userManagementTable->rowclass['captions_timezone'] = 'field_half_width';
@ -637,14 +662,15 @@ $userManagementTable->data['fields_timezone'][0] .= ui_print_input_placeholder(
__('The timezone must be that of the associated server.'),
true
);
$userManagementTable->data['fields_timezone'][1] = html_print_div(
[
'id' => 'timezone-picker',
'content' => implode('', $timezoneContent),
],
true
);
if (is_metaconsole() === false) {
$userManagementTable->data['fields_timezone'][1] = html_print_div(
[
'id' => 'timezone-picker',
'content' => implode('', $timezoneContent),
],
true
);
}
// Title for Language and Appearance.
$userManagementTable->data['title_additionalSettings'] = html_print_subtitle_table(__('Additional settings'));
@ -737,7 +763,3 @@ html_print_div(
);
html_print_table($userManagementTable);
// User Profile definition table. (Only where user is not creating).
if ($new_user === false && ((bool) check_acl($config['id_user'], 0, 'UM') === true)) {
profile_print_profile_table($id, io_safe_output($json_profile), false, ($is_err === true));
}

View File

@ -673,11 +673,11 @@ class DiscoveryTaskList extends HTML
$data[0] .= ');" >';
$data[0] .= html_print_image(
'images/target.png',
'images/change-active.svg',
true,
[
'title' => __('Force'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[0] .= '</span>';
@ -731,11 +731,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AZURE_COMPUTE:
// Discovery Applications MySQL.
$data[6] = html_print_image(
'images/plugin.png',
'images/plugins@svg.svg',
true,
[
'title' => __('Discovery Cloud Azure Compute'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Cloud.Azure.Compute');
@ -744,11 +744,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AWS_EC2:
// Discovery Applications MySQL.
$data[6] = html_print_image(
'images/plugin.png',
'images/plugins@svg.svg',
true,
[
'title' => __('Discovery Cloud AWS EC2'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Cloud.AWS.EC2');
@ -757,11 +757,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AWS_RDS:
// Discovery Cloud RDS.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Cloud RDS'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.Cloud.Aws.RDS');
@ -770,11 +770,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_CLOUD_AWS_S3:
// Discovery Cloud S3.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Cloud S3'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.Cloud.Aws.S3');
@ -783,11 +783,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_MYSQL:
// Discovery Applications MySQL.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Applications MySQL'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.MySQL');
@ -796,11 +796,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_ORACLE:
// Discovery Applications Oracle.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Applications Oracle'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.Oracle');
@ -809,11 +809,11 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_DB2:
// Discovery Applications DB2.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery Applications DB2'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.DB2');
@ -823,7 +823,7 @@ class DiscoveryTaskList extends HTML
// Internal deployment task.
$no_operations = true;
$data[6] = html_print_image(
'images/deploy.png',
'images/osx-terminal@groups.svg',
true,
['title' => __('Agent deployment')]
).'&nbsp;&nbsp;';
@ -833,9 +833,12 @@ class DiscoveryTaskList extends HTML
case DISCOVERY_APP_MICROSOFT_SQL_SERVER:
// Discovery Applications Oracle.
$data[6] = html_print_image(
'images/network.png',
'images/cluster@os.svg',
true,
['title' => __('Discovery Applications Microsoft SQL Server')]
[
'title' => __('Discovery Applications Microsoft SQL Server'),
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.App.Microsoft SQL Server');
break;
@ -845,20 +848,20 @@ class DiscoveryTaskList extends HTML
if ($task['id_recon_script'] == 0) {
// Discovery NetScan.
$data[6] = html_print_image(
'images/op_network.png',
'images/cluster@os.svg',
true,
[
'title' => __('Discovery NetScan'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'&nbsp;&nbsp;';
$data[6] .= __('Discovery.NetScan');
} else {
// APP or external script recon task.
$data[6] = html_print_image(
'images/plugin.png',
'images/plugins@svg.svg',
true,
['class' => 'invert_filter']
['class' => 'main_menu_icon invert_filter']
).'&nbsp;&nbsp;';
$data[6] .= $recon_script_name;
}
@ -873,7 +876,7 @@ class DiscoveryTaskList extends HTML
'100%',
1.9,
// Color.
'#82b92e',
'#ececec',
// Return.
true,
// Text.
@ -911,7 +914,7 @@ class DiscoveryTaskList extends HTML
true,
[
'title' => __('Review results'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[9] .= '</a>';
@ -919,11 +922,11 @@ class DiscoveryTaskList extends HTML
$data[9] .= '<a href="#" onclick="progress_task_list('.$task['id_rt'].',\''.$task['name'].'\')">';
$data[9] .= html_print_image(
'images/operation.png',
'images/details.svg',
true,
[
'title' => __('View summary'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[9] .= '</a>';
@ -940,11 +943,11 @@ class DiscoveryTaskList extends HTML
if (check_acl($config['id_user'], 0, 'MR')) {
$data[9] .= '<a href="#" onclick="show_map('.$task['id_rt'].',\''.$task['name'].'\')">';
$data[9] .= html_print_image(
'images/dynamic_network_icon.png',
'images/web@groups.svg',
true,
[
'title' => __('View map'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
);
$data[9] .= '</a>';
@ -965,32 +968,32 @@ class DiscoveryTaskList extends HTML
$tipam_task_id
)
).'">'.html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=delete&id='.$tipam_task_id
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
} else {
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
}
@ -1003,21 +1006,21 @@ class DiscoveryTaskList extends HTML
$task['id_rt']
)
).'">'.html_print_image(
'images/config.png',
'images/edit.svg',
true,
[
'title' => __('Edit task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
'images/delete.svg',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
}
@ -1218,12 +1221,12 @@ class DiscoveryTaskList extends HTML
$result .= progress_circular_bar(
$task['id_rt'],
($task['status'] < 0) ? 100 : $task['status'],
200,
200,
'#7eb641',
150,
150,
'#3A3A3A',
'%',
'',
'#3A3A3A',
'#ececec',
0
);
@ -1288,12 +1291,12 @@ class DiscoveryTaskList extends HTML
$result .= progress_circular_bar(
$task['id_rt'].'_detail',
$task['stats']['c_network_percent'],
200,
200,
'#7eb641',
150,
150,
'#3A3A3A',
'%',
'',
'#3A3A3A',
'#ececec',
0
);
$result .= '</div></div>';

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 14 / info@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-14-/-info" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Icons/Elements/Help-mini" fill="#e63c52">
<path d="M7,0 C10.8659932,0 14,3.13400675 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M7,6 C6.44771525,6 6,6.44771525 6,7 L6,7 L6,10 C6,10.5522847 6.44771525,11 7,11 C7.55228475,11 8,10.5522847 8,10 L8,10 L8,7 C8,6.44771525 7.55228475,6 7,6 Z M7,3 C6.44771525,3 6,3.44771525 6,4 C6,4.55228475 6.44771525,5 7,5 C7.55228475,5 8,4.55228475 8,4 C8,3.44771525 7.55228475,3 7,3 Z" id="Elements-/-Help-mini"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 959 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / file-csv@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-file-csv" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" fill="#14524f">
<path d="M14,0 L20,6 L20,18 C20,19.1045695 19.1045695,20 18,20 L18,20 L2,20 C0.8954305,20 0,19.1045695 0,18 L0,18 L0,2 C0,0.8954305 0.8954305,0 2,0 L2,0 L14,0 Z M3.51944167,13 C2.19341974,13 1,13.9742896 1,15.5033829 C1,17.0324763 2.15154536,18 3.5333998,18 C4.9222333,18 5.63409771,17.1069012 5.8225324,16.3694181 L4.9222333,16.105548 C4.78963111,16.5520974 4.3778664,17.0866035 3.5333998,17.0866035 C2.73778664,17.0866035 1.99800598,16.5250338 1.99800598,15.5033829 C1.99800598,14.4140731 2.77966102,13.8998647 3.51944167,13.8998647 C4.3778664,13.8998647 4.76171486,14.4073072 4.88035892,14.8673884 L5.78763709,14.5899865 C5.59222333,13.811908 4.88733799,13 3.51944167,13 Z M8.18145563,13 C7.24626122,13 6.45762712,13.6495264 6.45762712,14.5020298 C6.45762712,15.2259811 6.9670987,15.7198917 7.7557328,15.8755074 L8.44666002,16.0108254 C8.83050847,16.0852503 9.04685942,16.3017591 9.04685942,16.579161 C9.04685942,16.917456 8.76071785,17.1677943 8.2442672,17.1677943 C7.54636092,17.1677943 7.20438684,16.7415426 7.16251246,16.2679296 L6.26919242,16.4979702 C6.34596211,17.1813261 6.92522433,18 8.23728814,18 C9.3888335,18 10.0239282,17.255751 10.0239282,16.5182679 C10.0239282,15.8416779 9.54237288,15.2733424 8.64207378,15.1041949 L7.95114656,14.9756428 C7.58823529,14.9079838 7.41375872,14.6982409 7.41375872,14.4343708 C7.41375872,14.1163735 7.72083749,13.8254398 8.1884347,13.8254398 C8.81655035,13.8254398 9.03988036,14.2381597 9.0887338,14.5020298 L9.95413759,14.2449256 C9.84247258,13.7036536 9.38185444,13 8.18145563,13 Z M11.3988036,13.1014885 L10.3449651,13.1014885 L12.1734796,17.8985115 L13.1645065,17.8985115 L15,13.1014885 L13.9810568,13.1014885 L12.6899302,16.6671177 L11.3988036,13.1014885 Z M14,2 L14,7 L19,7 L14,2 Z" id="Shape"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / star@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-star" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M10,16.5 L5.32783438,18.9563028 C4.83898979,19.2133036 4.23436264,19.0253571 3.97736183,18.5365125 C3.87502276,18.3418521 3.83970808,18.118884 3.87688493,17.9021263 L4.76918916,12.6995935 L4.76918916,12.6995935 L0.989327772,9.01513923 C0.593844194,8.62963801 0.585751887,7.99652475 0.971253099,7.60104117 C1.1247617,7.44355754 1.32590411,7.34107036 1.54354115,7.30944585 L6.76718111,6.55040653 L6.76718111,6.55040653 L9.10326392,1.81698575 C9.34768622,1.32173209 9.94731205,1.11839309 10.4425657,1.36281539 C10.6397783,1.46014562 10.7994058,1.61977315 10.8967361,1.81698575 L13.2328189,6.55040653 L13.2328189,6.55040653 L18.4564589,7.30944585 C19.0030037,7.38886347 19.3816852,7.89630632 19.3022676,8.44285118 C19.270643,8.66048821 19.1681559,8.86163062 19.0106722,9.01513923 L15.2308108,12.6995935 L15.2308108,12.6995935 L16.1231151,17.9021263 C16.2164761,18.4464628 15.8508883,18.9634187 15.3065518,19.0567797 C15.0897942,19.0939566 14.8668261,19.0586419 14.6721656,18.9563028 L10,16.5 L10,16.5 Z" id="Star" fill="#a6adb2"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>A4F45784-4263-40A4-A100-0ADD2A4AF526@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Mockup---Inventory-v2" transform="translate(-330.000000, -482.000000)">
<g id="Base-operations" transform="translate(310.000000, 462.000000)">
<g id="Contenido" transform="translate(20.000000, 20.000000)">
<g id="Title">
<g id="Node" transform="translate(0.000000, 1.000000)">
<path d="M11.0005809,0.577602729 L17.0215369,4.05330429 C17.6403998,4.41055362 18.0216446,5.07084166 18.0216446,5.78541725 L18.0216446,12.2084379 C18.0216446,12.9225447 17.6408956,13.5824738 17.0226732,13.9398945 L10.9867915,17.429494 C10.3751132,17.7831311 9.62223302,17.7877875 9.00622741,17.4417433 L3.00985488,14.073251 C2.37954726,13.7191726 1.98939037,13.0524969 1.98939037,12.3295452 L1.98939037,5.78462237 C1.98939037,5.07047279 2.37018458,4.41051094 2.98846546,4.05310589 L8.99976366,0.578199219 C9.61866686,0.220434425 10.3814645,0.220207018 11.0005809,0.577602729 Z" id="Polygon" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<polyline id="Path-28" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="3 4 10 9 10 17.6651764"></polyline>
<circle id="Oval" fill="#3F3F3F" cx="10" cy="9" r="3"></circle>
<circle id="Oval" fill="#3F3F3F" cx="3" cy="4" r="3"></circle>
<circle id="Oval" fill="#3F3F3F" cx="17" cy="4" r="3"></circle>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;}
.st1{fill:#000000;}
</style>
<g id="Dark-/-20-/-delete-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(10.000000, 10.000000) rotate(0.000000) translate(-10.000000, -10.000000) translate(4.000000, 4.000000)" fill="#3F3F3F">
<path d="M6,0 C6.51283584,0 6.93550716,0.38604019 6.99327227,0.883378875 L7,1 L7,5 L11,5 C11.5522847,5 12,5.44771525 12,6 C12,6.51283584 11.6139598,6.93550716 11.1166211,6.99327227 L11,7 L7,7 L7,11 C7,11.5522847 6.55228475,12 6,12 C5.48716416,12 5.06449284,11.6139598 5.00672773,11.1166211 L5,11 L5,7 L1,7 C0.44771525,7 0,6.55228475 0,6 C0,5.48716416 0.38604019,5.06449284 0.883378875,5.00672773 L1,5 L5,5 L5,1 C5,0.44771525 5.44771525,0 6,0 Z" id="Path-7"></path>
</g>
<path d="M10,0 C4.4771525,0 0,4.4771525 0,10 C0,15.5228475 4.4771525,20 10,20 C15.5228475,20 20,15.5228475 20,10 C20,4.4771525 15.5228475,0 10,0 Z M10,2 C14.418278,2 18,5.581722 18,10 C18,14.418278 14.418278,18 10,18 C5.581722,18 2,14.418278 2,10 C2,5.581722 5.581722,2 10,2 Z" id="Oval" fill="#3F3F3F"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
<title>312C8F68-5915-4989-BCE0-E39966548B2E@svg</title>
<desc>Created with sketchtool.</desc>
<g id="Mockups" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="Mockup---Module-2-default-open" transform="translate(-1857.000000, -3735.000000)" stroke="#3F3F3F" stroke-width="2">
<g id="Barra-inferior" transform="translate(0.000000, 3710.000000)">
<g id="Acciones" transform="translate(1507.000000, 10.000000)">
<g id="Principal-por-defecto" transform="translate(269.000000, 0.000000)">
<g id="Icons/Elements/update-white" transform="translate(82.000000, 16.000000)">
<polyline id="Path-10" points="10.0005064 0 10.0005064 2.98289013 7 2.98289013"></polyline>
<path d="M0.000657169914,8.00835862 C0.790778884,9.26397417 2.12630154,9.92782378 4.00722512,9.99990745 C6.76864887,9.99990745 9.00722512,7.76136573 9.00722512,4.99998457 C9.00722512,2.23860342 6.76864887,6.16977954e-05 4.00722512,6.16977954e-05 C2.36730125,6.16977954e-05 0.911775413,0.789551382 0,2.00918391" id="Oval" transform="translate(4.503613, 4.999985) scale(-1, -1) translate(-4.503613, -4.999985) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<circle cx="10" cy="10" r="10" fill="#3F3F3F"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Some files were not shown because too many files have changed in this diff Show More