mirror of https://github.com/rancher/ui.git
Fix certs with no CN (rancher/rancher#2018)
This commit is contained in:
parent
4f1004bc25
commit
063955ef56
|
|
@ -31,7 +31,11 @@ export default Resource.extend({
|
||||||
|
|
||||||
countableSans: function() {
|
countableSans: function() {
|
||||||
var sans = this.get('displaySans').slice();
|
var sans = this.get('displaySans').slice();
|
||||||
|
if ( this.get('CN') )
|
||||||
|
{
|
||||||
sans.pushObject(this.get('CN'));
|
sans.pushObject(this.get('CN'));
|
||||||
|
}
|
||||||
|
|
||||||
var commonBases = sans.filter((name) => {
|
var commonBases = sans.filter((name) => {
|
||||||
return name.indexOf('*.') === 0 || name.indexOf('www.') === 0;
|
return name.indexOf('*.') === 0 || name.indexOf('www.') === 0;
|
||||||
}).map((name) => {
|
}).map((name) => {
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,14 @@
|
||||||
<label class="section">Domain Names</label>
|
<label class="section">Domain Names</label>
|
||||||
<div>
|
<div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
{{#if model.CN}}
|
||||||
<li><a href="{{model.CN}}" target="_blank">{{model.CN}}</a> (CN)</li>
|
<li><a href="{{model.CN}}" target="_blank">{{model.CN}}</a> (CN)</li>
|
||||||
{{#each model.displaySans as |san|}}
|
{{#each model.displaySans as |san|}}
|
||||||
<li><a href="{{san}}" target="_blank">{{san}}</a></li>
|
<li><a href="{{san}}" target="_blank">{{san}}</a></li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{else}}
|
||||||
|
<span class="text-muted">None</span>
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,14 @@
|
||||||
{{#link-to "certificates.detail" cert.id}}{{cert.displayName}}{{/link-to}}
|
{{#link-to "certificates.detail" cert.id}}{{cert.displayName}}{{/link-to}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
{{#if cert.CN}}
|
||||||
{{cert.CN}}
|
{{cert.CN}}
|
||||||
{{#if cert.countableSans.length}}
|
{{#if cert.countableSans.length}}
|
||||||
+ {{cert.countableSans.length}} other{{if (eq cert.countableSans.length 1) "" "s"}}
|
+ {{cert.countableSans.length}} other{{if (eq cert.countableSans.length 1) "" "s"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<span class="text-muted">None</span>
|
||||||
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="{{if cert.expiresSoon "text-bold text-danger"}}">
|
<span class="{{if cert.expiresSoon "text-bold text-danger"}}">
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export default DriverRoute.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setupController: function(controller, model) {
|
setupController: function(controller/*, model*/) {
|
||||||
this._super.apply(this,arguments);
|
this._super.apply(this,arguments);
|
||||||
controller.set('driver', this.get('otherChoices.firstObject.value'));
|
controller.set('driver', this.get('otherChoices.firstObject.value'));
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
"version": "0.52.0",
|
"version": "0.53.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "doc",
|
"doc": "doc",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue