mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 22:05:41 +02:00
Merge remote-tracking branch 'origin/develop' into ent-9662-second-round
Conflicts: pandora_console/operation/agentes/ver_agente.php
This commit is contained in:
commit
086f742455
@ -237,8 +237,9 @@ if (db_get_num_rows($sql) == 0) {
|
|||||||
$table->head[5] = __('Actions');
|
$table->head[5] = __('Actions');
|
||||||
$table->align = [];
|
$table->align = [];
|
||||||
$table->align[5] = 'left';
|
$table->align[5] = 'left';
|
||||||
|
$i = 0;
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
|
$table->cellclass[$i++][5] = 'table_action_buttons';
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
$sql = sprintf('SELECT id_policy FROM tpolicy_modules_inventory WHERE id = %d', $row['id_policy_module_inventory']);
|
$sql = sprintf('SELECT id_policy FROM tpolicy_modules_inventory WHERE id = %d', $row['id_policy_module_inventory']);
|
||||||
|
@ -756,8 +756,10 @@ function inventory_get_datatable(
|
|||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$data_rows = explode(PHP_EOL, $row['data']);
|
$data_rows = explode(PHP_EOL, $row['data']);
|
||||||
foreach ($data_rows as $data_key => $data_value) {
|
foreach ($data_rows as $data_key => $data_value) {
|
||||||
$row['data'] = $data_value;
|
if (empty($data_value) === false) {
|
||||||
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
|
$row['data'] = $data_value;
|
||||||
|
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6944,7 +6944,7 @@ function ui_get_favicon()
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (empty($config['custom_favicon'])) {
|
if (empty($config['custom_favicon'])) {
|
||||||
return (!is_metaconsole()) ? 'images/pandora.ico' : 'enterprise/meta/images/favicon_meta.ico';
|
return (!is_metaconsole()) ? 'images/pandora.ico' : '/images/favicon_meta.ico';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'images/custom_favicon/'.$config['custom_favicon'];
|
return 'images/custom_favicon/'.$config['custom_favicon'];
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
*/
|
*/
|
||||||
|
:root {
|
||||||
|
--primary-color: #14524f;
|
||||||
|
--secondary-color: #ffffff;
|
||||||
|
--input-border: #c0ccdc;
|
||||||
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "lato";
|
font-family: "lato";
|
||||||
@ -1505,3 +1510,39 @@ div.nodata_container {
|
|||||||
.visual-console-container-dashboard a:visited {
|
.visual-console-container-dashboard a:visited {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SVG icons mask */
|
||||||
|
.module_background_state {
|
||||||
|
mask: url(../../../images/modules@svg.svg) no-repeat center / contain;
|
||||||
|
-webkit-mask: url(../../../images/modules@svg.svg) no-repeat center / contain;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert_background_state {
|
||||||
|
mask: url(../../../images/alert@svg.svg) no-repeat center / contain;
|
||||||
|
-webkit-mask: url(../../../images/alert@svg.svg) no-repeat center / contain;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.main_menu_icon,
|
||||||
|
img.main_menu_icon[src$=".svg"] {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.os-big-icon[src$=".svg"] {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.noresizevc.graph.adapted_sparse
|
||||||
|
div.flot-x-axis.flot-x1-axis.xAxis.x1Axis
|
||||||
|
> div.flot-tick-label.tickLabel:nth-child(odd) {
|
||||||
|
visibility: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.noresizevc.graph.adapted_sparse
|
||||||
|
div.flot-x-axis.flot-x1-axis.xAxis.x1Axis
|
||||||
|
> div.flot-tick-label.tickLabel:first-child {
|
||||||
|
visibility: visible !important;
|
||||||
|
}
|
||||||
|
@ -213,8 +213,8 @@ class Agent
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
['class' => 'invert_filter os-big-icon'],
|
||||||
true
|
false
|
||||||
).'</div>';
|
).'</div>';
|
||||||
$html .= '<div class="agent_list_ips">';
|
$html .= '<div class="agent_list_ips">';
|
||||||
$html .= $ip.' - '.groups_get_name($this->agent['id_grupo'], true);
|
$html .= $ip.' - '.groups_get_name($this->agent['id_grupo'], true);
|
||||||
|
@ -206,6 +206,7 @@ class ModuleGraph
|
|||||||
|
|
||||||
$graph = grafico_modulo_sparse($params);
|
$graph = grafico_modulo_sparse($params);
|
||||||
if ($this->draw_events) {
|
if ($this->draw_events) {
|
||||||
|
$this->width = 100;
|
||||||
$graph .= '<br>';
|
$graph .= '<br>';
|
||||||
$graph .= graphic_module_events(
|
$graph .= graphic_module_events(
|
||||||
$this->id,
|
$this->id,
|
||||||
|
@ -218,7 +218,7 @@ foreach ($rows as $row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($idModuleInventory != $row['id_module_inventory']) {
|
if ($idModuleInventory != $row['id_module_inventory']) {
|
||||||
if (isset($table) === true && $rowTable >= 1) {
|
if (isset($table) === true && $rowTable > 1) {
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
unset($table);
|
unset($table);
|
||||||
$rowTable = 1;
|
$rowTable = 1;
|
||||||
@ -310,17 +310,16 @@ foreach ($rows as $row) {
|
|||||||
$rowTable++;
|
$rowTable++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($iterator1 > 5) {
|
// PRINT COUNT TOTAL.
|
||||||
// PRINT COUNT TOTAL.
|
$table->colspan[$rowTable][0] = 10;
|
||||||
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
||||||
$rowTable++;
|
$rowTable++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$idModuleInventory = $row['id_module_inventory'];
|
$idModuleInventory = $row['id_module_inventory'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($table) === true && $rowTable >= 1) {
|
if (isset($table) === true && $rowTable > 1) {
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
$printedTables++;
|
$printedTables++;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ use PandoraFMS\Enterprise\Metaconsole\Node;
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once 'include/functions_gis.php';
|
require_once $config['homedir'].'/include/functions_gis.php';
|
||||||
require_once $config['homedir'].'/include/functions_agents.php';
|
require_once $config['homedir'].'/include/functions_agents.php';
|
||||||
require_once $config['homedir'].'/include/functions_groups.php';
|
require_once $config['homedir'].'/include/functions_groups.php';
|
||||||
require_once $config['homedir'].'/include/functions_modules.php';
|
require_once $config['homedir'].'/include/functions_modules.php';
|
||||||
@ -1442,22 +1442,24 @@ $alerttab['active'] = ($tab === 'alert');
|
|||||||
|
|
||||||
// Inventory.
|
// Inventory.
|
||||||
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
||||||
$inventorytab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente.'">'.html_print_image(
|
|
||||||
'images/hardware-software-component@svg.svg',
|
|
||||||
true,
|
|
||||||
[
|
|
||||||
'class' => 'main_menu_icon invert_filter',
|
|
||||||
'title' => __('Inventory'),
|
|
||||||
]
|
|
||||||
).'</a>';
|
|
||||||
|
|
||||||
if ($tab == 'inventory') {
|
if ($inventoryCount > 0) {
|
||||||
$inventorytab['active'] = true;
|
$inventorytab['text'] = html_print_menu_button(
|
||||||
} else {
|
[
|
||||||
$inventorytab['active'] = false;
|
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente,
|
||||||
|
'image' => 'images/hardware-software-component@svg.svg',
|
||||||
|
'title' => __('Inventory'),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($tab === 'inventory') {
|
||||||
|
$inventorytab['active'] = true;
|
||||||
|
} else {
|
||||||
|
$inventorytab['active'] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Collection.
|
// Collection.
|
||||||
if ((int) $config['license_nms'] !== 1) {
|
if ((int) $config['license_nms'] !== 1) {
|
||||||
$collectiontab = enterprise_hook('collection_tab');
|
$collectiontab = enterprise_hook('collection_tab');
|
||||||
@ -1586,7 +1588,7 @@ if (enterprise_installed() === true && (bool) $config['log_collector'] === true)
|
|||||||
$log_viewer_tab['text'] = html_print_menu_button(
|
$log_viewer_tab['text'] = html_print_menu_button(
|
||||||
[
|
[
|
||||||
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=log_viewer&id_agente='.$id_agente,
|
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=log_viewer&id_agente='.$id_agente,
|
||||||
'image' => 'images/gm_log.png',
|
'image' => 'images/gm_log@svg.svg',
|
||||||
'title' => __('Log Viewer'),
|
'title' => __('Log Viewer'),
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
@ -1916,7 +1918,7 @@ switch ($tab) {
|
|||||||
|
|
||||||
if ((bool) $config['pure'] === false) {
|
if ((bool) $config['pure'] === false) {
|
||||||
ui_print_standard_header(
|
ui_print_standard_header(
|
||||||
__('Agent main view'),
|
__('Agent main view').' ( '.strtolower(agents_get_alias($id_agente)).' )',
|
||||||
$icon,
|
$icon,
|
||||||
false,
|
false,
|
||||||
($help_header ?? ''),
|
($help_header ?? ''),
|
||||||
@ -1935,6 +1937,12 @@ if ((bool) $config['pure'] === false) {
|
|||||||
'link' => '',
|
'link' => '',
|
||||||
'label' => $tab_name,
|
'label' => $tab_name,
|
||||||
],
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id_element' => $id_agente,
|
||||||
|
'url' => 'operation/agentes/ver_agente&id_agente='.$id_agente,
|
||||||
|
'label' => agents_get_alias($id_agente),
|
||||||
|
'section' => 'Agents',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}/
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/conf.d
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf
|
||||||
@ -60,6 +61,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/trans
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/commands
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/
|
||||||
@ -89,6 +91,7 @@ if [ ! -f $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server ] ; then
|
|||||||
install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server
|
install -m 0644 util/pandora_server_logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/pandora_server
|
||||||
fi
|
fi
|
||||||
install -m 0640 conf/pandora_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/pandora/pandora_server.conf.new
|
install -m 0640 conf/pandora_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/pandora/pandora_server.conf.new
|
||||||
|
install -m 0640 conf/pandora_server_sec.conf.template $RPM_BUILD_ROOT%{_sysconfdir}/pandora/conf.d/pandora_server_sec.conf.template
|
||||||
install -m 0640 conf/tentacle_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/tentacle_server.conf.new
|
install -m 0640 conf/tentacle_server.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/tentacle/tentacle_server.conf.new
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
|
||||||
@ -228,6 +231,9 @@ exit 0
|
|||||||
%defattr(600,root,root)
|
%defattr(600,root,root)
|
||||||
/etc/pandora/pandora_server.conf.new
|
/etc/pandora/pandora_server.conf.new
|
||||||
|
|
||||||
|
%defattr(600,root,root)
|
||||||
|
/etc/pandora/conf.d/pandora_server_sec.conf.template
|
||||||
|
|
||||||
%defattr(664,root,root)
|
%defattr(664,root,root)
|
||||||
/etc/tentacle/tentacle_server.conf.new
|
/etc/tentacle/tentacle_server.conf.new
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/trans
|
|||||||
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands
|
mkdir -p $RPM_BUILD_ROOT/var/spool/pandora/data_in/commands
|
||||||
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
|
mkdir -p $RPM_BUILD_ROOT/var/log/pandora/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf.d/
|
||||||
mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
mkdir -p $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||||
@ -78,6 +79,7 @@ cp -aRf bin/tentacle_server $RPM_BUILD_ROOT/usr/bin/
|
|||||||
|
|
||||||
cp -aRf conf/pandora_* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
cp -aRf conf/pandora_* $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/
|
||||||
cp -aRf conf/pandora_server.conf.new $RPM_BUILD_ROOT/etc/pandora/
|
cp -aRf conf/pandora_server.conf.new $RPM_BUILD_ROOT/etc/pandora/
|
||||||
|
cp -aRf conf/pandora_server_sec.conf.template $RPM_BUILD_ROOT/etc/pandora/conf.d/pandora_server_sec.conf.template
|
||||||
cp -aRf conf/tentacle_* $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
cp -aRf conf/tentacle_* $RPM_BUILD_ROOT%{prefix}/tentacle/conf/
|
||||||
cp -aRf conf/tentacle_server.conf.new $RPM_BUILD_ROOT/etc/tentacle/
|
cp -aRf conf/tentacle_server.conf.new $RPM_BUILD_ROOT/etc/tentacle/
|
||||||
cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/
|
cp -aRf util $RPM_BUILD_ROOT%{prefix}/pandora_server/
|
||||||
@ -202,6 +204,7 @@ rm -Rf %{prefix}pandora_server
|
|||||||
rm -Rf /var/log/pandora
|
rm -Rf /var/log/pandora
|
||||||
rm -Rf /usr/lib/perl5/PandoraFMS/
|
rm -Rf /usr/lib/perl5/PandoraFMS/
|
||||||
rm -Rf /etc/pandora/pandora_server.conf*
|
rm -Rf /etc/pandora/pandora_server.conf*
|
||||||
|
rm -Rf /etc/pandora/conf.d/*
|
||||||
rm -Rf /etc/tentacle/tentacle_server.conf*
|
rm -Rf /etc/tentacle/tentacle_server.conf*
|
||||||
rm -Rf /var/spool/pandora
|
rm -Rf /var/spool/pandora
|
||||||
rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd
|
rm -Rf /etc/init.d/pandora_server /etc/init.d/tentacle_serverd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user