diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index b370bc2ac9..9522c7cb58 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -137,10 +137,12 @@ if (!empty($sub)) { $sub = []; if (check_acl($config['id_user'], 0, 'PM')) { - $sub['godmode/modules/manage_network_components']['text'] = __('Network components'); + $sub['godmode/modules/manage_network_components']['text'] = __('Remote components'); $sub['godmode/modules/manage_network_components']['id'] = 'Network components'; enterprise_hook('components_submenu'); - $sub['godmode/modules/manage_network_templates']['text'] = __('Module templates'); + $sub['godmode/modules/manage_block_templates']['text'] = __('Module blocks'); + $sub['godmode/modules/manage_block_templates']['id'] = 'Module blocks'; + $sub['godmode/modules/manage_network_templates']['text'] = __('Module templates (legacy)'); $sub['godmode/modules/manage_network_templates']['id'] = 'Module templates'; enterprise_hook('inventory_submenu'); enterprise_hook('autoconfiguration_menu'); diff --git a/pandora_console/godmode/modules/manage_block_templates.php b/pandora_console/godmode/modules/manage_block_templates.php new file mode 100644 index 0000000000..46ffe791a4 --- /dev/null +++ b/pandora_console/godmode/modules/manage_block_templates.php @@ -0,0 +1,71 @@ +getMessage(); + /* + if (is_ajax()) { + echo json_encode(['error' => '[MiFuncionalidad]'.$e->getMessage() ]); + exit; + } else { + echo '[MiFuncionalidad]'.$e->getMessage(); + } + */ + // Stop this execution, but continue 'globally'. + return; +} + +// AJAX controller. +if (is_ajax()) { + $method = get_parameter('method'); + /* + if (method_exists($miFuncionalidad, $method) === true) { + if ($miFuncionalidad>ajaxMethod($method) === true) { + $miFuncionalidad>{$method}(); + } else { + $miFuncionalidad>error('Unavailable method.'); + } + } else { + $miFuncionalidad->error('Method not found. ['.$method.']'); + } + */ + // Stop any execution. + exit; +} else { + // Run. + $manageBlock->run(); +} diff --git a/pandora_console/include/class/ManageBlock.class.php b/pandora_console/include/class/ManageBlock.class.php new file mode 100644 index 0000000000..62399a5db7 --- /dev/null +++ b/pandora_console/include/class/ManageBlock.class.php @@ -0,0 +1,103 @@ + 'noaccess']); + } + + include 'general/noaccess.php'; + exit; + } + + $this->ajaxController = $ajax_controller; + + $this->setBreadcrum([]); + + return $this; + } + + + /** + * Run MiFuncionalidad (main page). + * + * @return void + */ + public function run() + { + $this->prepareBreadcrum( + [ + [ + 'link' => 'mishuevos', + // $this->url, + 'label' => __('Configuration'), + 'selected' => 0, + ], + [ + 'link' => 'url', + // $this->url, + 'label' => __('Module Blocks'), + 'selected' => 1, + ], + ], + true + ); + + ui_print_page_header( + __('Manage module blocks'), + '', + false, + '', + true, + '', + false, + '', + GENERIC_SIZE_TEXT, + '', + $this->printHeader(true) + ); + + // $this->printForm( + // [ + // 'form' => $form, + // 'inputs' => $inputs, + // ], + // true + // ); + + } + + +}