Merge pull request #2182 from loganhz/catalog-fix

Fix the issue that user can not deploy catalog item
This commit is contained in:
Westly Wright 2018-08-24 15:41:52 -07:00 committed by GitHub
commit c0389fb25c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

View File

@ -75,7 +75,9 @@ export default Service.extend({
apps.forEach((app) => {
let extInfo = parseHelmExternalId(app.get('externalId'));
deps.push(this.fetchTemplate(extInfo.templateId, false));
if ( extInfo && extInfo.templateId ) {
deps.push(this.fetchTemplate(extInfo.templateId, false));
}
});
return allSettled(deps);

View File

@ -1,14 +1,17 @@
import Component from '@ember/component';
import { next } from '@ember/runloop';
import layout from './template';
export default Component.extend({
layout,
didReceiveAttrs() {
if ( this.get('value') === 'false' ) {
this.set('value', false);
} else if ( this.get('value') === 'true' ) {
this.set('value', true);
}
next(() => {
if ( this.get('value') === 'true' ) {
this.set('value', true);
} else if ( this.get('value') === 'false' ) {
this.set('value', false);
}
});
}
});

View File

@ -1,11 +1,11 @@
<select name="" class="form-control mb-10" onChange={{action (mut value) value="target.value"}}>
<option value="">{{t 'schema.inputEnum.option'}}</option>
{{#each field.options as |option|}}
<option value={{option}} selected={{eq option value}}>
{{#if (eq option 'LoadBalancer')}}
{{#each field.options as |choice|}}
<option value={{choice}} selected={{eq choice value}}>
{{#if (eq choice 'LoadBalancer')}}
{{t 'model.service.displayKind.loadBalancer'}}
{{else}}
{{option}}
{{choice}}
{{/if}}
</option>
{{/each}}