mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-13100-desplegable-de-iconos-en-wizard-de-visual-consoles-tiene-demasiado-espacio' into 'develop'
Ent 13100 desplegable de iconos en wizard de visual consoles tiene demasiado espacio See merge request artica/pandorafms!7052
This commit is contained in:
commit
02d6dbdcdb
@ -630,6 +630,8 @@ echo '</form>';
|
|||||||
echo '<span id="any_text" class="invisible">'.__('None').'</span>';
|
echo '<span id="any_text" class="invisible">'.__('None').'</span>';
|
||||||
echo '<span id="none_text" class="invisible">'.__('None').'</span>';
|
echo '<span id="none_text" class="invisible">'.__('None').'</span>';
|
||||||
echo '<span id="loading_text" class="invisible">'.__('Loading...').'</span>';
|
echo '<span id="loading_text" class="invisible">'.__('Loading...').'</span>';
|
||||||
|
|
||||||
|
echo '<div id="cv-preview-img" title="'.__('Image preview').'"><center><img /></center></div>';
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
@ -917,6 +919,24 @@ $('#image').on('change', function() {
|
|||||||
$('#image_prev').html(`<img src="${src}">`);
|
$('#image_prev').html(`<img src="${src}">`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#wizard_table span#image_prev').click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
const src = $('#wizard_table span#image_prev img').attr('src');
|
||||||
|
|
||||||
|
$("#cv-preview-img img").attr('src', src);
|
||||||
|
$("#cv-preview-img").dialog({
|
||||||
|
resizable: true,
|
||||||
|
draggable: true,
|
||||||
|
modal: true,
|
||||||
|
width: 'auto',
|
||||||
|
clickOutside: true,
|
||||||
|
overlay: {
|
||||||
|
opacity: 0.5,
|
||||||
|
background: "black"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
select[name='kind_relationship'] option[disabled='disabled'] {
|
select[name='kind_relationship'] option[disabled='disabled'] {
|
||||||
|
@ -15,12 +15,15 @@ use PandoraFMS\Modules\Shared\Services\Config;
|
|||||||
|
|
||||||
final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenRepository
|
final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenRepository
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private TokenDataMapper $tokenDataMapper,
|
private TokenDataMapper $tokenDataMapper,
|
||||||
private Config $config
|
private Config $config
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Token[],
|
* @return Token[],
|
||||||
*/
|
*/
|
||||||
@ -49,6 +52,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function count(TokenFilter $tokenFilter): int
|
public function count(TokenFilter $tokenFilter): int
|
||||||
{
|
{
|
||||||
$sql = $this->getAuthenticationQuery($tokenFilter, $this->tokenDataMapper, true);
|
$sql = $this->getAuthenticationQuery($tokenFilter, $this->tokenDataMapper, true);
|
||||||
@ -65,6 +69,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
return (int) $count;
|
return (int) $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOne(TokenFilter $tokenFilter): Token
|
public function getOne(TokenFilter $tokenFilter): Token
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -85,6 +90,7 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
return $this->tokenDataMapper->fromDatabase($result);
|
return $this->tokenDataMapper->fromDatabase($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getExistToken(string $label): Token
|
public function getExistToken(string $label): Token
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -105,12 +111,14 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
return $this->tokenDataMapper->fromDatabase($result);
|
return $this->tokenDataMapper->fromDatabase($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function create(Token $token): Token
|
public function create(Token $token): Token
|
||||||
{
|
{
|
||||||
$idToken = $this->__create($token, $this->tokenDataMapper);
|
$idToken = $this->__create($token, $this->tokenDataMapper);
|
||||||
return $token->setIdToken($idToken);
|
return $token->setIdToken($idToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update(Token $token): Token
|
public function update(Token $token): Token
|
||||||
{
|
{
|
||||||
return $this->__update(
|
return $this->__update(
|
||||||
@ -120,15 +128,17 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function delete(int $id): void
|
public function delete(int $id): void
|
||||||
{
|
{
|
||||||
$this->__delete($id, $this->tokenDataMapper);
|
$this->__delete($id, $this->tokenDataMapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getAuthenticationQuery(
|
private function getAuthenticationQuery(
|
||||||
FilterAbstract $filter,
|
FilterAbstract $filter,
|
||||||
DataMapperAbstract $mapper,
|
DataMapperAbstract $mapper,
|
||||||
bool $count = false
|
bool $count=false
|
||||||
): string {
|
): string {
|
||||||
$pagination = '';
|
$pagination = '';
|
||||||
$orderBy = '';
|
$orderBy = '';
|
||||||
@ -179,4 +189,6 @@ final class TokenRepositoryMySQL extends RepositoryMySQL implements TokenReposit
|
|||||||
|
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -261,35 +261,61 @@ use PandoraFMS\Modules\Shared\Entities\Entity;
|
|||||||
*/
|
*/
|
||||||
final class Event extends Entity
|
final class Event extends Entity
|
||||||
{
|
{
|
||||||
|
|
||||||
private ?int $idEvent = null;
|
private ?int $idEvent = null;
|
||||||
|
|
||||||
private ?int $idAgent = null;
|
private ?int $idAgent = null;
|
||||||
|
|
||||||
private ?string $idUser = null;
|
private ?string $idUser = null;
|
||||||
|
|
||||||
private ?int $idGroup = null;
|
private ?int $idGroup = null;
|
||||||
|
|
||||||
private ?EventStatusEnum $status = null;
|
private ?EventStatusEnum $status = null;
|
||||||
|
|
||||||
private ?string $timestamp = null;
|
private ?string $timestamp = null;
|
||||||
|
|
||||||
private ?string $event = null;
|
private ?string $event = null;
|
||||||
|
|
||||||
private ?int $utimestamp = null;
|
private ?int $utimestamp = null;
|
||||||
|
|
||||||
private ?EventTypeEnum $eventType = null;
|
private ?EventTypeEnum $eventType = null;
|
||||||
|
|
||||||
private ?int $idAgentModule = null;
|
private ?int $idAgentModule = null;
|
||||||
|
|
||||||
private ?int $idAlertAm = null;
|
private ?int $idAlertAm = null;
|
||||||
|
|
||||||
private ?EventSeverityEnum $severity = null;
|
private ?EventSeverityEnum $severity = null;
|
||||||
|
|
||||||
private ?string $tags = null;
|
private ?string $tags = null;
|
||||||
|
|
||||||
private ?string $source = null;
|
private ?string $source = null;
|
||||||
|
|
||||||
private ?string $idExtra = null;
|
private ?string $idExtra = null;
|
||||||
|
|
||||||
private ?string $criticalInstructions = null;
|
private ?string $criticalInstructions = null;
|
||||||
|
|
||||||
private ?string $warningInstructions = null;
|
private ?string $warningInstructions = null;
|
||||||
|
|
||||||
private ?string $unknownInstructions = null;
|
private ?string $unknownInstructions = null;
|
||||||
|
|
||||||
private ?string $ownerUser = null;
|
private ?string $ownerUser = null;
|
||||||
|
|
||||||
private ?int $ackUtimestamp = null;
|
private ?int $ackUtimestamp = null;
|
||||||
|
|
||||||
private ?string $customData = null;
|
private ?string $customData = null;
|
||||||
|
|
||||||
private ?string $data = null;
|
private ?string $data = null;
|
||||||
|
|
||||||
private ?int $moduleStatus = null;
|
private ?int $moduleStatus = null;
|
||||||
|
|
||||||
private ?string $eventCustomId = null;
|
private ?string $eventCustomId = null;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function fieldsReadOnly(): array
|
public function fieldsReadOnly(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -301,6 +327,7 @@ final class Event extends Entity
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function jsonSerialize(): mixed
|
public function jsonSerialize(): mixed
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -331,35 +358,36 @@ final class Event extends Entity
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getValidations(): array
|
public function getValidations(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'idEvent' => [
|
'idEvent' => [
|
||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATERTHAN,
|
EventValidator::GREATERTHAN,
|
||||||
],
|
],
|
||||||
'idAgent' => [
|
'idAgent' => [
|
||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATEREQUALTHAN,
|
EventValidator::GREATEREQUALTHAN,
|
||||||
],
|
],
|
||||||
'idUser' => EventValidator::STRING,
|
'idUser' => EventValidator::STRING,
|
||||||
'idGroup' => [
|
'idGroup' => [
|
||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATEREQUALTHAN,
|
EventValidator::GREATEREQUALTHAN,
|
||||||
],
|
],
|
||||||
'status' => EventValidator::VALIDSTATUS,
|
'status' => EventValidator::VALIDSTATUS,
|
||||||
'timestamp' => EventValidator::DATETIME,
|
'timestamp' => EventValidator::DATETIME,
|
||||||
'event' => EventValidator::STRING,
|
'event' => EventValidator::STRING,
|
||||||
'utimestamp' => [
|
'utimestamp' => [
|
||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATEREQUALTHAN,
|
EventValidator::GREATEREQUALTHAN,
|
||||||
],
|
],
|
||||||
'eventType' => EventValidator::VALIDTYPE,
|
'eventType' => EventValidator::VALIDTYPE,
|
||||||
'idAgentModule' => [
|
'idAgentModule' => [
|
||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATEREQUALTHAN,
|
EventValidator::GREATEREQUALTHAN,
|
||||||
],
|
],
|
||||||
'idAlertAm' => [
|
'idAlertAm' => [
|
||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATEREQUALTHAN,
|
EventValidator::GREATEREQUALTHAN,
|
||||||
],
|
],
|
||||||
@ -375,62 +403,78 @@ final class Event extends Entity
|
|||||||
EventValidator::INTEGER,
|
EventValidator::INTEGER,
|
||||||
EventValidator::GREATEREQUALTHAN,
|
EventValidator::GREATEREQUALTHAN,
|
||||||
],
|
],
|
||||||
'customData' => EventValidator::STRING,
|
'customData' => EventValidator::STRING,
|
||||||
'data' => EventValidator::STRING,
|
'data' => EventValidator::STRING,
|
||||||
'moduleStatus' => EventValidator::INTEGER,
|
'moduleStatus' => EventValidator::INTEGER,
|
||||||
'eventCustomId' => EventValidator::STRING,
|
'eventCustomId' => EventValidator::STRING,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function validateFields(array $filters): array
|
public function validateFields(array $filters): array
|
||||||
{
|
{
|
||||||
return (new EventValidator())->validate($filters);
|
return (new EventValidator())->validate($filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdEvent(): ?int
|
public function getIdEvent(): ?int
|
||||||
{
|
{
|
||||||
return $this->idEvent;
|
return $this->idEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdEvent(?int $idEvent): self
|
public function setIdEvent(?int $idEvent): self
|
||||||
{
|
{
|
||||||
$this->idEvent = $idEvent;
|
$this->idEvent = $idEvent;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdAgent(): ?int
|
public function getIdAgent(): ?int
|
||||||
{
|
{
|
||||||
return $this->idAgent;
|
return $this->idAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdAgent(?int $idAgent): self
|
public function setIdAgent(?int $idAgent): self
|
||||||
{
|
{
|
||||||
$this->idAgent = $idAgent;
|
$this->idAgent = $idAgent;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdUser(): ?string
|
public function getIdUser(): ?string
|
||||||
{
|
{
|
||||||
return $this->idUser;
|
return $this->idUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdUser(?string $idUser): self
|
public function setIdUser(?string $idUser): self
|
||||||
{
|
{
|
||||||
$this->idUser = $idUser;
|
$this->idUser = $idUser;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdGroup(): ?int
|
public function getIdGroup(): ?int
|
||||||
{
|
{
|
||||||
return $this->idGroup;
|
return $this->idGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdGroup(?int $idGroup): self
|
public function setIdGroup(?int $idGroup): self
|
||||||
{
|
{
|
||||||
$this->idGroup = $idGroup;
|
$this->idGroup = $idGroup;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getStatus(): ?EventStatusEnum
|
public function getStatus(): ?EventStatusEnum
|
||||||
{
|
{
|
||||||
return $this->status;
|
return $this->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setStatus(null|string|EventStatusEnum $status): self
|
public function setStatus(null|string|EventStatusEnum $status): self
|
||||||
{
|
{
|
||||||
if (is_string($status) === true) {
|
if (is_string($status) === true) {
|
||||||
@ -442,40 +486,52 @@ final class Event extends Entity
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getTimestamp(): ?string
|
public function getTimestamp(): ?string
|
||||||
{
|
{
|
||||||
return $this->timestamp;
|
return $this->timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setTimestamp(?string $timestamp): self
|
public function setTimestamp(?string $timestamp): self
|
||||||
{
|
{
|
||||||
$this->timestamp = $timestamp;
|
$this->timestamp = $timestamp;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getEvent(): ?string
|
public function getEvent(): ?string
|
||||||
{
|
{
|
||||||
return $this->event;
|
return $this->event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setEvent(?string $event): self
|
public function setEvent(?string $event): self
|
||||||
{
|
{
|
||||||
$this->event = $event;
|
$this->event = $event;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getUtimestamp(): ?int
|
public function getUtimestamp(): ?int
|
||||||
{
|
{
|
||||||
return $this->utimestamp;
|
return $this->utimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setUtimestamp(?int $utimestamp): self
|
public function setUtimestamp(?int $utimestamp): self
|
||||||
{
|
{
|
||||||
$this->utimestamp = $utimestamp;
|
$this->utimestamp = $utimestamp;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getEventType(): ?EventTypeEnum
|
public function getEventType(): ?EventTypeEnum
|
||||||
{
|
{
|
||||||
return $this->eventType;
|
return $this->eventType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setEventType(null|string|EventTypeEnum $eventType): self
|
public function setEventType(null|string|EventTypeEnum $eventType): self
|
||||||
{
|
{
|
||||||
if (is_string($eventType) === true) {
|
if (is_string($eventType) === true) {
|
||||||
@ -487,30 +543,39 @@ final class Event extends Entity
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdAgentModule(): ?int
|
public function getIdAgentModule(): ?int
|
||||||
{
|
{
|
||||||
return $this->idAgentModule;
|
return $this->idAgentModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdAgentModule(?int $idAgentModule): self
|
public function setIdAgentModule(?int $idAgentModule): self
|
||||||
{
|
{
|
||||||
$this->idAgentModule = $idAgentModule;
|
$this->idAgentModule = $idAgentModule;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdAlertAm(): ?int
|
public function getIdAlertAm(): ?int
|
||||||
{
|
{
|
||||||
return $this->idAlertAm;
|
return $this->idAlertAm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdAlertAm(?int $idAlertAm): self
|
public function setIdAlertAm(?int $idAlertAm): self
|
||||||
{
|
{
|
||||||
$this->idAlertAm = $idAlertAm;
|
$this->idAlertAm = $idAlertAm;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getSeverity(): ?EventSeverityEnum
|
public function getSeverity(): ?EventSeverityEnum
|
||||||
{
|
{
|
||||||
return $this->severity;
|
return $this->severity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setSeverity(null|string|EventSeverityEnum $severity): self
|
public function setSeverity(null|string|EventSeverityEnum $severity): self
|
||||||
{
|
{
|
||||||
if (is_string($severity) === true) {
|
if (is_string($severity) === true) {
|
||||||
@ -522,123 +587,161 @@ final class Event extends Entity
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getTags(): ?string
|
public function getTags(): ?string
|
||||||
{
|
{
|
||||||
return $this->tags;
|
return $this->tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setTags(?string $tags): self
|
public function setTags(?string $tags): self
|
||||||
{
|
{
|
||||||
$this->tags = $tags;
|
$this->tags = $tags;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getSource(): ?string
|
public function getSource(): ?string
|
||||||
{
|
{
|
||||||
return $this->source;
|
return $this->source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setSource(?string $source): self
|
public function setSource(?string $source): self
|
||||||
{
|
{
|
||||||
$this->source = $source;
|
$this->source = $source;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdExtra(): ?string
|
public function getIdExtra(): ?string
|
||||||
{
|
{
|
||||||
return $this->idExtra;
|
return $this->idExtra;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdExtra(?string $idExtra): self
|
public function setIdExtra(?string $idExtra): self
|
||||||
{
|
{
|
||||||
$this->idExtra = $idExtra;
|
$this->idExtra = $idExtra;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCriticalInstructions(): ?string
|
public function getCriticalInstructions(): ?string
|
||||||
{
|
{
|
||||||
return $this->criticalInstructions;
|
return $this->criticalInstructions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setCriticalInstructions(?string $criticalInstructions): self
|
public function setCriticalInstructions(?string $criticalInstructions): self
|
||||||
{
|
{
|
||||||
$this->criticalInstructions = $criticalInstructions;
|
$this->criticalInstructions = $criticalInstructions;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getWarningInstructions(): ?string
|
public function getWarningInstructions(): ?string
|
||||||
{
|
{
|
||||||
return $this->warningInstructions;
|
return $this->warningInstructions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setWarningInstructions(?string $warningInstructions): self
|
public function setWarningInstructions(?string $warningInstructions): self
|
||||||
{
|
{
|
||||||
$this->warningInstructions = $warningInstructions;
|
$this->warningInstructions = $warningInstructions;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getUnknownInstructions(): ?string
|
public function getUnknownInstructions(): ?string
|
||||||
{
|
{
|
||||||
return $this->unknownInstructions;
|
return $this->unknownInstructions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setUnknownInstructions(?string $unknownInstructions): self
|
public function setUnknownInstructions(?string $unknownInstructions): self
|
||||||
{
|
{
|
||||||
$this->unknownInstructions = $unknownInstructions;
|
$this->unknownInstructions = $unknownInstructions;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOwnerUser(): ?string
|
public function getOwnerUser(): ?string
|
||||||
{
|
{
|
||||||
return $this->ownerUser;
|
return $this->ownerUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setOwnerUser(?string $ownerUser): self
|
public function setOwnerUser(?string $ownerUser): self
|
||||||
{
|
{
|
||||||
$this->ownerUser = $ownerUser;
|
$this->ownerUser = $ownerUser;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getAckUtimestamp(): ?int
|
public function getAckUtimestamp(): ?int
|
||||||
{
|
{
|
||||||
return $this->ackUtimestamp;
|
return $this->ackUtimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setAckUtimestamp(?int $ackUtimestamp): self
|
public function setAckUtimestamp(?int $ackUtimestamp): self
|
||||||
{
|
{
|
||||||
$this->ackUtimestamp = $ackUtimestamp;
|
$this->ackUtimestamp = $ackUtimestamp;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCustomData(): ?string
|
public function getCustomData(): ?string
|
||||||
{
|
{
|
||||||
return $this->customData;
|
return $this->customData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setCustomData(?string $customData): self
|
public function setCustomData(?string $customData): self
|
||||||
{
|
{
|
||||||
$this->customData = $customData;
|
$this->customData = $customData;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getData(): ?string
|
public function getData(): ?string
|
||||||
{
|
{
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setData(?string $data): self
|
public function setData(?string $data): self
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getModuleStatus(): ?int
|
public function getModuleStatus(): ?int
|
||||||
{
|
{
|
||||||
return $this->moduleStatus;
|
return $this->moduleStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setModuleStatus(?int $moduleStatus): self
|
public function setModuleStatus(?int $moduleStatus): self
|
||||||
{
|
{
|
||||||
$this->moduleStatus = $moduleStatus;
|
$this->moduleStatus = $moduleStatus;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getEventCustomId(): ?string
|
public function getEventCustomId(): ?string
|
||||||
{
|
{
|
||||||
return $this->eventCustomId;
|
return $this->eventCustomId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setEventCustomId(?string $eventCustomId): self
|
public function setEventCustomId(?string $eventCustomId): self
|
||||||
{
|
{
|
||||||
$this->eventCustomId = $eventCustomId;
|
$this->eventCustomId = $eventCustomId;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,18 @@ use PandoraFMS\Modules\PandoraITSM\Inventories\Services\GetPandoraITSMInventoryS
|
|||||||
|
|
||||||
final class GetPandoraITSMInventoryAction
|
final class GetPandoraITSMInventoryAction
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private GetPandoraITSMInventoryService $getPandoraITSMInventoryService
|
private GetPandoraITSMInventoryService $getPandoraITSMInventoryService
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __invoke(int $idPandoraITSMInventory): array
|
public function __invoke(int $idPandoraITSMInventory): array
|
||||||
{
|
{
|
||||||
return $this->getPandoraITSMInventoryService->__invoke($idPandoraITSMInventory);
|
return $this->getPandoraITSMInventoryService->__invoke($idPandoraITSMInventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,15 @@ use PandoraFMS\Modules\Shared\Entities\PaginationData;
|
|||||||
|
|
||||||
final class ListPandoraITSMInventoryAction
|
final class ListPandoraITSMInventoryAction
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private ListPandoraITSMInventoryService $listPandoraITSMInventoryService,
|
private ListPandoraITSMInventoryService $listPandoraITSMInventoryService,
|
||||||
private CountPandoraITSMInventoryService $countPandoraITSMInventoryService
|
private CountPandoraITSMInventoryService $countPandoraITSMInventoryService
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
|
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
|
||||||
{
|
{
|
||||||
return (new PaginationData(
|
return (new PaginationData(
|
||||||
@ -25,4 +28,6 @@ final class ListPandoraITSMInventoryAction
|
|||||||
$this->listPandoraITSMInventoryService->__invoke($pandoraITSMInventoryFilter)
|
$this->listPandoraITSMInventoryService->__invoke($pandoraITSMInventoryFilter)
|
||||||
))->toArray();
|
))->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,25 +11,28 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
|||||||
|
|
||||||
final class GetPandoraITSMInventoryController extends Controller
|
final class GetPandoraITSMInventoryController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private GetPandoraITSMInventoryAction $getPandoraITSMInventoryAction,
|
private GetPandoraITSMInventoryAction $getPandoraITSMInventoryAction,
|
||||||
private ValidateAclSystem $acl
|
private ValidateAclSystem $acl
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @OA\Get(
|
* @OA\Get(
|
||||||
* security={{ "bearerAuth": {}}},
|
* security={{ "bearerAuth": {}}},
|
||||||
* path="/pandoraITSM/inventory/{idPandoraITSMInventory}",
|
* path="/pandoraITSM/inventory/{idPandoraITSMInventory}",
|
||||||
* tags={"PandoraITSM"},
|
* tags={"PandoraITSM"},
|
||||||
* summary="Show pandoraITSMInventory",
|
* summary="Show pandoraITSMInventory",
|
||||||
* @OA\Parameter(ref="#/components/parameters/parameterIdPandoraITSMInventory"),
|
* @OA\Parameter(ref="#/components/parameters/parameterIdPandoraITSMInventory"),
|
||||||
* @OA\Response(response=200, ref="#/components/responses/ResponsePandoraITSMInventory"),
|
* @OA\Response(response=200, ref="#/components/responses/ResponsePandoraITSMInventory"),
|
||||||
* @OA\Response(response=400, ref="#/components/responses/BadRequest"),
|
* @OA\Response(response=400, ref="#/components/responses/BadRequest"),
|
||||||
* @OA\Response(response=401, ref="#/components/responses/Unauthorized"),
|
* @OA\Response(response=401, ref="#/components/responses/Unauthorized"),
|
||||||
* @OA\Response(response=403, ref="#/components/responses/Forbidden"),
|
* @OA\Response(response=403, ref="#/components/responses/Forbidden"),
|
||||||
* @OA\Response(response=404, ref="#/components/responses/NotFound"),
|
* @OA\Response(response=404, ref="#/components/responses/NotFound"),
|
||||||
* @OA\Response(response=500, ref="#/components/responses/InternalServerError")
|
* @OA\Response(response=500, ref="#/components/responses/InternalServerError")
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function __invoke(Request $request, Response $response): Response
|
public function __invoke(Request $request, Response $response): Response
|
||||||
@ -41,4 +44,6 @@ final class GetPandoraITSMInventoryController extends Controller
|
|||||||
$result = $this->getPandoraITSMInventoryAction->__invoke($idPandoraITSMInventory);
|
$result = $this->getPandoraITSMInventoryAction->__invoke($idPandoraITSMInventory);
|
||||||
return $this->getResponse($response, $result);
|
return $this->getResponse($response, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,40 +12,43 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
|||||||
|
|
||||||
final class ListPandoraITSMInventoryController extends Controller
|
final class ListPandoraITSMInventoryController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private ListPandoraITSMInventoryAction $listPandoraITSMInventoryAction,
|
private ListPandoraITSMInventoryAction $listPandoraITSMInventoryAction,
|
||||||
private ValidateAclSystem $acl,
|
private ValidateAclSystem $acl,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @OA\Post(
|
* @OA\Post(
|
||||||
* security={{ "bearerAuth": {}}},
|
* security={{ "bearerAuth": {}}},
|
||||||
* tags={"PandoraITSM"},
|
* tags={"PandoraITSM"},
|
||||||
* path="/pandoraITSM/inventory/list",
|
* path="/pandoraITSM/inventory/list",
|
||||||
* summary="List pandoraITSMInventories",
|
* summary="List pandoraITSMInventories",
|
||||||
* @OA\Parameter(ref="#/components/parameters/parameterPage"),
|
* @OA\Parameter(ref="#/components/parameters/parameterPage"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/parameterSizePage"),
|
* @OA\Parameter(ref="#/components/parameters/parameterSizePage"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/parameterSortField"),
|
* @OA\Parameter(ref="#/components/parameters/parameterSortField"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/parameterSortDirection"),
|
* @OA\Parameter(ref="#/components/parameters/parameterSortDirection"),
|
||||||
* @OA\RequestBody(ref="#/components/requestBodies/requestBodyPandoraITSMInventoryFilter"),
|
* @OA\RequestBody(ref="#/components/requestBodies/requestBodyPandoraITSMInventoryFilter"),
|
||||||
* @OA\Response(
|
* @OA\Response(
|
||||||
* response="200",
|
* response="200",
|
||||||
* description="List PandoraITSM Inventories Object",
|
* description="List PandoraITSM Inventories Object",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="paginationData",
|
* property="paginationData",
|
||||||
* type="object",
|
* type="object",
|
||||||
* ref="#/components/schemas/paginationData",
|
* ref="#/components/schemas/paginationData",
|
||||||
* description="Page object",
|
* description="Page object",
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="data",
|
* property="data",
|
||||||
* type="array",
|
* type="array",
|
||||||
* @OA\Items(
|
* @OA\Items(
|
||||||
* ref="#/components/schemas/PandoraITSMInventory",
|
* ref="#/components/schemas/PandoraITSMInventory",
|
||||||
* description="Array of pandoraITSMInventory objects"
|
* description="Array of pandoraITSMInventory objects"
|
||||||
* )
|
* )
|
||||||
@ -54,11 +57,11 @@ final class ListPandoraITSMInventoryController extends Controller
|
|||||||
* )
|
* )
|
||||||
* }
|
* }
|
||||||
* ),
|
* ),
|
||||||
* @OA\Response(response=400, ref="#/components/responses/BadRequest"),
|
* @OA\Response(response=400, ref="#/components/responses/BadRequest"),
|
||||||
* @OA\Response(response=401, ref="#/components/responses/Unauthorized"),
|
* @OA\Response(response=401, ref="#/components/responses/Unauthorized"),
|
||||||
* @OA\Response(response=403, ref="#/components/responses/Forbidden"),
|
* @OA\Response(response=403, ref="#/components/responses/Forbidden"),
|
||||||
* @OA\Response(response=404, ref="#/components/responses/NotFound"),
|
* @OA\Response(response=404, ref="#/components/responses/NotFound"),
|
||||||
* @OA\Response(response=500, ref="#/components/responses/InternalServerError")
|
* @OA\Response(response=500, ref="#/components/responses/InternalServerError")
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function __invoke(Request $request, Response $response): Response
|
public function __invoke(Request $request, Response $response): Response
|
||||||
@ -71,4 +74,6 @@ final class ListPandoraITSMInventoryController extends Controller
|
|||||||
$result = $this->listPandoraITSMInventoryAction->__invoke($pandoraITSMInventoryFilter);
|
$result = $this->listPandoraITSMInventoryAction->__invoke($pandoraITSMInventoryFilter);
|
||||||
return $this->getResponse($response, $result);
|
return $this->getResponse($response, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -112,25 +112,37 @@ use PandoraFMS\Modules\Shared\Validators\Validator;
|
|||||||
*/
|
*/
|
||||||
final class PandoraITSMInventory extends Entity
|
final class PandoraITSMInventory extends Entity
|
||||||
{
|
{
|
||||||
|
|
||||||
private ?int $idPandoraITSMInventory = null;
|
private ?int $idPandoraITSMInventory = null;
|
||||||
|
|
||||||
private ?string $agentAlias = null;
|
private ?string $agentAlias = null;
|
||||||
|
|
||||||
private ?string $osVersion = null;
|
private ?string $osVersion = null;
|
||||||
|
|
||||||
private ?string $agentAddress = null;
|
private ?string $agentAddress = null;
|
||||||
|
|
||||||
private ?string $agentUrlAddress = null;
|
private ?string $agentUrlAddress = null;
|
||||||
|
|
||||||
private ?bool $agentDisabled = null;
|
private ?bool $agentDisabled = null;
|
||||||
|
|
||||||
private ?string $groupName = null;
|
private ?string $groupName = null;
|
||||||
|
|
||||||
private ?int $groupId = null;
|
private ?int $groupId = null;
|
||||||
|
|
||||||
private ?string $osName = null;
|
private ?string $osName = null;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function fieldsReadOnly(): array
|
public function fieldsReadOnly(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function jsonSerialize(): mixed
|
public function jsonSerialize(): mixed
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -146,6 +158,7 @@ final class PandoraITSMInventory extends Entity
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getValidations(): array
|
public function getValidations(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -153,112 +166,142 @@ final class PandoraITSMInventory extends Entity
|
|||||||
Validator::INTEGER,
|
Validator::INTEGER,
|
||||||
Validator::GREATERTHAN,
|
Validator::GREATERTHAN,
|
||||||
],
|
],
|
||||||
'agentAlias' => Validator::STRING,
|
'agentAlias' => Validator::STRING,
|
||||||
'osVersion' => Validator::STRING,
|
'osVersion' => Validator::STRING,
|
||||||
'agentAddress' => Validator::STRING,
|
'agentAddress' => Validator::STRING,
|
||||||
'agentUrlAddress' => Validator::STRING,
|
'agentUrlAddress' => Validator::STRING,
|
||||||
'agentDisabled' => Validator::BOOLEAN,
|
'agentDisabled' => Validator::BOOLEAN,
|
||||||
'groupName' => Validator::STRING,
|
'groupName' => Validator::STRING,
|
||||||
'groupId' => [
|
'groupId' => [
|
||||||
Validator::INTEGER,
|
Validator::INTEGER,
|
||||||
Validator::GREATERTHAN,
|
Validator::GREATERTHAN,
|
||||||
],
|
],
|
||||||
'osName' => Validator::STRING,
|
'osName' => Validator::STRING,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function validateFields(array $filters): array
|
public function validateFields(array $filters): array
|
||||||
{
|
{
|
||||||
return (new Validator())->validate($filters);
|
return (new Validator())->validate($filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getIdPandoraITSMInventory(): ?int
|
public function getIdPandoraITSMInventory(): ?int
|
||||||
{
|
{
|
||||||
return $this->idPandoraITSMInventory;
|
return $this->idPandoraITSMInventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setIdPandoraITSMInventory(?int $idPandoraITSMInventory): self
|
public function setIdPandoraITSMInventory(?int $idPandoraITSMInventory): self
|
||||||
{
|
{
|
||||||
$this->idPandoraITSMInventory = $idPandoraITSMInventory;
|
$this->idPandoraITSMInventory = $idPandoraITSMInventory;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getAgentAlias(): ?string
|
public function getAgentAlias(): ?string
|
||||||
{
|
{
|
||||||
return $this->agentAlias;
|
return $this->agentAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setAgentAlias(?string $agentAlias): self
|
public function setAgentAlias(?string $agentAlias): self
|
||||||
{
|
{
|
||||||
$this->agentAlias = $agentAlias;
|
$this->agentAlias = $agentAlias;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOsVersion(): ?string
|
public function getOsVersion(): ?string
|
||||||
{
|
{
|
||||||
return $this->osVersion;
|
return $this->osVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setOsVersion(?string $osVersion): self
|
public function setOsVersion(?string $osVersion): self
|
||||||
{
|
{
|
||||||
$this->osVersion = $osVersion;
|
$this->osVersion = $osVersion;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getAgentAddress(): ?string
|
public function getAgentAddress(): ?string
|
||||||
{
|
{
|
||||||
return $this->agentAddress;
|
return $this->agentAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setAgentAddress(?string $agentAddress): self
|
public function setAgentAddress(?string $agentAddress): self
|
||||||
{
|
{
|
||||||
$this->agentAddress = $agentAddress;
|
$this->agentAddress = $agentAddress;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getAgentUrlAddress(): ?string
|
public function getAgentUrlAddress(): ?string
|
||||||
{
|
{
|
||||||
return $this->agentUrlAddress;
|
return $this->agentUrlAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setAgentUrlAddress(?string $agentUrlAddress): self
|
public function setAgentUrlAddress(?string $agentUrlAddress): self
|
||||||
{
|
{
|
||||||
$this->agentUrlAddress = $agentUrlAddress;
|
$this->agentUrlAddress = $agentUrlAddress;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getGroupName(): ?string
|
public function getGroupName(): ?string
|
||||||
{
|
{
|
||||||
return $this->groupName;
|
return $this->groupName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setGroupName(?string $groupName): self
|
public function setGroupName(?string $groupName): self
|
||||||
{
|
{
|
||||||
$this->groupName = $groupName;
|
$this->groupName = $groupName;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOsName(): ?string
|
public function getOsName(): ?string
|
||||||
{
|
{
|
||||||
return $this->osName;
|
return $this->osName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setOsName(?string $osName): self
|
public function setOsName(?string $osName): self
|
||||||
{
|
{
|
||||||
$this->osName = $osName;
|
$this->osName = $osName;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getGroupId(): ?int
|
public function getGroupId(): ?int
|
||||||
{
|
{
|
||||||
return $this->groupId;
|
return $this->groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setGroupId(?int $groupId): self
|
public function setGroupId(?int $groupId): self
|
||||||
{
|
{
|
||||||
$this->groupId = $groupId;
|
$this->groupId = $groupId;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getAgentDisabled(): ?bool
|
public function getAgentDisabled(): ?bool
|
||||||
{
|
{
|
||||||
return $this->agentDisabled;
|
return $this->agentDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function setAgentDisabled(?bool $agentDisabled): self
|
public function setAgentDisabled(?bool $agentDisabled): self
|
||||||
{
|
{
|
||||||
$this->agentDisabled = $agentDisabled;
|
$this->agentDisabled = $agentDisabled;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,12 @@ use PandoraFMS\Modules\Shared\Validators\Validator;
|
|||||||
*/
|
*/
|
||||||
final class PandoraITSMInventoryFilter extends FilterAbstract
|
final class PandoraITSMInventoryFilter extends FilterAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
private ?string $freeSearch = null;
|
private ?string $freeSearch = null;
|
||||||
|
|
||||||
private ?array $multipleSearch = null;
|
private ?array $multipleSearch = null;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->setDefaultFieldOrder('tagente.id_agente');
|
$this->setDefaultFieldOrder('tagente.id_agente');
|
||||||
@ -57,6 +60,7 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
$this->setEntityFilter(new PandoraITSMInventory());
|
$this->setEntityFilter(new PandoraITSMInventory());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function fieldsTranslate(): array
|
public function fieldsTranslate(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -72,11 +76,13 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function fieldsReadOnly(): array
|
public function fieldsReadOnly(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function jsonSerialize(): mixed
|
public function jsonSerialize(): mixed
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -85,22 +91,26 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getValidations(): array
|
public function getValidations(): array
|
||||||
{
|
{
|
||||||
$validations = [];
|
$validations = [];
|
||||||
if($this->getEntityFilter() !== null) {
|
if ($this->getEntityFilter() !== null) {
|
||||||
$validations = $this->getEntityFilter()->getValidations();
|
$validations = $this->getEntityFilter()->getValidations();
|
||||||
}
|
}
|
||||||
|
|
||||||
$validations['freeSearch'] = Validator::STRING;
|
$validations['freeSearch'] = Validator::STRING;
|
||||||
$validations['multipleSearch'] = Validator::ARRAY;
|
$validations['multipleSearch'] = Validator::ARRAY;
|
||||||
return $validations;
|
return $validations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function validateFields(array $filters): array
|
public function validateFields(array $filters): array
|
||||||
{
|
{
|
||||||
return (new Validator())->validate($filters);
|
return (new Validator())->validate($filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of freeSearch.
|
* Get the value of freeSearch.
|
||||||
*
|
*
|
||||||
@ -111,11 +121,11 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
return $this->freeSearch;
|
return $this->freeSearch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of freeSearch.
|
* Set the value of freeSearch.
|
||||||
*
|
*
|
||||||
* @param ?string $freeSearch
|
* @param string $freeSearch
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function setFreeSearch(?string $freeSearch): self
|
public function setFreeSearch(?string $freeSearch): self
|
||||||
{
|
{
|
||||||
@ -123,6 +133,7 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of fieldsFreeSearch.
|
* Get the value of fieldsFreeSearch.
|
||||||
*
|
*
|
||||||
@ -136,6 +147,7 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of multipleSearchString.
|
* Get the value of multipleSearchString.
|
||||||
*
|
*
|
||||||
@ -146,14 +158,17 @@ final class PandoraITSMInventoryFilter extends FilterAbstract
|
|||||||
return $this->multipleSearch;
|
return $this->multipleSearch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of multipleSearchString.
|
* Set the value of multipleSearchString.
|
||||||
*
|
*
|
||||||
* @param ?array $multipleSearch
|
* @param array $multipleSearch
|
||||||
*/
|
*/
|
||||||
public function setMultipleSearch(?array $multipleSearch): self
|
public function setMultipleSearch(?array $multipleSearch): self
|
||||||
{
|
{
|
||||||
$this->multipleSearch = $multipleSearch;
|
$this->multipleSearch = $multipleSearch;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,18 +7,27 @@ use PandoraFMS\Modules\PandoraITSM\Inventories\Entities\PandoraITSMInventoryFilt
|
|||||||
|
|
||||||
interface PandoraITSMInventoryRepository
|
interface PandoraITSMInventoryRepository
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return PandoraITSMInventory[],
|
* @return PandoraITSMInventory[],
|
||||||
*/
|
*/
|
||||||
public function list(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array;
|
public function list(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array;
|
||||||
|
|
||||||
|
|
||||||
public function count(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int;
|
public function count(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int;
|
||||||
|
|
||||||
|
|
||||||
public function getOne(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array;
|
public function getOne(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array;
|
||||||
|
|
||||||
|
|
||||||
public function create(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory;
|
public function create(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory;
|
||||||
|
|
||||||
|
|
||||||
public function update(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory;
|
public function update(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory;
|
||||||
|
|
||||||
|
|
||||||
public function delete(int $id): void;
|
public function delete(int $id): void;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,14 @@ use PandoraFMS\Modules\Shared\Services\Config;
|
|||||||
|
|
||||||
class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements PandoraITSMInventoryRepository
|
class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements PandoraITSMInventoryRepository
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private Config $config
|
private Config $config
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return PandoraITSMInventory[],
|
* @return PandoraITSMInventory[],
|
||||||
*/
|
*/
|
||||||
@ -40,6 +43,7 @@ class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements Pan
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function count(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int
|
public function count(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int
|
||||||
{
|
{
|
||||||
$result = $this->getPandoraITSMInventoriesQuery($pandoraITSMInventoryFilter, true);
|
$result = $this->getPandoraITSMInventoriesQuery($pandoraITSMInventoryFilter, true);
|
||||||
@ -59,6 +63,7 @@ class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements Pan
|
|||||||
return (int) $count;
|
return (int) $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getOne(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
|
public function getOne(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -68,7 +73,6 @@ class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements Pan
|
|||||||
if (empty($result_array) === false) {
|
if (empty($result_array) === false) {
|
||||||
$result = array_shift($result_array);
|
$result = array_shift($result_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
// Capture errors mysql.
|
// Capture errors mysql.
|
||||||
throw new InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
@ -84,23 +88,27 @@ class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements Pan
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function create(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory
|
public function create(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory
|
||||||
{
|
{
|
||||||
return $pandoraITSMInventory;
|
return $pandoraITSMInventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory
|
public function update(PandoraITSMInventory $pandoraITSMInventory): PandoraITSMInventory
|
||||||
{
|
{
|
||||||
return $pandoraITSMInventory;
|
return $pandoraITSMInventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function delete(int $id): void
|
public function delete(int $id): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function getPandoraITSMInventoriesQuery(
|
private function getPandoraITSMInventoriesQuery(
|
||||||
FilterAbstract $filter,
|
FilterAbstract $filter,
|
||||||
bool $count = false
|
bool $count=false
|
||||||
): array {
|
): array {
|
||||||
$pagination = '';
|
$pagination = '';
|
||||||
$orderBy = '';
|
$orderBy = '';
|
||||||
@ -184,7 +192,7 @@ class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements Pan
|
|||||||
if (isset($index_name_custom_fields[$name_field]) === true) {
|
if (isset($index_name_custom_fields[$name_field]) === true) {
|
||||||
if ($index_name_custom_fields[$name_field]['is_password_type']) {
|
if ($index_name_custom_fields[$name_field]['is_password_type']) {
|
||||||
$type = 'password';
|
$type = 'password';
|
||||||
} elseif ($index_name_custom_fields[$name_field]['is_link_enabled']) {
|
} else if ($index_name_custom_fields[$name_field]['is_link_enabled']) {
|
||||||
$type = 'link';
|
$type = 'link';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,4 +209,6 @@ class PandoraITSMInventoryRepositoryMySQL extends RepositoryMySQL implements Pan
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,18 @@ use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventory
|
|||||||
|
|
||||||
final class CountPandoraITSMInventoryService
|
final class CountPandoraITSMInventoryService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
|
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int
|
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): int
|
||||||
{
|
{
|
||||||
return $this->pandoraITSMInventoryRepository->count($pandoraITSMInventoryFilter);
|
return $this->pandoraITSMInventoryRepository->count($pandoraITSMInventoryFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,18 +8,25 @@ use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventory
|
|||||||
|
|
||||||
final class GetPandoraITSMInventoryService
|
final class GetPandoraITSMInventoryService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
|
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __invoke(int $idPandoraITSMInventory): array
|
public function __invoke(int $idPandoraITSMInventory): array
|
||||||
{
|
{
|
||||||
$pandoraITSMInventoryFilter = new PandoraITSMInventoryFilter();
|
$pandoraITSMInventoryFilter = new PandoraITSMInventoryFilter();
|
||||||
/** @var PandoraITSMInventory $entityFilter */
|
/*
|
||||||
|
@var PandoraITSMInventory $entityFilter
|
||||||
|
*/
|
||||||
$entityFilter = $pandoraITSMInventoryFilter->getEntityFilter();
|
$entityFilter = $pandoraITSMInventoryFilter->getEntityFilter();
|
||||||
$entityFilter->setIdPandoraITSMInventory($idPandoraITSMInventory);
|
$entityFilter->setIdPandoraITSMInventory($idPandoraITSMInventory);
|
||||||
|
|
||||||
return $this->pandoraITSMInventoryRepository->getOne($pandoraITSMInventoryFilter);
|
return $this->pandoraITSMInventoryRepository->getOne($pandoraITSMInventoryFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,18 @@ use PandoraFMS\Modules\PandoraITSM\Inventories\Repositories\PandoraITSMInventory
|
|||||||
|
|
||||||
final class ListPandoraITSMInventoryService
|
final class ListPandoraITSMInventoryService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
|
private PandoraITSMInventoryRepository $pandoraITSMInventoryRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
|
public function __invoke(PandoraITSMInventoryFilter $pandoraITSMInventoryFilter): array
|
||||||
{
|
{
|
||||||
return $this->pandoraITSMInventoryRepository->list($pandoraITSMInventoryFilter);
|
return $this->pandoraITSMInventoryRepository->list($pandoraITSMInventoryFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,11 @@ use OpenApi\Annotations as OA;
|
|||||||
|
|
||||||
More useful links:
|
More useful links:
|
||||||
|
|
||||||
* <a target='_blank' href='https://pandorafms.com/en/pandora-fms-license-2024_en/'>Pandora FMS Licence </a>
|
* <a target='_blank' href='https://pandorafms.com/en/pandora-fms-license-2024_en/'>Pandora FMS Licence </a>
|
||||||
* <a target='_blank' href='https://support.pandorafms.com'> Pandora FMS Official Support </a>
|
* <a target='_blank' href='https://support.pandorafms.com'> Pandora FMS Official Support </a>
|
||||||
* <a target='_blank' href='https://pandorafms.com/en/community/'> Pandora FMS Community </a>
|
* <a target='_blank' href='https://pandorafms.com/en/community/'> Pandora FMS Community </a>
|
||||||
* <a target='_blank' href='https://pandorafms.com/en/security/vulnerability-disclosure-policy/'> Vulnerability Disclosure Policy </a>
|
* <a target='_blank' href='https://pandorafms.com/en/security/vulnerability-disclosure-policy/'> Vulnerability Disclosure Policy </a>
|
||||||
* <a target='_blank' href='https://pandorafms.com/en/faq/'> Pandora FMS FAQ </a>",
|
* <a target='_blank' href='https://pandorafms.com/en/faq/'> Pandora FMS FAQ </a>",
|
||||||
* version="0.0.1"
|
* version="0.0.1"
|
||||||
* ),
|
* ),
|
||||||
* @OA\Schemes(
|
* @OA\Schemes(
|
||||||
@ -60,7 +60,7 @@ More useful links:
|
|||||||
* name="Users",
|
* name="Users",
|
||||||
* description="API Endpoints of users"
|
* description="API Endpoints of users"
|
||||||
* ),
|
* ),
|
||||||
* @OA\Tag(
|
* @OA\Tag(
|
||||||
* name="PandoraITSM",
|
* name="PandoraITSM",
|
||||||
* description="API Endpoints of integration pandoraITSM"
|
* description="API Endpoints of integration pandoraITSM"
|
||||||
* ),
|
* ),
|
||||||
@ -70,7 +70,7 @@ More useful links:
|
|||||||
* in="query",
|
* in="query",
|
||||||
* description="page",
|
* description="page",
|
||||||
* required=false,
|
* required=false,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* default=0
|
* default=0
|
||||||
* ),
|
* ),
|
||||||
@ -82,7 +82,7 @@ More useful links:
|
|||||||
* in="query",
|
* in="query",
|
||||||
* description="Size page",
|
* description="Size page",
|
||||||
* required=false,
|
* required=false,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* default=0
|
* default=0
|
||||||
* ),
|
* ),
|
||||||
@ -94,7 +94,7 @@ More useful links:
|
|||||||
* in="query",
|
* in="query",
|
||||||
* description="sort field",
|
* description="sort field",
|
||||||
* required=false,
|
* required=false,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="string",
|
* type="string",
|
||||||
* default=""
|
* default=""
|
||||||
* ),
|
* ),
|
||||||
@ -106,7 +106,7 @@ More useful links:
|
|||||||
* in="query",
|
* in="query",
|
||||||
* description="sort direction",
|
* description="sort direction",
|
||||||
* required=false,
|
* required=false,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="string",
|
* type="string",
|
||||||
* enum={
|
* enum={
|
||||||
* "ASC",
|
* "ASC",
|
||||||
@ -120,12 +120,12 @@ More useful links:
|
|||||||
* response="BadRequest",
|
* response="BadRequest",
|
||||||
* description="Bad request",
|
* description="Bad request",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Error",
|
* description="Error",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="error",
|
* property="error",
|
||||||
* type="string",
|
* type="string",
|
||||||
* default="Message error"
|
* default="Message error"
|
||||||
@ -139,12 +139,12 @@ More useful links:
|
|||||||
* response="Unauthorized",
|
* response="Unauthorized",
|
||||||
* description="Unauthorized",
|
* description="Unauthorized",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Error",
|
* description="Error",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="error",
|
* property="error",
|
||||||
* type="string",
|
* type="string",
|
||||||
* default="Message error"
|
* default="Message error"
|
||||||
@ -158,12 +158,12 @@ More useful links:
|
|||||||
* response="Forbidden",
|
* response="Forbidden",
|
||||||
* description="Forbidden",
|
* description="Forbidden",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Error",
|
* description="Error",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="error",
|
* property="error",
|
||||||
* type="string",
|
* type="string",
|
||||||
* default="Message error"
|
* default="Message error"
|
||||||
@ -177,12 +177,12 @@ More useful links:
|
|||||||
* response="NotFound",
|
* response="NotFound",
|
||||||
* description="Not found",
|
* description="Not found",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Error",
|
* description="Error",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="error",
|
* property="error",
|
||||||
* type="string",
|
* type="string",
|
||||||
* default="Message error"
|
* default="Message error"
|
||||||
@ -196,12 +196,12 @@ More useful links:
|
|||||||
* response="InternalServerError",
|
* response="InternalServerError",
|
||||||
* description="Internal server error",
|
* description="Internal server error",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Error",
|
* description="Error",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="error",
|
* property="error",
|
||||||
* type="string",
|
* type="string",
|
||||||
* default="Message error"
|
* default="Message error"
|
||||||
@ -215,10 +215,10 @@ More useful links:
|
|||||||
* response="successfullyDeleted",
|
* response="successfullyDeleted",
|
||||||
* description="Successfully deleted",
|
* description="Successfully deleted",
|
||||||
* content={
|
* content={
|
||||||
* @OA\MediaType(
|
* @OA\MediaType(
|
||||||
* mediaType="application/json",
|
* mediaType="application/json",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="result",
|
* property="result",
|
||||||
* type="string",
|
* type="string",
|
||||||
* default="Successfully deleted"
|
* default="Successfully deleted"
|
||||||
@ -227,76 +227,76 @@ More useful links:
|
|||||||
* )
|
* )
|
||||||
* }
|
* }
|
||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* schema="multipleSearch",
|
* schema="multipleSearch",
|
||||||
* type="object",
|
* type="object",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="field",
|
* property="field",
|
||||||
* type="string",
|
* type="string",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* description="Field to search of query"
|
* description="Field to search of query"
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="data",
|
* property="data",
|
||||||
* type="array",
|
* type="array",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* @OA\Items(type="integer"),
|
* @OA\Items(type="integer"),
|
||||||
* description="Values to search of query IN()"
|
* description="Values to search of query IN()"
|
||||||
* )
|
* )
|
||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* schema="multipleSearchString",
|
* schema="multipleSearchString",
|
||||||
* type="object",
|
* type="object",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="field",
|
* property="field",
|
||||||
* type="string",
|
* type="string",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* description="Field to search of query"
|
* description="Field to search of query"
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="data",
|
* property="data",
|
||||||
* type="array",
|
* type="array",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* @OA\Items(type="string"),
|
* @OA\Items(type="string"),
|
||||||
* description="Values to search of query IN()"
|
* description="Values to search of query IN()"
|
||||||
* )
|
* )
|
||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* schema="paginationData",
|
* schema="paginationData",
|
||||||
* type="object",
|
* type="object",
|
||||||
* description="Info pagination data",
|
* description="Info pagination data",
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="totalPages",
|
* property="totalPages",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* description="Number of pages",
|
* description="Number of pages",
|
||||||
* readOnly=true
|
* readOnly=true
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="sizePage",
|
* property="sizePage",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* description="Items per page",
|
* description="Items per page",
|
||||||
* readOnly=true
|
* readOnly=true
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="totalRegisters",
|
* property="totalRegisters",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* description="Number of items",
|
* description="Number of items",
|
||||||
* readOnly=true
|
* readOnly=true
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="totalRegistersPage",
|
* property="totalRegistersPage",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* description="Number of items this page",
|
* description="Number of items this page",
|
||||||
* readOnly=true
|
* readOnly=true
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
* property="currentPage",
|
* property="currentPage",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
|
@ -13,6 +13,8 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
|||||||
|
|
||||||
final class UserTokenMiddleware
|
final class UserTokenMiddleware
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ValidateServerIdentifierTokenService $validateServerIdentifierTokenService,
|
private readonly ValidateServerIdentifierTokenService $validateServerIdentifierTokenService,
|
||||||
private readonly ValidateUserTokenService $validateUserTokenService,
|
private readonly ValidateUserTokenService $validateUserTokenService,
|
||||||
@ -23,10 +25,11 @@ final class UserTokenMiddleware
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function check(Request $request): bool
|
public function check(Request $request): bool
|
||||||
{
|
{
|
||||||
$authorization = ($request->getHeader('Authorization')[0] ?? '');
|
$authorization = ($request->getHeader('Authorization')[0] ?? '');
|
||||||
|
|
||||||
$token = null;
|
$token = null;
|
||||||
try {
|
try {
|
||||||
$authorization = str_replace('Bearer ', '', $authorization);
|
$authorization = str_replace('Bearer ', '', $authorization);
|
||||||
@ -37,11 +40,12 @@ final class UserTokenMiddleware
|
|||||||
$authorization,
|
$authorization,
|
||||||
$matches
|
$matches
|
||||||
);
|
);
|
||||||
|
|
||||||
$uuid = ($matches[0] ?? '');
|
$uuid = ($matches[0] ?? '');
|
||||||
if (empty($uuid) === true) {
|
if (empty($uuid) === true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$strToken = str_replace($uuid.'-', '', $authorization);
|
$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);
|
||||||
@ -79,4 +83,6 @@ final class UserTokenMiddleware
|
|||||||
|
|
||||||
return $token !== null && $validToken;
|
return $token !== null && $validToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,8 @@ use PandoraFMS\Modules\Shared\Services\Config;
|
|||||||
|
|
||||||
class RepositoryMySQL extends Repository
|
class RepositoryMySQL extends Repository
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
protected function dbGetRow(
|
protected function dbGetRow(
|
||||||
string $field,
|
string $field,
|
||||||
string $table,
|
string $table,
|
||||||
@ -29,18 +31,20 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbGetValue(
|
protected function dbGetValue(
|
||||||
string $field,
|
string $field,
|
||||||
string $table,
|
string $table,
|
||||||
array $filters,
|
array $filters,
|
||||||
string $whereJoin = 'AND'
|
string $whereJoin='AND'
|
||||||
): mixed {
|
): mixed {
|
||||||
return \db_get_value_filter($field, $table, $filters, $whereJoin);
|
return \db_get_value_filter($field, $table, $filters, $whereJoin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbGetValueSql(
|
protected function dbGetValueSql(
|
||||||
string $sql,
|
string $sql,
|
||||||
?bool $cache = false
|
?bool $cache=false
|
||||||
): string {
|
): string {
|
||||||
ob_start();
|
ob_start();
|
||||||
$result = \db_get_value_sql($sql, $cache);
|
$result = \db_get_value_sql($sql, $cache);
|
||||||
@ -57,6 +61,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbGetRowSql(
|
protected function dbGetRowSql(
|
||||||
string $sql
|
string $sql
|
||||||
): array {
|
): array {
|
||||||
@ -75,9 +80,10 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbGetAllRowsSql(
|
protected function dbGetAllRowsSql(
|
||||||
string $sql,
|
string $sql,
|
||||||
?bool $cache = false
|
?bool $cache=false
|
||||||
): array {
|
): array {
|
||||||
ob_start();
|
ob_start();
|
||||||
$result = \db_get_all_rows_sql($sql, $cache);
|
$result = \db_get_all_rows_sql($sql, $cache);
|
||||||
@ -94,6 +100,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbInsert(string $table, array $values): mixed
|
protected function dbInsert(string $table, array $values): mixed
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
@ -110,6 +117,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbUpdate(string $table, array $values, array $condition): mixed
|
protected function dbUpdate(string $table, array $values, array $condition): mixed
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
@ -130,6 +138,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function dbDelete(string $table, array $where): mixed
|
protected function dbDelete(string $table, array $where): mixed
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
@ -147,7 +156,8 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function dbFormatWhereClauseSQL(array $values, $prefix = ''): string
|
|
||||||
|
protected function dbFormatWhereClauseSQL(array $values, $prefix=''): string
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
$values_prefix = [];
|
$values_prefix = [];
|
||||||
@ -165,7 +175,8 @@ class RepositoryMySQL extends Repository
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildQueryFilters(FilterAbstract $filter, ?DataMapperAbstract $mapper = null): string
|
|
||||||
|
public function buildQueryFilters(FilterAbstract $filter, ?DataMapperAbstract $mapper=null): string
|
||||||
{
|
{
|
||||||
$where_clause = '1=1';
|
$where_clause = '1=1';
|
||||||
|
|
||||||
@ -179,7 +190,7 @@ class RepositoryMySQL extends Repository
|
|||||||
$searchEntity = $filter->getEntityFilter()->toArray();
|
$searchEntity = $filter->getEntityFilter()->toArray();
|
||||||
$translates = $filter->fieldsTranslate();
|
$translates = $filter->fieldsTranslate();
|
||||||
$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) {
|
||||||
$resultEntity = [];
|
$resultEntity = [];
|
||||||
foreach ($searchEntity as $key => $value) {
|
foreach ($searchEntity as $key => $value) {
|
||||||
if (isset($translates[$key]) === true) {
|
if (isset($translates[$key]) === true) {
|
||||||
@ -217,6 +228,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $where_clause;
|
return $where_clause;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function freeSearch(array $fields, string $value): string
|
private function freeSearch(array $fields, string $value): string
|
||||||
{
|
{
|
||||||
$clause = ' AND (';
|
$clause = ' AND (';
|
||||||
@ -234,12 +246,14 @@ class RepositoryMySQL extends Repository
|
|||||||
return $clause;
|
return $clause;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function multipleSearch(FilterAbstract $filter): string
|
private function multipleSearch(FilterAbstract $filter): string
|
||||||
{
|
{
|
||||||
$fields = $filter->fieldsTranslate();
|
$fields = $filter->fieldsTranslate();
|
||||||
$field = '';
|
$field = '';
|
||||||
if (empty($fields) === false
|
if (empty($fields) === false
|
||||||
&& isset($fields[($filter->getMultipleSearch()['field'])]) === true) {
|
&& isset($fields[($filter->getMultipleSearch()['field'])]) === true
|
||||||
|
) {
|
||||||
$field = ($fields[($filter->getMultipleSearch()['field'] ?? '')] ?? '');
|
$field = ($fields[($filter->getMultipleSearch()['field'] ?? '')] ?? '');
|
||||||
} else {
|
} else {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
@ -256,16 +270,18 @@ class RepositoryMySQL extends Repository
|
|||||||
|
|
||||||
$clause = ' AND ('.$field.' IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
|
$clause = ' AND ('.$field.' IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
|
||||||
|
|
||||||
if(isset($filter->getMultipleSearch()['secondaryGroup']) === true
|
if (isset($filter->getMultipleSearch()['secondaryGroup']) === true
|
||||||
&& $filter->getMultipleSearch()['secondaryGroup'] === true
|
&& $filter->getMultipleSearch()['secondaryGroup'] === true
|
||||||
) {
|
) {
|
||||||
$clause .= ' OR tagent_secondary_group.id_group IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
|
$clause .= ' OR tagent_secondary_group.id_group IN ('.implode(',', $filter->getMultipleSearch()['data']).')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$clause .= ')';
|
$clause .= ')';
|
||||||
|
|
||||||
return $clause;
|
return $clause;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function multipleSearchString(FilterAbstract $filter): string
|
private function multipleSearchString(FilterAbstract $filter): string
|
||||||
{
|
{
|
||||||
$fields = $filter->fieldsTranslate();
|
$fields = $filter->fieldsTranslate();
|
||||||
@ -291,6 +307,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $clause;
|
return $clause;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function buildQueryPagination(FilterAbstract $filter): string
|
public function buildQueryPagination(FilterAbstract $filter): string
|
||||||
{
|
{
|
||||||
$filter->setLimit($filter->getSizePage());
|
$filter->setLimit($filter->getSizePage());
|
||||||
@ -308,6 +325,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $sqlLimit;
|
return $sqlLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function buildQueryOrderBy(FilterAbstract $filter): string
|
public function buildQueryOrderBy(FilterAbstract $filter): string
|
||||||
{
|
{
|
||||||
$default = '';
|
$default = '';
|
||||||
@ -338,6 +356,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function buildQueryGroupBy(FilterAbstract $filter): string
|
public function buildQueryGroupBy(FilterAbstract $filter): string
|
||||||
{
|
{
|
||||||
$groupBy = '';
|
$groupBy = '';
|
||||||
@ -360,6 +379,7 @@ class RepositoryMySQL extends Repository
|
|||||||
return $groupBy;
|
return $groupBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function checkDirectionOrderByMsql(?string $direction): string
|
private function checkDirectionOrderByMsql(?string $direction): string
|
||||||
{
|
{
|
||||||
$directionArray = [
|
$directionArray = [
|
||||||
@ -370,7 +390,8 @@ class RepositoryMySQL extends Repository
|
|||||||
return (isset($directionArray[$direction]) === true) ? $directionArray[$direction] : 'ASC';
|
return (isset($directionArray[$direction]) === true) ? $directionArray[$direction] : 'ASC';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkAclGroupMysql(string $field, ?string $mode = ''): string
|
|
||||||
|
public function checkAclGroupMysql(string $field, ?string $mode=''): string
|
||||||
{
|
{
|
||||||
$config = new Config();
|
$config = new Config();
|
||||||
$isAdmin = \users_is_admin($config->get('id_user'));
|
$isAdmin = \users_is_admin($config->get('id_user'));
|
||||||
@ -418,10 +439,11 @@ class RepositoryMySQL extends Repository
|
|||||||
return $filter;
|
return $filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function buildQuery(
|
public function buildQuery(
|
||||||
FilterAbstract $filter,
|
FilterAbstract $filter,
|
||||||
DataMapperAbstract $mapper,
|
DataMapperAbstract $mapper,
|
||||||
bool $count = false
|
bool $count=false
|
||||||
): string {
|
): string {
|
||||||
$filters = $this->buildQueryFilters($filter, $mapper);
|
$filters = $this->buildQueryFilters($filter, $mapper);
|
||||||
if (empty($mapper->getSearchFieldRelated()) === false) {
|
if (empty($mapper->getSearchFieldRelated()) === false) {
|
||||||
@ -489,18 +511,23 @@ class RepositoryMySQL extends Repository
|
|||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function maxFieldSql(string $field): string
|
public function maxFieldSql(string $field): string
|
||||||
{
|
{
|
||||||
return 'MAX('.$field.')';
|
return 'MAX('.$field.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function safeInput(?string $value): ?string
|
public function safeInput(?string $value): ?string
|
||||||
{
|
{
|
||||||
return \io_safe_input($value);
|
return \io_safe_input($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function safeOutput(?string $value): ?string
|
public function safeOutput(?string $value): ?string
|
||||||
{
|
{
|
||||||
return \io_safe_output($value);
|
return \io_safe_output($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,12 @@ use PandoraFMS\Modules\Users\Validators\UserValidator;
|
|||||||
*/
|
*/
|
||||||
final class UserFilter extends FilterAbstract
|
final class UserFilter extends FilterAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
private ?string $freeSearch = null;
|
private ?string $freeSearch = null;
|
||||||
|
|
||||||
private ?array $multipleSearchString = null;
|
private ?array $multipleSearchString = null;
|
||||||
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->setDefaultFieldOrder(UserDataMapper::ID_USER);
|
$this->setDefaultFieldOrder(UserDataMapper::ID_USER);
|
||||||
@ -52,6 +55,7 @@ final class UserFilter extends FilterAbstract
|
|||||||
$this->setEntityFilter(new User());
|
$this->setEntityFilter(new User());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function fieldsTranslate(): array
|
public function fieldsTranslate(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -60,11 +64,13 @@ final class UserFilter extends FilterAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function fieldsReadOnly(): array
|
public function fieldsReadOnly(): array
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function jsonSerialize(): mixed
|
public function jsonSerialize(): mixed
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -72,6 +78,7 @@ final class UserFilter extends FilterAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getValidations(): array
|
public function getValidations(): array
|
||||||
{
|
{
|
||||||
$validations = [];
|
$validations = [];
|
||||||
@ -83,11 +90,13 @@ final class UserFilter extends FilterAbstract
|
|||||||
return $validations;
|
return $validations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function validateFields(array $filters): array
|
public function validateFields(array $filters): array
|
||||||
{
|
{
|
||||||
return (new UserValidator())->validate($filters);
|
return (new UserValidator())->validate($filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of freeSearch.
|
* Get the value of freeSearch.
|
||||||
*
|
*
|
||||||
@ -98,10 +107,11 @@ final class UserFilter extends FilterAbstract
|
|||||||
return $this->freeSearch;
|
return $this->freeSearch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of freeSearch.
|
* Set the value of freeSearch.
|
||||||
*
|
*
|
||||||
* @param ?string $freeSearch
|
* @param string $freeSearch
|
||||||
*/
|
*/
|
||||||
public function setFreeSearch(?string $freeSearch): self
|
public function setFreeSearch(?string $freeSearch): self
|
||||||
{
|
{
|
||||||
@ -109,6 +119,7 @@ final class UserFilter extends FilterAbstract
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of fieldsFreeSearch.
|
* Get the value of fieldsFreeSearch.
|
||||||
*
|
*
|
||||||
@ -122,6 +133,7 @@ final class UserFilter extends FilterAbstract
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of multipleSearchString.
|
* Get the value of multipleSearchString.
|
||||||
*
|
*
|
||||||
@ -132,14 +144,17 @@ final class UserFilter extends FilterAbstract
|
|||||||
return $this->multipleSearchString;
|
return $this->multipleSearchString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of multipleSearchString.
|
* Set the value of multipleSearchString.
|
||||||
*
|
*
|
||||||
* @param ?array $multipleSearchString
|
* @param array $multipleSearchString
|
||||||
*/
|
*/
|
||||||
public function setMultipleSearchString(?array $multipleSearchString): self
|
public function setMultipleSearchString(?array $multipleSearchString): self
|
||||||
{
|
{
|
||||||
$this->multipleSearchString = $multipleSearchString;
|
$this->multipleSearchString = $multipleSearchString;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13896,3 +13896,8 @@ button.disabled {
|
|||||||
.text-nowrap {
|
.text-nowrap {
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wizard_table span#image_prev img {
|
||||||
|
height: 48px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user