2018-05-22 15:03:45 +00:00
|
|
|
<form>
|
|
|
|
<fieldset>
|
|
|
|
<label class="type-text{{if item.error.SourceName ' has-error'}}">
|
|
|
|
<span>Source Service</span>
|
2018-06-05 16:09:26 +00:00
|
|
|
{{#power-select
|
|
|
|
options=items
|
|
|
|
searchField='Name'
|
|
|
|
selected=SourceName
|
|
|
|
searchPlaceholder='Type service name'
|
|
|
|
onchange=(action 'change' 'SourceName') as |service|
|
|
|
|
}}
|
2018-05-24 08:52:07 +00:00
|
|
|
{{service.Name}}
|
|
|
|
{{/power-select}}
|
2018-05-22 15:03:45 +00:00
|
|
|
<em>Choose a Consul Service, write in a future Consul Service, or write any Service URL</em>
|
|
|
|
</label>
|
|
|
|
<label class="type-text{{if item.error.DestinationName ' has-error'}}">
|
|
|
|
<span>Destination Service</span>
|
2018-06-05 16:09:26 +00:00
|
|
|
{{#power-select
|
|
|
|
options=items
|
|
|
|
searchField='Name'
|
|
|
|
selected=DestinationName
|
|
|
|
searchPlaceholder='Type service name'
|
|
|
|
onchange=(action 'change' 'DestinationName') as |service|
|
|
|
|
}}
|
|
|
|
{{service.Name}}
|
|
|
|
{{/power-select}}
|
2018-05-22 15:03:45 +00:00
|
|
|
<em>Choose a Consul Service, write in a future Consul Service, or write any Service URL</em>
|
|
|
|
</label>
|
|
|
|
<div role="radiogroup" class={{if item.error.Action ' has-error'}}>
|
2018-05-22 16:12:36 +00:00
|
|
|
{{#each intents as |intent|}}
|
2018-05-22 15:03:45 +00:00
|
|
|
<label>
|
|
|
|
<span>{{intent}}</span>
|
|
|
|
<input type="radio" name="Action" value="{{intent}}" checked={{if (eq item.Action intent) 'checked'}} onchange={{ action 'change' }}/>
|
|
|
|
</label>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
<label class="type-text{{if item.error.Description ' has-error'}}">
|
|
|
|
<span>Description</span>
|
|
|
|
{{input value=item.Description name='description' placeholder="Description"}}
|
|
|
|
<em>Choose a Consul Service, write in a future Consul Service, or write any Service URL</em>
|
|
|
|
</label>
|
|
|
|
</fieldset>
|
|
|
|
<div>
|
|
|
|
{{#if create }}
|
|
|
|
<button type="submit" {{ action "create" item}} disabled={{if item.isInvalid 'disabled'}}>Save</button>
|
|
|
|
{{ else }}
|
|
|
|
<button type="submit" {{ action "update" item}} disabled={{if item.isInvalid 'disabled'}}>Save</button>
|
|
|
|
{{/if}}
|
|
|
|
<button type="reset" {{ action "cancel" item}}>Cancel</button>
|
|
|
|
{{# if (and item.ID (not-eq item.ID 'anonymous')) }}
|
|
|
|
{{#confirmation-dialog message='Are you sure you want to delete this Intention?'}}
|
|
|
|
{{#block-slot 'action' as |confirm|}}
|
|
|
|
<button type="button" class="type-delete" {{action confirm 'delete' item parent}}>Delete</button>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{#block-slot 'dialog' as |execute cancel message|}}
|
|
|
|
<p>
|
|
|
|
{{message}}
|
|
|
|
</p>
|
|
|
|
<button type="button" class="type-delete" {{action execute}}>Confirm Delete</button>
|
|
|
|
<button type="button" class="type-cancel" {{action cancel}}>Cancel</button>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/confirmation-dialog}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|