2014-03-18 Miguel de Dios <miguel.dedios@artica.es>

* godmode/agentes/configurar_agente.php,
	godmode/agentes/module_manager_editor_plugin.php,
	include/ajax/module.php, include/javascript/pandora_modules.js:
	fixed the save module plugin server from the component.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9612 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-03-18 15:29:09 +00:00
parent 8d70785421
commit 2b8ca22e57
5 changed files with 49 additions and 32 deletions

View File

@ -1,3 +1,10 @@
2014-03-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/configurar_agente.php,
godmode/agentes/module_manager_editor_plugin.php,
include/ajax/module.php, include/javascript/pandora_modules.js:
fixed the save module plugin server from the component.
2014-03-18 Alejandro Gallardo <alejandro.gallardo@artica.es>
* pandoradb.data.oracle.sql,

View File

@ -95,17 +95,10 @@ if (!empty($macros)) {
?>
<script type="text/javascript">
var load_module_component = false;
function changePluginSelect() {
jQuery.post ("ajax.php",
{"page" : "godmode/servers/plugin",
"get_plugin_description" : 1,
"id_plugin" : $("#id_plugin").val()
},
function (data, status) {
$("#plugin_description").html(data);
}
);
function changePluginSelect() {
load_plugin_description($("#id_plugin").val());
load_plugin_macros_fields('simple-macro');
forced_title_callback();

View File

@ -24,10 +24,12 @@ enterprise_include_once ('include/functions_metaconsole.php');
$get_plugin_macros = get_parameter('get_plugin_macros');
if ($get_plugin_macros) {
$plugin_macros = db_get_value('macros','tplugin','id',get_parameter('id_plugin',0));
$id_plugin = get_parameter('id_plugin', 0);
$plugin_macros = db_get_value('macros', 'tplugin', 'id',
$id_plugin);
$macros = array();
$macros['base64'] = base64_encode($plugin_macros);
$macros['array'] = json_decode($plugin_macros,true);
@ -36,7 +38,6 @@ if ($get_plugin_macros) {
}
$search_modules = get_parameter('search_modules');
if ($search_modules) {
$id_agents = json_decode(io_safe_output(get_parameter('id_agents')));
$filter = get_parameter('q', '') . '%';

View File

@ -231,7 +231,8 @@ function configure_modules_form () {
$("#component_loading").show ();
$(".error").hide ();
jQuery.post ("ajax.php",
{"page" : "godmode/agentes/module_manager_editor",
{
"page" : "godmode/agentes/module_manager_editor",
"get_module_component" : 1,
"id_module_component" : this.value
},
@ -330,10 +331,11 @@ function configure_modules_form () {
if (!load_module_component) {
// Delete macro fields
$('.macro_field').remove();
$('#hidden-macros').val('');
}
load_module_component = false;
$('#hidden-macros').val('');
// If exist macros, load the fields
if (data["macros"] != '' && data["macros"] != null) {
@ -613,6 +615,7 @@ function load_plugin_macros_fields(row_model_id) {
params.push("page=include/ajax/module");
params.push("get_plugin_macros=1");
params.push("id_plugin=" + id_plugin);
jQuery.ajax ({
data: params.join ("&"),
type: 'POST',
@ -636,6 +639,19 @@ function load_plugin_macros_fields(row_model_id) {
});
}
function load_plugin_description(id_plugin) {
jQuery.post ("ajax.php",
{
"page" : "godmode/servers/plugin",
"get_plugin_description" : 1,
"id_plugin" : id_plugin
},
function (data, status) {
$("#plugin_description").html(data);
}
);
}
// Show the modal window of a module
function show_module_detail_dialog(module_id, id_agente) {