You are here

function _hosting_task_log_class in Hosting 7.3

Same name and namespace in other branches
  1. 5 task/hosting_task.module \_hosting_task_log_class()
  2. 6.2 task/hosting_task.module \_hosting_task_log_class()
  3. 7.4 task/hosting_task.module \_hosting_task_log_class()

Map entry statuses to coincide with our CSS classes.

@todo make this irrelevant.

See also

_drush_print_log()

1 call to _hosting_task_log_class()
_hosting_task_log_table in task/hosting_task.module
Display table containing the logged information for this task.

File

task/hosting_task.module, line 1377
Web server node type is defined here.

Code

function _hosting_task_log_class($type) {
  switch (strtolower($type)) {
    case 'warning':
    case 'cancel':
    case 'rollback':

      // aegir-specific
      $type = 'warning';
      break;
    case 'failed':
    case 'error':
      $type = 'error';
      break;
    case 'queue':

      // aegir-specific
      $type = 'queue';
      break;
    case 'ok':
    case 'completed':
    case 'success':
      $type = 'success';
      break;
    case 'notice':
    case 'info':
    case 'message':
    default:
      $type = 'info';
  }
  return 'hosting-' . $type;
}