Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
c5a32b5f
Commit
c5a32b5f
authored
May 03, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a lockdown checkbox for Rob. This closes issue
#76
.
parent
6e9a0929
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
www/aptui/js/adminextend.js
www/aptui/js/adminextend.js
+24
-1
www/aptui/template/adminextend.html
www/aptui/template/adminextend.html
+5
-3
No files found.
www/aptui/js/adminextend.js
View file @
c5a32b5f
...
...
@@ -87,7 +87,7 @@ function (_, sup, moment, mainString, waitwaitString, oopsString)
var
howlong
=
$
(
'
#days
'
).
val
();
var
reason
=
$
(
"
#reason
"
).
val
();
var
method
=
(
action
==
"
extend
"
?
"
RequestExtension
"
:
"
DenyExtension
"
);
xf
var
callback
=
function
(
json
)
{
sup
.
HideModal
(
"
#waitwait-modal
"
);
...
...
@@ -129,6 +129,10 @@ function (_, sup, moment, mainString, waitwaitString, oopsString)
.
format
(
"
MMM D h:mm A
"
));
}
});
// lockout change event handler.
$
(
'
#lockout-checkbox
'
).
change
(
function
()
{
DoLockout
(
$
(
this
).
is
(
"
:checked
"
));
});
}
});
}
...
...
@@ -179,6 +183,25 @@ function (_, sup, moment, mainString, waitwaitString, oopsString)
});
}
//
// Request lockout set/clear.
//
function
DoLockout
(
lockout
)
{
lockout
=
(
lockout
?
1
:
0
);
var
callback
=
function
(
json
)
{
if
(
json
.
code
)
{
alert
(
"
Failed to change lockout:
"
+
json
.
value
);
return
;
}
}
var
xmlthing
=
sup
.
CallServerMethod
(
null
,
"
status
"
,
"
Lockout
"
,
{
"
uuid
"
:
window
.
UUID
,
"
lockout
"
:
lockout
});
xmlthing
.
done
(
callback
);
}
// Helper.
function
decodejson
(
id
)
{
return
JSON
.
parse
(
_
.
unescape
(
$
(
id
)[
0
].
textContent
));
...
...
www/aptui/template/adminextend.html
View file @
c5a32b5f
...
...
@@ -188,11 +188,13 @@ pre {
<
/tr
>
<
tr
>
<
td
>
Lockout
:
<
/td
>
<
td
><%
if
(
expinfo
.
lockout
)
{
%>
<
span
class
=
"
text-danger
"
>
Yes
<
/span><% } else { %>No<% } %></
td
>
<
td
><
input
type
=
"
checkbox
"
id
=
"
lockout-checkbox
"
<%
if
(
expinfo
.
lockout
)
{
%>
checked
<%
}
%>
>
<
/td
>
<
td
>
Lockdown
:
<
/td
>
<
td
><%
if
(
expinfo
.
lockdown
)
{
%>
<
span
class
=
"
text-danger
"
>
Yes
<
/span><% } else { %>No<% } %></
td
>
<
/td
>
<
/tbody
>
<
/table
>
<
/div
>
...
...
@@ -200,7 +202,7 @@ pre {
<
/div
>
</script>
</div>
<div>
<div>
app
<script
id=
"secondrow-template"
type=
"text/template"
>
<
div
class
=
'
col-sm-6
'
>
<
div
class
=
'
panel panel-default
'
>
...
...
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