2012-07-16 Sergio Martin <sergio.martin@artica.es>
* include/functions_modules.php: Added a function to get the kind of a module (dataserver, networserver...) as a string from the module id git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6781 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ab854ea07f
commit
b529c1e008
|
@ -1,3 +1,9 @@
|
|||
2012-07-16 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_modules.php: Added a function to get the
|
||||
kind of a module (dataserver, networserver...) as a string
|
||||
from the module id
|
||||
|
||||
2012-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* operation/tree.php: Fixed a bug which shows agents with
|
||||
|
|
|
@ -659,6 +659,38 @@ function modules_get_agentmodule_type ($id_agentmodule) {
|
|||
return (int) db_get_value ('id_tipo_modulo', 'tagente_modulo', 'id_agente_modulo', (int) $id_agentmodule);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the module kind (dataserver, networkserver...) of an agent module.
|
||||
*
|
||||
* @param int $id_agentmodule Agent module id.
|
||||
*
|
||||
* @return string Module kind of the given agent module.
|
||||
*/
|
||||
function modules_get_agentmodule_kind($id_agentmodule) {
|
||||
$id_modulo = (int) db_get_value ('id_modulo', 'tagente_modulo', 'id_agente_modulo', (int) $id_agentmodule);
|
||||
|
||||
switch($id_modulo) {
|
||||
case 1:
|
||||
return 'dataserver';
|
||||
break;
|
||||
case 2:
|
||||
return 'networkserver';
|
||||
break;
|
||||
case 4:
|
||||
return 'pluginserver';
|
||||
break;
|
||||
case 5:
|
||||
return 'predictionserver';
|
||||
break;
|
||||
case 6:
|
||||
return 'wmiserver';
|
||||
break;
|
||||
default:
|
||||
return 'other';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the unit of an agent module.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue