Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
f629146b
Commit
f629146b
authored
Sep 25, 2001
by
Leigh B. Stoller
Browse files
Some minor changes for the started/ended/expires/created date problems
that Mike reported.
parent
ecaf874b
Changes
6
Hide whitespace changes
Inline
Side-by-side
tbsetup/batch_daemon.in
View file @
f629146b
...
...
@@ -323,9 +323,9 @@ sub startexp($)
$query_result
=
DBQueryFatal
("
insert into experiments
"
.
"
(eid, pid, expt_created, expt_name,
"
.
"
expt_head_uid,
expt_start,
state, batchmode)
"
.
"
expt_head_uid, state, batchmode)
"
.
"
VALUES ('
$eid
', '
$pid
', '
$rightnow
', '
$longname
',
"
.
"
'
$creator
',
'
$rightnow
',
'new', 1)
");
"
'
$creator
', 'new', 1)
");
#
# Try to start the experiment. If it fails, the experiment is gone.
...
...
tbsetup/batchexp.in
View file @
f629146b
...
...
@@ -185,9 +185,9 @@ $created = `date '+%Y:%m:%d %H:%M:%S'`;
# is looking for batch experiments to run. Easy race avoidance.
#
DBQueryFatal
("
INSERT INTO batch_experiments
"
.
"
(eid, pid, created,
started,
expires,
"
.
"
(eid, pid, created, expires,
"
.
"
name, creator_uid, status)
"
.
"
VALUES ('
$eid
', '
$pid
', '
$created
',
'
$created
',
'
$expires
',
"
.
"
VALUES ('
$eid
', '
$pid
', '
$created
', '
$expires
',
"
.
"
'
$longname
', '
$uid
', 'new')
");
exit
0
;
...
...
tbsetup/startexp.in
View file @
f629146b
...
...
@@ -266,6 +266,17 @@ $expt_name = $row[0];
$expt_created
=
$row
[
1
];
$expt_expires
=
$row
[
2
];
#
# Gen up a date for the started field of the record, and insert it.
#
$expt_started
=
`
date '+20%y-%m-%d %H:%M:%S'
`;
if
(
$expt_started
=~
/^([-\@\w: ]+)$/
)
{
$expt_started
=
$
1
;
DBQueryWarn
("
update experiments set expt_start='
$expt_started
'
"
.
"
WHERE eid='
$eid
' and pid='
$pid
'
");
}
print
STDOUT
"
Setup Success
\n
";
#
...
...
@@ -334,6 +345,7 @@ print $MAIL "PID: $pid\n";
print
$MAIL
"
Name:
$expt_name
\n
";
print
$MAIL
"
Created:
$expt_created
\n
";
print
$MAIL
"
Expires:
$expt_expires
\n
";
print
$MAIL
"
Started:
$expt_started
\n
";
print
$MAIL
"
Directory:
$eiddir
\n\n
";
if
(
open
(
IN
,
"
$repfile
"))
{
...
...
www/beginexp_form.php3
View file @
f629146b
...
...
@@ -113,21 +113,8 @@ echo "<tr>
<td colspan=2>Expiration date:</td>
<td><input type=
\"
text
\"
value=
\"
$year
:
$month
:
$rest
\"
name=
\"
exp_expires
\"
></td>
</tr>
\n
"
;
echo
"<tr>
<td colspan=2>Experiment starts:</td>
<td><input type=
\"
text
\"
value=
\"
$year
:
$thismonth
:
$rest
\"
name=
\"
exp_start
\"
></td>
<td><input type=
\"
hidden
\"
value=
\"
$year
:
$thismonth
:
$rest
\"
name=
\"
exp_created
\"
></td>
</tr>
\n
"
;
echo
"<tr>
<td colspan=2>Experiment ends:</td>
<td><input type=
\"
text
\"
value=
\"
$year
:
$month
:
$rest
\"
name=
\"
exp_end
\"
></td>
</tr>
\n
"
;
echo
"<tr>
...
...
www/beginexp_process.php3
View file @
f629146b
...
...
@@ -199,10 +199,9 @@ else {
$query_result
=
mysql_db_query
(
$TBDBNAME
,
"INSERT INTO experiments "
.
"(eid, pid, expt_created, expt_expires, expt_name, "
.
"expt_head_uid,
expt_start, expt_end,
state, shared) "
.
"expt_head_uid, state, shared) "
.
"VALUES ('
$exp_id
', '
$exp_pid
', '
$exp_created
', '
$exp_expires
', "
.
"'
$exp_name
', '
$uid
', '
$exp_start
', '
$exp_end
', "
.
"'
$expt_state
',
$exp_shared
)"
);
"'
$exp_name
', '
$uid
', '
$expt_state
',
$exp_shared
)"
);
if
(
!
$query_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error adding new experiment
$exp_id
:
$err
\n
"
,
1
);
...
...
@@ -242,9 +241,7 @@ if ($nonsfile) {
"PID:
$exp_pid
\n
"
.
"Name:
$exp_name
\n
"
.
"Created:
$exp_created
\n
"
.
"Expires:
$exp_expires
\n
"
.
"Start:
$exp_start
\n
"
.
"End:
$exp_end
\n
"
,
"Expires:
$exp_expires
\n
"
,
"From:
$TBMAIL_WWW
\n
"
.
"Bcc:
$TBMAIL_LOGS
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
...
...
www/showstuff.php3
View file @
f629146b
...
...
@@ -273,18 +273,13 @@ function SHOWEXP($pid, $eid) {
</tr>
\n
"
;
echo
"<tr>
<td>Starts: </td>
<td class=
\"
left
\"
>
$exp_start
</td>
</tr>
\n
"
;
echo
"<tr>
<td>Ends: </td>
<td class=
\"
left
\"
>
$exp_end
</td>
<td>Expires: </td>
<td class=
\"
left
\"
>
$exp_expires
</td>
</tr>
\n
"
;
echo
"<tr>
<td>
Expires
: </td>
<td class=
\"
left
\"
>
$exp_
expires
</td>
<td>
Started
: </td>
<td class=
\"
left
\"
>
$exp_
start
</td>
</tr>
\n
"
;
echo
"<tr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment