diff --git a/pandora_console/images/omnishell.png b/pandora_console/images/omnishell.png
new file mode 100644
index 0000000000..02c8f0e071
Binary files /dev/null and b/pandora_console/images/omnishell.png differ
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 31c2e5214a..44a8289b0d 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -84,6 +84,27 @@ function html_debug_print($var, $file='', $oneline=false)
}
+/**
+ * Console log.
+ */
+function jslog($var)
+{
+ $more_info = '';
+ if (is_string($var)) {
+ $more_info = 'size: '.strlen($var);
+ } else if (is_bool($var)) {
+ $more_info = 'val: '.($var ? 'true' : 'false');
+ } else if (is_null($var)) {
+ $more_info = 'is null';
+ } else if (is_array($var)) {
+ $more_info = count($var);
+ }
+
+ echo ''."\n";
+ echo '';
+}
+
+
// Alias for "html_debug_print"
function html_debug($var, $file='', $oneline=false)
{
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 6a658997f6..ce17086f02 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -7084,3 +7084,21 @@ function ui_get_inventory_module_add_form(
}
+function ui_print_status_div($status)
+{
+ switch ((int) $status) {
+ case 0:
+ $return = '
';
+ break;
+
+ case 1:
+ $return = '
';
+ break;
+
+ default:
+ $return = '
';
+ break;
+ }
+
+ return $return;
+}
\ No newline at end of file
diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php
index ece6ec2d6c..b5aa181e8b 100644
--- a/pandora_console/operation/agentes/ver_agente.php
+++ b/pandora_console/operation/agentes/ver_agente.php
@@ -37,6 +37,7 @@ require_once $config['homedir'].'/include/functions_groups.php';
require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_users.php';
enterprise_include_once('include/functions_metaconsole.php');
+enterprise_include_once('include/functions_omnishell.php');
ui_require_javascript_file('openlayers.pandora');
ui_require_css_file('agent_view');
@@ -1485,6 +1486,17 @@ if ($policyTab == -1) {
$policyTab = '';
}
+
+// Omnishell.
+$tasks = count_tasks_agent($id_agente);
+
+if ($tasks === true) {
+ $omnishellTab = enterprise_hook('omnishell_tab');
+ if ($omnishellTab == -1) {
+ $omnishellTab = '';
+ }
+}
+
// WUX Console.
$modules_wux = enterprise_hook('get_wux_modules', [$id_agente]);
if ($modules_wux) {
@@ -1747,6 +1759,7 @@ $onheader = [
'ncm_view' => ($ncm_tab ?? null),
'external_tools' => ($external_tools ?? null),
'incident' => ($incidenttab ?? null),
+ 'omnishell' => ($omnishellTab ?? null),
];
@@ -1871,6 +1884,10 @@ switch ($tab) {
$tab_name = 'Policies';
break;
+ case 'omnishell':
+ $tab_name = 'Omnishell';
+ break;
+
case 'ux_console_tab':
$tab_name = 'UX Console';
break;
@@ -2009,6 +2026,10 @@ switch ($tab) {
enterprise_include('operation/agentes/policy_view.php');
break;
+ case 'omnishell':
+ enterprise_include('operation/agentes/omnishell_view.php');
+ break;
+
case 'ux_console_tab':
enterprise_include('operation/agentes/ux_console_view.php');
break;