Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
6c969dc8
Commit
6c969dc8
authored
Jun 28, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow project/profile parameters in addition to uuid.
parent
614c9abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
www/aptui/show-profile.php
www/aptui/show-profile.php
+12
-6
No files found.
www/aptui/show-profile.php
View file @
6c969dc8
...
...
@@ -41,14 +41,20 @@ $isadmin = (ISADMIN() ? 1 : 0);
#
# Verify page arguments.
#
$reqargs
=
RequiredPageArguments
(
"uuid"
,
PAGEARG_STRING
);
$optargs
=
OptionalPageArguments
(
"source"
,
PAGEARG_BOOLEAN
,
$optargs
=
OptionalPageArguments
(
"uuid"
,
PAGEARG_STRING
,
"profile"
,
PAGEARG_STRING
,
"project"
,
PAGEARG_PROJECT
,
"source"
,
PAGEARG_BOOLEAN
,
"rspec"
,
PAGEARG_BOOLEAN
);
if
(
!
isset
(
$uuid
))
{
SPITUSERERROR
(
"Must provide uuid!"
);
if
(
isset
(
$uuid
))
{
$profile
=
Profile
::
Lookup
(
$uuid
);
}
elseif
(
isset
(
$project
)
&&
isset
(
$profile
))
{
$profile
=
Profile
::
LookupByName
(
$project
,
$profile
);
}
else
{
SPITUSERERROR
(
"Must provide a uuid or project/profile name!"
);
}
$profile
=
Profile
::
Lookup
(
$uuid
);
if
(
!
$profile
)
{
SPITUSERERROR
(
"No such profile!"
);
}
...
...
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