Rotation ui (#633)

* Adding rotation to the UI.

* Removing spinkit dependency.
This commit is contained in:
kevgliss 2016-12-26 15:55:11 -08:00 committed by GitHub
parent ce75bba2c3
commit 700c57b807
18 changed files with 417 additions and 391 deletions

View File

@ -20,7 +20,6 @@
"angular-loading-bar": "~0.8.0", "angular-loading-bar": "~0.8.0",
"angular-moment": "~0.10.3", "angular-moment": "~0.10.3",
"moment-range": "~2.1.0", "moment-range": "~2.1.0",
"angular-spinkit": "~0.3.3",
"angular-clipboard": "~1.3.0", "angular-clipboard": "~1.3.0",
"angularjs-toaster": "~1.0.0", "angularjs-toaster": "~1.0.0",
"angular-chart.js": "~0.8.8", "angular-chart.js": "~0.8.8",

View File

@ -196,6 +196,8 @@ def reissue(old_certificate_name, commit):
if commit: if commit:
print("[!] Running in COMMIT mode.") print("[!] Running in COMMIT mode.")
print("[+] Starting certificate re-issuance.")
old_cert = validate_certificate(old_certificate_name) old_cert = validate_certificate(old_certificate_name)
if not old_cert: if not old_cert:

View File

@ -66,7 +66,7 @@ class Certificate(db.Model):
bits = Column(Integer()) bits = Column(Integer())
san = Column(String(1024)) # TODO this should be migrated to boolean san = Column(String(1024)) # TODO this should be migrated to boolean
rotation = Column(Boolean) rotation = Column(Boolean, default=False)
user_id = Column(Integer, ForeignKey('users.id')) user_id = Column(Integer, ForeignKey('users.id'))
authority_id = Column(Integer, ForeignKey('authorities.id', ondelete="CASCADE")) authority_id = Column(Integer, ForeignKey('authorities.id', ondelete="CASCADE"))

View File

@ -62,6 +62,7 @@ class CertificateInputSchema(CertificateCreationSchema):
key_type = fields.String(validate=validate.OneOf(['RSA2048', 'RSA4096']), missing='RSA2048') key_type = fields.String(validate=validate.OneOf(['RSA2048', 'RSA4096']), missing='RSA2048')
notify = fields.Boolean(default=True) notify = fields.Boolean(default=True)
rotation = fields.Boolean()
# certificate body fields # certificate body fields
organizational_unit = fields.String(missing=lambda: current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT')) organizational_unit = fields.String(missing=lambda: current_app.config.get('LEMUR_DEFAULT_ORGANIZATIONAL_UNIT'))
@ -84,9 +85,11 @@ class CertificateInputSchema(CertificateCreationSchema):
class CertificateEditInputSchema(CertificateSchema): class CertificateEditInputSchema(CertificateSchema):
notify = fields.Boolean()
owner = fields.String() owner = fields.String()
notify = fields.Boolean()
rotation = fields.Boolean()
destinations = fields.Nested(AssociatedDestinationSchema, missing=[], many=True) destinations = fields.Nested(AssociatedDestinationSchema, missing=[], many=True)
notifications = fields.Nested(AssociatedNotificationSchema, missing=[], many=True) notifications = fields.Nested(AssociatedNotificationSchema, missing=[], many=True)
replaces = fields.Nested(AssociatedCertificateSchema, missing=[], many=True) replaces = fields.Nested(AssociatedCertificateSchema, missing=[], many=True)
@ -116,12 +119,20 @@ class CertificateEditInputSchema(CertificateSchema):
class CertificateNestedOutputSchema(LemurOutputSchema): class CertificateNestedOutputSchema(LemurOutputSchema):
__envelope__ = False __envelope__ = False
id = fields.Integer() id = fields.Integer()
active = fields.Boolean() name = fields.String()
owner = fields.Email()
creator = fields.Nested(UserNestedOutputSchema)
description = fields.String()
status = fields.Boolean()
bits = fields.Integer() bits = fields.Integer()
body = fields.String() body = fields.String()
chain = fields.String() chain = fields.String()
description = fields.String() active = fields.Boolean()
name = fields.String()
rotation = fields.Boolean()
notify = fields.Boolean()
# Note aliasing is the first step in deprecating these fields. # Note aliasing is the first step in deprecating these fields.
cn = fields.String() # deprecated cn = fields.String() # deprecated
@ -133,9 +144,6 @@ class CertificateNestedOutputSchema(LemurOutputSchema):
not_before = fields.DateTime() # deprecated not_before = fields.DateTime() # deprecated
validity_start = ArrowDateTime(attribute='not_before') validity_start = ArrowDateTime(attribute='not_before')
owner = fields.Email()
status = fields.Boolean()
creator = fields.Nested(UserNestedOutputSchema)
issuer = fields.Nested(AuthorityNestedOutputSchema) issuer = fields.Nested(AuthorityNestedOutputSchema)
@ -155,6 +163,8 @@ class CertificateOutputSchema(LemurOutputSchema):
issuer = fields.String() issuer = fields.String()
name = fields.String() name = fields.String()
rotation = fields.Boolean()
# Note aliasing is the first step in deprecating these fields. # Note aliasing is the first step in deprecating these fields.
notify = fields.Boolean() notify = fields.Boolean()
active = fields.Boolean(attribute='notify') active = fields.Boolean(attribute='notify')

View File

@ -126,26 +126,16 @@ def export(cert, export_plugin):
return plugin.export(cert.body, cert.chain, cert.private_key, export_plugin['pluginOptions']) return plugin.export(cert.body, cert.chain, cert.private_key, export_plugin['pluginOptions'])
def update(cert_id, owner, description, notify, destinations, notifications, replaces, roles): def update(cert_id, **kwargs):
""" """
Updates a certificate Updates a certificate
:param cert_id: :param cert_id:
:param owner:
:param description:
:param notify:
:param destinations:
:param notifications:
:param replaces:
:return: :return:
""" """
cert = get(cert_id) cert = get(cert_id)
cert.notify = notify
cert.description = description for key, value in kwargs.items():
cert.destinations = destinations setattr(cert, key, value)
cert.notifications = notifications
cert.roles = roles
cert.replaces = replaces
cert.owner = owner
return database.update(cert) return database.update(cert)
@ -555,7 +545,7 @@ def reissue_certificate(certificate, replace=None, user=None):
primitives['creator'] = user primitives['creator'] = user
if replace: if replace:
primitives['replacements'] = [certificate] primitives['replaces'] = [certificate]
new_cert = create(**primitives) new_cert = create(**primitives)

View File

@ -638,18 +638,13 @@ class Certificates(AuthenticatedResource):
for destination in data['destinations']: for destination in data['destinations']:
if destination.plugin.requires_key: if destination.plugin.requires_key:
if not cert.private_key: if not cert.private_key:
return dict(message='Unable to add destination: {0}. Certificate does not have required private key.'.format(destination.label)), 400 return dict(
message='Unable to add destination: {0}. Certificate does not have required private key.'.format(
destination.label
)
), 400
return service.update( return service.update(certificate_id)
certificate_id,
data['owner'],
data['description'],
data['notify'],
data['destinations'],
data['notifications'],
data['replacements'],
data['roles']
)
class NotificationCertificatesList(AuthenticatedResource): class NotificationCertificatesList(AuthenticatedResource):

View File

@ -10,7 +10,6 @@
'restangular', 'restangular',
'angular-loading-bar', 'angular-loading-bar',
'ui.bootstrap', 'ui.bootstrap',
'angular-spinkit',
'toaster', 'toaster',
'uiSwitch', 'uiSwitch',
'mgo-angular-wizard', 'mgo-angular-wizard',

View File

@ -1,21 +1,21 @@
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title">Create Certificate <span class="text-muted"><small>encrypt all the things</small></span></h3> <h3 class="modal-title">Create Certificate <span class="text-muted"><small>encrypt all the things</small></span></h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div> <div>
<wizard on-finish="create(certificate)" template="angular/wizard.html"> <wizard on-finish="create(certificate)" template="angular/wizard.html">
<wz-step title="Tracking" canexit="trackingForm.$valid"> <wz-step title="Tracking" canexit="trackingForm.$valid">
<ng-include src="'angular/certificates/certificate/tracking.tpl.html'"></ng-include> <ng-include src="'angular/certificates/certificate/tracking.tpl.html'"></ng-include>
</wz-step> </wz-step>
<wz-step title="Distinguished Name" canenter="exitTracking" canexit="exitDN"> <wz-step title="Options" canenter="exitTracking">
<ng-include src="'angular/certificates/certificate/distinguishedName.tpl.html'"></ng-include> <ng-include src="'angular/certificates/certificate/options.tpl.html'"></ng-include>
</wz-step> </wz-step>
<wz-step title="Options" canenter="enterValidation"> <wz-step title="Distinguished Name" canenter="exitValidation">
<ng-include src="'angular/certificates/certificate/options.tpl.html'"></ng-include> <ng-include src="'angular/certificates/certificate/distinguishedName.tpl.html'"></ng-include>
</wz-step> </wz-step>
</wizard> </wizard>
</div> </div>
</div> </div>

View File

@ -1,5 +1,16 @@
<form name="dnForm" novalidate> <form name="dnForm" novalidate>
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error': dnForm.name.$invalid, 'has-success': !dnForm.name.$invalid&&dnForm.name.$dirty}">
<label class="control-label col-sm-2">
Custom Certificate Name
</label>
<div class="col-sm-10">
<input name="name" ng-model="certificate.name"
placeholder="the.example.net-SymantecCorporation-20150828-20160830" class="form-control"
uib-tooltip="If no name is provided, Lemur will generate a name for you">
</div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error': dnForm.country.$invalid, 'has-success': !dnForm.country.$invalid&&dnForm.country.$dirty}"> ng-class="{'has-error': dnForm.country.$invalid, 'has-success': !dnForm.country.$invalid&&dnForm.country.$dirty}">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
@ -7,7 +18,8 @@
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="country" ng-model="certificate.country" placeholder="Country" class="form-control" required/> <input name="country" ng-model="certificate.country" placeholder="Country" class="form-control" required/>
<p ng-show="dnForm.country.$invalid && !dnForm.country.$pristine" class="help-block">You must enter a country</p> <p ng-show="dnForm.country.$invalid && !dnForm.country.$pristine" class="help-block">You must enter a
country</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
@ -27,7 +39,8 @@
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="location" ng-model="certificate.location" placeholder="Location" class="form-control" required/> <input name="location" ng-model="certificate.location" placeholder="Location" class="form-control" required/>
<p ng-show="dnForm.location.$invalid && !dnForm.location.$pristine" class="help-block">You must enter a location</p> <p ng-show="dnForm.location.$invalid && !dnForm.location.$pristine" class="help-block">You must enter a
location</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
@ -36,8 +49,10 @@
Organization Organization
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="organization" ng-model="certificate.organization" placeholder="Organization" class="form-control" required/> <input name="organization" ng-model="certificate.organization" placeholder="Organization" class="form-control"
<p ng-show="dnForm.organization.$invalid && !dnForm.organization.$pristine" class="help-block">You must enter a organization</p> required/>
<p ng-show="dnForm.organization.$invalid && !dnForm.organization.$pristine" class="help-block">You must enter a
organization</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
@ -46,8 +61,10 @@
Organizational Unit Organizational Unit
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="organizationalUnit" ng-model="certificate.organizationalUnit" placeholder="Organizational Unit" class="form-control" required/> <input name="organizationalUnit" ng-model="certificate.organizationalUnit" placeholder="Organizational Unit"
<p ng-show="dnForm.organization.$invalid && !dnForm.organizationalUnit.$pristine" class="help-block">You must enter a organizational unit</p> class="form-control" required/>
<p ng-show="dnForm.organization.$invalid && !dnForm.organizationalUnit.$pristine" class="help-block">You must
enter a organizational unit</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,44 +1,56 @@
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span>
<h3 class="modal-title">Edit <span class="text-muted"><small>{{ certificate.name }}</small></span></h3> </button>
<h3 class="modal-title">Edit <span class="text-muted"><small>{{ certificate.name }}</small></span></h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form name="editForm" class="form-horizontal" role="form" novalidate> <form name="editForm" class="form-horizontal" role="form" novalidate>
<div class="form-group" <div class="form-group"
ng-class="{'has-error': editForm.owner.$invalid, 'has-success': !editForm.owner.$invalid&&editForm.owner.$dirty}"> ng-class="{'has-error': editForm.owner.$invalid, 'has-success': !editForm.owner.$invalid&&editForm.owner.$dirty}">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Owner Owner
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="email" name="owner" ng-model="certificate.owner" placeholder="owner@example.com" <input type="email" name="owner" ng-model="certificate.owner" placeholder="owner@example.com"
class="form-control" required/> class="form-control" required/>
<p ng-show="editForm.owner.$invalid && !editForm.owner.$pristine" class="help-block">Enter a valid <p ng-show="editForm.owner.$invalid && !editForm.owner.$pristine" class="help-block">Enter a valid
email.</p> email.</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error': editForm.description.$invalid, 'has-success': !editForm.$invalid&&editForm.description.$dirty}"> ng-class="{'has-error': editForm.description.$invalid, 'has-success': !editForm.$invalid&&editForm.description.$dirty}">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Description Description
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="description" ng-model="certificate.description" placeholder="Something elegant" class="form-control" required></textarea> <textarea name="description" ng-model="certificate.description" placeholder="Something elegant"
<p ng-show="editForm.description.$invalid && !editForm.description.$pristine" class="help-block">You must give a short description about this authority will be used for, this description should only include alphanumeric characters</p> class="form-control" required></textarea>
</div> <p ng-show="editForm.description.$invalid && !editForm.description.$pristine" class="help-block">You must give a
</div> short description about this authority will be used for, this description should only include alphanumeric
<div class="form-group"> characters</p>
<label class="control-label col-sm-2"> </div>
Roles </div>
</label> <div class="form-group">
<div class="col-sm-10" ng-model="certificate" role-select></div> <label class="control-label col-sm-2">
</div> Roles
<div ng-include="'angular/certificates/certificate/replaces.tpl.html'"></div> </label>
<div ng-include="'angular/certificates/certificate/notifications.tpl.html'"></div> <div class="col-sm-10" ng-model="certificate" role-select></div>
<div ng-include="'angular/certificates/certificate/destinations.tpl.html'"></div> </div>
</form> <div ng-include="'angular/certificates/certificate/replaces.tpl.html'"></div>
<div ng-include="'angular/certificates/certificate/notifications.tpl.html'"></div>
<div class="form-group">
<label class="control-label col-sm-2">Auto Rotate</label>
<div class="col-sm-10">
<switch ng-model="certificate.rotation" id="active" name="active" class="green small"
uib-tooltip="If selected, new certificates will be automatically re-issued and re-deployed onto known endpoints."></switch>
</div>
</div>
</form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="submit" ng-click="save(certificate)" ng-disabled="editForm.$invalid" class="btn btn-success">Save</button> <button type="submit" ng-click="save(certificate)" ng-disabled="editForm.$invalid" class="btn btn-success">Save
<button ng-click="cancel()" class="btn btn-danger">Cancel</button> </button>
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div> </div>

View File

@ -1,17 +1,45 @@
<form name="optionsForm" novalidate> <form name="optionsForm" novalidate>
<div class="form-horizontal"> <div class="form-horizontal">
<div> <div>
<div class="form-group">
<label class="control-label col-sm-2">
Certificate Template
</label>
<div class="col-sm-10">
<select class="form-control" ng-change="certificate.useTemplate()" name="certificateTemplate"
ng-model="certificate.template" ng-options="template.name for template in templates"></select>
</div>
</div>
<div class="form-group"
ng-class="{'has-error': trackingForm.csr.$invalid&&trackingForm.csr.$dirty, 'has-success': !trackingForm.csr.$invalid&&trackingForm.csr.$dirty}">
<label class="control-label col-sm-2">
Certificate Signing Request (CSR)
</label>
<div class="col-sm-10">
<textarea uib-tooltip="Values defined in the CSR will take precedence"
name="certificate signing request"
ng-model="certificate.csr"
placeholder="PEM encoded string..." class="form-control"
ng-pattern="/^-----BEGIN CERTIFICATE REQUEST-----/"></textarea>
<p ng-show="trackingForm.csr.$invalid && !trackingForm.csr.$pristine"
class="help-block">Enter a valid certificate signing request.</p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Subject Alternate Names Subject Alternate Names
</label> </label>
<div class="col-sm-3"> <div class="col-sm-3">
<select class="form-control" ng-model="certificate.subAltType" ng-options="item for item in ['DNSName', 'IPAddress', 'uniformResourceIdentifier', 'directoryName','rfc822Name', 'registeredID', 'otherName', 'x400Address', 'EDIPartyName']"></select> <select class="form-control" ng-model="certificate.subAltType"
ng-options="item for item in ['DNSName', 'IPAddress', 'uniformResourceIdentifier', 'directoryName','rfc822Name', 'registeredID', 'otherName', 'x400Address', 'EDIPartyName']"></select>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input tooltip-trigger="focus" tooltip-placement="top" uib-tooltip="String or Base64-encoded DER ASN.1 structure for the value" class="form-control" name="value" ng-model="certificate.subAltValue" placeholder="Value" class="form-control" required/> <input tooltip-trigger="focus" tooltip-placement="top"
<span class="input-group-btn"> uib-tooltip="String or Base64-encoded DER ASN.1 structure for the value" class="form-control"
name="value" ng-model="certificate.subAltValue" placeholder="Value" class="form-control" required/>
<span class="input-group-btn">
<button ng-click="certificate.attachSubAltName()" class="btn btn-info">Add</button> <button ng-click="certificate.attachSubAltName()" class="btn btn-info">Add</button>
</span> </span>
</div> </div>
@ -24,7 +52,9 @@
<td>{{ alt.nameType }}</td> <td>{{ alt.nameType }}</td>
<td>{{ alt.value }}</td> <td>{{ alt.value }}</td>
<td> <td>
<button type="button" ng-click="certificate.removeSubAltName($index)" class="btn btn-danger btn-sm pull-right">Remove</button> <button type="button" ng-click="certificate.removeSubAltName($index)"
class="btn btn-danger btn-sm pull-right">Remove
</button>
</td> </td>
</tr> </tr>
</table> </table>
@ -32,10 +62,12 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Key Type Key Type
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="form-control" ng-model="certificate.keyType" ng-options="option for option in ['RSA2048', 'RSA4096']" ng-init="certificate.keyType = 'RSA2048'"></select> <select class="form-control" ng-model="certificate.keyType"
ng-options="option for option in ['RSA2048', 'RSA4096']"
ng-init="certificate.keyType = 'RSA2048'"></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -99,12 +131,14 @@
<div class="col-sm-3"> <div class="col-sm-3">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useServerAuthentication">Server Authentication <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useServerAuthentication">Server
Authentication
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useClientAuthentication">Client Authentication <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useClientAuthentication">Client
Authentication
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
@ -131,7 +165,8 @@
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useSmartCardLogon">Smartcard Logon <input type="checkbox" ng-model="certificate.extensions.extendedKeyUsage.useSmartCardLogon">Smartcard
Logon
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
@ -147,13 +182,17 @@
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="checkbox"> <div class="checkbox">
<label tooltip-trigger="mouseenter" tooltip-placement="top" uib-tooltip="Put Issuer's keyIdentifier in this extension" > <label tooltip-trigger="mouseenter" tooltip-placement="top"
<input type="checkbox" ng-model="certificate.extensions.authorityKeyIdentifier.useKeyIdentifier">Key Identifier uib-tooltip="Put Issuer's keyIdentifier in this extension">
<input type="checkbox" ng-model="certificate.extensions.authorityKeyIdentifier.useKeyIdentifier">Key
Identifier
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label tooltip-trigger="mouseenter" tooltip-placement="top" uib-tooltip="Put Issuer's Name and Serial number" > <label tooltip-trigger="mouseenter" tooltip-placement="top"
<input type="checkbox" ng-model="certificate.extensions.authorityIdentifier.useAuthorityCert">Authority Certificate uib-tooltip="Put Issuer's Name and Serial number">
<input type="checkbox" ng-model="certificate.extensions.authorityIdentifier.useAuthorityCert">Authority
Certificate
</label> </label>
</div> </div>
</div> </div>
@ -164,7 +203,8 @@
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="checkbox"> <div class="checkbox">
<label tooltip-trigger="mouseenter" tooltip-placement="top" uib-tooltip="Ask CA to include/not include AIA extension" > <label tooltip-trigger="mouseenter" tooltip-placement="top"
uib-tooltip="Ask CA to include/not include AIA extension">
<input type="checkbox" ng-model="certificate.extensions.certificateInfoAccess.includeAIA">Include AIA <input type="checkbox" ng-model="certificate.extensions.certificateInfoAccess.includeAIA">Include AIA
</label> </label>
</div> </div>
@ -176,7 +216,8 @@
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="checkbox"> <div class="checkbox">
<label tooltip-trigger="mouseenter" tooltip-placement="top" uib-tooltip="Ask CA to include/not include Subject Key Identifier" > <label tooltip-trigger="mouseenter" tooltip-placement="top"
uib-tooltip="Ask CA to include/not include Subject Key Identifier">
<input type="checkbox" ng-model="certificate.extensions.subjectKeyIdentifier.includeSKI">Include SKI <input type="checkbox" ng-model="certificate.extensions.subjectKeyIdentifier.includeSKI">Include SKI
</label> </label>
</div> </div>
@ -187,7 +228,8 @@
cRL Distribution Points cRL Distribution Points
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="form-control" ng-model="certificate.extensions.cRLDistributionPoints.includeCRLDP" ng-options="item for item in ['yes', 'no', 'default']"></select> <select class="form-control" ng-model="certificate.extensions.cRLDistributionPoints.includeCRLDP"
ng-options="item for item in ['yes', 'no', 'default']"></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -195,15 +237,21 @@
Custom Custom
</label> </label>
<div class="col-sm-2"> <div class="col-sm-2">
<input tooltip-trigger="focus" tooltip-placement="top" uib-tooltip="OID for the custom extension e.g. 1.12.123.12.10" class="form-control" name="oid" ng-model="certificate.customOid" placeholder="Oid" class="form-control" required/> <input tooltip-trigger="focus" tooltip-placement="top"
uib-tooltip="OID for the custom extension e.g. 1.12.123.12.10" class="form-control" name="oid"
ng-model="certificate.customOid" placeholder="Oid" class="form-control" required/>
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
<select tooltip-trigger="focus" tooltip-placement="top" uib-tooltip="Encoding for value" class="form-control col-sm-2" ng-model="certificate.customEncoding" ng-options="item for item in ['b64asn1', 'string', 'ia5string']"></select> <select tooltip-trigger="focus" tooltip-placement="top" uib-tooltip="Encoding for value"
class="form-control col-sm-2" ng-model="certificate.customEncoding"
ng-options="item for item in ['b64asn1', 'string', 'ia5string']"></select>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="input-group"> <div class="input-group">
<input tooltip-trigger="focus" tooltip-placement="top" uib-tooltip="String or Base64-encoded DER ASN.1 structure for the value" class="form-control" name="value" ng-model="certificate.customValue" placeholder="Value" class="form-control" required/> <input tooltip-trigger="focus" tooltip-placement="top"
<span class="input-group-btn"> uib-tooltip="String or Base64-encoded DER ASN.1 structure for the value" class="form-control"
name="value" ng-model="certificate.customValue" placeholder="Value" class="form-control" required/>
<span class="input-group-btn">
<button ng-click="certificate.attachCustom()" class="btn btn-info">Add</button> <button ng-click="certificate.attachCustom()" class="btn btn-info">Add</button>
</span> </span>
</div> </div>
@ -224,9 +272,11 @@
<td>{{ custom.oid }}</td> <td>{{ custom.oid }}</td>
<td>{{ custom.encoding }}</td> <td>{{ custom.encoding }}</td>
<td>{{ custom.value }}</td> <td>{{ custom.value }}</td>
<td>{{ custom.isCritical}}</td> <td>{{ custom.isCritical }}</td>
<td> <td>
<button type="button" ng-click="certificate.removeCustom($index)" class="btn btn-danger btn-sm pull-right">Remove</button> <button type="button" ng-click="certificate.removeCustom($index)"
class="btn btn-danger btn-sm pull-right">Remove
</button>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,177 +1,149 @@
<form name="trackingForm" novalidate> <form name="trackingForm" novalidate>
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" <div class="form-group"
ng-class="{'has-error': trackingForm.ownerEmail.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.ownerEmail.$dirty}"> ng-class="{'has-error': trackingForm.ownerEmail.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.ownerEmail.$dirty}">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Owner Owner
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="email" name="ownerEmail" ng-model="certificate.owner" placeholder="TeamDL@example.com" <input type="email" name="ownerEmail" ng-model="certificate.owner" placeholder="TeamDL@example.com"
uib-tooltip="This is the certificates team distribution list or main point of contact" uib-tooltip="This is the certificates team distribution list or main point of contact"
class="form-control" class="form-control"
required/> required/>
<p ng-show="trackingForm.ownerEmail.$invalid && !trackingForm.ownerEmail.$pristine" class="help-block"> <p ng-show="trackingForm.ownerEmail.$invalid && !trackingForm.ownerEmail.$pristine" class="help-block">
You must enter an Certificate owner</p> You must enter an Certificate owner</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group">
ng-class="{'has-error': trackingForm.name.$invalid, 'has-success': !trackingForm.name.$invalid&&trackingForm.name.$dirty}"> <label class="control-label col-sm-2">
<label class="control-label col-sm-2" uib-tooltip="If no name is provided, Lemur will generate a name for you"> Roles
Custom Name <span class="glyphicon glyphicon-question-sign"></span> </label>
</label> <div class="col-sm-10" ng-model="certificate" role-select></div>
<div class="col-sm-10"> </div>
<input name="name" ng-model="certificate.name" <div ng-include="'angular/certificates/certificate/notifications.tpl.html'"></div>
placeholder="the.example.net-SymantecCorporation-20150828-20160830" class="form-control"/> <div class="form-group"
</div> ng-class="{'has-error': trackingForm.commonName.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.commonName.$dirty}">
</div> <label class="control-label col-sm-2">
<div class="form-group" Common Name
ng-class="{'has-error': trackingForm.description.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.description.$dirty}"> </label>
<label class="control-label col-sm-2"> <div class="col-sm-10">
Description <input name="commonName"
</label> uib-tooltip="If you need a certificate with multiple domains enter your primary domain here and the rest under 'Subject Alternate Names' by clicking 'More Options'"
ng-model="certificate.commonName" placeholder="Common Name" class="form-control"
ng-maxlength="64"
required/>
<div class="col-sm-10"> <p ng-show="trackingForm.commonName.$invalid && !trackingForm.commonName.$pristine" class="help-block">
You must
enter a common name and it must be less than 64 characters</p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error': trackingForm.description.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.description.$dirty}">
<label class="control-label col-sm-2">
Description
</label>
<div class="col-sm-10">
<textarea name="description" ng-model="certificate.description" placeholder="Something elegant" <textarea name="description" ng-model="certificate.description" placeholder="Something elegant"
class="form-control" required></textarea> class="form-control" required></textarea>
<p ng-show="trackingForm.description.$invalid && !trackingForm.description.$pristine" <p ng-show="trackingForm.description.$invalid && !trackingForm.description.$pristine"
class="help-block">You class="help-block">You
must give a short description about this certificate will be used for.</p> must give a short description about this certificate will be used for.</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error': trackingForm.selectedAuthority.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.selectedAuthority.$dirty}"> ng-class="{'has-error': trackingForm.selectedAuthority.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.selectedAuthority.$dirty}">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Certificate Authority Certificate Authority
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<ui-select class="input-md" ng-model="certificate.authority" theme="bootstrap" title="choose an authority"> <ui-select class="input-md" ng-model="certificate.authority" theme="bootstrap" title="choose an authority">
<ui-select-match placeholder="select an authority...">{{$select.selected.name}}</ui-select-match> <ui-select-match placeholder="select an authority...">{{$select.selected.name}}</ui-select-match>
<ui-select-choices class="form-control" repeat="authority in authorities" <ui-select-choices class="form-control" repeat="authority in authorities"
refresh="getAuthoritiesByName($select.search)" refresh="getAuthoritiesByName($select.search)"
refresh-delay="300"> refresh-delay="300">
<div ng-bind-html="authority.name | highlight: $select.search"></div> <div ng-bind-html="authority.name | highlight: $select.search"></div>
<small> <small>
<span ng-bind-html="''+authority.description | highlight: $select.search"></span> <span ng-bind-html="''+authority.description | highlight: $select.search"></span>
</small> </small>
</ui-select-choices> </ui-select-choices>
</ui-select> </ui-select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2"
Certificate Template uib-tooltip="If no date is selected Lemur attempts to issue a 2 year certificate">
</label> Validity Range <span class="glyphicon glyphicon-question-sign"></span>
</label>
<div class="col-sm-10"> <div class="col-sm-2">
<select class="form-control" ng-change="certificate.useTemplate()" name="certificateTemplate" <select ng-model="certificate.validityYears" class="form-control">
ng-model="certificate.template" ng-options="template.name for template in templates"></select> <option value="">-</option>
</div> <option value="1">1 year</option>
</div> <option value="2">2 years</option>
<div class="form-group" <option value="3">3 years</option>
ng-class="{'has-error': trackingForm.commonName.$invalid, 'has-success': !trackingForm.$invalid&&trackingForm.commonName.$dirty}"> <option value="4">4 years</option>
<label class="control-label col-sm-2"> </select>
Common Name </div>
</label> <span style="padding-top: 15px" class="text-center col-sm-1">
<div class="col-sm-10">
<input name="commonName"
uib-tooltip="If you need a certificate with multiple domains enter your primary domain here and the rest under 'Subject Alternate Names' in the next few panels"
ng-model="certificate.commonName" placeholder="Common Name" class="form-control"
ng-maxlength="64"
required/>
<p ng-show="trackingForm.commonName.$invalid && !trackingForm.commonName.$pristine" class="help-block">
You must
enter a common name and it must be less than 64 characters</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"
uib-tooltip="If no date is selected Lemur attempts to issue a 2 year certificate">
Validity Range <span class="glyphicon glyphicon-question-sign"></span>
</label>
<div class="col-sm-2">
<select ng-model="certificate.validityYears" class="form-control">
<option value="">-</option>
<option value="1">1 year</option>
<option value="2">2 years</option>
<option value="3">3 years</option>
<option value="4">4 years</option>
</select>
</div>
<span style="padding-top: 15px" class="text-center col-sm-1">
<strong>or</strong> <strong>or</strong>
</span> </span>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" <input type="text" class="form-control"
uib-tooltip="yyyy/MM/dd" uib-tooltip="yyyy/MM/dd"
uib-datepicker-popup="yyyy/MM/dd" uib-datepicker-popup="yyyy/MM/dd"
ng-model="certificate.validityStart" ng-model="certificate.validityStart"
is-open="popup1.opened" is-open="popup1.opened"
datepicker-options="dateOptions" datepicker-options="dateOptions"
close-text="Close" close-text="Close"
max-date="certificate.authority.authorityCertificate.notAfter" max-date="certificate.authority.authorityCertificate.notAfter"
min-date="certificate.authority.authorityCertificate.notBefore" min-date="certificate.authority.authorityCertificate.notBefore"
alt-input-formats="altInputFormats" alt-input-formats="altInputFormats"
placeholder="Start Date" placeholder="Start Date"
/> />
<span class="input-group-btn"> <span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open1()"><i <button type="button" class="btn btn-default" ng-click="open1()"><i
class="glyphicon glyphicon-calendar"></i></button> class="glyphicon glyphicon-calendar"></i></button>
</span> </span>
</div> </div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" <input type="text" class="form-control"
uib-tooltip="yyyy/MM/dd" uib-tooltip="yyyy/MM/dd"
uib-datepicker-popup="yyyy/MM/dd" uib-datepicker-popup="yyyy/MM/dd"
ng-model="certificate.validityEnd" ng-model="certificate.validityEnd"
is-open="popup2.opened" is-open="popup2.opened"
datepicker-options="dateOptions" datepicker-options="dateOptions"
close-text="Close" close-text="Close"
max-date="certificate.authority.authorityCertificate.notAfter" max-date="certificate.authority.authorityCertificate.notAfter"
min-date="certificate.authority.authorityCertificate.notBefore" min-date="certificate.authority.authorityCertificate.notBefore"
alt-input-formats="altInputFormats" alt-input-formats="altInputFormats"
placeholder="End Date" placeholder="End Date"
/> />
<span class="input-group-btn"> <span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open2()"><i <button type="button" class="btn btn-default" ng-click="open2()"><i
class="glyphicon glyphicon-calendar"></i></button> class="glyphicon glyphicon-calendar"></i></button>
</span> </span>
</div>
</div>
<div class="col-sm-1">
<button uib-tooltip="Clear Validity" ng-click="clearDates()" class="btn btn-default"><i class="glyphicon glyphicon-remove"></i></button>
</div>
</div> </div>
<div class="form-group" </div>
ng-class="{'has-error': trackingForm.csr.$invalid&&trackingForm.csr.$dirty, 'has-success': !trackingForm.csr.$invalid&&trackingForm.csr.$dirty}"> <div class="col-sm-1">
<label class="control-label col-sm-2"> <button uib-tooltip="Clear Validity" ng-click="clearDates()" class="btn btn-default"><i
Certificate Signing Request (CSR) class="glyphicon glyphicon-remove"></i></button>
</label> </div>
<div class="col-sm-10">
<textarea uib-tooltip="Values defined in the CSR will take precedence" name="certificate signing request"
ng-model="certificate.csr"
placeholder="PEM encoded string..." class="form-control"
ng-pattern="/^-----BEGIN CERTIFICATE REQUEST-----/"></textarea>
<p ng-show="trackingForm.csr.$invalid && !trackingForm.csr.$pristine"
class="help-block">Enter a valid certificate signing request.</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Roles
</label>
<div class="col-sm-10" ng-model="certificate" role-select></div>
</div>
<div ng-include="'angular/certificates/certificate/replaces.tpl.html'"></div>
<div ng-include="'angular/certificates/certificate/notifications.tpl.html'"></div>
<div ng-include="'angular/certificates/certificate/destinations.tpl.html'"></div>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2">Auto Rotate</label>
<div class="col-sm-10">
<switch ng-model="certificate.rotation" id="active" name="active" class="green small"
uib-tooltip="If selected, new certificates will be automatically re-issued and re-deployed onto known endpoints."></switch>
</div>
</div>
<div ng-include="'angular/certificates/certificate/replaces.tpl.html'"></div>
<div ng-include="'angular/certificates/certificate/destinations.tpl.html'"></div>
</div>
</form> </form>

View File

@ -1,99 +1,99 @@
<div class="modal-header"> <div class="modal-header">
<div class="modal-title"> <button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close" ng-click="cancel()" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h3 class="modal-title">Import a certificate <span class="text-muted"><small>encrypt all the things</small></span></h3>
<h3 class="modal-header">Upload a certificate <span class="text-muted"><small>encrypt all the things</small></span></h3> </div>
<div class="modal-body">
<form name="uploadForm" class="form-horizontal" role="form" novalidate>
<div class="form-group"
ng-class="{'has-error': uploadForm.owner.$invalid, 'has-success': !uploadForm.owner.$invalid&&uploadForm.owner.$dirty}">
<label class="control-label col-sm-2">
Owner
</label>
<div class="col-sm-10">
<input type="email" name="owner" ng-model="certificate.owner" placeholder="owner@example.com"
class="form-control" required/>
<p ng-show="uploadForm.owner.$invalid && !uploadForm.owner.$pristine" class="help-block">Enter a valid
email.</p>
</div>
</div> </div>
<div class="modal-body"> <div class="form-group">
<form name="uploadForm" class="form-horizontal" role="form" novalidate> <label class="control-label col-sm-2">
<div class="form-group" Roles
ng-class="{'has-error': uploadForm.owner.$invalid, 'has-success': !uploadForm.owner.$invalid&&uploadForm.owner.$dirty}"> </label>
<label class="control-label col-sm-2"> <div class="col-sm-10" ng-model="certificate" role-select></div>
Owner </div>
</label> <div ng-include="'angular/certificates/certificate/notifications.tpl.html'"></div>
<div class="form-group"
<div class="col-sm-10"> ng-class="{'has-error': uploadForm.description.$invalid, 'has-success': !uploadForm.$invalid&&uploadForm.description.$dirty}">
<input type="email" name="owner" ng-model="certificate.owner" placeholder="owner@example.com" <label class="control-label col-sm-2">
class="form-control" required/> Description
</label>
<p ng-show="uploadForm.owner.$invalid && !uploadForm.owner.$pristine" class="help-block">Enter a valid <div class="col-sm-10">
email.</p> <textarea name="description" ng-model="certificate.description" placeholder="Something elegant"
</div> class="form-control" required></textarea>
</div> <p ng-show="uploadForm.description.$invalid && !uploadForm.description.$pristine" class="help-block">You must
<div class="form-group" give a short description about this authority will be used for.</p>
ng-class="{'has-error': uploadForm.name.$invalid, 'has-success': !uploadForm.name.$invalid&&uploadForm.name.$dirty}"> </div>
<label class="control-label col-sm-2" uib-tooltip="If no name is provided, Lemur will generate a name for you"> </div>
Custom Name <span class="glyphicon glyphicon-question-sign"></span> <div class="form-group"
</label> ng-class="{'has-error': uploadForm.publicCert.$invalid, 'has-success': !uploadForm.publicCert.$invalid&&uploadForm.publicCert.$dirty}">
<div class="col-sm-10"> <label class="control-label col-sm-2">
<input name="name" ng-model="certificate.name" placeholder="the.example.net-SymantecCorporation-20150828-20160830" class="form-control"/> Public Certificate
</div> </label>
</div> <div class="col-sm-10">
<div class="form-group"
ng-class="{'has-error': uploadForm.description.$invalid, 'has-success': !uploadForm.$invalid&&uploadForm.description.$dirty}">
<label class="control-label col-sm-2">
Description
</label>
<div class="col-sm-10">
<textarea name="description" ng-model="certificate.description" placeholder="Something elegant" class="form-control" required></textarea>
<p ng-show="uploadForm.description.$invalid && !uploadForm.description.$pristine" class="help-block">You must give a short description about this authority will be used for.</p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error': uploadForm.publicCert.$invalid, 'has-success': !uploadForm.publicCert.$invalid&&uploadForm.publicCert.$dirty}">
<label class="control-label col-sm-2">
Public Certificate
</label>
<div class="col-sm-10">
<textarea name="publicCert" ng-model="certificate.body" placeholder="PEM encoded string..." <textarea name="publicCert" ng-model="certificate.body" placeholder="PEM encoded string..."
class="form-control" ng-pattern="/^-----BEGIN CERTIFICATE-----/" required></textarea> class="form-control" ng-pattern="/^-----BEGIN CERTIFICATE-----/" required></textarea>
<p ng-show="uploadForm.publicCert.$invalid && !uploadForm.publicCert.$pristine" class="help-block">Enter
<p ng-show="uploadForm.publicCert.$invalid && !uploadForm.publicCert.$pristine" class="help-block">Enter a valid certificate.</p>
a valid certificate.</p> </div>
</div> </div>
</div> <div class="form-group"
<div class="form-group" ng-class="{'has-error': uploadForm.privateKey.$invalid&&uploadForm.privateKey.$dirty, 'has-success': !uploadForm.privateKey.$invalid&&uploadForm.privateKey.$dirty}">
ng-class="{'has-error': uploadForm.privateKey.$invalid&&uploadForm.privateKey.$dirty, 'has-success': !uploadForm.privateKey.$invalid&&uploadForm.privateKey.$dirty}"> <label class="control-label col-sm-2">
<label class="control-label col-sm-2"> Private Key
Private Key </label>
</label> <div class="col-sm-10">
<div class="col-sm-10">
<textarea name="privateKey" ng-model="certificate.privateKey" placeholder="PEM encoded string..." <textarea name="privateKey" ng-model="certificate.privateKey" placeholder="PEM encoded string..."
class="form-control" ng-pattern="/(^-----BEGIN PRIVATE KEY-----[\S\s]*-----END PRIVATE KEY-----)|(^-----BEGIN RSA PRIVATE KEY-----[\S\s]*-----END RSA PRIVATE KEY-----)/"></textarea> class="form-control"
ng-pattern="/(^-----BEGIN PRIVATE KEY-----[\S\s]*-----END PRIVATE KEY-----)|(^-----BEGIN RSA PRIVATE KEY-----[\S\s]*-----END RSA PRIVATE KEY-----)/"></textarea>
<p ng-show="uploadForm.privateKey.$invalid && !uploadForm.privateKey.$pristine" class="help-block">Enter <p ng-show="uploadForm.privateKey.$invalid && !uploadForm.privateKey.$pristine" class="help-block">Enter
a valid certificate.</p> a valid certificate.</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error': uploadForm.owner.$invalid&&uploadform.intermediateCert.$dirty, 'has-success': !uploadForm.intermediateCert.$invalid&&uploadForm.intermediateCert.$dirty}"> ng-class="{'has-error': uploadForm.owner.$invalid&&uploadform.intermediateCert.$dirty, 'has-success': !uploadForm.intermediateCert.$invalid&&uploadForm.intermediateCert.$dirty}">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
Intermediate Certificate Intermediate Certificate
</label> </label>
<div class="col-sm-10">
<div class="col-sm-10">
<textarea name="intermediateCert" ng-model="certificate.chain" <textarea name="intermediateCert" ng-model="certificate.chain"
placeholder="PEM encoded string..." class="form-control" placeholder="PEM encoded string..." class="form-control"
ng-pattern="/^-----BEGIN CERTIFICATE-----/"></textarea> ng-pattern="/^-----BEGIN CERTIFICATE-----/"></textarea>
<p ng-show="uploadForm.intermediateCert.$invalid && !uploadForm.intemediateCert.$pristine"
<p ng-show="uploadForm.intermediateCert.$invalid && !uploadForm.intemediateCert.$pristine" class="help-block">Enter a valid certificate.</p>
class="help-block">Enter a valid certificate.</p> </div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Roles
</label>
<div class="col-sm-10" ng-model="certificate" role-select></div>
</div>
<div ng-include="'angular/certificates/certificate/replaces.tpl.html'"></div>
<div ng-include="'angular/certificates/certificate/notifications.tpl.html'"></div>
<div ng-include="'angular/certificates/certificate/destinations.tpl.html'"></div>
</form>
</div> </div>
<div class="modal-footer"> <div ng-include="'angular/certificates/certificate/replaces.tpl.html'"></div>
<button type="submit" ng-click="save(certificate)" ng-disabled="uploadForm.$invalid" class="btn btn-success">Import</button> <div ng-include="'angular/certificates/certificate/destinations.tpl.html'"></div>
<button ng-click="cancel()" class="btn btn-danger">Cancel</button> <div class="form-group"
ng-class="{'has-error': uploadForm.name.$invalid, 'has-success': !uploadForm.name.$invalid&&uploadForm.name.$dirty}">
<label class="control-label col-sm-2">
Custom Certificate Name
</label>
<div class="col-sm-10">
<input name="name" ng-model="certificate.name"
placeholder="the.example.net-SymantecCorporation-20150828-20160830" class="form-control"
uib-tooltip="If no name is provided, Lemur will generate a name for you">
</div>
</div> </div>
</form>
</div>
<div class="modal-footer">
<button type="submit" ng-click="save(certificate)" ng-disabled="uploadForm.$invalid" class="btn btn-success">
Import
</button>
<button ng-click="cancel()" class="btn btn-danger">Cancel</button>
</div>
</div> </div>

View File

@ -4,7 +4,7 @@
uib-typeahead="role.name for role in findRoleByName($viewValue)" typeahead-loading="loadingRoles" uib-typeahead="role.name for role in findRoleByName($viewValue)" typeahead-loading="loadingRoles"
class="form-control input-md" typeahead-on-select="ngModel.attachRole($item)" typeahead-wait-ms="500" class="form-control input-md" typeahead-on-select="ngModel.attachRole($item)" typeahead-wait-ms="500"
uib-tooltip="Roles control who can access this resource" uib-tooltip="Roles control who can access this resource"
tooltip-trigger="focus" tooltip-placement="top"> tooltip-placement="top">
<span class="input-group-btn"> <span class="input-group-btn">
<button ng-model="roles.show" class="btn btn-md btn-default" uib-btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0"> <button ng-model="roles.show" class="btn btn-md btn-default" uib-btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0">
<span class="badge">{{ ngModel.roles.length || 0 }}</span> <span class="badge">{{ ngModel.roles.length || 0 }}</span>

View File

@ -4,9 +4,10 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<input ng-hide="currentStepNumber() == 1" class="btn btn-default pull-left" type="submit" wz-previous value="Previous" /> <input ng-hide="currentStepNumber() == 1" class="btn btn-default pull-left" type="submit" wz-previous value="Previous" />
<input ng-show="currentStepNumber() != steps.length" class="btn btn-default pull-right" type="submit" wz-next value="Next" /> <input ng-show="currentStepNumber() != steps.length" class="btn btn-default pull-right" type="submit" wz-next value="More Options" />
<input ng-show="!context.loading" ng-class="{disabled: trackingForm.invalid}" class="btn btn-success pull-right" type="submit" wz-finish value="Create" /> <input ng-show="!context.loading" ng-class="{disabled: trackingForm.invalid}" class="btn btn-success pull-right" type="submit" wz-finish value="Create" />
<button ng-show="context.loading" class="btn btn-success pull-right disabled"><wave-spinner></wave-spinner></button> <button ng-show="context.loading" class="btn btn-success pull-right disabled">Working... <i class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
</button>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
</div> </div>

View File

@ -72,11 +72,11 @@
<ul ng-show="currentUser.username" class="nav navbar-nav navbar-right"> <ul ng-show="currentUser.username" class="nav navbar-nav navbar-right">
<li class="dropdown" uib-dropdown on-toggle="toggled(open)"> <li class="dropdown" uib-dropdown on-toggle="toggled(open)">
<a href class="dropdown-toggle profile-nav" uib-dropdown-toggle> <a href class="dropdown-toggle profile-nav" uib-dropdown-toggle>
<span ng-if="currentUser.profileImage"> <span ng-if="currentUser.profilePicture">
{{ currentUser.username }}<img ng-src="{{ currentUser.profileImage }}" class="profile img-circle"> {{ currentUser.username }} <img ng-src="{{ currentUser.profilePicture }}" class="profile img-circle">
</span> </span>
<span ng-if="!currentUser.profileImage"> <span ng-if="!currentUser.profilePicture">
{{ currentUser.username }}<ng-letter-avatar height="35" width="35" data="currentUser.username" shape="round"></ng-letter-avatar> {{ currentUser.username }} <ng-letter-avatar height="35" width="35" data="currentUser.username" shape="round"></ng-letter-avatar>
</span> </span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">

View File

@ -68,14 +68,6 @@ body { padding-top: 70px; }
left: 50%; left: 50%;
} }
.wave-spinner {
margin: auto;
width: 100px;
height: 60px;
text-align: center;
font-size: 20px;
}
html { html {
position: relative; position: relative;
min-height: 100%; min-height: 100%;
@ -159,16 +151,6 @@ a {
margin-top: 10px; margin-top: 10px;
} }
.wave-spinner {
margin: 5px auto !important;
width: 40px !important;
height: 12px !important;
}
.wave-spinner>div {
background-color: #FFFFFF !important;
}
.clipboard-btn { .clipboard-btn {
border-width: 0; border-width: 0;
background-color: transparent; background-color: transparent;

View File

@ -26,10 +26,7 @@ class UserOutputSchema(LemurOutputSchema):
username = fields.String() username = fields.String()
email = fields.Email() email = fields.Email()
active = fields.Boolean() active = fields.Boolean()
roles = fields.Nested(AssociatedRoleSchema, many=True) profile_picture = fields.String()
certificates = fields.Nested(AssociatedCertificateSchema, many=True)
authorities = fields.Nested(AssociatedAuthoritySchema, many=True)
profileImage = fields.String()
user_input_schema = UserInputSchema() user_input_schema = UserInputSchema()