chore: add new host catalog logic
This commit is contained in:
2 files changed
+33
-1
No files matched your search
@@ -1,4 +1,16 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class ScopesScopeProjectsProjectHostCatalogsNewRoute extends Route {
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Creates a new unsaved host catalog belonging to the current project scope.
|
||||
* @return {HostCatalogModel}
|
||||
*/
|
||||
model() {
|
||||
const scopeID = this.modelFor('scopes.scope.projects.project').id;
|
||||
return this.store.createRecord('host-catalog', { scopeID });
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +1,21 @@
|
||||
{{outlet}}
|
||||
{{title (t 'titles.new')}}
|
||||
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "titles.new"}}</h2>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
<Form::HostCatalog
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
Reference in new issue
Block a user