[CRM-13823] Admin Status Page Created: 25/Nov/13  Updated: 03/Mar/16  Resolved: 07/Nov/15

Status: Done/Fixed
Project: CiviCRM
Component/s: CiviCRM API, Core CiviCRM
Affects Version/s: 4.4.0
Fix Version/s: 4.7

Type: Improvement Priority: Critical
Reporter: Coleman Watts Assignee: Unassigned
Resolution: Fixed/Completed Votes: 1
Labels: PatchSubmitted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Supplementation
is supplemented by CRM-18156 CiviCRM version 4.6.14 incorrectly sh... Done/Fixed
is supplemented by CRM-13805 Fetching CiviCRM News fails silently ... In Progress
Documentation Required?: User and Admin Doc
Funding Source: Contributed Code

 Description   

Create a "status page" similar to drupal, where we can check for things that should be there

  • triggers
  • extension dir/url
  • outbound mail settings
  • debug mode
  • messages which currently show on the dashboard titled "There are a few things to setup before using your site ... "
  • The existence of directories specified at civicrm/admin/setting/path
  • Ensure that file permissions on directories specified at civicrm/admin/setting/path are correct
  • Ensure that cron is running
  • Ensure cUrl is installed
  • Ensure allow_fopen_url is enabled

Also give commands to

  • clear caches
  • clear templates_c
  • rebuild triggers
  • rebuild menu
  • truncate log tables
  • and other stuff which are now all done via magic url params


 Comments   
Comment by Chris Burgess [ 30/Jan/14 ]

An implementation along the lines of Drupal's hook_requirements('runtime') would be good - and it would be valuable IMO if we can report back to Drupal's status page (if we provide a report, let's pass it back up the tree as well).

If we make our checks execute as a hook then both core CiviCRM and extensions/modules can add additional checks.

If CiviCRM's checks return a structure like Drupal's hook_requirements() array return then we can pass it straight back into Drupal's status page as well, which gets it better visibility. We can also do other things with output that way (email, console, ...).

Current versionCheck() outputs by CRM_Core_Session::setStatus() - would be good to split the check and output layers there - possibly fire periodically from a hook somewhere central (currently versioncheck is in CRM_Core_Page::run()).

versionCheck() also has permissions check in it, which makes it dependent on a suitable user logging in for the check to fire - that perms check may only want to be against output of the check firing?

Comment by Coleman Watts [ 10/Aug/15 ]

Jon K Goldberg and Andrew Hunt I've merged the above PR and poked around a bit. So far so good, and it looks like there's more to do (at least it looks like the actual status page hasn't yet been implemented). Could you please update this issue to document what's been done, what's left to do and your anticipated timeline?

Comment by Jon K Goldberg [ 10/Aug/15 ]

Hi Coleman,

Here's what's done here, and what's not:

  • Tim added a new hook civicrm_hook_check, which allows extension developers to add checks to CRM_Utils_Check, comparable to hook_requirements in Drupal.
  • Andrew rewrote all the existing checks to fit a unified "status check" framework, which adheres to PSR-3 standards, and modified the System.check API to call this info.
  • I created a new entity "StatusPreference" which allows a Civi administrator to specify that certain checks should be ignored (temporarily or permanently, up to a certain severity) by System.check.
  • Michael Daryabeygi wrote an Angular UI to view outstanding checks and to add/edit StatusPreference entries.

Andrew's work and mine are complete. Michael's work is here: https://github.com/ginkgostreet/org.civicrm.statuspage. Note that it's intended to go into core, even though it's written as an extension. On 7/7/15 Michael said, "I'm still looking for a free weekend to finish this up." Unfortunately, I'm not in a position to help; I don't have Angular skills, nor are my JS fundamentals strong enough to pick them up right now.

Comment by Coleman Watts [ 10/Aug/15 ]

Great thanks Jon.
Michael Z Daryabeygi when do you think you can roll a PR for core? It would be great to get the status page merged into master soon so that there's time to test it out during the alpha/beta cycles. Please let me know if there's anything I can do to help.

Comment by Michael Z Daryabeygi [ 18/Aug/15 ]

@colemanw I don't know when I will find a chance to finish this.
If someone else wants to run with this, I don't want to hold this up.
There are some issues in the repo, most pretty minor. This one was what I was going to do next.
https://github.com/ginkgostreet/org.civicrm.statuspage/issues/5
This was definitely an Angular-learning project for me, so I don't know how useful the code is.
The API is definitely the driver of this feature and I don't think there is really a lot to be done to finish the angular code.
I am watching this issue and do get notifications of changes here.
I can give someone write permissions to the repo or I'm pretty sure it is already fork-able.
If no one does pick it up, I will keep looking for an opportunity to work on it.

Looks like I had some local changes relating to #5... just pushed, not sure what state that code is in.

Comment by Andrew Hunt [ 09/Oct/15 ]

Trying to assign this to @Nikki Murray but she doesn't show up in the dropdown. Things are working; remaining to-dos are:

  • make the UI look nicer
  • transfer it to core instead of that temporary extension
  • @Tim Otten, she may need your help navigating how to merge files into the angular app
Comment by Nikki Murray [ 09/Oct/15 ]

I've got the extension up to my liking. I've got the code in aghstrategies/org.civicrm.statuspage master branch now. It's dependent on the update to Font Awesome that Andrew has been working on. I need some guidance on getting it into core for a PR (PR probably bundled with Andrews Font Awesome PR).

Comment by Coleman Watts [ 09/Oct/15 ]

Great, thanks Nikki. Let's go ahead and merge the font-awesome PR first. Is that ready to go?

Comment by Nikki Murray [ 13/Oct/15 ]

I'm attempting to move code from the angular extension into core. I've created an ang/crmStatusPageand moved the ctrl and partials into it, and crmStatusPage.css into the ang/ and crmStatusPage.js into the ang/. I've modified Civi/Angular/Manage.php to include js, css, partials, settings. Cleared cache on local server, and am not able to get it to work. Is there another step I need to do?

Comment by Kurund Jalmi [ 13/Oct/15 ]

Nikki,

Do you want to ping us on #civicrm irc channel. It might be easier to debug and work on this issue.

Comment by Nikki Murray [ 14/Oct/15 ]

PR Submitted:

CRM 13823 admin status page #6957
https://github.com/civicrm/civicrm-core/pull/6957

Comment by Coleman Watts [ 25/Oct/15 ]

Thanks Andrew, Nikki and Michael for all the great work on this. I've just done a round of cleanup and polish to the Angular UI (adding icons, using tabs & a popup menu).

Left to do:

  • Add nav-menu item (probably under Administer -> Administration Console)
  • Add a link from the Admin Console page

Nikki Murray want to add those for the next beta?

Comment by Coleman Watts [ 07/Nov/15 ]

Added menu links. I think we can finally call this done

Comment by Joanne Chester [ 05/Feb/16 ]

What permission is need to see this page. Unless it is visible to everyone, I want to include the required permissions in the documentation?

Comment by Coleman Watts [ 06/Feb/16 ]

"administer CiviCRM"

Generated at Sat Sep 22 15:14:09 UTC 2018 using JIRA 7.3.3#73014-sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.