Merge branch 'ent-3394-discovery-applications' into 'ent-3430-discovery'

Ent 3394 discovery applications

See merge request artica/pandorafms!2183

Former-commit-id: 1e6092ad224bc2ec5e058f7a6b2e2f43f1f1674c
This commit is contained in:
fbsanchez 2019-02-20 16:43:49 +01:00
commit 93a73bc8c8
5 changed files with 36 additions and 22 deletions

View File

@ -33,6 +33,9 @@ function get_wiz_class($str)
case 'tasklist':
return 'DiscoveryTaskList';
case 'app':
return 'Applications';
default:
// Ignore.
return null;
@ -50,6 +53,19 @@ foreach ($classes as $classpath) {
include_once $classpath;
}
// Load enterprise wizards.
if (enterprise_installed() === true) {
$enterprise_classes = glob(
$config['homedir'].'/'.ENTERPRISE_DIR.'/wizards/*.class.php'
);
foreach ($enterprise_classes as $classpath) {
$r = enterprise_include_once(
'wizards/'.basename($classpath)
);
}
}
$classes = array_merge($classes, $enterprise_classes);
$wiz_in_use = get_parameter('wiz', null);
$page = get_parameter('page', 0);

View File

@ -186,24 +186,6 @@ class HostDevices extends Wizard
}
/**
* Checks if environment is ready,
* returns array
* icon: icon to be displayed
* label: label to be displayed
*
* @return array With data.
**/
public function load()
{
return [
'icon' => $this->icon,
'label' => $this->label,
'url' => $this->url,
];
}
// Extra methods.

View File

@ -178,12 +178,20 @@ class Wizard
/**
* To be overwritten.
* Checks if environment is ready,
* returns array
* icon: icon to be displayed
* label: label to be displayed
*
* @return void
*/
* @return array With data.
**/
public function load()
{
return [
'icon' => $this->icon,
'label' => $this->label,
'url' => $this->url,
];
}

View File

@ -340,6 +340,14 @@ class ConsoleSupervisor
enterprise_hook('cron_supervisor_release_lock');
}
/*
* Check if CRON is running.
* NOTIF.CRON.CONFIGURED
*/
if (enterprise_installed()) {
$this->checkCronRunning();
}
}

View File

@ -375,7 +375,7 @@ function messages_get_count(
tnotification_source ns
LEFT JOIN tnotification_source_user nsu
ON ns.id=nsu.id_source
AND nsu.id_user="test")
AND nsu.id_user="%s")
ON tm.id_source=ns.id',
$user
);