mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 03:19:05 +02:00
update endpoints and add new fields integration pandoraitsm pandora_enterprise#13004
This commit is contained in:
parent
53bead2acc
commit
75f416ae50
@ -6,6 +6,8 @@ use PandoraFMS\Modules\Events\Repositories\EventRepository;
|
|||||||
use PandoraFMS\Modules\Events\Repositories\EventRepositoryMySQL;
|
use PandoraFMS\Modules\Events\Repositories\EventRepositoryMySQL;
|
||||||
use PandoraFMS\Modules\Groups\Repositories\GroupRepository;
|
use PandoraFMS\Modules\Groups\Repositories\GroupRepository;
|
||||||
use PandoraFMS\Modules\Groups\Repositories\GroupRepositoryMySQL;
|
use PandoraFMS\Modules\Groups\Repositories\GroupRepositoryMySQL;
|
||||||
|
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepository;
|
||||||
|
use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventoryRepositoryMySQL;
|
||||||
use PandoraFMS\Modules\Shared\Repositories\Repository;
|
use PandoraFMS\Modules\Shared\Repositories\Repository;
|
||||||
use PandoraFMS\Modules\Shared\Repositories\RepositoryMySQL;
|
use PandoraFMS\Modules\Shared\Repositories\RepositoryMySQL;
|
||||||
use PandoraFMS\Modules\Users\Repositories\UserRepository;
|
use PandoraFMS\Modules\Users\Repositories\UserRepository;
|
||||||
@ -15,10 +17,10 @@ use Slim\App;
|
|||||||
use Slim\Factory\AppFactory;
|
use Slim\Factory\AppFactory;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'settings' => function () {
|
'settings' => function () {
|
||||||
return include __DIR__.'/settings.php';
|
return include __DIR__.'/settings.php';
|
||||||
},
|
},
|
||||||
App::class => function (ContainerInterface $container) {
|
App::class => function (ContainerInterface $container) {
|
||||||
AppFactory::setContainer($container);
|
AppFactory::setContainer($container);
|
||||||
|
|
||||||
$app = AppFactory::create();
|
$app = AppFactory::create();
|
||||||
@ -39,19 +41,22 @@ return [
|
|||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
},
|
},
|
||||||
Repository::class => function (ContainerInterface $container) {
|
Repository::class => function (ContainerInterface $container) {
|
||||||
return $container->get(RepositoryMySQL::class);
|
return $container->get(RepositoryMySQL::class);
|
||||||
},
|
},
|
||||||
TokenRepository::class => function (ContainerInterface $container) {
|
TokenRepository::class => function (ContainerInterface $container) {
|
||||||
return $container->get(TokenRepositoryMySQL::class);
|
return $container->get(TokenRepositoryMySQL::class);
|
||||||
},
|
},
|
||||||
UserRepository::class => function (ContainerInterface $container) {
|
UserRepository::class => function (ContainerInterface $container) {
|
||||||
return $container->get(UserRepositoryMySQL::class);
|
return $container->get(UserRepositoryMySQL::class);
|
||||||
},
|
},
|
||||||
GroupRepository::class => function (ContainerInterface $container) {
|
GroupRepository::class => function (ContainerInterface $container) {
|
||||||
return $container->get(GroupRepositoryMySQL::class);
|
return $container->get(GroupRepositoryMySQL::class);
|
||||||
},
|
},
|
||||||
EventRepository::class => function (ContainerInterface $container) {
|
EventRepository::class => function (ContainerInterface $container) {
|
||||||
return $container->get(EventRepositoryMySQL::class);
|
return $container->get(EventRepositoryMySQL::class);
|
||||||
},
|
},
|
||||||
|
PandoraITSMInventoryRepository::class => function (ContainerInterface $container) {
|
||||||
|
return $container->get(PandoraITSMInventoryRepositoryMySQL::class);
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
@ -9,4 +9,5 @@ return function (App $app) {
|
|||||||
(include __DIR__.'/../../../include/lib/Modules/Profiles/routes.php')($app);
|
(include __DIR__.'/../../../include/lib/Modules/Profiles/routes.php')($app);
|
||||||
(include __DIR__.'/../../../include/lib/Modules/Tags/routes.php')($app);
|
(include __DIR__.'/../../../include/lib/Modules/Tags/routes.php')($app);
|
||||||
(include __DIR__.'/../../../include/lib/Modules/Users/routes.php')($app);
|
(include __DIR__.'/../../../include/lib/Modules/Users/routes.php')($app);
|
||||||
|
(include __DIR__.'/../../../include/lib/Modules/PandoraITSM/routes.php')($app);
|
||||||
};
|
};
|
||||||
|
@ -1118,6 +1118,110 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/pandoraITSM/inventory/{idPandoraITSMInventory}": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["PandoraITSM"],
|
||||||
|
"summary": "Show pandoraITSMInventory",
|
||||||
|
"operationId": "09b6d1f91536441fc65dc66142a6f9cb",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/parameterIdPandoraITSMInventory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/components/responses/ResponsePandoraITSMInventory"
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/components/responses/BadRequest"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/components/responses/Unauthorized"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/components/responses/Forbidden"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/components/responses/NotFound"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/components/responses/InternalServerError"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"bearerAuth": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/pandoraITSM/inventory/list": {
|
||||||
|
"post": {
|
||||||
|
"tags": ["PandoraITSM"],
|
||||||
|
"summary": "List pandoraITSMInventories",
|
||||||
|
"operationId": "149f20397779ed681c1f7680c1214974",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/parameterPage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/parameterSizePage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/parameterSortField"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/parameterSortDirection"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"$ref": "#/components/requestBodies/requestBodyPandoraITSMInventoryFilter"
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "List PandoraITSM Inventories Object",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"properties": {
|
||||||
|
"paginationData": {
|
||||||
|
"$ref": "#/components/schemas/paginationData"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/PandoraITSMInventory"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/components/responses/BadRequest"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/components/responses/Unauthorized"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/components/responses/Forbidden"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/components/responses/NotFound"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/components/responses/InternalServerError"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"bearerAuth": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/profile": {
|
"/profile": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": ["Profiles"],
|
"tags": ["Profiles"],
|
||||||
@ -2081,6 +2185,192 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"Event": {
|
||||||
|
"properties": {
|
||||||
|
"idEvent": {
|
||||||
|
"description": "Id event",
|
||||||
|
"type": "integer",
|
||||||
|
"readOnly": true,
|
||||||
|
"nullable": false
|
||||||
|
},
|
||||||
|
"idAgent": {
|
||||||
|
"description": "Id agent",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"idUser": {
|
||||||
|
"description": "Id user",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"idGroup": {
|
||||||
|
"description": "Id group",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"description": "Event status, the available status are: new, validated, inprocess",
|
||||||
|
"type": "integer",
|
||||||
|
"default": "new",
|
||||||
|
"enum": ["new", "validated", "inprocess"],
|
||||||
|
"nullable": false
|
||||||
|
},
|
||||||
|
"timestamp": {
|
||||||
|
"description": "Event registration date",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"readOnly": true,
|
||||||
|
"example": "2023-02-21 08:34:16",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"event": {
|
||||||
|
"description": "Description event",
|
||||||
|
"type": "string",
|
||||||
|
"default": "Event created for api",
|
||||||
|
"nullable": false
|
||||||
|
},
|
||||||
|
"utimestamp": {
|
||||||
|
"description": "Event registration date",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"readOnly": true,
|
||||||
|
"example": "1704898868",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"eventType": {
|
||||||
|
"description": "Event status, the available status are: going_unknown, unknown, alert_fired, alert_recovered, alert_ceased, alert_manual_validation, recon_host_detected, system, error, new_agent, going_up_critical, going_down_critical, going_up_warning, going_down_warning, going_up_normal, going_down_normal, configuration_change, ncm",
|
||||||
|
"type": "string",
|
||||||
|
"default": "unknown",
|
||||||
|
"enum": [
|
||||||
|
"going_unknown",
|
||||||
|
"unknown",
|
||||||
|
"alert_fired",
|
||||||
|
"alert_recovered",
|
||||||
|
"alert_ceased",
|
||||||
|
"alert_manual_validation",
|
||||||
|
"recon_host_detected",
|
||||||
|
"system",
|
||||||
|
"error",
|
||||||
|
"new_agent",
|
||||||
|
"going_up_critical",
|
||||||
|
"going_down_critical",
|
||||||
|
"going_up_warning",
|
||||||
|
"going_down_warning",
|
||||||
|
"going_up_normal",
|
||||||
|
"going_down_normal",
|
||||||
|
"configuration_change",
|
||||||
|
"ncm"
|
||||||
|
],
|
||||||
|
"nullable": false
|
||||||
|
},
|
||||||
|
"idAgentModule": {
|
||||||
|
"description": "Id agent module",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"idAlertAm": {
|
||||||
|
"description": "Id alert action",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"severity": {
|
||||||
|
"description": "Event severity, the available severity are: maintenance, informational, normal, warning, critical, minor, major",
|
||||||
|
"type": "integer",
|
||||||
|
"default": "maintenance",
|
||||||
|
"enum": [
|
||||||
|
"maintenance",
|
||||||
|
"informational",
|
||||||
|
"normal",
|
||||||
|
"warning",
|
||||||
|
"critical",
|
||||||
|
"minor",
|
||||||
|
"major"
|
||||||
|
],
|
||||||
|
"nullable": false
|
||||||
|
},
|
||||||
|
"tags": {
|
||||||
|
"description": "Tags",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"description": "Source",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"idExtra": {
|
||||||
|
"description": "Extra id",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"criticalInstructions": {
|
||||||
|
"description": "Critical instructions",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"warningInstructions": {
|
||||||
|
"description": "Warning instructions",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"unknownInstructions": {
|
||||||
|
"description": "Unknows instructions",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"ownerUser": {
|
||||||
|
"description": "Id user",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"ackUtimestamp": {
|
||||||
|
"description": "Event ack utimestamp",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"readOnly": true,
|
||||||
|
"example": "1704898868",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"customData": {
|
||||||
|
"description": "Custom data",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"description": "Data",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"moduleStatus": {
|
||||||
|
"description": "Module status",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"readOnly": true,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"eventCustomId": {
|
||||||
|
"description": "Events Custom Id",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"EventFilter": {
|
"EventFilter": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"idEventFilter": {
|
"idEventFilter": {
|
||||||
@ -2529,6 +2819,96 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"PandoraITSMInventory": {
|
||||||
|
"properties": {
|
||||||
|
"idPandoraITSMInventory": {
|
||||||
|
"description": "Id Agent pandoraITSMInventory",
|
||||||
|
"type": "integer",
|
||||||
|
"readOnly": true,
|
||||||
|
"nullable": false
|
||||||
|
},
|
||||||
|
"agentAlias": {
|
||||||
|
"description": "Agent Name pandoraITSMInventory",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"osVersion": {
|
||||||
|
"description": "Agent os version pandoraITSMInventory",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"agentAddress": {
|
||||||
|
"description": "Agent address pandoraITSMInventory",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"agentUrlAddress": {
|
||||||
|
"description": "Agent url address pandoraITSMInventory",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"agentDisabled": {
|
||||||
|
"description": "Agent disable pandoraITSMInventory",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"groupName": {
|
||||||
|
"description": "Agent group name pandoraITSMInventory",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"groupId": {
|
||||||
|
"description": "Agent group id pandoraITSMInventory",
|
||||||
|
"type": "integer",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"osName": {
|
||||||
|
"description": "Agent OS name pandoraITSMInventory",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"PandoraITSMInventoryFilter": {
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/PandoraITSMInventory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"idPandoraITSMInventory": {
|
||||||
|
"default": null,
|
||||||
|
"readOnly": false
|
||||||
|
},
|
||||||
|
"freeSearch": {
|
||||||
|
"description": "Find word in name field.",
|
||||||
|
"type": "string",
|
||||||
|
"default": null,
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"multipleSearch": {
|
||||||
|
"$ref": "#/components/schemas/multipleSearch"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"Profile": {
|
"Profile": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"idProfile": {
|
"idProfile": {
|
||||||
@ -2707,6 +3087,42 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"multipleSearch": {
|
||||||
|
"properties": {
|
||||||
|
"field": {
|
||||||
|
"description": "Field to search of query",
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"description": "Values to search of query IN()",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"multipleSearchString": {
|
||||||
|
"properties": {
|
||||||
|
"field": {
|
||||||
|
"description": "Field to search of query",
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"description": "Values to search of query IN()",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"paginationData": {
|
"paginationData": {
|
||||||
"description": "Info pagination data",
|
"description": "Info pagination data",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -3196,12 +3612,14 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": null,
|
"default": null,
|
||||||
"nullable": true
|
"nullable": true
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
"multipleSearchString": {
|
"multipleSearchString": {
|
||||||
"description": "search string in field.",
|
"$ref": "#/components/schemas/multipleSearch"
|
||||||
"type": "string",
|
|
||||||
"default": null,
|
|
||||||
"nullable": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -3316,6 +3734,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ResponseEvent": {
|
||||||
|
"description": "Event object",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Event"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"ResponseEventFilter": {
|
"ResponseEventFilter": {
|
||||||
"description": "EventFilter object",
|
"description": "EventFilter object",
|
||||||
"content": {
|
"content": {
|
||||||
@ -3336,6 +3764,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ResponsePandoraITSMInventory": {
|
||||||
|
"description": "PandoraITSMInventory object",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/PandoraITSMInventory"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"ResponseProfile": {
|
"ResponseProfile": {
|
||||||
"description": "Profile object",
|
"description": "Profile object",
|
||||||
"content": {
|
"content": {
|
||||||
@ -3499,6 +3937,16 @@
|
|||||||
"default": 1
|
"default": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"parameterIdEvent": {
|
||||||
|
"name": "idEvent",
|
||||||
|
"in": "path",
|
||||||
|
"description": "Event id",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
"parameterIdEventFilter": {
|
"parameterIdEventFilter": {
|
||||||
"name": "idEventFilter",
|
"name": "idEventFilter",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@ -3519,6 +3967,16 @@
|
|||||||
"default": 1
|
"default": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"parameterIdPandoraITSMInventory": {
|
||||||
|
"name": "idPandoraITSMInventory",
|
||||||
|
"in": "path",
|
||||||
|
"description": "PandoraITSMInventory id",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
"parameterIdProfile": {
|
"parameterIdProfile": {
|
||||||
"name": "idProfile",
|
"name": "idProfile",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@ -3642,6 +4100,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"requestBodyEvent": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Event"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"requestBodyEventFilter": {
|
"requestBodyEventFilter": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
@ -3682,6 +4150,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"requestBodyPandoraITSMInventory": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/PandoraITSMInventory"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requestBodyPandoraITSMInventoryFilter": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/PandoraITSMInventoryFilter"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"requestBodyProfile": {
|
"requestBodyProfile": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
@ -3797,6 +4285,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Users",
|
"name": "Users",
|
||||||
"description": "API Endpoints of users"
|
"description": "API Endpoints of users"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PandoraITSM",
|
||||||
|
"description": "API Endpoints of integration pandoraITSM"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -56,11 +56,18 @@ try {
|
|||||||
$status_values = $ITSM->getStatus();
|
$status_values = $ITSM->getStatus();
|
||||||
$object_types_values = $ITSM->getObjectypes();
|
$object_types_values = $ITSM->getObjectypes();
|
||||||
if ((bool) get_parameter('update_config', 0) === true) {
|
if ((bool) get_parameter('update_config', 0) === true) {
|
||||||
|
$ITSM_groups_agents_sync_base = null;
|
||||||
|
if (empty($config['ITSM_groups_agents_sync']) === false) {
|
||||||
|
$ITSM_groups_agents_sync_base = base64_encode($config['ITSM_groups_agents_sync']);
|
||||||
|
}
|
||||||
|
|
||||||
$set_config_inventories = $ITSM->createNode(
|
$set_config_inventories = $ITSM->createNode(
|
||||||
[
|
[
|
||||||
'serverAuth' => $config['server_unique_identifier'],
|
'serverAuth' => md5($config['server_unique_identifier']),
|
||||||
'apiPass' => $config['api_password'],
|
'apiPass' => md5($config['api_password']),
|
||||||
'agentsForExecution' => $config['ITSM_agents_sync'],
|
'agentsForExecution' => $config['ITSM_agents_sync'],
|
||||||
|
'groups' => $ITSM_groups_agents_sync_base,
|
||||||
|
'mode' => $config['ITSM_mode_agents_sync'],
|
||||||
'path' => $config['ITSM_public_url'],
|
'path' => $config['ITSM_public_url'],
|
||||||
'label' => array_keys(servers_get_names())[0],
|
'label' => array_keys(servers_get_names())[0],
|
||||||
'nodeId' => $config['metaconsole_node_id'],
|
'nodeId' => $config['metaconsole_node_id'],
|
||||||
@ -69,7 +76,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$node = $ITSM->getNode($config['server_unique_identifier']);
|
$node = $ITSM->getNode(md5($config['server_unique_identifier']));
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
$node = [];
|
$node = [];
|
||||||
}
|
}
|
||||||
@ -207,7 +214,7 @@ if (empty($itsm_public_url) === true) {
|
|||||||
|
|
||||||
$row['publicUrl'] = html_print_label_input_block(
|
$row['publicUrl'] = html_print_label_input_block(
|
||||||
__('URL conect to API %s', get_product_name()).ui_print_help_tip(
|
__('URL conect to API %s', get_product_name()).ui_print_help_tip(
|
||||||
__('Full URL to your Pandora (e.g., http://192.168.1.20).'),
|
__('Full URL to your Pandora (e.g., http://192.168.1.20/XXX/api/v2).'),
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
html_print_input_text(
|
html_print_input_text(
|
||||||
@ -237,6 +244,55 @@ $row['agentsSync'] = html_print_label_input_block(
|
|||||||
|
|
||||||
$table_remote->data['ITSM_sync_inventory'] = $row;
|
$table_remote->data['ITSM_sync_inventory'] = $row;
|
||||||
|
|
||||||
|
$row = [];
|
||||||
|
$itsm_groups_agents_sync = [];
|
||||||
|
if (empty($config['ITSM_groups_agents_sync']) === false) {
|
||||||
|
$itsm_groups_agents_sync = json_decode(
|
||||||
|
io_safe_output($config['ITSM_groups_agents_sync']),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mode_values = [
|
||||||
|
1 => __('Enable'),
|
||||||
|
2 => __('Disable'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$row['modeAgentsSync'] = html_print_label_input_block(
|
||||||
|
__('Mode Agents to synchronize'),
|
||||||
|
html_print_select(
|
||||||
|
$mode_values,
|
||||||
|
'ITSM_mode_agents_sync',
|
||||||
|
$config['ITSM_mode_agents_sync'],
|
||||||
|
'',
|
||||||
|
__('All'),
|
||||||
|
0,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$row['groupsAgentsSync'] = html_print_label_input_block(
|
||||||
|
__('Groups Agents to synchronize'),
|
||||||
|
html_print_select_groups(
|
||||||
|
false,
|
||||||
|
'AW',
|
||||||
|
false,
|
||||||
|
'ITSM_groups_agents_sync[]',
|
||||||
|
$itsm_groups_agents_sync,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$table_remote->data['ITSM_sync_inventory_filters'] = $row;
|
||||||
|
|
||||||
// Test.
|
// Test.
|
||||||
$row = [];
|
$row = [];
|
||||||
$button_test_pandora = html_print_button(
|
$button_test_pandora = html_print_button(
|
||||||
|
@ -1972,6 +1972,27 @@ function config_update_config()
|
|||||||
$error_update[] = __('Pandora ITSM API agents sync');
|
$error_update[] = __('Pandora ITSM API agents sync');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ITSM_mode_agents_sync = (int) get_parameter(
|
||||||
|
'ITSM_mode_agents_sync',
|
||||||
|
$config['ITSM_mode_agents_sync']
|
||||||
|
);
|
||||||
|
if (config_update_value('ITSM_mode_agents_sync', $ITSM_mode_agents_sync, true) === false) {
|
||||||
|
$error_update[] = __('Pandora ITSM mode agents to synch');
|
||||||
|
}
|
||||||
|
|
||||||
|
$ITSM_groups_agents_sync = get_parameter(
|
||||||
|
'ITSM_groups_agents_sync',
|
||||||
|
null
|
||||||
|
);
|
||||||
|
|
||||||
|
if (empty($ITSM_groups_agents_sync) === false) {
|
||||||
|
$ITSM_groups_agents_sync = json_encode($ITSM_groups_agents_sync);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config_update_value('ITSM_groups_agents_sync', $ITSM_groups_agents_sync, true) === false) {
|
||||||
|
$error_update[] = __('Pandora ITSM groups agents to synch');
|
||||||
|
}
|
||||||
|
|
||||||
$incident_default_group = (int) get_parameter('default_group', $config['default_group']);
|
$incident_default_group = (int) get_parameter('default_group', $config['default_group']);
|
||||||
if (empty($incident_default_group) === true) {
|
if (empty($incident_default_group) === true) {
|
||||||
try {
|
try {
|
||||||
@ -3923,6 +3944,14 @@ function config_process_config()
|
|||||||
config_update_value('ITSM_agents_sync', 20);
|
config_update_value('ITSM_agents_sync', 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['ITSM_mode_agents_sync'])) {
|
||||||
|
config_update_value('ITSM_mode_agents_sync', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($config['ITSM_groups_agents_sync'])) {
|
||||||
|
config_update_value('ITSM_groups_agents_sync', null);
|
||||||
|
}
|
||||||
|
|
||||||
// Module Library.
|
// Module Library.
|
||||||
if (!isset($config['module_library_user'])) {
|
if (!isset($config['module_library_user'])) {
|
||||||
config_update_value('module_library_user', '');
|
config_update_value('module_library_user', '');
|
||||||
|
@ -179,6 +179,7 @@ function testConectionApiItsmToPandora(path) {
|
|||||||
} else {
|
} else {
|
||||||
showFailureImage();
|
showFailureImage();
|
||||||
showMessage();
|
showMessage();
|
||||||
|
$("span#ITSM-message-pandora").html(data);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
|
@ -594,7 +594,7 @@ class ITSM
|
|||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function pingItsmtoPandora(string $path): bool
|
public function pingItsmtoPandora(string $path): array
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -603,12 +603,12 @@ class ITSM
|
|||||||
[],
|
[],
|
||||||
[
|
[
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
'apiPass' => $config['api_password'],
|
'apiPass' => md5($config['api_password']),
|
||||||
'serverAuth' => $config['server_unique_identifier'],
|
'serverAuth' => md5($config['server_unique_identifier']),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (bool) $result['valid'];
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1500,12 +1500,10 @@ class Manager
|
|||||||
$ITSM = new ITSM();
|
$ITSM = new ITSM();
|
||||||
$result = $ITSM->pingItsmtoPandora($path);
|
$result = $ITSM->pingItsmtoPandora($path);
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
echo $e->getMessage();
|
$result = $e->getMessage();
|
||||||
$result = false;
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode(['valid' => ($result !== false) ? 1 : 0]);
|
echo json_encode($result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
$filters = $this->buildQueryFilters($filter, $mapper);
|
$filters = $this->buildQueryFilters($filter, $mapper);
|
||||||
|
|
||||||
// Check ACL for user list.
|
// Check ACL for user list.
|
||||||
if (\users_is_admin() === false) {
|
if (empty($this->config->get('id_user')) === false && \users_is_admin() === false) {
|
||||||
// No admin.
|
// No admin.
|
||||||
$filters .= sprintf(
|
$filters .= sprintf(
|
||||||
' AND ttoken.id_user = "%s"',
|
' AND ttoken.id_user = "%s"',
|
||||||
|
@ -16,7 +16,7 @@ use PandoraFMS\Modules\Shared\Entities\Entity;
|
|||||||
* property="idEvent",
|
* property="idEvent",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* nullable=false,
|
* nullable=false,
|
||||||
* description="Id event"
|
* description="Id event",
|
||||||
* readOnly=true
|
* readOnly=true
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
@ -212,7 +212,7 @@ use PandoraFMS\Modules\Shared\Entities\Entity;
|
|||||||
* nullable=true,
|
* nullable=true,
|
||||||
* default=null,
|
* default=null,
|
||||||
* description="Module status",
|
* description="Module status",
|
||||||
* readonly=true
|
* readOnly=true
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="eventCustomId",
|
* property="eventCustomId",
|
||||||
|
@ -60,6 +60,10 @@ More useful links:
|
|||||||
* name="Users",
|
* name="Users",
|
||||||
* description="API Endpoints of users"
|
* description="API Endpoints of users"
|
||||||
* ),
|
* ),
|
||||||
|
* @OA\Tag(
|
||||||
|
* name="PandoraITSM",
|
||||||
|
* description="API Endpoints of integration pandoraITSM"
|
||||||
|
* ),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* parameter="parameterPage",
|
* parameter="parameterPage",
|
||||||
* name="page",
|
* name="page",
|
||||||
@ -225,6 +229,42 @@ More useful links:
|
|||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
|
* schema="multipleSearch",
|
||||||
|
* type="object",
|
||||||
|
* @OA\Property(
|
||||||
|
* property="field",
|
||||||
|
* type="string",
|
||||||
|
* nullable=true,
|
||||||
|
* description="Field to search of query"
|
||||||
|
* ),
|
||||||
|
* @OA\Property(
|
||||||
|
* property="data",
|
||||||
|
* type="array",
|
||||||
|
* nullable=true,
|
||||||
|
* @OA\Items(type="integer"),
|
||||||
|
* description="Values to search of query IN()"
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
* @OA\Schema(
|
||||||
|
* schema="multipleSearchString",
|
||||||
|
* type="object",
|
||||||
|
* @OA\Property(
|
||||||
|
* property="field",
|
||||||
|
* type="string",
|
||||||
|
* nullable=true,
|
||||||
|
* description="Field to search of query"
|
||||||
|
* ),
|
||||||
|
* @OA\Property(
|
||||||
|
* property="data",
|
||||||
|
* type="array",
|
||||||
|
* nullable=true,
|
||||||
|
* @OA\Items(type="string"),
|
||||||
|
* description="Values to search of query IN()"
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
*
|
||||||
|
* @OA\Schema(
|
||||||
* schema="paginationData",
|
* schema="paginationData",
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Info pagination data",
|
* description="Info pagination data",
|
||||||
|
@ -30,22 +30,23 @@ final class UserTokenMiddleware
|
|||||||
$token = null;
|
$token = null;
|
||||||
try {
|
try {
|
||||||
$authorization = str_replace('Bearer ', '', $authorization);
|
$authorization = str_replace('Bearer ', '', $authorization);
|
||||||
preg_match(
|
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($authorization);
|
||||||
'/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/',
|
|
||||||
$authorization,
|
|
||||||
$matches
|
|
||||||
);
|
|
||||||
|
|
||||||
$uuid = ($matches[0] ?? '');
|
|
||||||
if (empty($uuid) === true) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$strToken = str_replace($uuid.'-', '', $authorization);
|
|
||||||
$validTokenUiniqueServerIdentifier = $this->validateServerIdentifierTokenService->__invoke($strToken);
|
|
||||||
if ($validTokenUiniqueServerIdentifier === false) {
|
if ($validTokenUiniqueServerIdentifier === false) {
|
||||||
|
preg_match(
|
||||||
|
'/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/',
|
||||||
|
$authorization,
|
||||||
|
$matches
|
||||||
|
);
|
||||||
|
|
||||||
|
$uuid = ($matches[0] ?? '');
|
||||||
|
if (empty($uuid) === true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$strToken = str_replace($uuid.'-', '', $authorization);
|
||||||
$validToken = $this->validateUserTokenService->__invoke($uuid, $strToken);
|
$validToken = $this->validateUserTokenService->__invoke($uuid, $strToken);
|
||||||
$token = $this->getUserTokenService->__invoke($uuid);
|
$token = $this->getUserTokenService->__invoke($uuid);
|
||||||
if ($token !== null && $validToken) {
|
if ($token !== null && $validToken) {
|
||||||
|
$this->config->set('id_user', $token->getIdUser());
|
||||||
$oldToken = clone $token;
|
$oldToken = clone $token;
|
||||||
$token->setLastUsage($this->timestamp->getMysqlCurrentTimestamp(0));
|
$token->setLastUsage($this->timestamp->getMysqlCurrentTimestamp(0));
|
||||||
$this->updateTokenService->__invoke($token, $oldToken);
|
$this->updateTokenService->__invoke($token, $oldToken);
|
||||||
|
@ -165,16 +165,32 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildQueryFilters(FilterAbstract $filter, DataMapperAbstract $mapper): string
|
public function buildQueryFilters(FilterAbstract $filter, ?DataMapperAbstract $mapper = null): string
|
||||||
{
|
{
|
||||||
$where_clause = '1=1';
|
$where_clause = '1=1';
|
||||||
|
|
||||||
if ($filter->getEntityFilter() !== null) {
|
if ($mapper !== null && $filter->getEntityFilter() !== null) {
|
||||||
$searchEntity = $mapper->toDatabase($filter->getEntityFilter());
|
$searchEntity = $mapper->toDatabase($filter->getEntityFilter());
|
||||||
$searchEntity = array_filter($searchEntity, fn ($value) => !is_null($value) && $value !== '' && $value !== 'null');
|
$searchEntity = array_filter($searchEntity, fn ($value) => !is_null($value) && $value !== '' && $value !== 'null');
|
||||||
if (empty($searchEntity) === false) {
|
if (empty($searchEntity) === false) {
|
||||||
$where_clause .= ' AND '.$this->dbFormatWhereClauseSQL($searchEntity, '`'.$mapper->getTableName().'`.');
|
$where_clause .= ' AND '.$this->dbFormatWhereClauseSQL($searchEntity, '`'.$mapper->getTableName().'`.');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$searchEntity = $filter->getEntityFilter()->toArray();
|
||||||
|
$translates = $filter->fieldsTranslate();
|
||||||
|
$searchEntity = array_filter($searchEntity, fn ($value) => !is_null($value) && $value !== '' && $value !== 'null');
|
||||||
|
if(empty($searchEntity) === false) {
|
||||||
|
$resultEntity = [];
|
||||||
|
foreach ($searchEntity as $key => $value) {
|
||||||
|
if (isset($translates[$key]) === true) {
|
||||||
|
$resultEntity[$translates[$key]] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($resultEntity) === false) {
|
||||||
|
$where_clause .= ' AND '.$this->dbFormatWhereClauseSQL($resultEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($filter->getFieldsFreeSearch()) === false
|
if (empty($filter->getFieldsFreeSearch()) === false
|
||||||
@ -222,8 +238,16 @@ class RepositoryMySQL extends Repository
|
|||||||
{
|
{
|
||||||
$fields = $filter->fieldsTranslate();
|
$fields = $filter->fieldsTranslate();
|
||||||
$field = '';
|
$field = '';
|
||||||
if (empty($fields) === false) {
|
if (empty($fields) === false
|
||||||
|
&& isset($fields[($filter->getMultipleSearch()['field'])]) === true) {
|
||||||
$field = ($fields[($filter->getMultipleSearch()['field'] ?? '')] ?? '');
|
$field = ($fields[($filter->getMultipleSearch()['field'] ?? '')] ?? '');
|
||||||
|
} else {
|
||||||
|
throw new Exception(
|
||||||
|
__(
|
||||||
|
'Bad request, multiple field %s is not a valid field',
|
||||||
|
$filter->getMultipleSearch()['field']
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($field) === true) {
|
if (empty($field) === true) {
|
||||||
@ -238,8 +262,17 @@ class RepositoryMySQL extends Repository
|
|||||||
{
|
{
|
||||||
$fields = $filter->fieldsTranslate();
|
$fields = $filter->fieldsTranslate();
|
||||||
$field = '';
|
$field = '';
|
||||||
if (empty($fields) === false) {
|
if (empty($fields) === false
|
||||||
|
&& isset($fields[($filter->getMultipleSearchString()['field'])]) === true
|
||||||
|
) {
|
||||||
$field = ($fields[($filter->getMultipleSearchString()['field'] ?? '')] ?? '');
|
$field = ($fields[($filter->getMultipleSearchString()['field'] ?? '')] ?? '');
|
||||||
|
} else {
|
||||||
|
throw new Exception(
|
||||||
|
__(
|
||||||
|
'Bad request, multiple field %s is not a valid field',
|
||||||
|
$filter->getMultipleSearchString()['field']
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($field) === true) {
|
if (empty($field) === true) {
|
||||||
|
@ -18,13 +18,14 @@ use PandoraFMS\Modules\Users\Validators\UserValidator;
|
|||||||
* nullable=true,
|
* nullable=true,
|
||||||
* default=null,
|
* default=null,
|
||||||
* description="Find word in fullname and comments fields."
|
* description="Find word in fullname and comments fields."
|
||||||
* ),
|
* )
|
||||||
|
* ),
|
||||||
|
* @OA\Schema(
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="multipleSearchString",
|
* property="multipleSearchString",
|
||||||
* type="string",
|
* type="object",
|
||||||
* nullable=true,
|
* ref="#/components/schemas/multipleSearch",
|
||||||
* default=null,
|
* description="Multiple search object",
|
||||||
* description="search string in field."
|
|
||||||
* )
|
* )
|
||||||
* )
|
* )
|
||||||
* }
|
* }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user