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:
parent
8d70785421
commit
2b8ca22e57
|
@ -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,
|
||||
|
|
|
@ -790,15 +790,15 @@ if ($update_module || $create_module) {
|
|||
if (!empty($macros)) {
|
||||
$macros = json_decode(base64_decode($macros), true);
|
||||
|
||||
foreach($macros as $k => $m) {
|
||||
foreach ($macros as $k => $m) {
|
||||
$macros[$k]['value'] = get_parameter($m['macro'], '');
|
||||
}
|
||||
|
||||
$macros = json_encode($macros);
|
||||
|
||||
$conf_array = explode("\n",$configuration_data);
|
||||
foreach($conf_array as $line) {
|
||||
if(preg_match("/^module_name\s*(.*)/", $line, $match)) {
|
||||
$conf_array = explode("\n", $configuration_data);
|
||||
foreach ($conf_array as $line) {
|
||||
if (preg_match("/^module_name\s*(.*)/", $line, $match)) {
|
||||
$new_configuration_data .= "module_name $name\n";
|
||||
}
|
||||
// We delete from conf all the module macros starting with _field
|
||||
|
|
|
@ -94,24 +94,17 @@ 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);
|
||||
}
|
||||
);
|
||||
var load_module_component = false;
|
||||
|
||||
load_plugin_macros_fields('simple-macro');
|
||||
forced_title_callback();
|
||||
|
||||
//For to avoid the deletion of macros in the code
|
||||
//$("#network_component").change (function () {
|
||||
//In the file pandora_modules.js
|
||||
load_module_component = true;
|
||||
}
|
||||
</script>
|
||||
function changePluginSelect() {
|
||||
|
||||
load_plugin_description($("#id_plugin").val());
|
||||
load_plugin_macros_fields('simple-macro');
|
||||
forced_title_callback();
|
||||
|
||||
//For to avoid the deletion of macros in the code
|
||||
//$("#network_component").change (function () {
|
||||
//In the file pandora_modules.js
|
||||
load_module_component = true;
|
||||
}
|
||||
</script>
|
|
@ -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', '') . '%';
|
||||
|
|
|
@ -231,9 +231,10 @@ function configure_modules_form () {
|
|||
$("#component_loading").show ();
|
||||
$(".error").hide ();
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "godmode/agentes/module_manager_editor",
|
||||
"get_module_component" : 1,
|
||||
"id_module_component" : this.value
|
||||
{
|
||||
"page" : "godmode/agentes/module_manager_editor",
|
||||
"get_module_component" : 1,
|
||||
"id_module_component" : this.value
|
||||
},
|
||||
function (data, status) {
|
||||
$("#text-name").attr ("value", js_html_entity_decode (data["name"]));
|
||||
|
@ -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) {
|
||||
|
@ -612,7 +614,8 @@ function load_plugin_macros_fields(row_model_id) {
|
|||
var params = [];
|
||||
params.push("page=include/ajax/module");
|
||||
params.push("get_plugin_macros=1");
|
||||
params.push("id_plugin="+id_plugin);
|
||||
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) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue