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 871953ba39
commit 9d6b9b7717
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' }}/>