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
e349a63c
Commit
e349a63c
authored
Jun 11, 2010
by
Leigh B Stoller
Browse files
Print out URNs instead of hrns when printing protogeni slice info.
parent
3d26e961
Changes
3
Hide whitespace changes
Inline
Side-by-side
www/experiment_defs.php
View file @
e349a63c
...
...
@@ -1111,6 +1111,7 @@ class Experiment
if
(
$slice
)
{
$slice_hrn
=
$slice
->
hrn
();
$slice_urn
=
$slice
->
urn
();
if
(
ISADMIN
())
{
$url
=
CreateURL
(
"showslice"
,
"slice_idx"
,
$slice
->
idx
(),
"showtype"
,
"cm"
);
...
...
@@ -1118,13 +1119,13 @@ class Experiment
echo
"<tr>
<td>Geni Slice (CM): </td>
<td class=
\"
left
\"
>
<a href='
$url
'>
$slice_
h
rn
</a></td>
<a href='
$url
'>
$slice_
u
rn
</a></td>
</tr>
\n
"
;
}
else
{
echo
"<tr>
<td>Geni Slice (CM): </td>
<td class=
\"
left
\"
>
$slice_
h
rn
</td>
<td class=
\"
left
\"
>
$slice_
u
rn
</td>
</tr>
\n
"
;
}
}
...
...
@@ -1133,6 +1134,7 @@ class Experiment
$slice
=
GeniSlice
::
LookupByExperiment
(
"geni-sa"
,
$this
);
if
(
$slice
)
{
$slice_hrn
=
$slice
->
hrn
();
$slice_urn
=
$slice
->
urn
();
if
(
ISADMIN
())
{
$url
=
CreateURL
(
"showslice"
,
"slice_idx"
,
$slice
->
idx
(),
"showtype"
,
"sa"
);
...
...
@@ -1140,13 +1142,13 @@ class Experiment
echo
"<tr>
<td>Geni Slice (SA): </td>
<td class=
\"
left
\"
>
<a href='
$url
'>
$slice_
h
rn
</a></td>
<a href='
$url
'>
$slice_
u
rn
</a></td>
</tr>
\n
"
;
}
else
{
echo
"<tr>
<td>Geni Slice (SA): </td>
<td class=
\"
left
\"
>
$slice_
h
rn
</td>
<td class=
\"
left
\"
>
$slice_
u
rn
</td>
</tr>
\n
"
;
}
$slice
=
GeniSlice
::
Lookup
(
"geni-cm"
,
$slice_hrn
);
...
...
@@ -1158,13 +1160,13 @@ class Experiment
echo
"<tr>
<td>Geni Slice (CM): </td>
<td class=
\"
left
\"
>
<a href='
$url
'>
$slice_
h
rn
</a></td>
<a href='
$url
'>
$slice_
u
rn
</a></td>
</tr>
\n
"
;
}
else
{
echo
"<tr>
<td>Geni Slice (SA): </td>
<td class=
\"
left
\"
>
$slice_
h
rn
</td>
<td class=
\"
left
\"
>
$slice_
u
rn
</td>
</tr>
\n
"
;
}
}
...
...
www/geni_defs.php
View file @
e349a63c
...
...
@@ -174,6 +174,23 @@ class GeniSlice
}
return
null
;
}
#
# The urn is stored in the certificate.
#
function
urn
()
{
$slice_uuid
=
$this
->
uuid
();
$query_result
=
DBQueryFatal
(
"select urn from geni_certificates "
.
"where uuid='
$slice_uuid
'"
,
$this
->
dblink
);
if
(
$query_result
&&
mysql_num_rows
(
$query_result
))
{
$row
=
mysql_fetch_row
(
$query_result
);
return
$row
[
0
];
}
return
null
;
}
}
class
GeniUser
...
...
www/showslice.php
View file @
e349a63c
...
...
@@ -52,6 +52,10 @@ $rows = array();
$rows
[]
=
array
(
"idx"
=>
$slice
->
idx
());
$rows
[]
=
array
(
"hrn"
=>
$slice
->
hrn
());
$urn
=
$slice
->
urn
();
if
(
$urn
)
{
$rows
[]
=
array
(
"urn"
=>
$slice
->
urn
());
}
$rows
[]
=
array
(
"uuid"
=>
$slice
->
uuid
());
$rows
[]
=
array
(
"created"
=>
$slice
->
created
());
$rows
[]
=
array
(
"expires"
=>
$slice
->
expires
());
...
...
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