455dfe0a1b
* Add model layer support for filtering intentions by service * Add Route, Controller and template for services.show.intentions tab We are still loading the intentions themselves in the parent Route for the moment * Load the intentions in in the parent route for the moment * Temporarily add support for returning to history -1 Once we have an intention form underneath the service/intention tab this will no longer be needed * Add the new tab and enable blocking queries for it * Add some further acceptance testing around intention listings
63 lines
2 KiB
Handlebars
63 lines
2 KiB
Handlebars
{{#if item.ID }}
|
|
{{title 'Edit Intention'}}
|
|
{{else}}
|
|
{{title 'New Intention'}}
|
|
{{/if}}
|
|
|
|
<AppView @class="intention edit" @loading={{isLoading}}>
|
|
<BlockSlot @name="notification" as |status type|>
|
|
{{partial 'dc/intentions/notifications'}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="breadcrumbs">
|
|
<ol>
|
|
{{#if (gt history.length 0)}}
|
|
<li><a href={{href-to 'dc.services'}}>All Services</a></li>
|
|
{{#let history.firstObject as |back|}}
|
|
<li><a data-test-back href={{href-to back.key back.value}}>{{concat 'Service (' back.value ')'}}</a></li>
|
|
{{/let}}
|
|
{{else}}
|
|
<li><a data-test-back href={{href-to 'dc.intentions'}}>All Intentions</a></li>
|
|
{{/if}}
|
|
</ol>
|
|
</BlockSlot>
|
|
<BlockSlot @name="header">
|
|
<h1>
|
|
{{#if item.ID }}
|
|
Edit Intention
|
|
{{else}}
|
|
New Intention
|
|
{{/if}}
|
|
</h1>
|
|
</BlockSlot>
|
|
<BlockSlot @name="actions">
|
|
{{#if (not create) }}
|
|
<FeedbackDialog @type="inline">
|
|
<BlockSlot @name="action" as |success error|>
|
|
<CopyButton @success={{action success}} @error={{action error}} @clipboardText={{item.ID}} @title="copy UUID to clipboard">
|
|
Copy UUID
|
|
</CopyButton>
|
|
</BlockSlot>
|
|
<BlockSlot @name="success" as |transition|>
|
|
<p class={{transition}}>
|
|
Copied UUID!
|
|
</p>
|
|
</BlockSlot>
|
|
<BlockSlot @name="error" as |transition|>
|
|
<p class={{transition}}>
|
|
Sorry, something went wrong!
|
|
</p>
|
|
</BlockSlot>
|
|
</FeedbackDialog>
|
|
{{/if}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="content">
|
|
<ConsulIntentionForm
|
|
@item={{item}}
|
|
@services={{services}}
|
|
@nspaces={{nspaces}}
|
|
@ondelete={{action "route" "delete"}}
|
|
@onsubmit={{action "route" (if item.isNew "create" "update")}}
|
|
@oncancel={{action "route" "cancel"}}
|
|
/>
|
|
</BlockSlot>
|
|
</AppView> |