Remove SourceType for the moment

This commit is contained in:
John Cowen 2018-05-22 17:12:36 +01:00 committed by Jack Pearkes
parent 15d01f1d90
commit 5263d04317
4 changed files with 1 additions and 14 deletions

View file

@ -18,9 +18,6 @@ export default Controller.extend({
change: function(e) {
const target = e.target;
switch (target.name) {
case 'SourceType':
set(this.changeset, target.name, target.value);
break;
case 'Action':
set(this.changeset, target.name, target.value);
break;

View file

@ -17,7 +17,6 @@ export default Route.extend(WithIntentionActions, {
create: true,
isLoading: false,
item: this.item,
types: ['consul', 'externaluri'],
intents: ['allow', 'deny'],
});
},

View file

@ -11,7 +11,6 @@ export default Route.extend(WithAclActions, {
return hash({
isLoading: false,
item: get(this, 'repo').findBySlug(params.id, this.modelFor('dc').dc.Name),
types: ['consul', 'externaluri'],
intents: ['allow', 'deny'],
});
},

View file

@ -5,21 +5,13 @@
{{input value=item.SourceName name='source' autofocus='autofocus'}}
<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.Type ' has-error'}}>
{{#each types as |type|}}
<label>
<span>{{type}}</span>
<input type="radio" name="SourceType" value="{{type}}" checked={{if (eq item.SourceType type) 'checked'}} onchange={{ action 'change' }}/>
</label>
{{/each}}
</div>
<label class="type-text{{if item.error.DestinationName ' has-error'}}">
<span>Destination Service</span>
{{input value=item.DestinationName name='name'}}
<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'}}>
{{#each itents as |intent|}}
{{#each intents as |intent|}}
<label>
<span>{{intent}}</span>
<input type="radio" name="Action" value="{{intent}}" checked={{if (eq item.Action intent) 'checked'}} onchange={{ action 'change' }}/>