mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
New certificate and Kerberos key status behavior.
The status panel for certificates and Kerberos keys has been modified to display only the current status with the relevant buttons. New icons have been added to replace the red/yellow/green bullets.
This commit is contained in:
parent
c596b92591
commit
aa48d3b72e
@ -11,6 +11,8 @@ app_DATA = \
|
||||
aci.js \
|
||||
add.js \
|
||||
associate.js \
|
||||
caution.png \
|
||||
check.png \
|
||||
ipa_logo_180x50.png \
|
||||
ipa.js \
|
||||
ipa.css \
|
||||
|
BIN
install/static/caution.png
Executable file
BIN
install/static/caution.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 438 B |
@ -413,96 +413,132 @@ function certificate_status_widget(spec) {
|
||||
|
||||
that.widget_create(container);
|
||||
|
||||
var table = $('<table/>', {
|
||||
'class': 'certificate-status'
|
||||
var dd = $('<dd/>', {
|
||||
'class': 'first'
|
||||
}).appendTo(container);
|
||||
|
||||
var tr = $('<tr/>').appendTo(table);
|
||||
var div = $('<div/>', {
|
||||
name: 'certificate-valid'
|
||||
}).appendTo(dd);
|
||||
|
||||
var td = $('<td/>').appendTo(tr);
|
||||
$('<img/>', {
|
||||
src: 'check.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-valid'
|
||||
}).appendTo(td);
|
||||
var content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Valid Certificate Present:');
|
||||
content_div.append('<b>Valid Certificate Present:</b>');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'get',
|
||||
'value': 'Get'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
|
||||
td.append(' ');
|
||||
content_div.append(' ');
|
||||
|
||||
if (!that.is_selfsign()) {
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'revoke',
|
||||
'value': 'Revoke'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
|
||||
td.append(' ');
|
||||
content_div.append(' ');
|
||||
}
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'view',
|
||||
'value': 'View'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'create',
|
||||
'value': 'New Certificate'
|
||||
}).appendTo(content_div);
|
||||
|
||||
if (!that.is_selfsign()) {
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
div = $('<div/>', {
|
||||
name: 'certificate-revoked'
|
||||
}).appendTo(dd);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-revoked'
|
||||
}).appendTo(td);
|
||||
$('<img/>', {
|
||||
src: 'caution.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Certificate Revoked:');
|
||||
content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append($('<span/>', {
|
||||
content_div.append('<b>Certificate Revoked:</b>');
|
||||
|
||||
content_div.append(' ');
|
||||
|
||||
content_div.append($('<span/>', {
|
||||
'name': 'revocation_reason'
|
||||
}));
|
||||
td.append(' ');
|
||||
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'restore',
|
||||
'value': 'Restore'
|
||||
}).appendTo(td);
|
||||
}
|
||||
}).appendTo(content_div);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
content_div.append(' ');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-missing'
|
||||
}).appendTo(td);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('No Valid Certificate:');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'create',
|
||||
'value': 'New Certificate'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
}
|
||||
|
||||
div = $('<div/>', {
|
||||
name: 'certificate-missing'
|
||||
}).appendTo(dd);
|
||||
|
||||
$('<img/>', {
|
||||
src: 'caution.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
content_div.append('<b>No Valid Certificate:</b>');
|
||||
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'create',
|
||||
'value': 'New Certificate'
|
||||
}).appendTo(content_div);
|
||||
};
|
||||
|
||||
that.setup = function(container) {
|
||||
|
||||
that.widget_setup(container);
|
||||
|
||||
that.valid = $('.status-valid', that.container);
|
||||
that.revoked = $('.status-revoked', that.container);
|
||||
that.missing = $('.status-missing', that.container);
|
||||
that.valid = $('div[name=certificate-valid]', that.container);
|
||||
that.revoked = $('div[name=certificate-revoked]', that.container);
|
||||
that.missing = $('div[name=certificate-missing]', that.container);
|
||||
|
||||
var button = $('input[name=get]', that.container);
|
||||
that.get_button = IPA.button({
|
||||
@ -558,7 +594,8 @@ function certificate_status_widget(spec) {
|
||||
});
|
||||
button.replaceWith(that.restore_button);
|
||||
|
||||
button = $('input[name=create]', that.container);
|
||||
$('input[name=create]', that.container).each(function(index) {
|
||||
button = $(this);
|
||||
that.create_button = IPA.button({
|
||||
'label': 'New Certificate',
|
||||
'click': function() {
|
||||
@ -566,6 +603,7 @@ function certificate_status_widget(spec) {
|
||||
}
|
||||
});
|
||||
button.replaceWith(that.create_button);
|
||||
});
|
||||
};
|
||||
|
||||
that.load = function(result) {
|
||||
@ -582,14 +620,11 @@ function certificate_status_widget(spec) {
|
||||
};
|
||||
|
||||
function set_status(status, revocation_reason) {
|
||||
that.valid.toggleClass('status-valid-active', status == CERTIFICATE_STATUS_VALID);
|
||||
that.missing.toggleClass('status-missing-active', status == CERTIFICATE_STATUS_MISSING);
|
||||
|
||||
that.get_button.css('visibility', status == CERTIFICATE_STATUS_VALID ? 'visible' : 'hidden');
|
||||
that.view_button.css('visibility', status == CERTIFICATE_STATUS_VALID ? 'visible' : 'hidden');
|
||||
that.valid.css('display', status == CERTIFICATE_STATUS_VALID ? 'inline' : 'none');
|
||||
that.missing.css('display', status == CERTIFICATE_STATUS_MISSING ? 'inline' : 'none');
|
||||
|
||||
if (!that.is_selfsign()) {
|
||||
that.revoked.toggleClass('status-revoked-active', status == CERTIFICATE_STATUS_REVOKED);
|
||||
that.revoked.css('display', status == CERTIFICATE_STATUS_REVOKED ? 'inline' : 'none');
|
||||
that.revoke_button.css('visibility', status == CERTIFICATE_STATUS_VALID ? 'visible' : 'hidden');
|
||||
that.revocation_reason.html(revocation_reason == undefined ? '' : CRL_REASON[revocation_reason]);
|
||||
that.restore_button.css('visibility', revocation_reason == 6 ? 'visible' : 'hidden');
|
||||
|
BIN
install/static/check.png
Executable file
BIN
install/static/check.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -221,76 +221,78 @@ function host_provisioning_status_widget(spec) {
|
||||
|
||||
that.widget_create(container);
|
||||
|
||||
var table = $('<table/>', {
|
||||
'class': 'kerberos-key-status'
|
||||
var dd = $('<dd/>', {
|
||||
'class': 'first'
|
||||
}).appendTo(container);
|
||||
|
||||
var tr = $('<tr/>').appendTo(table);
|
||||
var div = $('<div/>', {
|
||||
name: 'kerberos-key-valid'
|
||||
}).appendTo(dd);
|
||||
|
||||
var td = $('<td/>').appendTo(tr);
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-valid'
|
||||
}).appendTo(td);
|
||||
$('<img/>', {
|
||||
src: 'check.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Kerberos Key Present, Host Provisioned:');
|
||||
var content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append('<b>Kerberos Key Present, Host Provisioned:</b>');
|
||||
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'unprovision',
|
||||
'value': 'Delete Key, Unprovision'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
div = $('<div/>', {
|
||||
name: 'kerberos-key-missing'
|
||||
}).appendTo(dd);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-missing'
|
||||
}).appendTo(td);
|
||||
$('<img/>', {
|
||||
src: 'caution.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Kerberos Key Not Present');
|
||||
content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append('<b>Kerberos Key Not Present</b>');
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
content_div.append('<br/>');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append('Enroll via One-Time-Password:');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Enroll via One-Time-Password:');
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append('<br/>');
|
||||
content_div.append('<br/>');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'text',
|
||||
'name': 'otp',
|
||||
'class': 'otp'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'enroll',
|
||||
'value': 'Set OTP'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
};
|
||||
|
||||
that.setup = function(container) {
|
||||
|
||||
that.widget_setup(container);
|
||||
|
||||
that.valid = $('.status-valid', that.container);
|
||||
that.missing = $('.status-missing', that.container);
|
||||
that.valid = $('div[name=kerberos-key-valid]', that.container);
|
||||
that.missing = $('div[name=kerberos-key-missing]', that.container);
|
||||
|
||||
var button = $('input[name=unprovision]', that.container);
|
||||
that.unprovision_button = IPA.button({
|
||||
@ -392,12 +394,8 @@ function host_provisioning_status_widget(spec) {
|
||||
};
|
||||
|
||||
function set_status(status) {
|
||||
that.valid.toggleClass('status-valid-active', status == 'valid');
|
||||
that.missing.toggleClass('status-missing-active', status == 'missing');
|
||||
|
||||
that.unprovision_button.css('visibility', status == 'valid' ? 'visible' : 'hidden');
|
||||
that.otp_input.css('visibility', status == 'missing' ? 'visible' : 'hidden');
|
||||
that.enroll_button.css('visibility', status == 'missing' ? 'visible' : 'hidden');
|
||||
that.valid.css('display', status == 'valid' ? 'inline' : 'none');
|
||||
that.missing.css('display', status == 'missing' ? 'inline' : 'none');
|
||||
}
|
||||
|
||||
return that;
|
||||
|
@ -235,7 +235,7 @@ dl.entryattrs input {
|
||||
|
||||
dl.entryattrs input.otp {
|
||||
min-width: 15em;
|
||||
width: 98%;
|
||||
width: 15em;
|
||||
}
|
||||
|
||||
span.attrhint {
|
||||
@ -619,13 +619,15 @@ table.kerberos-key-status {
|
||||
}
|
||||
|
||||
.status-icon {
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
-webkit-border-radius: 0.5em;
|
||||
-moz-border-radius: 0.5em;
|
||||
vertical-align: bottom;
|
||||
# width: auto;
|
||||
# height: 1em;
|
||||
# -webkit-border-radius: 0.5em;
|
||||
# -moz-border-radius: 0.5em;
|
||||
}
|
||||
|
||||
.status-valid {
|
||||
background-image:url('check.png');
|
||||
border: 0.2em solid #008000;
|
||||
}
|
||||
|
||||
|
@ -274,45 +274,57 @@ function service_provisioning_status_widget(spec) {
|
||||
|
||||
that.widget_create(container);
|
||||
|
||||
var table = $('<table/>', {
|
||||
'class': 'kerberos-key-status'
|
||||
var dd = $('<dd/>', {
|
||||
'class': 'first'
|
||||
}).appendTo(container);
|
||||
|
||||
var tr = $('<tr/>').appendTo(table);
|
||||
var div = $('<div/>', {
|
||||
'class': 'kerberos-key-valid'
|
||||
}).appendTo(dd);
|
||||
|
||||
var td = $('<td/>').appendTo(tr);
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-valid'
|
||||
}).appendTo(td);
|
||||
$('<img/>', {
|
||||
src: 'check.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Kerberos Key Present, Service Provisioned:');
|
||||
var content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
content_div.append('<b>Kerberos Key Present, Service Provisioned:</b>');
|
||||
|
||||
content_div.append(' ');
|
||||
|
||||
$('<input/>', {
|
||||
'type': 'button',
|
||||
'name': 'unprovision',
|
||||
'value': 'Delete Key, Unprovision'
|
||||
}).appendTo(td);
|
||||
}).appendTo(content_div);
|
||||
|
||||
tr = $('<tr/>').appendTo(table);
|
||||
div = $('<div/>', {
|
||||
name: 'kerberos-key-missing'
|
||||
}).appendTo(dd);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
$('<div/>', {
|
||||
'class': 'status-icon status-missing'
|
||||
}).appendTo(td);
|
||||
$('<img/>', {
|
||||
src: 'caution.png',
|
||||
style: 'float: left;',
|
||||
'class': 'status-icon'
|
||||
}).appendTo(div);
|
||||
|
||||
td = $('<td/>').appendTo(tr);
|
||||
td.append('Kerberos Key Not Present');
|
||||
content_div = $('<div/>', {
|
||||
style: 'float: left;'
|
||||
}).appendTo(div);
|
||||
|
||||
content_div.append('<b>Kerberos Key Not Present</b>');
|
||||
};
|
||||
|
||||
that.setup = function(container) {
|
||||
|
||||
that.widget_setup(container);
|
||||
|
||||
that.valid = $('.status-valid', that.container);
|
||||
that.missing = $('.status-missing', that.container);
|
||||
that.valid = $('div[name=kerberos-key-valid]', that.container);
|
||||
that.missing = $('div[name=kerberos-key-missing]', that.container);
|
||||
|
||||
var button = $('input[name=unprovision]', that.container);
|
||||
that.unprovision_button = IPA.button({
|
||||
@ -366,10 +378,8 @@ function service_provisioning_status_widget(spec) {
|
||||
};
|
||||
|
||||
function set_status(status) {
|
||||
that.valid.toggleClass('status-valid-active', status == 'valid');
|
||||
that.missing.toggleClass('status-missing-active', status == 'missing');
|
||||
|
||||
that.unprovision_button.css('visibility', status == 'valid' ? 'visible' : 'hidden');
|
||||
that.valid.css('display', status == 'valid' ? 'inline' : 'none');
|
||||
that.missing.css('display', status == 'missing' ? 'inline' : 'none');
|
||||
}
|
||||
|
||||
return that;
|
||||
|
Loading…
Reference in New Issue
Block a user