Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
therouv committed Oct 26, 2014
2 parents dbdfaba + 3848d61 commit 4d0f718
Show file tree
Hide file tree
Showing 606 changed files with 64,267 additions and 4,321 deletions.
21 changes: 18 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
language: php

php:
- 5.3
- 5.4
- 5.5

env:
- MAGENTO_VERSION="1.6.2.0"
- MAGENTO_VERSION="1.7.0.2"
- MAGENTO_VERSION="1.8.1.0"
- MAGENTO_VERSION="1.9.0.1"

before_install:
- mkdir test/
- composer install --dev
- curl -sS https://getcomposer.org/installer | php
- chmod +x ./composer.phar
- ./composer.phar --version
- ./composer.phar install --dev

before_script:
- CURR_DIR=$(pwd)
- bin/mage-ci install test 1.7.0.2 magento_test -c -t -r http://mage-ci.ecomdev.org
- bin/mage-ci install test ${MAGENTO_VERSION} magento_test -c -t -r http://mage-ci.firegento.com
- bin/mage-ci install-module test $CURR_DIR
- git clone https://github.com/EcomDev/EcomDev_PHPUnit.git -b dev $CURR_DIR/phpunit/
- git clone https://github.com/EcomDev/EcomDev_PHPUnit.git ./phpunit/
- bin/mage-ci install-module $CURR_DIR/test $CURR_DIR/phpunit/

script:
- bin/mage-ci phpunit test
91 changes: 54 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FireGento_AdminMonitoring
=========================

The admin monitoring logs nearly every save and delete call in the backend.
The admin monitoring allows an shop owner to log almost every activity in the backend.

Facts
-----
Expand All @@ -15,53 +15,65 @@ Builds

Description
-----------
The admin monitoring logs nearly every save and delete call in the backend. The idea is to generate an overview of the changes in the backend to know who changed certain things.
The admin monitoring allows an shop owner to log almost every activity in the backend. The goal is to monitor all changes in the backend and show them in a nice view so that
a shop owner can monitor who changed what, e.g. logged in to the admin account, saved a product, deleted a customer, e.g.

### BE CAREFUL
This extension writes a lot of data into the database and we exclude only a few core classes. If you have many writes in the backend, please have a look into this to avoid a full hard disk!

To exclude a class, add it into the node `config/default/firegento_adminmonitoring_config/exclude/object_types`
There are currently several ways if you can exclude e.g. specific models, admin routes, field names from logging data to the database:
- Exclude all changes from a specific object (e.g. Mage_Index_Model_Event)
- Exclude all changes from a specific admin route (e.g. admin_sales_order_create_loadBlock)
- Exclude specific objects from specific admin routes (e.g. Mage_CatalogRule_Model_Flag from admin_promo_catalog_save)
- Exclude specific field names from every object (e.g. created_at, updated_at)

```xml
<config>
<default>
<firegento_adminmonitoring_config>
<exclude>
<object_types>
<Mage_Index_Model_Event />
<!-- omit infinite loops -->
<Firegento_AdminMonitoring_Model_History />
</object_types>
</exclude>
</firegento_adminmonitoring_config>
</default>
</config>
```

You can also exclude fields like updated_at ...
There is a basic *adminmonitoring.xml* file located in the "etc" folder of this extension with the following default excludes:

```xml
<?xml version="1.0"?>
<config>
<default>
<firegento_adminmonitoring_config>
<exclude>
<fields>
<updated_at />
<update_time />
</fields>
</exclude>
</firegento_adminmonitoring_config>
</default>
<adminmonitoring>
<excludes>
<object_types>
<Mage_Index_Model_Event/>
<Mage_Admin_Model_User/>
<Enterprise_Logging_Model_Event_Changes/>
<Enterprise_Logging_Model_Event/>
<!-- omit infinite loops -->
<FireGento_AdminMonitoring_Model_History/>
</object_types>
<fields>
<created_at/>
<updated_at/>
<create_time/>
<update_time/>
<low_stock_date/>
</fields>
<admin_routes>
<admin_sales_order_create_index/>
<admin_sales_order_create_loadBlock/>
<admin_sales_order_create_save/>
<admin_sales_order_invoice_save/>
<admin_sales_order_shipment_save/>
<admin_sales_order_creditmemo_save/>
<admin_sales_order_create_reorder/>
<admin_promo_catalog_save>
<Mage_CatalogRule_Model_Flag/>
</admin_promo_catalog_save>
</admin_routes>
</excludes>
</adminmonitoring>
</config>
```


### Third party integration

Events for model_save_after and model_delete_after are observed and changes automatically logged, if not excluded as described above.
So even third party models will be logged and can be even better integrated by link to their adminhtml edit form.
To do this observe the firegento_AdminMonitoring_rowurl event and see Firegento_AdminMonitoring_Model_RowUrl_Product for an catalog_product implementation which can be adapted.
To do this observe the event **firegento_adminmonitoring_rowurl** and see **Firegento_AdminMonitoring_Model_RowUrl_Product** for an catalog_product implementation which can be adapted for your custom models.

If you want to log your own events just dispatch the firegento_AdminMonitoring_log event:
If you want to log your own events just dispatch the event **firegento_adminmonitoring_log** and pass your custom data:

```php
Mage::dispatchEvent(
Expand All @@ -76,9 +88,14 @@ Mage::dispatchEvent(
);
```

If you want to exclude some more fields, admin routes, object types just create a custom *adminmonitoring.xml* file
in your custom module and add the necessary values in the same structure like in the default *adminmonitoring.xml* file of this extension.


Requirements
------------
- PHP >= 5.3.0 (or even 5.0 as long as [spl](http://www.php.net/manual/en/book.spl.php) is activated)
- PHP >= 5.5.0: json extension

Compatibility
-------------
Expand All @@ -90,6 +107,7 @@ Installation Instructions
1. Install the extension by copying all the extension files into your document root.
2. Clear the cache, logout from the admin panel and then login again.
3. You can now configure the extenion via *System -> Configuration -> Advanced -> Admin -> Admin Monitoring*
4. You can view all logging entries in *System -> Configuration -> Admin Monitoring*

Uninstallation
--------------
Expand All @@ -100,6 +118,8 @@ Uninstallation
DROP TABLE 'firegento_adminmonitoring_history';
```

3. Please remove all integration for the admin monitoring in your custom modules.

Support
-------
If you have any issues with this extension, open an issue on [GitHub](https://github.com/firegento/firegento-adminmonitoring/issues).
Expand All @@ -115,15 +135,12 @@ FireGento Team
* Twitter: [@firegento](https://twitter.com/firegento)

Developers:
* Tobias Zander (@airbone42)
* Ralf Siepker (@mageconsult)
* Carmen Bremen (@neoshops)
* Fabian Blechschmidt (@Schrank)
* Please see the [contributor page](https://github.com/firegento/firegento-adminmonitoring/graphs/contributors) on github.

License
-------
[GNU General Public License, version 3 (GPLv3)](http://opensource.org/licenses/gpl-3.0)

Copyright
---------
(c) 2013 FireGento Team
(c) 2013-2014 FireGento Team
Loading

0 comments on commit 4d0f718

Please sign in to comment.