chore: Add named outlets for host catalog template
Host set updates host catalog template layout sections, thus named outlets need to be introduced to host catalog template.
This commit is contained in:
9 files changed
+79
-33
No files matched your search
@@ -17,4 +17,25 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogRoute exte
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the host-catalog specific templates for header and navigation page sections.
|
||||
* @override
|
||||
* @param {object} controller
|
||||
* @param {object} model
|
||||
*/
|
||||
renderTemplate(controller, model) {
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog');
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/-header', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'header',
|
||||
model: model
|
||||
});
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/-navigation', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'navigation',
|
||||
model: model
|
||||
});
|
||||
}
|
||||
}
|
||||
+24
@@ -16,4 +16,28 @@ export default class ScopesScopeProjectsProjectHostCatalogsHostCatalogHostSetsHo
|
||||
adapterOptions: { scopeID, hostCatalogID }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the host-set specific templates for header and navigation page sections.
|
||||
* @override
|
||||
* @param {object} controller
|
||||
* @param {object} model
|
||||
*/
|
||||
renderTemplate(controller, model) {
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets');
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-header', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'header',
|
||||
model: model
|
||||
});
|
||||
|
||||
this.render('scopes/scope/projects/project/host-catalogs/host-catalog/host-sets/-navigation', {
|
||||
into: 'scopes/scope/projects/project/host-catalogs/host-catalog',
|
||||
outlet: 'navigation',
|
||||
model: model
|
||||
});
|
||||
|
||||
super.renderTemplate(...arguments);
|
||||
}
|
||||
}
|
||||
@@ -5,18 +5,15 @@
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.host-catalog"}}</h2>
|
||||
{{outlet "header"}}
|
||||
</page.header>
|
||||
|
||||
<page.actions>
|
||||
{{outlet "actions"}}
|
||||
</page.actions>
|
||||
|
||||
<page.navigation>
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.host-sets'>
|
||||
{{t 'titles.host-sets'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
{{outlet "navigation"}}
|
||||
</page.navigation>
|
||||
|
||||
<page.body>
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h2>{{t "resources.host-catalog"}}</h2>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.host-sets'>
|
||||
{{t 'titles.host-sets'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h2>{{t "resources.host-set"}}</h2>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.project.host-catalogs.host-catalog.host-sets.host-set.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
+13
-23
@@ -1,23 +1,13 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.host-set"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
<Form::HostSet
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
<Rose::Separator />
|
||||
<Rose::Button
|
||||
@style="warning"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete'}}
|
||||
</Rose::Button>
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
<Form::HostSet
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
<Rose::Separator />
|
||||
<Rose::Button
|
||||
@style="warning"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete'}}
|
||||
</Rose::Button>
|
||||
@@ -20,5 +20,4 @@ module('Integration | Component | form/host-set', function(hooks) {
|
||||
|
||||
assert.ok(find('form'));
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user