Commit bbd2e557 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add admin link for admins.

parent 4144e7f8
...@@ -134,7 +134,7 @@ function showsummary ($showby) { ...@@ -134,7 +134,7 @@ function showsummary ($showby) {
switch ($showby) { switch ($showby) {
case "projects": case "projects":
$which = "pid"; $which = "pid";
$table = "project_stats"; $table = "project_stats_backup";
$title = "Project Summary Stats (Epoch)"; $title = "Project Summary Stats (Epoch)";
$link = "showproject.php3?pid="; $link = "showproject.php3?pid=";
$wclause = "where pid!='$TBOPSPID'"; $wclause = "where pid!='$TBOPSPID'";
...@@ -142,7 +142,7 @@ function showsummary ($showby) { ...@@ -142,7 +142,7 @@ function showsummary ($showby) {
break; break;
case "users": case "users":
$which = "uid"; $which = "uid";
$table = "user_stats"; $table = "user_stats_backup";
$title = "User Summary Stats (Epoch)"; $title = "User Summary Stats (Epoch)";
$link = "showuser.php3?user="; $link = "showuser.php3?user=";
$wclause = ""; $wclause = "";
...@@ -161,7 +161,7 @@ function showsummary ($showby) { ...@@ -161,7 +161,7 @@ function showsummary ($showby) {
"exptpreload_count+exptstart_count as expt_new, ". "exptpreload_count+exptstart_count as expt_new, ".
"exptswapmod_count as expt_swapmods, ". "exptswapmod_count as expt_swapmods, ".
"u.usr_name, s.uid_idx ". "u.usr_name, s.uid_idx ".
"from user_stats as s ". "from $table as s ".
"left join users as u on u.uid_idx=s.uid_idx ". "left join users as u on u.uid_idx=s.uid_idx ".
"$wclause ". "$wclause ".
"order by $order"); "order by $order");
...@@ -443,8 +443,8 @@ function showrange ($showby, $range) { ...@@ -443,8 +443,8 @@ function showrange ($showby, $range) {
DBQueryFatal("select s.exptidx,s.pid,u.uid,r.pnodes,r.vnodes, ". DBQueryFatal("select s.exptidx,s.pid,u.uid,r.pnodes,r.vnodes, ".
" swapin_time,swapout_time,swapmod_time,byswapmod, ". " swapin_time,swapout_time,swapmod_time,byswapmod, ".
" e.eid_uuid,r.idx,r.lastidx,byswapin ". " e.eid_uuid,r.idx,r.lastidx,byswapin ".
" from experiment_resources as r ". " from experiment_resources_backup as r ".
"left join experiment_stats as s on ". "left join experiment_stats_backup as s on ".
" r.exptidx=s.exptidx ". " r.exptidx=s.exptidx ".
"left join experiments as e on e.idx=s.exptidx ". "left join experiments as e on e.idx=s.exptidx ".
"left join users as u on u.uid_idx=r.uid_idx ". "left join users as u on u.uid_idx=r.uid_idx ".
...@@ -541,13 +541,13 @@ function showrange ($showby, $range) { ...@@ -541,13 +541,13 @@ function showrange ($showby, $range) {
# current experiment. # current experiment.
# #
if ($swapin_time == 0) { if ($swapin_time == 0) {
if ($debug) if (1)
echo "No swapin time: $exptidx, $rsrcidx<br>\n"; echo "No swapin time: $exptidx, $rsrcidx<br>\n";
continue; continue;
} }
if ($swapout_time == 0 && $swapmod_time == 0) { if ($swapout_time == 0 && $swapmod_time == 0) {
if (!isset($uuid)) { if (!isset($uuid)) {
if ($debug) if (1)
echo "No swapout/swapmod time: $exptidx, $rsrcidx<br>\n"; echo "No swapout/swapmod time: $exptidx, $rsrcidx<br>\n";
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment