The space taken by the GIT Info can get pretty long, especially if we add /var/ww/html as extra folders to monitor all projects. It is therefore suggested to move it to its own page to not clutter the regular Status Report too much.

Comments

lolandese created an issue. See original summary.

lolandese’s picture

We could also make it a local tab of the Status Report.

lolandese’s picture

Issue tags: +LutskGCW20
lolandese’s picture

Easiest and probably also best (most straightforward) is to strip down gitinfo.install. We add also $phase === 'install' so module install will fail if:

  • shell_exec is not available
  • we are on a a non-Unix OS
  • if Git is not installed.
function gitinfo_requirements($phase) {
  $route_name = \Drupal::routeMatch()->getRouteName();
  if ($phase === 'install' || ($phase === 'runtime' && $route_name === 'system.status')) { .. }

The rest can then be moved to a separate dedicated page but leaving the built-in check to avoid breaking.

It might be good to keep a link to the Git Info report. Rename to just "Git info".

lolandese’s picture

Another advantage of this approach is that we now can give permissions to any role to view Git info, which is pretty harmless. Furthermore, we have now more horizontal screen space available as we do not use the left column for report sections anymore.

To see how to replicate the functionality of the Status report to have warnings places separately at the top.

lolandese’s picture

Status: Active » Needs review
StatusFileSize
new65.62 KB

The attached patch only leaves the Git version info on the Status report with a link to the detailed report that now lives at admin/reports/gitinfo. We now can give permissions to any role to view Git info.

lolandese’s picture

Status: Needs review » Needs work
  • To see how to replicate the functionality of the Status report to have warnings placed separately at the top.
  • Now that we have put the code in a class: \Drupal calls should be avoided in classes, use dependency injection instead
  • Change the following text on the settings page:
    Configuration for the Git Info section in the Status reportReport.
    Connect with remote repos and check if your Git version is up to date
lolandese’s picture

Status: Needs work » Needs review
StatusFileSize
new67.17 KB

Using Drupal status messages for errors, warnings, and OK.

  • lolandese committed 34015da on 8.x-1.x
    Issue #3087770 by lolandese: Move the GIT Info Report to its own page
    
lolandese’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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