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
bbcb657a
Commit
bbcb657a
authored
Oct 22, 2009
by
Jonathon Duerig
Browse files
Longitude/latitude/country location information will default to sitevar values if present.
parent
9c649900
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/ptopgen.in
View file @
bbcb657a
...
...
@@ -65,6 +65,13 @@ if ($PGENISUPPORT) {
$cmurn
=
GeniHRN::
Generate
(
$OURDOMAIN
,
"
authority
",
"
cm
");
}
my
$default_long
=
undef
;
TBGetSiteVar
('
protogeni/default_longitude
',
\
$default_long
);
my
$default_lat
=
undef
;
TBGetSiteVar
('
protogeni/default_latitude
',
\
$default_lat
);
my
$default_country
=
undef
;
TBGetSiteVar
('
protogeni/default_country
',
\
$default_country
);
my
$delaycap_override
;
#
...
...
@@ -1530,6 +1537,13 @@ sub print_node
my
$country
=
shift
(
@
_
);
my
$lat
=
shift
(
@
_
);
my
$long
=
shift
(
@
_
);
if
(
!
defined
(
$lat
)
||
!
defined
(
$long
))
{
$lat
=
$default_lat
;
$long
=
$default_long
;
}
if
(
!
defined
(
$country
))
{
$country
=
$default_country
;
}
if
(
!
$do_xml
)
{
my
$text
=
"
node
$name
"
.
join
("
",
@$types
)
.
"
-
"
.
join
("
",
@$features
)
.
...
...
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