Merge branch 'ent-13019-ruta-api-v2' into 'develop'

api change path v1 to v2 pandora_enterprise#13019

See merge request artica/pandorafms!7015
This commit is contained in:
Matias Didier 2024-03-13 09:10:22 +00:00
commit a5491383cf
20 changed files with 9 additions and 18 deletions

View File

@ -23,7 +23,7 @@ window.onload = function() {
// the following lines will be replaced by docker/configurator, when it runs in a docker-container // the following lines will be replaced by docker/configurator, when it runs in a docker-container
const ui = SwaggerUIBundle({ const ui = SwaggerUIBundle({
url: "../v1/swagger.json", url: "../v2/swagger.json",
dom_id: "#swagger-ui", dom_id: "#swagger-ui",
docExpansion: "none", docExpansion: "none",
deepLinking: true, deepLinking: true,

View File

@ -7,7 +7,7 @@
}, },
"servers": [ "servers": [
{ {
"url": "/api/v1", "url": "/api/v2",
"description": "PandoraFMS API Server" "description": "PandoraFMS API Server"
} }
], ],

View File

@ -123,7 +123,7 @@ $table_remote->data['ITSM_user_level_conf'] = $row;
$row = []; $row = [];
$row['hostname'] = html_print_label_input_block( $row['hostname'] = html_print_label_input_block(
__('URL to Pandora ITSM setup').ui_print_help_tip( __('URL to Pandora ITSM setup').ui_print_help_tip(
__('Full URL to your Pandora ITSM setup (e.g., http://192.168.1.20/integria/api/v1).'), __('Full URL to your Pandora ITSM setup (e.g., http://192.168.1.20/integria/api/v2).'),
true true
), ),
html_print_input_text( html_print_input_text(

View File

@ -345,7 +345,7 @@ if (empty($container) === true) {
// Solution to load the ContainerBuilder class. // Solution to load the ContainerBuilder class.
$containerBuilder = new ContainerBuilder(); $containerBuilder = new ContainerBuilder();
$containerBuilder->addDefinitions(__DIR__.'/../api/v1/config/container.php'); $containerBuilder->addDefinitions(__DIR__.'/../api/v2/config/container.php');
// Create DI container instance. // Create DI container instance.
$container = $containerBuilder->build(); $container = $containerBuilder->build();

View File

@ -6904,7 +6904,9 @@ function get_defined_translation($string)
} }
} }
if ($config['ignore_cache_translate'] !== true && is_array($cache_translation) === true && count($cache_translation) === 0) { if ((isset($config['ignore_cache_translate']) === false || $config['ignore_cache_translate'] !== true)
&& is_array($cache_translation) === true && count($cache_translation) === 0
) {
$cache_translation_all = db_get_all_rows_sql( $cache_translation_all = db_get_all_rows_sql(
sprintf( sprintf(
'SELECT translation, string 'SELECT translation, string

View File

@ -164,8 +164,6 @@ class GroupRepositoryMySQL extends RepositoryMySQL implements GroupRepository
$pagination $pagination
); );
hd($sql, true);
return $sql; return $sql;
} }
} }

View File

@ -33,7 +33,7 @@ More useful links:
* bearerFormat="pandoraBearer", * bearerFormat="pandoraBearer",
* ), * ),
* @OA\Server( * @OA\Server(
* url="/api/v1", * url="/api/v2",
* description="PandoraFMS API Server" * description="PandoraFMS API Server"
* ), * ),
* @OA\Tag( * @OA\Tag(

View File

@ -25,15 +25,6 @@ final class UserTokenMiddleware
public function check(Request $request): bool public function check(Request $request): bool
{ {
hd('El server UUID:', true);
hd($this->config->get('server_unique_identifier'), true);
hd('El api pass es:', true);
hd($this->config->get('api_password'), true);
hd('El token de md5 con el que se puede loguear: ', true);
hd(md5($this->config->get('server_unique_identifier')).'-'.md5($this->config->get('api_password')), true);
$authorization = ($request->getHeader('Authorization')[0] ?? ''); $authorization = ($request->getHeader('Authorization')[0] ?? '');
$token = null; $token = null;

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
php ../api/v1/config/generateDoc.php php ../api/v2/config/generateDoc.php