Change the appearance of `*` for intention listings
1. Use 'All Services (*)' as opposed to '*' 2. Set 'Destination' in teh same bold font as 'Source' 3. Ensure you can search for all services by using '*' or 'All Services (*)'
This commit is contained in:
parent
54ad6fc050
commit
cb11361511
|
@ -32,13 +32,15 @@ export default Controller.extend(WithFiltering, {
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
filter: function(item, { s = '', action = '' }) {
|
filter: function(item, { s = '', action = '' }) {
|
||||||
|
const source = get(item, 'SourceName').toLowerCase();
|
||||||
|
const destination = get(item, 'DestinationName').toLowerCase();
|
||||||
|
const sLower = s.toLowerCase();
|
||||||
|
const allLabel = 'All Services (*)'.toLowerCase();
|
||||||
return (
|
return (
|
||||||
(get(item, 'SourceName')
|
(source.indexOf(sLower) !== -1 ||
|
||||||
.toLowerCase()
|
destination.indexOf(sLower) !== -1 ||
|
||||||
.indexOf(s.toLowerCase()) !== -1 ||
|
(source === '*' && allLabel.indexOf(sLower) !== -1) ||
|
||||||
get(item, 'DestinationName')
|
(destination === '*' && allLabel.indexOf(sLower) !== -1)) &&
|
||||||
.toLowerCase()
|
|
||||||
.indexOf(s.toLowerCase()) !== -1) &&
|
|
||||||
(action === '' || get(item, 'Action') === action)
|
(action === '' || get(item, 'Action') === action)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
td.intent-allow strong {
|
html.template-intention.template-list td.intent-allow strong {
|
||||||
@extend %with-allow;
|
@extend %with-allow;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
td.intent-deny strong {
|
html.template-intention.template-list td.intent-deny strong {
|
||||||
@extend %with-deny;
|
@extend %with-deny;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
html.template-intention.template-list td.destination {
|
||||||
|
font-weight: $weight-semibold;
|
||||||
|
}
|
||||||
|
|
|
@ -26,16 +26,26 @@
|
||||||
<th>Precedence</th>
|
<th>Precedence</th>
|
||||||
{{/block-slot}}
|
{{/block-slot}}
|
||||||
{{#block-slot 'row'}}
|
{{#block-slot 'row'}}
|
||||||
<td data-test-intention="{{item.ID}}">
|
<td class="source" data-test-intention="{{item.ID}}">
|
||||||
<a href={{href-to 'dc.intentions.edit' item.ID}}>{{item.SourceName}}</a>
|
<a href={{href-to 'dc.intentions.edit' item.ID}}>
|
||||||
|
{{#if (eq item.SourceName '*') }}
|
||||||
|
All Services (*)
|
||||||
|
{{else}}
|
||||||
|
{{item.SourceName}}
|
||||||
|
{{/if}}
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="intent-{{item.Action}}">
|
<td class="intent-{{item.Action}}">
|
||||||
<strong>{{item.Action}}</strong>
|
<strong>{{item.Action}}</strong>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="destination">
|
||||||
{{item.DestinationName}}
|
{{#if (eq item.DestinationName '*') }}
|
||||||
|
All Services (*)
|
||||||
|
{{else}}
|
||||||
|
{{item.DestinationName}}
|
||||||
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="precedence">
|
||||||
{{item.Precedence}}
|
{{item.Precedence}}
|
||||||
</td>
|
</td>
|
||||||
{{/block-slot}}
|
{{/block-slot}}
|
||||||
|
|
Loading…
Reference in New Issue