diff --git a/ui-v2/app/components/consul-service-search-bar/index.hbs b/ui-v2/app/components/consul-service-search-bar/index.hbs
index 9013c715f..d093ed1bc 100644
--- a/ui-v2/app/components/consul-service-search-bar/index.hbs
+++ b/ui-v2/app/components/consul-service-search-bar/index.hbs
@@ -44,8 +44,8 @@
{{/let}}
diff --git a/ui-v2/app/filter/predicates/service.js b/ui-v2/app/filter/predicates/service.js
index 9aa5d4f09..ed0a77ed9 100644
--- a/ui-v2/app/filter/predicates/service.js
+++ b/ui-v2/app/filter/predicates/service.js
@@ -6,8 +6,8 @@ export default () => ({ instances = [], sources = [], statuses = [], types = []
'terminating-gateway',
'mesh-gateway',
'service',
- 'mesh-enabled',
- 'mesh-disabled',
+ 'in-mesh',
+ 'not-in-mesh',
].reduce((prev, item) => {
prev[item] = types.includes(item);
return prev;
@@ -48,11 +48,15 @@ export default () => ({ instances = [], sources = [], statuses = [], types = []
if (typeIncludes['service'] && typeof item.Kind === 'undefined') {
return true;
}
- if (typeIncludes['mesh-enabled'] && typeof item.Proxy !== 'undefined') {
- return true;
+ if (typeIncludes['in-mesh']) {
+ if (item.InMesh) {
+ return true;
+ }
}
- if (typeIncludes['mesh-disabled'] && typeof item.Proxy === 'undefined') {
- return true;
+ if (typeIncludes['not-in-mesh']) {
+ if (!item.InMesh) {
+ return true;
+ }
}
return false;
}
diff --git a/ui-v2/app/models/service.js b/ui-v2/app/models/service.js
index 181b5b7ab..6f1a13294 100644
--- a/ui-v2/app/models/service.js
+++ b/ui-v2/app/models/service.js
@@ -16,6 +16,7 @@ export default Model.extend({
InstanceCount: attr('number'),
ConnectedWithGateway: attr(),
ConnectedWithProxy: attr(),
+ Proxy: attr(),
GatewayConfig: attr(),
Kind: attr('string'),
ExternalSources: attr(),
@@ -39,6 +40,12 @@ export default Model.extend({
SyncTime: attr('number'),
meta: attr(),
/* Mesh properties involve both the service and the associated proxy */
+ MeshEnabled: computed('ConnectedWithProxy', 'ConnectedWithGateway', function() {
+ return this.ConnectedWithProxy || this.ConnectedWithGateway;
+ }),
+ InMesh: computed('Kind', function() {
+ return this.MeshEnabled || (this.Kind || '').length > 0;
+ }),
MeshStatus: computed('MeshChecksPassing', 'MeshChecksWarning', 'MeshChecksCritical', function() {
switch (true) {
case this.MeshChecksCritical !== 0: