-
-
- {{#if @model.errors.name}}
-
- {{#each @model.errors.name as |error|}}
- {{error.message}}
- {{/each}}
-
- {{/if}}
-
-
-
- {{#if @model.errors.description}}
-
- {{#each @model.errors.description as |error|}}
- {{error.message}}
- {{/each}}
-
- {{/if}}
-
-
- Place Radio Button Group Here
-
- {{#if @model.isNew}}
- {{#if @model.type}}
- {{component
- (concat 'form/host-catalog/' @model.type)
- model=@model
- submit=@submit
- cancel=@cancel
- }}
- {{/if}}
+{{#if @model.isNew}}
+ {{@model.type}} {{@model.compositeType}}
+ {{#if @model.isStatic}}
+ {{component
+ (concat 'form/host-catalog/' @model.compositeType)
+ model=@model
+ submit=@submit
+ cancel=@cancel
+ toggleType=this.toggleType
+ showDynamicPlugins=this.showDynamicPlugins
+ }}
{{/if}}
- {{#if (can 'save model' @model)}}
-
+ {{#if this.showDynamicPlugins}}
+ {{component
+ (concat 'form/host-catalog/' @model.compositeType)
+ model=@model
+ submit=@submit
+ cancel=@cancel
+ toggleType=this.toggleType
+ showDynamicPlugins=this.showDynamicPlugins
+ }}
{{/if}}
-
\ No newline at end of file
+{{/if}}
\ No newline at end of file
diff --git a/ui/admin/app/components/form/host-catalog/index.js b/ui/admin/app/components/form/host-catalog/index.js
new file mode 100644
index 000000000..ed49133db
--- /dev/null
+++ b/ui/admin/app/components/form/host-catalog/index.js
@@ -0,0 +1,29 @@
+import Component from '@glimmer/component';
+import { 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);
+ }
+ //show dynamic type radio cards -> aws and azure if the type is dynamic
+ //call route action to update the query and rerender the model if static is selected
+ renderDynamicPlugins(type) {
+ if (type === 'dynamic') {
+ this.showDynamicPlugins = true;
+ } else {
+ this.showDynamicPlugins = false;
+ //CHECK:how to call the action to update query param
+ this.args.model.type = 'static';
+ this.args.changeType();
+ }
+ }
+}
diff --git a/ui/admin/app/components/form/host-catalog/static/index.hbs b/ui/admin/app/components/form/host-catalog/static/index.hbs
index 6754ba2a0..960ed5e2b 100644
--- a/ui/admin/app/components/form/host-catalog/static/index.hbs
+++ b/ui/admin/app/components/form/host-catalog/static/index.hbs
@@ -1 +1,104 @@
-I'm a static host catalog form.
\ No newline at end of file
+