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) => { apps.forEach((app) => {
let extInfo = parseHelmExternalId(app.get('externalId')); let extInfo = parseHelmExternalId(app.get('externalId'));
if ( extInfo && extInfo.templateId ) {
deps.push(this.fetchTemplate(extInfo.templateId, false)); deps.push(this.fetchTemplate(extInfo.templateId, false));
}
}); });
return allSettled(deps); return allSettled(deps);

View File

@ -1,14 +1,17 @@
import Component from '@ember/component'; import Component from '@ember/component';
import { next } from '@ember/runloop';
import layout from './template'; import layout from './template';
export default Component.extend({ export default Component.extend({
layout, layout,
didReceiveAttrs() { didReceiveAttrs() {
if ( this.get('value') === 'false' ) { next(() => {
this.set('value', false); if ( this.get('value') === 'true' ) {
} else if ( this.get('value') === 'true' ) {
this.set('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"}}> <select name="" class="form-control mb-10" onChange={{action (mut value) value="target.value"}}>
<option value="">{{t 'schema.inputEnum.option'}}</option> <option value="">{{t 'schema.inputEnum.option'}}</option>
{{#each field.options as |option|}} {{#each field.options as |choice|}}
<option value={{option}} selected={{eq option value}}> <option value={{choice}} selected={{eq choice value}}>
{{#if (eq option 'LoadBalancer')}} {{#if (eq choice 'LoadBalancer')}}
{{t 'model.service.displayKind.loadBalancer'}} {{t 'model.service.displayKind.loadBalancer'}}
{{else}} {{else}}
{{option}} {{choice}}
{{/if}} {{/if}}
</option> </option>
{{/each}} {{/each}}