You are here

function deploy_logs_overview in Deploy - Content Staging 6

Same name and namespace in other branches
  1. 5 deploy.module \deploy_logs_overview()

Display a list of deployments that have taken place.

1 string reference to 'deploy_logs_overview'
deploy_menu in ./deploy.module
Implementation of hook_menu().

File

./deploy.logs.admin.inc, line 10
Page handlers for deploy logs admin.

Code

function deploy_logs_overview() {
  $result = pager_query("SELECT * FROM {deploy_log} ORDER BY ts DESC", 20);
  while ($log = db_fetch_array($result)) {
    $row = array(
      l($log['plan'], 'admin/build/deploy/logs/details/' . $log['dlid']),
      $log['username'],
      format_date($log['ts'], 'small'),
      $log['server'],
    );
    $rows[] = $row;
  }
  if (empty($rows)) {
    $rows[] = array(
      array(
        'data' => t('No deployment plans have been pushed.'),
        'colspan' => '4',
        'class' => 'message',
      ),
    );
  }
  $header = array(
    t('Plan'),
    t('Pushed By'),
    t('When'),
    t('To Server'),
  );
  $output = theme('table', $header, $rows);
  $output .= theme('pager');
  return $output;
}