2010-08-19 Sergio Martin <sergio.martin@artica.es>

* godmode/agentes/module_manager_editor_common.php
	godmode/agentes/module_manager_editor_network.php
	godmode/agentes/module_manager_editor_wmi.php
	godmode/agentes/module_manager_editor_plugin.php
	godmode/agentes/module_manager_editor_prediction.php
	godmode/agentes/module_manager_editor.php: Added the policy linkation
	configuration in the modules form and allowed to modify modules
	config if the module is unlinked



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3163 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-08-19 17:23:08 +00:00
parent 14b67f19de
commit f3eb7a3ae3
7 changed files with 36 additions and 6 deletions

View File

@ -1,3 +1,14 @@
2010-08-19 Sergio Martin <sergio.martin@artica.es>
* godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager_editor.php: Added the policy linkation
configuration in the modules form and allowed to modify modules
config if the module is unlinked
2010-08-19 Miguel de Dios <miguel.dedios@artica.es> 2010-08-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_html.php: fixed the function "print_checkbox_extended" * include/functions_html.php: fixed the function "print_checkbox_extended"

View File

@ -209,6 +209,20 @@ if ($id_agent_module) {
$snmp3_security_level = ""; $snmp3_security_level = "";
} }
} }
enterprise_include_once('include/functions_policies.php');
$relink_policy = get_parameter('relink_policy', 0);
$unlink_policy = get_parameter('unlink_policy', 0);
if($relink_policy) {
$result = relink_module_policy($id_agent_module);
print_result_message($result, 'Module relinked to the policy successful');
}
if($unlink_policy) {
$result = unlink_module_policy($id_agent_module);
print_result_message($result, 'Module unlinked from the policy successful');
}
switch ($moduletype) { switch ($moduletype) {
case "dataserver": case "dataserver":
@ -268,6 +282,12 @@ if (isset ($extra_title))
echo ' - '.$extra_title; echo ' - '.$extra_title;
echo '</h3>'; echo '</h3>';
if (isModuleInPolicy($id_agent_module)) {
if($config['enterprise_installed']) {
add_policy_linkation($id_agent_module);
}
}
echo '<h3 id="message" class="error invisible"></h3>'; echo '<h3 id="message" class="error invisible"></h3>';
echo '<form method="post" id="module_form">'; echo '<form method="post" id="module_form">';

View File

@ -99,7 +99,7 @@ $disabledTextBecauseInPolicy = '';
$page = get_parameter('page', ''); $page = get_parameter('page', '');
if (strstr($page, "policy_modules") === false) { if (strstr($page, "policy_modules") === false) {
if ($config['enterprise_installed']) if ($config['enterprise_installed'])
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module); $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
else else
$disabledBecauseInPolicy = false; $disabledBecauseInPolicy = false;
if ($disabledBecauseInPolicy) if ($disabledBecauseInPolicy)

View File

@ -20,7 +20,7 @@ $disabledTextBecauseInPolicy = '';
$page = get_parameter('page', ''); $page = get_parameter('page', '');
if (strstr($page, "policy_modules") === false) { if (strstr($page, "policy_modules") === false) {
if ($config['enterprise_installed']) if ($config['enterprise_installed'])
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module); $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
else else
$disabledBecauseInPolicy = false; $disabledBecauseInPolicy = false;
if ($disabledBecauseInPolicy) if ($disabledBecauseInPolicy)
@ -150,7 +150,6 @@ $data[3] = print_select(array('noAuthNoPriv' => __('Not auth and not privacy met
if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row3'] = 'display: none;'; if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row3'] = 'display: none;';
push_table_simple($data, 'field_snmpv3_row3'); push_table_simple($data, 'field_snmpv3_row3');
?> ?>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready (function () { $(document).ready (function () {

View File

@ -20,7 +20,7 @@ $disabledTextBecauseInPolicy = '';
$page = get_parameter('page', ''); $page = get_parameter('page', '');
if (strstr($page, "policy_modules") === false) { if (strstr($page, "policy_modules") === false) {
if ($config['enterprise_installed']) if ($config['enterprise_installed'])
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module); $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
else else
$disabledBecauseInPolicy = false; $disabledBecauseInPolicy = false;
if ($disabledBecauseInPolicy) if ($disabledBecauseInPolicy)

View File

@ -37,7 +37,7 @@ else {
} }
if (strstr($page, "policy_modules") === false) { if (strstr($page, "policy_modules") === false) {
if ($config['enterprise_installed']) if ($config['enterprise_installed'])
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module); $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
else else
$disabledBecauseInPolicy = false; $disabledBecauseInPolicy = false;
if ($disabledBecauseInPolicy) if ($disabledBecauseInPolicy)

View File

@ -19,7 +19,7 @@ $disabledTextBecauseInPolicy = '';
$page = get_parameter('page', ''); $page = get_parameter('page', '');
if (strstr($page, "policy_modules") === false) { if (strstr($page, "policy_modules") === false) {
if ($config['enterprise_installed']) if ($config['enterprise_installed'])
$disabledBecauseInPolicy = isModuleInPolicy($id_agent_module); $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module);
else else
$disabledBecauseInPolicy = false; $disabledBecauseInPolicy = false;
if ($disabledBecauseInPolicy) if ($disabledBecauseInPolicy)