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
7d82bdb6
Commit
7d82bdb6
authored
Dec 17, 2014
by
Leigh B Stoller
Browse files
Send email when profile created.
parent
e195996f
Changes
2
Hide whitespace changes
Inline
Side-by-side
apt/APT_Profile.pm.in
View file @
7d82bdb6
...
...
@@ -946,7 +946,28 @@ sub Publish($)
$
self
->{
'DBROW'
}->{
'published'
}
=
time
();
return
0
;
}
}
#
#
Manage
URL
#
sub
AdminURL
($)
{
my
($
self
)
=
@
_
;
my
$
uuid
=
$
self
->
uuid
();
require
Project
;
my
$
project
=
Project
->
Lookup
($
self
->
pid_idx
());
return
undef
if
(
!defined($project));
my
$
wwwbase
=
$
project
->
wwwBase
();
$
wwwbase
.=
"/apt"
if
($
project
->
Brand
()->
isEmulab
());
return
$
wwwbase
.
"/manage_profile.php?uuid=$uuid"
;
}
#
_Always_
make
sure
that
this
1
is
at
the
end
of
the
file
...
1
;
apt/manage_profile.in
View file @
7d82bdb6
...
...
@@ -57,6 +57,7 @@ my $webtask_id;
#
my
$TB
=
"
@prefix
@
";
my
$TBOPS
=
"
@TBOPSEMAIL
@
";
my
$TBLOGS
=
"
@TBLOGSEMAIL
@
";
my
$MANAGEINSTANCE
=
"
$TB
/bin/manage_instance
";
#
...
...
@@ -475,6 +476,20 @@ if (defined($instance)) {
if
(
!
defined
(
$webtask_id
));
exit
(
0
);
}
my
$portalLogs
=
(
$project
->
isAPT
()
?
"
aptnet-logs
\@
flux.utah.edu
"
:
$project
->
isCloud
()
?
"
cloudlab-logs
\@
flux.utah.edu
"
:
$TBLOGS
);
$project
->
SendEmail
(
$portalLogs
,
"
New Profile Created
",
"
Name:
"
.
$profile
->
name
()
.
"
\n
"
.
"
User:
"
.
$profile
->
creator
()
.
"
\n
"
.
"
Project:
"
.
$profile
->
pid
()
.
"
(
"
.
$project
->
Brand
()
->
brand
()
.
"
)
\n
"
.
"
UUID:
"
.
$profile
->
uuid
()
.
"
\n
"
.
"
URL:
"
.
$profile
->
AdminURL
()
.
"
\n
",
$TBOPS
);
exit
(
0
);
sub
fatal
($)
...
...
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