Merge branch 'ent-12083-open-inventory-widget-no-carga' into 'develop'

Ent 12083 open inventory widget no carga

See merge request artica/pandorafms!6506
This commit is contained in:
Rafael Ameijeiras 2023-11-27 14:46:47 +00:00
commit 67700a1ea2
3 changed files with 4 additions and 4 deletions

View File

@ -42,6 +42,7 @@ require_once $config['homedir'].'/include/functions_users.php';
enterprise_include_once('include/functions_reporting.php'); enterprise_include_once('include/functions_reporting.php');
enterprise_include_once('include/functions_metaconsole.php'); enterprise_include_once('include/functions_metaconsole.php');
enterprise_include_once('include/functions_inventory.php'); enterprise_include_once('include/functions_inventory.php');
require_once $config['homedir'].'/include/functions_inventory.php';
enterprise_include_once('include/functions_cron.php'); enterprise_include_once('include/functions_cron.php');
require_once $config['homedir'].'/include/functions_forecast.php'; require_once $config['homedir'].'/include/functions_forecast.php';
require_once $config['homedir'].'/include/functions_ui.php'; require_once $config['homedir'].'/include/functions_ui.php';

View File

@ -409,8 +409,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t
$messageTable->colspan[1][0] = 2; $messageTable->colspan[1][0] = 2;
$messageTable->data = []; $messageTable->data = [];
$messageTable->data[0][0] = '<b>'.$text_title.'</b>'; $messageTable->data[0][0] = '<b>'.$text_title.'</b>'.$closeButton;
$messageTable->data[0][1] = $closeButton;
$messageTable->data[1][0] = '<span>'.$text_message.'</b>'; $messageTable->data[1][0] = '<span>'.$text_message.'</b>';
// JavaScript help vars. // JavaScript help vars.

View File

@ -393,7 +393,7 @@ class InventoryWidget extends Widget
public function load() public function load()
{ {
global $config; global $config;
include_once $config['homedir'].'/include/functions_inventory.php';
$inventory_id_agent = $this->values['agentId']; $inventory_id_agent = $this->values['agentId'];
$inventory_agent = $this->values['agentAlias']; $inventory_agent = $this->values['agentAlias'];
$cellId = $this->cellId; $cellId = $this->cellId;
@ -827,7 +827,7 @@ class InventoryWidget extends Widget
); );
} }
if (count($agents_ids) === 0 || (int) $rows === ERR_NODATA) { if (count($agents_ids) === 0 || (int) $rows === ERR_NODATA || empty($rows) === true) {
ui_print_info_message( ui_print_info_message(
[ [
'no_close' => true, 'no_close' => true,