Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 0 additions & 339 deletions LICENSE

This file was deleted.

674 changes: 674 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

## License

Icinga Web 2 and this Icinga Web 2 module are licensed under the terms of the GNU General Public License Version 2,
you will find a copy of this license in the LICENSE file included in the source package.
Icinga Web 2 and this Icinga Web 2 module are licensed under the terms of the GNU General Public License Version 3,
you will find a copy of this license in the LICENSE.md file included in the source package.

## Support

Expand Down
3 changes: 2 additions & 1 deletion application/controllers/ConfigController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

namespace Icinga\Module\Audit\Controllers;

Expand All @@ -11,12 +12,12 @@

class ConfigController extends CompatController
{
public function init()

Check failure on line 15 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Method Icinga\Module\Audit\Controllers\ConfigController::init() has no return type specified.

Check failure on line 15 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Method Icinga\Module\Audit\Controllers\ConfigController::init() has no return type specified.

Check failure on line 15 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Method Icinga\Module\Audit\Controllers\ConfigController::init() has no return type specified.

Check failure on line 15 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Method Icinga\Module\Audit\Controllers\ConfigController::init() has no return type specified.
{
$this->assertPermission('config/modules');

foreach ($this->Module()->getConfigTabs()->getTabs() as $tab) {
$this->tabs->add($tab->getName(), $tab);

Check failure on line 20 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Parameter #1 $name of method ipl\Web\Widget\Tabs::add() expects string, string|null given.

Check failure on line 20 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Parameter #1 $name of method ipl\Web\Widget\Tabs::add() expects string, string|null given.

Check failure on line 20 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Parameter #1 $name of method ipl\Web\Widget\Tabs::add() expects string, string|null given.

Check failure on line 20 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Parameter #1 $name of method ipl\Web\Widget\Tabs::add() expects string, string|null given.
}
}

Expand All @@ -25,11 +26,11 @@
$this->getTabs()->activate('config');

$form = new AuditLogConfigForm();
$form->setIniConfig($this->Config());

Check failure on line 29 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Parameter #1 $config of method Icinga\Forms\ConfigForm::setIniConfig() expects Icinga\Application\Config, mixed given.

Check failure on line 29 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Parameter #1 $config of method Icinga\Forms\ConfigForm::setIniConfig() expects Icinga\Application\Config, mixed given.

Check failure on line 29 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Parameter #1 $config of method Icinga\Forms\ConfigForm::setIniConfig() expects Icinga\Application\Config, mixed given.

Check failure on line 29 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Parameter #1 $config of method Icinga\Forms\ConfigForm::setIniConfig() expects Icinga\Application\Config, mixed given.
$form->setSubmitLabel($this->translate('Save Configuration'));

$form->handleRequest();

$this->addContent(new HtmlString((string) $form));

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Parameter #1 $content of class ipl\Html\HtmlString constructor expects string, mixed given.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Cannot cast Icinga\Module\Audit\Forms\Config\AuditLogConfigForm to string.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Parameter #1 $content of class ipl\Html\HtmlString constructor expects string, mixed given.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Cannot cast Icinga\Module\Audit\Forms\Config\AuditLogConfigForm to string.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Parameter #1 $content of class ipl\Html\HtmlString constructor expects string, mixed given.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Cannot cast Icinga\Module\Audit\Forms\Config\AuditLogConfigForm to string.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Parameter #1 $content of class ipl\Html\HtmlString constructor expects string, mixed given.

Check failure on line 34 in application/controllers/ConfigController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Cannot cast Icinga\Module\Audit\Forms\Config\AuditLogConfigForm to string.
}
}
3 changes: 2 additions & 1 deletion application/controllers/LogController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

namespace Icinga\Module\Audit\Controllers;

Expand All @@ -20,15 +21,15 @@
{
$this->assertPermission('audit/log');

if ($this->Config()->get('log', 'type') !== 'file') {

Check failure on line 24 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Cannot call method get() on mixed.

Check failure on line 24 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Cannot call method get() on mixed.

Check failure on line 24 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Cannot call method get() on mixed.

Check failure on line 24 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Cannot call method get() on mixed.
$this->httpNotFound('Page not found');
}

$this->addTitleTab($this->translate('Audit Log'));

$file = $this->Config()->get('log', 'path', '/var/log/icingaweb2/audit.log');

Check failure on line 30 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Cannot call method get() on mixed.

Check failure on line 30 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Cannot call method get() on mixed.

Check failure on line 30 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Cannot call method get() on mixed.

Check failure on line 30 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Cannot call method get() on mixed.

if (! @file_exists($file)) {

Check failure on line 32 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Parameter #1 $filename of function file_exists expects string, mixed given.

Check failure on line 32 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Parameter #1 $filename of function file_exists expects string, mixed given.

Check failure on line 32 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Parameter #1 $filename of function file_exists expects string, mixed given.

Check failure on line 32 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Parameter #1 $filename of function file_exists expects string, mixed given.
$this->addContent(new EmptyStateBar($this->translate('No activity has been recorded yet.')));

return;
Expand All @@ -48,13 +49,13 @@
$query = $resource->select()->order('DESC');

$this->setupPaginationControl($query);
$this->addControl(HtmlString::create((string) $this->view->paginator));

Check failure on line 52 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Cannot cast mixed to string.

Check failure on line 52 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Cannot cast mixed to string.

Check failure on line 52 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Cannot cast mixed to string.

Check failure on line 52 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Cannot cast mixed to string.

$this->setupLimitControl();
$this->addControl(Html::tag(
'div',
['class' => 'sort-controls-container'],
HtmlString::create((string) $this->view->limiter)

Check failure on line 58 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.3) / PHPStan 8.3

Cannot cast mixed to string.

Check failure on line 58 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.2) / PHPStan 8.2

Cannot cast mixed to string.

Check failure on line 58 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.4) / PHPStan 8.4

Cannot cast mixed to string.

Check failure on line 58 in application/controllers/LogController.php

View workflow job for this annotation

GitHub Actions / PHP / Static analysis (8.5) / PHPStan 8.5

Cannot cast mixed to string.
));

$table = new Table();
Expand Down
3 changes: 2 additions & 1 deletion application/forms/Config/AuditLogConfigForm.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

namespace Icinga\Module\Audit\Forms\Config;

Expand Down
3 changes: 2 additions & 1 deletion configuration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

/** @var $this \Icinga\Application\Modules\Module */

Expand Down
3 changes: 2 additions & 1 deletion library/Audit/ProvidedHook/AuditLog.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

namespace Icinga\Module\Audit\ProvidedHook;

Expand Down
3 changes: 2 additions & 1 deletion library/Audit/ProvidedHook/AuditStream.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

namespace Icinga\Module\Audit\ProvidedHook;

Expand Down
3 changes: 2 additions & 1 deletion run.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
// SPDX-License-Identifier: GPL-3.0-or-later

/** @var $this \Icinga\Application\Modules\Module */

Expand Down