function _hosting_task_log_class in Hosting 7.4
Same name and namespace in other branches
- 5 task/hosting_task.module \_hosting_task_log_class()
- 6.2 task/hosting_task.module \_hosting_task_log_class()
- 7.3 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 1422 - 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;
}