Commit 7b54da4a authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent 0d3fe404
# Changelog
## 1.1.1 February 4, 2018
* Enh [#225](https://github.com/bedezign/yii2-audit/issues/225): German translation
* Enh [#236](https://github.com/bedezign/yii2-audit/pull/236): Chinese translation
* Bug [#221](https://github.com/bedezign/yii2-audit/issues/221): Verify component existence in the console, terminate execution with more flair if not.
## 1.1.0 January 20, 2018
* Enh [#231](https://github.com/bedezign/yii2-audit/issues/231): This release is identical to 1.0.13 except that **it requires Yii 2.0.13** to make it compatible with PHP 7.2. It will still work on older PHP versions.
## 1.0.13 January 20, 2018
* Bug [#216](https://github.com/bedezign/yii2-audit/issues/216): Migration failed for MSSQL on alter_audit_mail
* Enh [#219](https://github.com/bedezign/yii2-audit/pull/219): Refactored chart panels
* Enh: Use `HTTP_X_FORWARDED_FOR` as IP when it is set
* Enh [#217](https://github.com/bedezign/yii2-audit/pull/217), [#218](https://github.com/bedezign/yii2-audit/pull/218): Optimized database queries for panels
* Enh: Made `php-mime-mail-parser` optional (mail panel will now work without, with less functionality). This means you don't need the `mailparse` extension anymore to install Audit.
* Bug [#233](https://github.com/bedezign/yii2-audit/issues/233): Made DbPanel work with versions that have the [duplicate queries count](https://github.com/yiisoft/yii2-debug/pull/293)
* A new version will be released shortly (1.1.0) that will be PHP >= 7.2 and Yii >= 2.0.13. As of PHP 7.2 `object` is reserved as a type hint keyword and thus the Yii `Object` class was renamed to `BaseObject`. For PHP < 7.2 a workaround was added that still provides an `Object` class. This means that Audit v1.0 will work for Yii >= 2.0.13, as long as you do not use PHP >= 7.2
## 1.0.12 August 27, 2017
* Enh [#188](https://github.com/bedezign/yii2-audit/issues/188): Ignore attributes when they contain arrays
* Enh [#191](https://github.com/bedezign/yii2-audit/issues/191): add an option to disable most common timestamp fields
* Bug [#204](https://github.com/bedezign/yii2-audit/pull/204): Fixed typo in Turkisch translations
* Enh: Now using PhpMimeMailParser to display the email HTML
* Enh: Improved IP detection for users behind a proxy
* Enh [#214](https://github.com/bedezign/yii2-audit/issues/191): Reduced amount of queries to display the main screen
## 1.0.11 April 15, 2017
* Bug: use correct database when running migrations if the database component is not "db"
* Bug: check if the module has been installed (prevents errors prior to migration while installing)
## 1.0.10 March 26, 2017
* Bug [#201](https://github.com/bedezign/yii2-audit/issues/201): Fix migration on pgsql
## 1.0.9 March 25, 2017
* Enh [#200](https://github.com/bedezign/yii2-audit/issues/200): fix ID column name duplicating
* Bug [#199](https://github.com/bedezign/yii2-audit/issues/199): Fix user id filtering
* Enh [#195](https://github.com/bedezign/yii2-audit/issues/195): cleanup solo AuditEntry records
* Enh [#194](https://github.com/bedezign/yii2-audit/issues/194): add ignoreKeys to RequestPanel to lower data usage
* Enh [#193](https://github.com/bedezign/yii2-audit/issues/193): charts in panels shows "undefined"
* Enh [#189](https://github.com/bedezign/yii2-audit/issues/189): enhance MailPanel
* Bug [#187](https://github.com/bedezign/yii2-audit/issues/187): audit_mail table data too long
* Enh [#185](https://github.com/bedezign/yii2-audit/issues/185): log config
* Enh [#182](https://github.com/bedezign/yii2-audit/issues/182): Added ability to save overrided field with another name
* Bug [#184](https://github.com/bedezign/yii2-audit/issues/184): Use full url for js log action
* Bug [#180](https://github.com/bedezign/yii2-audit/issues/180): Fix dbPanel errors
* Enh [#174](https://github.com/bedezign/yii2-audit/issues/174): Ability to use custom user id instead Yii::$app->user->id
## 1.0.8 November 11, 2016
* Bug [#172](https://github.com/bedezign/yii2-audit/issues/172): Declaration of getUrl() compatible with yii\debug\Panel::getUrl()
* Enh [#171](https://github.com/bedezign/yii2-audit/issues/171): Override to save related record label instead of id in AuditTrail
* Bug [#168](https://github.com/bedezign/yii2-audit/issues/168): On certain errors the ProfilePanel data is not saved
* Enh [#167](https://github.com/bedezign/yii2-audit/issues/167): Get parent model for audit trail
## 1.0.7 July 27, 2016
* Bug [#162](https://github.com/bedezign/yii2-audit/issues/162): fix charts
* Bug [#160](https://github.com/bedezign/yii2-audit/issues/160): error when config is setup but tables are not present
* Bug [#145](https://github.com/bedezign/yii2-audit/issues/145): Bootstrap Array to String conversion fix
* Bug [#153](https://github.com/bedezign/yii2-audit/issues/153): save user_id on finalize function
## 1.0.6 March 21, 2016
* Bug [#141](https://github.com/bedezign/yii2-audit/issues/141): PHP7: ErrorPanel should support Throwable
* Enh [#140](https://github.com/bedezign/yii2-audit/issues/140): `AuditTrailSearch.field` should allow `array`
* Enh [#138](https://github.com/bedezign/yii2-audit/issues/138): Allow `*` as prefix in route matching
* Bug: LogPanels without messages should still work
## 1.0.5 October 28, 2015
* Enh: Added `generateTrace()`-function to the `Helper` for external usage
* Enh: ErrorPanel now avoids duplicate exception logging
* Enh: Javascript logging sets the type to 'unknown' if none was specified
* Couple minor things fixed (tablenames and comments, thanks Evgeniy and Tobias)
## 1.0.4 August 11, 2015
* Enh [#114](https://github.com/bedezign/yii2-audit/issues/114): Cleanup command should show counts
* Bug [#115](https://github.com/bedezign/yii2-audit/issues/115): heroku trail page not working
* Bug [#116](https://github.com/bedezign/yii2-audit/issues/116): js log/info not working
* Enh [#118](https://github.com/bedezign/yii2-audit/issues/118): cleanup should use options instead of params
* Bug [#122](https://github.com/bedezign/yii2-audit/issues/122): Migration tool throws SQL error in MySQL database with UTF8
* POST data recognition improved
* SOAP Panel now logs all exceptions during Soap Calls, not just `SoapFault`s
## 1.0.3 July 29, 2015
* Bug [#113](https://github.com/bedezign/yii2-audit/issues/113): getting 404 on audit/js-log
* Enh [#112](https://github.com/bedezign/yii2-audit/issues/112): generic cleanup() method in PanelTrait
* Enh [#103](https://github.com/bedezign/yii2-audit/issues/103): Use error hash to determine different messages and files for error filter
* Bug [#99](https://github.com/bedezign/yii2-audit/issues/99): IE8 support for the javascript logger
* Enh [#64](https://github.com/bedezign/yii2-audit/issues/64): Support for SOAP
* Bug [#116](https://github.com/bedezign/yii2-audit/issues/116): js log/info not working
* Enh [#114](https://github.com/bedezign/yii2-audit/issues/114): Cleanup should show counts
* Enh [#110](https://github.com/bedezign/yii2-audit/issues/110): All model saving data methods should be in the panels
* Enh [#118](https://github.com/bedezign/yii2-audit/issues/118): Cleanup should use options instead of parameters
* Enh [#119](https://github.com/bedezign/yii2-audit/issues/119): Heroku should showcase all panels
## 1.0.2 July 14, 2015
* Enh [#61](https://github.com/bedezign/yii2-audit/issues/61): give each panel its own cleanup method
* Enh [#89](https://github.com/bedezign/yii2-audit/issues/89): only show graphs and menu items for active panels
* Enh [#108](https://github.com/bedezign/yii2-audit/issues/108): show IP address in entry grid
* Bug [#107](https://github.com/bedezign/yii2-audit/issues/107): fix logging text or html on non-multipart messages
* helper will always try to uncompress data
* fixes for jslogging that were caused when pdo binary support was added
* fix ordering in Version helper
## 1.0.1 July 12, 2015
* Moved documentation to gh-pages branch
* PostgreSQL compatibility
* Added [heroku](https://limitless-inlet-7926.herokuapp.com/index.php?r=audit) demonstration page
* Enh [#100](https://github.com/bedezign/yii2-audit/issues/100): cURL Panel now detects content types for POST and result. Supported: XML, JSON, query string
## 1.0.0 July 9, 2015
* ability to undelete and roll back to any version of a model
* added controllers and views for entry, trail, javascript and errors
* added graphs to main page
* created views that can be included in your application
* audit_entry is created on demand for trails, javascript and errors
* user callback to display custom output instead of user_id
* extendable panel based logging
* added extensive documentation
* improved access control and added IP based access
* no longer storing url data in entry table
* created fresh migration scripts
* added functionality to email errors via cron script
* added unit test suite
* huge code overhaul
## 0.1.0
* initial release
# Contributing
Contributions are **welcome** and will be fully **credited**.
We accept contributions via Pull Requests on [Github](https://github.com/bedezign/yii2-audit).
## Pull Requests
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
- **Create feature branches** - Don't ask us to pull from your master branch.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
## Running Tests
``` bash
$ cd tests
$ codecept run
```
**Happy coding**!
# Credits
## Developers
* [Steve Guns (Blizzke)](https://github.com/Blizzke)
* [Brett O'Donnell (cornernote)](https://github.com/cornernote)
* [Marc Hollander (MGHollander)](https://github.com/MGHollander)
## Contributors
* [Tobias Munk (schmunk42)](https://github.com/schmunk42)
## Media and Assets
* Icon made by [Freepik](http://www.freepik.com/) from [flaticon](http://www.flaticon.com/free-icon/search-analytics_83477) (CC BY 3.0)
## Related Projects
* [Sammaye Yii2 Audit Trail](https://github.com/Sammaye/yii2-audittrail)
* [cornernote Yii1 Audit Module](https://github.com/cornernote/yii-audit-module)
* [yii2-debug Module](https://github.com/yiisoft/yii2-debug)
* [2amigos ChartJS Widget](https://github.com/2amigos/yii2-chartjs-widget)
* [PHPSpec Diff](https://github.com/phpspec/php-diff)
* [yii2-swiftmailer](https://github.com/yiisoft/yii2-swiftmailer)
# The BSD License (BSD)
Copyright (c) 2013-2015, B&E DeZign <info@bedezign.com>
> Redistribution and use in source and binary forms, with or without modification,
> are permitted provided that the following conditions are met:
>
> Redistributions of source code must retain the above copyright notice, this
> list of conditions and the following disclaimer.
>
> Redistributions in binary form must reproduce the above copyright notice, this
> list of conditions and the following disclaimer in the documentation and/or
> other materials provided with the distribution.
>
> Neither the name of B&E DeZign. nor the names of its
> contributors may be used to endorse or promote products derived from
> this software without specific prior written permission.
>
>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
>ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
>WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
>ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
>(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
>LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
>ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
>SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
# Yii2 Audit
[![Join Chat](https://img.shields.io/badge/gitter-join%20chat-blue.svg?style=flat-square)](https://gitter.im/bedezign/yii2-audit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Latest Version](https://img.shields.io/github/tag/bedezign/yii2-audit.svg?style=flat-square&label=release)](https://github.com/bedezign/yii2-audit/tags)
[![Software License](https://img.shields.io/badge/license-BSD-brightgreen.svg?style=flat-square)](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md)
[![Build Status](https://img.shields.io/travis/bedezign/yii2-audit/master.svg?style=flat-square)](https://travis-ci.org/bedezign/yii2-audit)
[![HHVM](https://img.shields.io/hhvm/bedezign/yii2-audit.svg?style=flat-square)](http://hhvm.h4cc.de/package/bedezign/yii2-audit)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/bedezign/yii2-audit.svg?style=flat-square)](https://scrutinizer-ci.com/g/bedezign/yii2-audit/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/bedezign/yii2-audit.svg?style=flat-square)](https://scrutinizer-ci.com/g/bedezign/yii2-audit)
[![Total Downloads](https://img.shields.io/packagist/dt/bedezign/yii2-audit.svg?style=flat-square)](https://packagist.org/packages/bedezign/yii2-audit)
[![Yii2 Framework](https://img.shields.io/badge/extension-Yii2_Framework-green.svg?style=flat-square)](http://www.yiiframework.com/extension/yii2-audit)
Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
## PHP7.2 & Yii 2.0.13 or later
From `PHP 7.2` on `Object` became a reserved keyword. The people from Yii changed their `Object`-implementation, calling it `BaseObject`, with a fallback `Object` class for PHP < 7.2.
We opted - to not force everyone to `Yii 2.0.13` right away - to split our releases in 2 branches.
Version `1.0.*` is currently a maintenance version. We'll keep adding bugfixes and things like translations for a while, probably until `2.0.13` is a bit more common. You can use it as long as you aren't on `PHP 7.2`.
For all other cases, please use version `1.1.*`.
## Features
### Powerful, yet Simple
* Installs as a simple module so it can be added without any hassle.
* You can either track specific actions and nothing else or exclude specific routes from logging (wildcard supported).
* View your data. The module contains a nice viewer that is automatically made available when you add it to your configuration. It has configurable permissions to limit access to this functionality by IPs, roles or users.
### Minimal Footprint
Tracks minimal data in the base entry:
* `user_id` - User ID of the visitor (if any), based on `Yii::$app->user->id`.
* `ip` - IP Address of the visitor.
* `request_method` - The method used to generate the request, eg: `CLI` for console requests and `GET`, `POST`, `DELETE`, `PUT`, `PATCH`, `OPTIONS` or `HEAD` for web requests.
* `ajax` - If the page was requested using ajax.
* `route` - The controller and action of the request.
* `duration` - How long the request took to serve.
* `memory_max` - The peak memory usage during the request.
* `created` - The datetime the entry was created.
### Log Data using Configurable Panels
Each panel is optional, and you can even create your own.
* `RequestPanel` - Tracks all incoming web and console request data:
* URL Information including the route and params.
* PHP SuperGlobals `$_GET`, `$_POST`, `$_SERVER`, `$_FILES` and `$_COOKIES`.
* Headers from the Request and Response.
* `AssetPanel` - Asset Bundles loaded for the request.
* `ConfigPanel` - Yii and PHP configuration that was used for the request.
* `DbPanel` - SQL queries.
* `ErrorPanel` - Record all PHP exceptions and errors in the background. Once logged you can configure a cron task to email the errors to a developer so issues can be fixed before they are even reported by a user. [more info](https://bedezign.github.io/yii2-audit/docs/error-panel/)
* `JavascriptPanel` - Automatically log JavaScript errors. Errors and warning are logged automatically by including `JSLoggingAsset` asset bundle. The javascript component also provides methods to manually add logging entries. [more info](https://bedezign.github.io/yii2-audit/docs/javascript-panel/)
* `LogPanel` - Yii logs.
* `MailPanel` - Emails that were sent during the request. [more info](https://bedezign.github.io/yii2-audit/docs/mail-panel/)
* `ProfilingPanel` - Application profiling information.
* `TrailPanel` - Database changes that were made during the request using the `AuditTrailBehavior`. [more info](https://bedezign.github.io/yii2-audit/docs/trail-panel/)
* `ExtraDataPanel` - Extra data that you want to store. [more info](https://bedezign.github.io/yii2-audit/docs/extra-data-panel/)
* `CurlPanel` - Track your applications cURL requests (including replies, log and headers) [more info](https://bedezign.github.io/yii2-audit/docs/curl-panel/)
* `YourOwnPanel` - Create your own panel to capture any data you want. [more info](https://bedezign.github.io/yii2-audit/docs/custom-views-panel/)
## Documentation
Getting started? Try the [Installation Guide](https://bedezign.github.io/yii2-audit/docs/installation/). You will find further information in the [Documentation](https://bedezign.github.io/yii2-audit/docs/).
For changes since the last version see the [Changelog](https://github.com/bedezign/yii2-audit/blob/master/CHANGELOG.md).
## Screenshots
### Dashboard
![Dashboard](https://cloud.githubusercontent.com/assets/51875/8369827/b70355ee-1bfe-11e5-9748-dd864f0500de.png)
### Entry View
![Audit Entry View](https://cloud.githubusercontent.com/assets/51875/8395061/3b004aca-1d97-11e5-8b71-6787c662ea3e.png)
### More Screenshots
More images are available from the [Screenshots](https://bedezign.github.io/yii2-audit/screenshots/) page.
## Contributing
Contributions are welcome. Please refer to the [contributing guidelines](https://github.com/bedezign/yii2-audit/blob/master/CONTRIBUTING.md).
Thanks to [everyone who has contributed](https://github.com/bedezign/yii2-audit/blob/master/CREDITS.md).
## Project Resources
* [Project Homepage](https://bedezign.github.io/yii2-audit/)
* [Live Demo](https://yii2-audit.herokuapp.com/)
* [GitHub Project](https://github.com/bedezign/yii2-audit)
* [Yii2 Extension](http://www.yiiframework.com/extension/yii2-audit)
* [Packagist Package](https://packagist.org/packages/bedezign/yii2-audit)
* [Travis CI Testing](https://travis-ci.org/bedezign/yii2-audit)
* [Scrutinizer CI Code Quality](https://scrutinizer-ci.com/g/bedezign/yii2-audit)
## License
BSD-3 - Please refer to the [license](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md).
![Analytics](https://ga-beacon.appspot.com/UA-65104334-3/yii2-audit/README.md?pixel)
\ No newline at end of file
{
"name": "arter/amos-audit",
"name": "elitedivision/amos-audit",
"description": "This is a FORK of Continuous integration version for Yii2 Audit that includes all dependencies",
"keywords": [
"yii2",
......@@ -52,10 +52,10 @@
},
"autoload": {
"psr-4": {
"arter\\amos\\audit\\": "src"
"elitedivision\\amos\\audit\\": "src"
}
},
"extra": {
"bootstrap": "arter\\amos\\audit\\Bootstrap"
"bootstrap": "elitedivision\\amos\\audit\\Bootstrap"
}
}
{
"name": "arter/amos-audit",
"name": "elitedivision/amos-audit",
"description": "This is a FORK of Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.",
"keywords": [
"yii2",
......@@ -39,10 +39,10 @@
},
"autoload": {
"psr-4": {
"arter\\amos\\audit\\": "src"
"elitedivision\\amos\\audit\\": "src"
}
},
"extra": {
"bootstrap": "arter\\amos\\audit\\Bootstrap"
"bootstrap": "elitedivision\\amos\\audit\\Bootstrap"
}
}
# Heroku
## Git
Add remote:
```
git remote add heroku https://git.heroku.com/yii2-audit.git
```
Push changes:
```
git push heroku master
```
## Migrate
```
heroku run php /app/tests/codeception/_app/yii migrate/up --interactive=0
heroku run php /app/tests/codeception/_app/yii migrate/up --migrationPath=/app/src/migrations --interactive=0
```
## Helpful Commands
Interactive shell:
```
heroku run bash
```
Watch logs:
```
heroku logs --tail
```
Set and unset config var:
```
heroku config:set SOME_CONFIG=foobar
heroku config:unset SOME_CONFIG
```
Get config vars:
```
heroku config
```
Database console:
```
apt-get install postgresql-client
heroku pg:psql
```
Reset database:
```
heroku pg:reset DATABASE
```
## Useful Links
- https://devcenter.heroku.com/articles/getting-started-with-php
\ No newline at end of file
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
/**
* This IS A FORK of bedezign yii2 audit to customize it for arter requests
* This IS A FORK of bedezign yii2 audit to customize it for elitedivision requests
*
* This serves as both the Module for the MVC part of the audit and the configuration/entry point for the actual
* audit process.
......@@ -24,10 +10,10 @@
* @copyright 2014-2015 B&E DeZign
*/
namespace arter\amos\audit;
namespace elitedivision\amos\audit;
use arter\amos\audit\components\panels\Panel;
use arter\amos\audit\models\AuditEntry;
use elitedivision\amos\audit\components\panels\Panel;
use elitedivision\amos\audit\models\AuditEntry;
use Yii;
use yii\base\ActionEvent;
......@@ -44,23 +30,23 @@ use yii\helpers\ArrayHelper;
* To configure it you need to do 2 things:
* - add a module configuration entry:
* 'modules' => [
* 'audit' => 'arter\amos\audit\Audit',
* 'audit' => 'elitedivision\amos\audit\Audit',
* ]
* or optionally with configuration:
* 'modules' => [
* 'audit' => [
* 'class' => 'arter\amos\audit\Audit',
* 'class' => 'elitedivision\amos\audit\Audit',
* 'ignoreActions' => ['debug/*']
* ]
* - If you want to auto track actions, be sure to add the module to the application bootstrapping:
* 'bootstrap' => ['audit'],
*
* @package arter\amos\audit
* @package elitedivision\amos\audit
* @property AuditEntry $entry
*
* @method void data($type, $data) @see ExtraDataPanel::trackData()
* @method \arter\amos\audit\models\AuditError exception(\Exception $exception) @see ErrorPanel::log()
* @method \arter\amos\audit\models\AuditError errorMessage($message, $code, $file, $line, $trace) @see ErrorPanel::logMessage()
* @method \elitedivision\amos\audit\models\AuditError exception(\Exception $exception) @see ErrorPanel::log()
* @method \elitedivision\amos\audit\models\AuditError errorMessage($message, $code, $file, $line, $trace) @see ErrorPanel::logMessage()
*/
class Audit extends Module
{
......@@ -190,21 +176,21 @@ class Audit extends Module
*/
private $_corePanels = [
// Tracking/logging panels
'audit/request' => ['class' => 'arter\amos\audit\panels\RequestPanel'],
'audit/db' => ['class' => 'arter\amos\audit\panels\DbPanel'],
'audit/log' => ['class' => 'arter\amos\audit\panels\LogPanel'],
'audit/asset' => ['class' => 'arter\amos\audit\panels\AssetPanel'],
'audit/config' => ['class' => 'arter\amos\audit\panels\ConfigPanel'],
'audit/profiling' => ['class' => 'arter\amos\audit\panels\ProfilingPanel'],
'audit/request' => ['class' => 'elitedivision\amos\audit\panels\RequestPanel'],
'audit/db' => ['class' => 'elitedivision\amos\audit\panels\DbPanel'],
'audit/log' => ['class' => 'elitedivision\amos\audit\panels\LogPanel'],
'audit/asset' => ['class' => 'elitedivision\amos\audit\panels\AssetPanel'],
'audit/config' => ['class' => 'elitedivision\amos\audit\panels\ConfigPanel'],
'audit/profiling' => ['class' => 'elitedivision\amos\audit\panels\ProfilingPanel'],
// Special other panels
'audit/error' => ['class' => 'arter\amos\audit\panels\ErrorPanel'],
'audit/javascript' => ['class' => 'arter\amos\audit\panels\JavascriptPanel'],
'audit/trail' => ['class' => 'arter\amos\audit\panels\TrailPanel'],
'audit/mail' => ['class' => 'arter\amos\audit\panels\MailPanel'],
'audit/extra' => ['class' => 'arter\amos\audit\panels\ExtraDataPanel'],
'audit/curl' => ['class' => 'arter\amos\audit\panels\CurlPanel'],
'audit/soap' => ['class' => 'arter\amos\audit\panels\SoapPanel'],
'audit/error' => ['class' => 'elitedivision\amos\audit\panels\ErrorPanel'],
'audit/javascript' => ['class' => 'elitedivision\amos\audit\panels\JavascriptPanel'],
'audit/trail' => ['class' => 'elitedivision\amos\audit\panels\TrailPanel'],
'audit/mail' => ['class' => 'elitedivision\amos\audit\panels\MailPanel'],
'audit/extra' => ['class' => 'elitedivision\amos\audit\panels\ExtraDataPanel'],
'audit/curl' => ['class' => 'elitedivision\amos\audit\panels\CurlPanel'],
'audit/soap' => ['class' => 'elitedivision\amos\audit\panels\SoapPanel'],
];
/**
......@@ -213,7 +199,7 @@ class Audit extends Module
private $_panelFunctions = [];
/**
* @var \arter\amos\audit\models\AuditEntry If activated this is the active entry
* @var \elitedivision\amos\audit\models\AuditEntry If activated this is the active entry
*/
private $_entry = null;
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\audit;
namespace elitedivision\amos\audit;
use arter\amos\audit\models\AuditTrail;
use elitedivision\amos\audit\models\AuditTrail;
use Yii;
use yii\base\Behavior;
......@@ -25,7 +11,7 @@ use yii\db\Query;
/**
* Class AuditTrailBehavior
* @package arter\amos\audit
* @package elitedivision\amos\audit
*
* @property \yii\db\ActiveRecord $owner
*/
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\audit;
namespace elitedivision\amos\audit;
use yii\base\Application;
use yii\base\BootstrapInterface;
/**
* Bootstrap
* @package arter\amos\audit
* @package elitedivision\amos\audit
*/
class Bootstrap implements BootstrapInterface
{
......@@ -33,10 +19,10 @@ class Bootstrap implements BootstrapInterface
public function bootstrap($app)
{
// Make sure to register the base folder as alias as well or things like assets won't work anymore
\Yii::setAlias('@arter/amos/audit', __DIR__);
\Yii::setAlias('@elitedivision/amos/audit', __DIR__);
if ($app instanceof \yii\console\Application) {
$app->controllerMap['audit'] = 'arter\amos\audit\commands\AuditController';
$app->controllerMap['audit'] = 'elitedivision\amos\audit\commands\AuditController';
}
$moduleName = Audit::findModuleIdentifier();
......@@ -51,7 +37,7 @@ class Bootstrap implements BootstrapInterface
$app->i18n->translations['audit'] = [
'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en',
'basePath' => '@arter/amos/audit/messages',
'basePath' => '@elitedivision/amos/audit/messages',
];
}
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*