Skip to content
GitLab
Menu
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
5e5bb239
Commit
5e5bb239
authored
Aug 06, 2014
by
Leigh B Stoller
Browse files
Minor UI tweaks to make creating a disk image more apparent
and less scary (to Mike).
parent
3498409e
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/loadimage.php3
View file @
5e5bb239
...
...
@@ -46,7 +46,7 @@ $optargs = OptionalPageArguments("target", PAGEARG_STRING,
#
# Standard Testbed Header
#
PAGEHEADER
(
"Snapshot Node Disk into Existing Image
Descriptor
"
);
PAGEHEADER
(
"Snapshot Node Disk into
New or
Existing Image"
);
# Need these below.
$imageid
=
$image
->
imageid
();
...
...
@@ -125,8 +125,7 @@ if (! isset($confirmed)) {
$url
=
CreateURL
(
"loadimage"
,
$image
);
$newurl
=
CreateURL
(
"newimageid_ez"
,
"node_id"
,
$target
);
echo
"<center><form action='
$url
' method='post'>
\n
"
.
"<h2><b>Warning!</b></h2>"
.
echo
"<br><center><form action='
$url
' method='post'>
\n
"
.
"<b>Doing a snapshot of '
$target
' into image '
$image_name
' "
.
"will overwrite any previous snapshot for that image.<br><br> "
.
"Are you sure you want to continue?</b><br>"
.
...
...
@@ -137,7 +136,8 @@ if (! isset($confirmed)) {
"</form>"
.
"<br>"
.
"If you do not want to overwrite this image, then "
.
"<a href='
$newurl
'>Create a new image</a>"
.
"<a href='
$newurl
'>create a new image</a> based on the image "
.
"that is currently loaded on
$target
. "
.
"</center>"
;
PAGEFOOTER
();
...
...
www/shownode.php3
View file @
5e5bb239
...
...
@@ -93,13 +93,33 @@ if ($node->HasSerialConsole()) {
"<a href=
\"
faq.php3#tiptunnel
\"
>(howto)"
,
"nodetipacl.php3?node_id=
$node_id
"
);
WRITESUBMENUBUTTON
(
"Report a Problem
<img src=
\"
/new.gif
\"
>
"
,
WRITESUBMENUBUTTON
(
"Report a Problem"
,
"reportnode.php3?node_id=
$node_id
"
);
WRITESUBMENUBUTTON
(
"Show Console Log"
,
"showconlog.php3?node_id=
$node_id
&linecount=500"
);
}
if
(
$node
->
AccessCheck
(
$this_user
,
$TB_NODEACCESS_LOADIMAGE
))
{
$baseimage
=
$node
->
def_boot_image
();
if
(
$baseimage
&&
$baseimage
->
AccessCheck
(
$this_user
,
$TB_IMAGEID_DESTROY
))
{
WRITESUBMENUBUTTON
(
"Create a Disk Image"
,
"loadimage.php3?target=
$node_id
"
.
"&imageid="
.
$baseimage
->
imageid
()
.
"&version="
.
$baseimage
->
version
());
}
else
{
#
# This can happen for virtual nodes which are running the
# defaut osid. User must create a new descriptor.
#
WRITESUBMENUBUTTON
(
"Create a Disk Image"
,
"newimageid_ez.php3?node_id=
$node_id
"
);
}
}
#
# SSH to option.
#
...
...
@@ -132,26 +152,6 @@ if ($isadmin ||
"bootlog.php3?node_id=
$node_id
"
);
}
if
(
$node
->
AccessCheck
(
$this_user
,
$TB_NODEACCESS_LOADIMAGE
))
{
$baseimage
=
$node
->
def_boot_image
();
if
(
$baseimage
&&
$baseimage
->
AccessCheck
(
$this_user
,
$TB_IMAGEID_DESTROY
))
{
WRITESUBMENUBUTTON
(
"Create a Disk Image"
,
"loadimage.php3?target=
$node_id
"
.
"&imageid="
.
$baseimage
->
imageid
()
.
"&version="
.
$baseimage
->
version
());
}
else
{
#
# This can happen for virtual nodes which are running the
# defaut osid. User must create a new descriptor.
#
WRITESUBMENUBUTTON
(
"Create a Disk Image"
,
"newimageid_ez.php3?node_id=
$node_id
"
);
}
}
if
((
$isadmin
||
$node
->
AccessCheck
(
$this_user
,
$TB_NODEACCESS_READINFO
))
&&
(
$node
->
TypeClass
()
==
"robot"
))
{
...
...
Write
Preview
Supports
Markdown
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