Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
9d815da4
Commit
9d815da4
authored
Nov 01, 2000
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefix specified experiment name with the project name, as per
what the tb scripts do.
parent
1f8a78bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
www/beginexp_form.php3
www/beginexp_form.php3
+4
-4
www/beginexp_process.php3
www/beginexp_process.php3
+17
-5
No files found.
www/beginexp_form.php3
View file @
9d815da4
...
...
@@ -103,14 +103,14 @@ echo " </td>
# Experiment ID and Long Name:
#
echo
"<tr>
<td>*
Experiment Name
:</td>
<td>*
Name<br>(will be prefixed by project name)
:</td>
<td><input type=
\"
text
\"
name=
\"
exp_id
\"
>
</td>
</tr>
\n
"
;
echo
"<tr>
<td>*
Experiment
Long Name:</td>
<td><input type=
\"
text
\"
name=
\"
exp_name
\"
>
<td>*Long Name:</td>
<td><input type=
\"
text
\"
name=
\"
exp_name
\"
size=
\"
40
\"
>
</td>
</tr>
\n
"
;
...
...
@@ -121,7 +121,7 @@ echo "<tr>
echo
"<tr>
<td>*Your NS file (20K max):</td>
<td><input type=
\"
hidden
\"
name=
\"
MAX_FILE_SIZE
\"
value=
\"
20000
\"
>
<input type=
\"
file
\"
name=
\"
exp_nsfile
\"
>
<input type=
\"
file
\"
name=
\"
exp_nsfile
\"
size=
\"
30
\"
>
</td>
</tr>
\n
"
;
...
...
www/beginexp_process.php3
View file @
9d815da4
...
...
@@ -89,13 +89,18 @@ if ($row = mysql_fetch_row($pswd_result)) {
}
}
#
# Current policy is to prefix the EID with the PID.
#
$exp_eid
=
$exp_pid
.
"-"
.
$exp_id
;
#
# Make sure the experiment ID does not already exist.
#
$query_result
=
mysql_db_query
(
$TBDBNAME
,
"SELECT eid FROM experiments WHERE eid=
\"
$exp_id
\"
"
);
"SELECT eid FROM experiments WHERE eid=
\"
$exp_
e
id
\"
"
);
if
(
$row
=
mysql_fetch_row
(
$query_result
))
{
USERERROR
(
"The experiment name
\"
$exp_id
\"
you have chosen is already "
.
USERERROR
(
"The experiment name
\"
$exp_
e
id
\"
you have chosen is already "
.
"in use. Please select another."
,
1
);
}
...
...
@@ -125,6 +130,12 @@ if (strcmp($trust, "group_root") && strcmp($trust, "local_root")) {
# which we know to be unique cause we tested that above. Later, when
# the experiment is ended, the directory will be deleted.
#
# Note that the filenames are all wierd. The tbsetup scripts do very odd
# things with the name, prepending the "project" to the filename.
#
# There is similar path stuff in endexp.php3. Be sure to sync that up
# if you change things here.
#
# No need to tell me how bogus this is.
#
$dirname
=
"
$TBWWW_DIR
"
.
"
$TBNSSUBDIR
"
.
"/"
.
"
$exp_id
"
;
...
...
@@ -219,15 +230,16 @@ $query_result = mysql_db_query($TBDBNAME,
"INSERT INTO experiments "
.
"(eid, pid, expt_created, expt_expires, expt_name, "
.
"expt_head_uid, expt_start, expt_end) "
.
"VALUES ('
$exp_id
', '
$exp_pid
', '
$exp_created
', '
$exp_expires
', "
.
"VALUES ('
$exp_
e
id
', '
$exp_pid
', '
$exp_created
', '
$exp_expires
', "
.
"'
$exp_name
', '
$uid
', '
$exp_start
', '
$exp_end
')"
);
if
(
!
$query_result
)
{
$err
=
mysql_error
();
TBERROR
(
"Database Error adding new experiment
$exp_id
:
$err
\n
"
,
1
);
TBERROR
(
"Database Error adding new experiment
$exp_
e
id
:
$err
\n
"
,
1
);
}
echo
"<center><br>"
;
echo
"<h2>Experiment Configured!<br>"
;
echo
"The ID for your experiment is
$exp_eid
<br>"
;
echo
"Here is a summary of the nodes that were allocated<br>"
;
echo
"</h2></center><br>"
;
...
...
@@ -252,7 +264,7 @@ echo "</XMP>\n";
if
(
1
)
{
mail
(
$TBMAIL_WWW
,
"TESTBED: New Experiment Created"
,
"User:
$uid
\n
"
.
"EID:
$exp_id
\n
"
.
"EID:
$exp_
e
id
\n
"
.
"PID:
$exp_pid
\n
"
.
"Name:
$exp_name
\n
"
.
"Created:
$exp_created
\n
"
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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