Download & Extend

Disabled sites should be class hosting-warning, enabled but problematic sites should be hosting-error

Project:Hostmaster (Aegir)
Version:6.x-2.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:AUX Project

Issue Summary

The hosting site list was showing Disabled sites as being bright red as though they were errors, which was disorienting / ambiguous for some users.

I changed it to use hosting-warning class, which makes it orange-ish, as an alert, which was better.

However I didn't realise that a site that is *Enabled*, but has a task fail (i.e a verify, or a Disable task), changes to use the hosting-warning class too. This made it indistinguishable from disabled sites.

I'd like to change this so that:

a) Disabled sites are orange or amber
b) Enabled sites that have entered some sort of error state, are red

I think this is reasonable because Enabled sites that have a problem need addressing. Also, since the task output that might be an error is also red, this matches up with the 'colour' status of the site then.

See screenshot, where i have a site being provisioned (grey), enabled sites (green), disabled sites (orange), and an enabled site that has had a failed task (heh.. trying to disable a site that has had its platform files deleted!)

My reasoning here, is that a site in a Deleted state, isn't actually shown. So we ought never to see a 'red' site here, unless it is enabled and something is wrong.

See the screenshtot. Thoughts welcome

AttachmentSize
4015368751_52c60d3164_o.png120.09 KB

Comments

#1

Updated screenshot. Now a site can be 'red' in two different circumstances:

1) Site is enabled but experiences an error when running a task (site 23, verify failed)
2) Site is not enabled, but has also never been verified (in other words: we have just tried to install this site, and the install failed. So technicaly the site is disabled, but it was never enabled, so it's an immediate problem) - (the tattler sites, since they aren't installable at the moment, see #605356: Tattler profile wont install from installed Tattler distribution

I'm happy to be shot down on this :)

AttachmentSize
hosting_status.png 113.04 KB

#2

And a patch

AttachmentSize
606120_hosting_status.patch 1.07 KB

#3

Status:needs review» needs work

reverting it back to hosting-error for disabled sites until this is re-thought

#4

However I didn't realise that a site that is *Enabled*, but has a task fail (i.e a verify, or a Disable task), changes to use the hosting-warning class too. This made it indistinguishable from disabled sites.

I don't know what's happened a year since this, but

1) sites that are enabled but fail on install are left as 'queued' but with a red error log - that's good
2) sites that are enabled but fail on a task like verify are left as 'enabled' but with a red error log - that's good
3) sites that are disabled are hosting-error, so this could become hosting-warning and improve the usability this ticket was intended for - that's good

there's a bunch of 'hosting_site_verified' in hosting_site.module related to the status map that I can't actually find anywhere else in the code:

from function hosting_site_preprocess_views_view_table

<?php
     
if (isset($result->hosting_site_status) && isset($result->hosting_site_verified)) {
       
$variables['row_classes'][$num][] = _hosting_site_list_class($result->hosting_site_status, $result->hosting_site_verified);
?>

Where is this attribute ever set on $result?

Anyway, at this point I don't see why we can't:

set HOSTING_SITE_DISABLED to 'hosting-warning' in _hosting_site_list_class()

Get rid of the following bit:

<?php
  
if (($status == HOSTING_SITE_ENABLED) && (!$verified)) {
     return
'hosting-warning';
   }
?>

as I can't see where this would ever actually occur anymore (perhaps since we switched to creating revisions for the same task instead of a new task each time, and resetting the verified state? dunno)

#5

Project:Hosting» Hostmaster (Aegir)
Version:6.x-0.4-alpha2» 6.x-2.x-dev

Tagging.

nobody click here