mirror of https://github.com/rancher/ui.git
commit
0031949daf
|
|
@ -61,8 +61,8 @@
|
||||||
<label class="section">{{t 'certificatesPage.detail.domainNames.labelText'}}</label>
|
<label class="section">{{t 'certificatesPage.detail.domainNames.labelText'}}</label>
|
||||||
<div>
|
<div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
{{#if model.certificate.CN}}
|
{{#if model.certificate.cn}}
|
||||||
<li><a href="https://{{model.certificate.CN}}" target="_blank">{{model.certificate.CN}}</a> (CN)</li>
|
<li><a href="https://{{model.certificate.cn}}" target="_blank">{{model.certificate.cn}}</a> (CN)</li>
|
||||||
{{#each model.certificate.displaySans as |san|}}
|
{{#each model.certificate.displaySans as |san|}}
|
||||||
<li><a href="https://{{san}}" target="_blank">{{san}}</a></li>
|
<li><a href="https://{{san}}" target="_blank">{{san}}</a></li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,15 @@ import Controller from '@ember/controller';
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
sortBy: 'name',
|
sortBy: 'name',
|
||||||
headers: [
|
headers: [
|
||||||
{
|
|
||||||
name: 'state',
|
|
||||||
sort: ['sortState','name','id'],
|
|
||||||
translationKey: 'certificatesPage.index.table.header.state',
|
|
||||||
width: 125,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'name',
|
name: 'name',
|
||||||
sort: ['name','id'],
|
sort: ['name', 'id'],
|
||||||
translationKey: 'certificatesPage.index.table.header.name',
|
translationKey: 'certificatesPage.index.table.header.name',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cn',
|
name: 'cn',
|
||||||
searchField: ['CN'],
|
searchField: ['cn'],
|
||||||
sort: ['CN','id'],
|
sort: ['cn','id'],
|
||||||
translationKey: 'certificatesPage.index.table.header.domain',
|
translationKey: 'certificatesPage.index.table.header.domain',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -26,5 +20,12 @@ export default Controller.extend({
|
||||||
translationKey: 'certificatesPage.index.table.header.expires',
|
translationKey: 'certificatesPage.index.table.header.expires',
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'created',
|
||||||
|
sort: ['created', 'id'],
|
||||||
|
classNames: 'text-right pr-20',
|
||||||
|
searchField: 'created',
|
||||||
|
translationKey: 'certificatesPage.index.table.header.created',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
{{form-name-description
|
{{form-name-description
|
||||||
model=primaryResource
|
model=primaryResource
|
||||||
nameRequired=true
|
nameRequired=true
|
||||||
|
descriptionShown=false
|
||||||
namePlaceholder="certificatesPage.new.form.name.placeholder"
|
namePlaceholder="certificatesPage.new.form.name.placeholder"
|
||||||
descriptionPlaceholder="certificatesPage.new.form.description.placeholder"
|
descriptionPlaceholder="certificatesPage.new.form.description.placeholder"
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -49,17 +49,17 @@ export default Resource.extend({
|
||||||
// subjectAlternativeNames can be null:
|
// subjectAlternativeNames can be null:
|
||||||
return (this.get('subjectAlternativeNames')||[])
|
return (this.get('subjectAlternativeNames')||[])
|
||||||
.slice()
|
.slice()
|
||||||
.removeObject(this.get('CN'))
|
.removeObject(this.get('cn'))
|
||||||
.filter((san) => {
|
.filter((san) => {
|
||||||
return (san+'').indexOf('@') === -1;
|
return (san+'').indexOf('@') === -1;
|
||||||
});
|
});
|
||||||
}.property('CN','subjectAlternativeNames.[]'),
|
}.property('cn','subjectAlternativeNames.[]'),
|
||||||
|
|
||||||
countableSans: function() {
|
countableSans: function() {
|
||||||
var sans = this.get('displaySans').slice();
|
var sans = this.get('displaySans').slice();
|
||||||
if ( this.get('CN') )
|
if ( this.get('cn') )
|
||||||
{
|
{
|
||||||
sans.pushObject(this.get('CN'));
|
sans.pushObject(this.get('cn'));
|
||||||
}
|
}
|
||||||
|
|
||||||
var commonBases = sans.filter((name) => {
|
var commonBases = sans.filter((name) => {
|
||||||
|
|
@ -69,12 +69,12 @@ export default Resource.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
return this.get('displaySans').slice().removeObjects(commonBases);
|
return this.get('displaySans').slice().removeObjects(commonBases);
|
||||||
}.property('displaySans.[]','CN'),
|
}.property('displaySans.[]','cn'),
|
||||||
|
|
||||||
displayDetailedName: function() {
|
displayDetailedName: function() {
|
||||||
var name = (this.get('name') || '('+this.get('id')+')');
|
var name = (this.get('name') || '('+this.get('id')+')');
|
||||||
var str = name;
|
var str = name;
|
||||||
var cn = this.get('CN');
|
var cn = this.get('cn');
|
||||||
var sans = this.get('countableSans.length');
|
var sans = this.get('countableSans.length');
|
||||||
|
|
||||||
var more = '';
|
var more = '';
|
||||||
|
|
@ -97,5 +97,5 @@ export default Resource.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}.property('id','name','CN','countableSans.length')
|
}.property('id','name','cn','countableSans.length')
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
<td data-title="{{t 'generic.state'}}:">
|
|
||||||
{{badge-state model=model}}
|
|
||||||
</td>
|
|
||||||
<td data-title="{{t 'generic.name'}}:" class="force-wrap">
|
<td data-title="{{t 'generic.name'}}:" class="force-wrap">
|
||||||
{{#link-to "certificates.detail" model.id}}{{model.displayName}}{{/link-to}}
|
{{#link-to "certificates.detail" model.id}}{{model.displayName}}{{/link-to}}
|
||||||
</td>
|
</td>
|
||||||
<td data-title="{{t 'certificatesPage.table.cn'}}:">
|
<td data-title="{{t 'certificatesPage.table.cn'}}:">
|
||||||
{{#if model.CN}}
|
{{#if model.cn}}
|
||||||
{{model.CN}}
|
{{model.cn}}
|
||||||
{{#if model.countableSans.length}}
|
{{#if model.countableSans.length}}
|
||||||
+ {{model.countableSans.length}} other{{if (eq model.countableSans.length 1) "" "s"}}
|
+ {{model.countableSans.length}} other{{if (eq model.countableSans.length 1) "" "s"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="text-muted">None</span>
|
<span class="text-muted">{{t 'generic.none'}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td data-title="certificatesPage.table.expiresDate:">
|
<td data-title="certificatesPage.table.expiresDate:">
|
||||||
|
|
@ -19,6 +16,9 @@
|
||||||
{{date-from-now model.expiresDate}}
|
{{date-from-now model.expiresDate}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td data-title="{{t 'generic.created'}}:" class="text-right pr-20">
|
||||||
|
{{date-calendar model.created}}
|
||||||
|
</td>
|
||||||
<td data-title="{{t 'generic.actions'}}:" class="actions">
|
<td data-title="{{t 'generic.actions'}}:" class="actions">
|
||||||
{{action-menu model=model}}
|
{{action-menu model=model}}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="col span-4 input-group mt-0">
|
<div class="col span-6 input-group mt-0">
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<label class="acc-label pt-5">{{t 'inputCertificate.key.label'}}{{field-required}}</label>
|
<label class="acc-label pt-5">{{t 'inputCertificate.key.label'}}{{field-required}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -11,28 +11,18 @@
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col span-4 input-group mt-0">
|
<div class="col span-6 input-group mt-0">
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<label class="acc-label pt-5">{{t 'inputCertificate.cert.label'}}{{field-required}}</label>
|
<label class="acc-label pt-5">{{t 'inputCertificate.cert.label'}}{{field-required}}</label>
|
||||||
|
<span class="protip">
|
||||||
|
{{t 'inputCertificate.cert.protip'}}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{input-text-file
|
{{input-text-file
|
||||||
value=model.cert
|
value=model.certs
|
||||||
accept="application/x-x509-ca-cert,text/plain,.pem,.crt"
|
accept="application/x-x509-ca-cert,text/plain,.pem,.crt"
|
||||||
minHeight=60
|
minHeight=60
|
||||||
placeholder="inputCertificate.cert.placeholder"
|
placeholder="inputCertificate.cert.placeholder"
|
||||||
showUploadLabel=false
|
showUploadLabel=false
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col span-4 input-group mt-0">
|
|
||||||
<div class="clearfix">
|
|
||||||
<label class="acc-label pt-5">{{t 'inputCertificate.certChain.label'}}</label>
|
|
||||||
</div>
|
|
||||||
{{input-text-file
|
|
||||||
value=model.certChain
|
|
||||||
accept="application/x-x509-ca-cert,text/plain,.pem,.crt"
|
|
||||||
minHeight=60
|
|
||||||
placeholder="inputCertificate.certChain.placeholder"
|
|
||||||
showUploadLabel=false
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
{{form-name-description
|
{{form-name-description
|
||||||
model=primaryResource
|
model=primaryResource
|
||||||
nameRequired=true
|
nameRequired=true
|
||||||
|
descriptionShown=false
|
||||||
namePlaceholder="editCertificate.name.placeholder"
|
namePlaceholder="editCertificate.name.placeholder"
|
||||||
descriptionPlaceholder="editCertificate.description.placeholder"
|
descriptionPlaceholder="editCertificate.description.placeholder"
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -540,6 +540,7 @@ certificatesPage:
|
||||||
name: Name
|
name: Name
|
||||||
domain: Domain Name
|
domain: Domain Name
|
||||||
expires: Expires
|
expires: Expires
|
||||||
|
created: Created
|
||||||
body:
|
body:
|
||||||
noData: You do not have any certificates yet.
|
noData: You do not have any certificates yet.
|
||||||
new:
|
new:
|
||||||
|
|
@ -2834,6 +2835,7 @@ inputCertificate:
|
||||||
cert:
|
cert:
|
||||||
label: Certificate
|
label: Certificate
|
||||||
placeholder: "Paste in the primary certificate, starting with -----BEGIN CERTIFICATE-----"
|
placeholder: "Paste in the primary certificate, starting with -----BEGIN CERTIFICATE-----"
|
||||||
|
protip: Please include any chain certificates that are needed.
|
||||||
certChain:
|
certChain:
|
||||||
label: Chain Certs
|
label: Chain Certs
|
||||||
placeholder: "Optional; Paste in the additional chained certificates, starting with -----BEGIN CERTIFICATE-----"
|
placeholder: "Optional; Paste in the additional chained certificates, starting with -----BEGIN CERTIFICATE-----"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue