Dblog Quick filter , enables you to search dblog records using Angularjs for filtering.

Tested for up to 1000+ records in watchdog table.

How it is different from other similar modules out there?
This module use Angularj's DOM based filtering, this efficiently speeds up the search (without any additional page load and ajax reloads per search).

Installation instructions
===============
Install the Libraries module. http://drupal.org/project/libraries
Create a directory within sites/all/libraries named [angular]
Locate/download/extract the Angularjs 1.4.8 [https://code.angularjs.org/1.4.8/angular-1.4.8.zip] to the [angular] directory.

Requirements
============
* Libraries
* Angularjs 1.4.8 added in Libraries

http://pareview.sh/pareview/httpgitdrupalorgsandboxnaxrohan2766891git

https://www.drupal.org/sandbox/naxrohan/2766891

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/naxrohan/2766891.git dblog_quick_filter

Manual reviews of other projects:
https://www.drupal.org/node/2769301#comment-11420269
https://www.drupal.org/node/2769141#comment-11420301
https://www.drupal.org/node/2770029#comment-11425001

Comments

dsouza_rohan created an issue. See original summary.

PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

dsouza_rohan’s picture

Issue summary: View changes
dsouza_rohan’s picture

Issue summary: View changes
visabhishek’s picture

Issue summary: View changes
dsouza_rohan’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
visabhishek’s picture

Status: Needs review » Needs work
StatusFileSize
new34.54 KB

Automated Review

Issues reported by PAReview.sh:
http://pareview.sh/pareview/httpsgitdrupalorgsandboxnaxrohan2766891git

Please fix above issues.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. (*) Not working for me. May be i am missing some thing. If Yes then update in readme properly. Please see the screenshot

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

Unable to verify the correct operation of the module because in free trial account Access denied (You are not authorized to access this page.) for page Sources

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

dsouza_rohan’s picture

@visabhishek , Thank you for your review.
Am unable to reproduce the issue as per the your screenshot, module seems to be working.

Can I know which Drupal 7 version, Browser version, OS that you were using, Also are you using jquery updated module.

dsouza_rohan’s picture

Status: Needs work » Needs review

@visabhishek, I have traced & sorted the issue (there was some issue with my .js file).

ashwinsh’s picture

Automated review test is not clear, please check following and resolve them first.

See: http://pareview.sh/pareview/httpsgitdrupalorgsandboxnaxrohan2766891git

Thank you,

dsouza_rohan’s picture

Issue summary: View changes
dsouza_rohan’s picture

Issue summary: View changes
dsouza_rohan’s picture

Issue summary: View changes
dsouza_rohan’s picture

Assigned: Unassigned » dsouza_rohan

Hello thank you for your reviews...ashwin

I have added a updated Readme with installation instructions.
Also solved most of the .js related issues (indentation ..etc) mention in the Automated review.

here is the updated pareview URL

http://pareview.sh/pareview/httpsgitdrupalorgsandboxnaxrohan2766891git

dsouza_rohan’s picture

Assigned: dsouza_rohan » Unassigned
rishabh318’s picture

Hi dsouza_rohan,

1. I think You should used hook_requirements() for angular library Although you have mentioned it in readme.txt.
2. I think You should used hook_help() for about project including useful URL
3. Should use t() function under dblog_quick_filter_get_logged_users in foreach() { } loop.

Thanks
Rishabh

arun ak’s picture

Status: Needs review » Needs work

Manual Review:

  1. Permission dblog_quick_filter display not using anywhere in code. If not using remove it.
  2. It would be better if we can integrate with views exposed filters.
  3. In your module js file add drupal js behaviour.
  4. Implement hook_requirements() to check availability of angularjs library.
  5. Instead of creating separate page dblog quick filter, can't we apply angular js filter in existing dblog page(admin/reports/dblog)?
  6. Use drupal_exit() instead of exit() in dblog_quick_filter.module line no 320, 397 and 406.
  7. To add a simple link at top of the form no need to create another form. You can add extra html at top of a form using #prefix attribute in hook_form_alter() like below.
    /**
     * Implements hook_form_alter().
     */
    function dblog_quick_filter_form_alter(&$form, &$form_state, $form_id) {
      if ($form_id == 'dblog_filter_form') {
       $form['#prefix'] = l(
        t("Quick Search Page"),
          "admin/structure/dblog_quick_filter",
          array(
            'attributes' => array(
              'target' => '_blank',
            ),
          )
        );
      }
    }

    But found below in dblog_quick_filter.module line no 49:

    /**
     * Implements hook_page_alter().
     */
    function dblog_quick_filter_page_alter(&$page) {
    
      if (isset($page['content']['system_main']) && arg(2) == 'dblog') {
        array_unshift($page['content']['system_main'], array(
          'dblog_quick_filter_linked ' => drupal_get_form('dblog_quick_filter_linked_form'),
        )
        );
      }
    
    }
    
    /**
     * Implements hook_form().
     */
    function dblog_quick_filter_linked_form($form) {
    
      $form['#prefix'] = l(
        t("Quick Search Page"),
        "admin/structure/dblog_quick_filter",
        array(
          'attributes' => array(
            'target' => '_blank',
          ),
        )
      );
    
      return $form;
    }

Thanks,
ARUN AK

dsouza_rohan’s picture

Status: Needs work » Needs review

Thanks @rishabh318 & @ARUN AK

This module is intended at being a quicker alternative to the default dblog page (hence i'v not replaced the original admin/reports/dblog).
Also I Guess views expose filter ...is not part of this module (it's kind of out of scope...here).

However I'v Done few of the changes/suggestions, they are listed below...

  • Implemented hook_requirements() & hook_help()
  • Updated function dblog_quick_filter_get_logged_users as suggestion.
  • Permission "dblog_quick_filter display" removed .
  • Added drupal js behaviour in my main js file.
  • Used drupal_exit() instead of exit() in all occurrences.
  • Implemented hook_form_alter() as per @ARUN AK suggestion
gaydamaka’s picture

Hi,

Move this code in new function to avoid duplication

$classes = array(
    WATCHDOG_DEBUG => 'dblog-debug',
    WATCHDOG_INFO => 'dblog-info',
    WATCHDOG_NOTICE => 'dblog-notice',
    WATCHDOG_WARNING => 'dblog-warning',
    WATCHDOG_ERROR => 'dblog-error',
    WATCHDOG_CRITICAL => 'dblog-critical',
    WATCHDOG_ALERT => 'dblog-alert',
    WATCHDOG_EMERGENCY => 'dblog-emerg',
  );
visabhishek’s picture

Hi @gaydamaka: Looks like you forgot to change the status. Is this now RTBC after your review or are there application blockers left and this should be "needs work"?

br0ken’s picture

Status: Needs review » Needs work

There are a lot of work. F.e. hook_requirements() must be in *.install file.

br0ken’s picture

'type' => MENU_NORMAL_ITEM, should not be specified. It assumes by default.

dsouza_rohan’s picture

Thank you for your help @gaydamaka,@visabhishek & @BR0kEN
'type' => MENU_NORMAL_ITEM, specifying this is not harmful or against coding standard.

I'v Done few of the changes/suggestions, they are listed below...

  • Move hook_requirements() to .install file.
  • Created a common function for $classes array.
dsouza_rohan’s picture

Status: Needs work » Needs review
dsouza_rohan’s picture

Assigned: Unassigned » dsouza_rohan
aditya_anurag’s picture

Automated Review

Kindly check the pareview.sh link, some trivial issue you can fix... to adhere to Drupal coding standard's
http://pareview.sh/pareview/httpgitdrupalorgsandboxnaxrohan2766891git

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[Yes: Does not cause] module duplication and/or fragmentation.
Master Branch
[Yes: Follows] the guidelines for master branch.
Licensing
[Yes: Follows] the licensing requirements.
3rd party assets/code
[Yes: Follows ] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements.]
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. (*) Major finding, needs work
  2. (+) Release blocker
  3. Just a recommendation
  4. ...]

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

klausi’s picture

@aditya_anurag: Looks like you forgot to change the status. Is this now RTBC after your review or are there application blockers left and this should be "needs work"?

aditya_anurag’s picture

Status: Needs review » Reviewed & tested by the community

@klausi, thanks for reminding i missed to change the status.

arun ak’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -PAreview: review bonus
StatusFileSize
new38.56 KB

dblog_quick_filter_permission(): Give proper name to the user permission. Found 'Config admin'.

dblog_quick_filter_page(): File exist validation is happening after attaching files to the page. First do validation and then do things accordingly.

Total Records count at top of list showing wrong value. Refer screenshot attached.

dblog_quick_filter_requirements(): Same code block using in different if condition. Why can't we use OR operator?

dblog_quick_filter_get_dblog(): Remove commented lines from code.

User proper file name to the module css. Found ajs_style.css in repo.

As it showing report, add it under admin/reports instead of admin/structure. Found admin/structure/dblog_quick_filter.

Please note that assigning an issue to yourself is problematic for several reasons. For background, please see this page.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

dsouza_rohan’s picture

Assigned: dsouza_rohan » Unassigned

@ARUN AK, I have implemented all the suggested changes, However the (Total Records count) am not able to replicate (also the screenshot you attached is unclear as the alternating odd/even color of the rows is missing for 2 rows, this may be caused by missing or blank entries)

dsouza_rohan’s picture

Status: Needs work » Needs review
visabhishek’s picture

Status: Needs review » Reviewed & tested by the community

Module working fine for me. I dont think we have any blocker points left. So marking as RTBC.

dsouza_rohan’s picture

Thankyou for RTBC update

poojasharmaece’s picture

Status: Reviewed & tested by the community » Needs work

I am getting WSOD while i am trying to enable this module.

In error log i find :
PHP Fatal error: Call to undefined function libraries_get_libraries() in /var/www/html/drupal7/sites/all/modules/dblog_quick_filter/dblog_quick_filter.install on line 15, referer: http://localhost/drupal7/admin/modules/list/confirm

if we enabled 'libraries' module first then enable 'dblog_quick_filter' module it will work fine.

Steps to reproduce this issue :

Try to enable 'dblog_quick_filter' module without enabling 'libraries' module

dsouza_rohan’s picture

Hello @poojasharmaece thankyou for reporting that issue.

I have already added "libraries" as dependency in the modules .info file.
The issue is not being reproduced when am using the the sites admin/modules panel.

However when enabled using

drush

commands am getting the mentioned error :

PHP Fatal error:  Call to undefined function libraries_get_libraries() in /var/www/html/drupal7/sites/all/modules/custom/dblog_quick_filter/dblog_quick_filter.install on line 15
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                     [error]
Error: Call to undefined function libraries_get_libraries() in /var/www/html/drupal7/sites/all/modules/custom/dblog_quick_filter/dblog_quick_filter.install, line 15

I have fixed the reported issue.

dsouza_rohan’s picture

Status: Needs work » Needs review
poojasharmaece’s picture

Status: Needs review » Reviewed & tested by the community

Yes, Now working fine for me, So marking as RTBC.

visabhishek’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new9.08 KB

Review of the 7.x-1.x branch (commit 45b6c91):

No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Please fix issue reported on https://pareview.sh/node/903

Otherwise all looks good for me.

Thanks for your contribution, dsouza_rohan!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.