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

Comments

Anonymous’s picture

StatusFileSize
new113.04 KB

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 :)

Anonymous’s picture

StatusFileSize
new1.07 KB

And a patch

Anonymous’s picture

Status: Needs review » Needs work

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

Anonymous’s picture

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

      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:

   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)

steven jones’s picture

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

Tagging.

ergonlogic’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev

Why would disabled sites be yellow (hosting-warning)? I would think grey would be more appropriate. Or are we trying to draw attention to them?

ergonlogic’s picture

Project: Hostmaster (Aegir) » Hosting
anarcat’s picture

i agree that grey is better.

ergonlogic’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Status: Needs work » Fixed

I added a 'hosting-disable' class and applied it to both disabled site and locked platforms. It currently uses the same grey as hosting-queue, but I added a lock icon. I'm happy to re-work it, if this doesn't suit anyone.

Merged in 565471600d5c

Status: Fixed » Closed (fixed)
Issue tags: -AUX Project

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

  • Commit 5654716 on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by ergonlogic:
    Issue #606120 by Mig5, ergonlogic: Add class for locked platforms and...

  • Commit 5654716 on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by ergonlogic:
    Issue #606120 by Mig5, ergonlogic: Add class for locked platforms and...