mirror of https://github.com/status-im/consul.git
Always sort consul-gateway to bottom sources list
This commit is contained in:
parent
5ac1bc9cc0
commit
f06001352a
|
@ -134,7 +134,14 @@
|
||||||
<BlockSlot @name='options'>
|
<BlockSlot @name='options'>
|
||||||
{{#let components.Option as |Option|}}
|
{{#let components.Option as |Option|}}
|
||||||
{{#if (gt @sources.length 0)}}
|
{{#if (gt @sources.length 0)}}
|
||||||
{{#each @sources as |source|}}
|
<Option
|
||||||
|
class='consul'
|
||||||
|
@value='consul'
|
||||||
|
@selected={{includes 'consul' @filter.source.value}}
|
||||||
|
>
|
||||||
|
{{t 'common.brand.consul'}}
|
||||||
|
</Option>
|
||||||
|
{{#each this.sortedSources as |source|}}
|
||||||
<Option
|
<Option
|
||||||
class={{source}}
|
class={{source}}
|
||||||
@value={{source}}
|
@value={{source}}
|
||||||
|
@ -143,13 +150,6 @@
|
||||||
{{t (concat 'common.brand.' source)}}
|
{{t (concat 'common.brand.' source)}}
|
||||||
</Option>
|
</Option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<Option
|
|
||||||
class='consul'
|
|
||||||
@value='consul'
|
|
||||||
@selected={{includes 'consul' @filter.source.value}}
|
|
||||||
>
|
|
||||||
{{t 'common.brand.consul'}}
|
|
||||||
</Option>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
|
|
|
@ -8,4 +8,14 @@ export default class ConsulServiceSearchBar extends Component {
|
||||||
return ['passing', 'warning', 'critical', 'empty'];
|
return ['passing', 'warning', 'critical', 'empty'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get sortedSources() {
|
||||||
|
const sources = this.args.sources || [];
|
||||||
|
|
||||||
|
if (sources.includes('consul-api-gateway')) {
|
||||||
|
return [...sources.filter((s) => s !== 'consul-api-gateway'), 'consul-api-gateway'];
|
||||||
|
} else {
|
||||||
|
return sources;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue