You are here

function template_preprocess_monitoring_overview_summary in Monitoring 8

Preprocess function for monitoring overview summary.

Parameters

array $variables: Theme variables.

File

./monitoring.module, line 340
Monitoring bootstrap file.

Code

function template_preprocess_monitoring_overview_summary(&$variables) {
  $variables['time_total'] = $variables['total_execution_time'];
  $variables['time_non_cached'] = $variables['non_cached_execution_time'];
  $variables['ok'] = $variables['status_overview'][SensorResultInterface::STATUS_OK];
  $variables['info'] = $variables['status_overview'][SensorResultInterface::STATUS_INFO];
  $variables['warning'] = $variables['status_overview'][SensorResultInterface::STATUS_WARNING];
  $variables['critical'] = $variables['status_overview'][SensorResultInterface::STATUS_CRITICAL];
  $variables['unknown'] = $variables['status_overview'][SensorResultInterface::STATUS_UNKNOWN];
  $variables['has_force_run_permission'] = \Drupal::currentUser()
    ->hasPermission('monitoring force run');
}