show provider info when dynamic is selected

This commit is contained in:
dharini committed 2022-01-31 11:41:35 -08:00
1 parent 36eab2e0f1
commit 19f48b2ca3
4 files changed
+29 -9

No files matched your search

@@ -1,2 +0,0 @@
THIS IS DYNAINC
{{{log @model 'NAMEEEE'}}}
@@ -1,4 +1,3 @@
STATIC {{{log 'STATTTTTIC' @model}}}
<Rose::Form
@onSubmit={{@submit}}
@cancel={{@cancel}}
@@ -22,7 +21,7 @@ STATIC {{{log 'STATTTTTIC' @model}}}
{{/each}}
</field.errors>
{{/if}}
</form.input> --}}
</form.input>
<form.textarea
@name='description'
@@ -0,0 +1,26 @@
import Component from '@glimmer/component';
import { options } from 'api/models/credential-library';
import { computed, action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class FormHostCatalogIndexComponent extends Component {
// =properties
/**
/**
*/
@tracked showDynamicPlugins = false;
// =actions
@action
toggleType(type) {
this.renderDynamicPlugins(type);
}
renderDynamicPlugins(type) {
if(type === 'dynamic') {
this.showDynamicPlugins = true;
} else {
this.showDynamicPlugins = false;
}
}
}
@@ -24,11 +24,9 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route {
*/
model(params) {
const scopeModel = this.modelFor('scopes.scope');
if (!params.type) params.type = 'plugin';
params.name = 'Avon';
if (!params.type) params.type = 'static';
return this.store.createRecord('host-catalog', {
type: params.type,
name: params.name,
compositeType: params.type, //static or aws or azure
scopeModel,
});
}
@@ -43,7 +41,6 @@ export default class ScopesScopeHostCatalogsNewRoute extends Route {
*/
@action
async changeType(type) {
console.log(type, 'GET TYPE HERE');
await this.router.replaceWith({ queryParams: { type } });
}
}