You are here

function theme_acquia_purge_status_bar_widget in Acquia Purge 7

Same name and namespace in other branches
  1. 6 acquia_purge.admin.inc \theme_acquia_purge_status_bar_widget()

Returns HTML for the Acquia Purge progress bar widget.

Parameters

array $variables: An associative array containing:

  • total: Total amount of actions initially queued for purging.
  • remaining: Remaining number of purge actions still to be processed.
  • good: Number of purge actions that have already taken place.
  • bad: Number of queue items that failed purging.
  • percent: Value between 0-100 representing the progress percentage.
  • running: Whether URLs are being purged or not.
  • purgehistory: Array with recently purged URL's.
3 theme calls to theme_acquia_purge_status_bar_widget()
AcquiaPurgeProcessorAjax::pathCallback in lib/processor/AcquiaPurgeProcessorAjax.php
Process a chunk of items form the queue and respond in JSON.
theme_acquia_purge_status_widget in ./acquia_purge.admin.inc
Returns HTML for the Acquia Purge status widget.
_acquia_purge_diagnostics_status in ./acquia_purge.diagnostics.inc
Status.

File

./acquia_purge.admin.inc, line 372
Admin page callbacks and theme functions for the Acquia Purge module.

Code

function theme_acquia_purge_status_bar_widget(array $variables) {

  // Determine status messages based on what the statistics tells us.
  if ($variables['locked']) {
    $message = t("Site content is being refreshed, please wait a moment...\n    %remaining items to go...", array(
      '%remaining' => $variables['remaining'],
    ));
  }
  elseif ($variables['running']) {
    $message = t("%remaining items about to be processed...", array(
      '%remaining' => $variables['remaining'],
    ));
  }
  else {
    $message = t("Content changes are now visible for everybody!");
  }
  return theme('progress_bar', array(
    'percent' => $variables['percent'],
    'message' => $message,
  ));
}