diff --git a/lib/istio/addon/components/istio-nav/component.js b/lib/istio/addon/components/istio-nav/component.js
index ffc34c87a..d98a3c654 100644
--- a/lib/istio/addon/components/istio-nav/component.js
+++ b/lib/istio/addon/components/istio-nav/component.js
@@ -1,19 +1,29 @@
import Component from '@ember/component';
-import { get, computed } from '@ember/object';
+import { set, get, computed } from '@ember/object';
import layout from './template';
import { inject as service } from '@ember/service';
import { alias } from '@ember/object/computed';
+import C from 'ui/utils/constants';
export default Component.extend({
- scope: service(),
- grafana: service(),
+ scope: service(),
+ grafana: service(),
+ features: service(),
layout,
+ showVirtualServiceUI: false,
+
cluster: alias('scope.currentCluster'),
project: alias('scope.currentProject'),
pageScope: alias('scope.currentPageScope'),
+ init() {
+ this._super(...arguments);
+
+ set(this, 'showVirtualServiceUI', get(this, 'features').isFeatureEnabled(C.FEATURES.ISTIO_VIRTUAL_SERVICE_UI))
+ },
+
kialiUrl: computed('cluster.id', function() {
return `/k8s/clusters/${ get(this, 'cluster.id') }/api/v1/namespaces/istio-system/services/http:kiali-http:80/proxy/`
}),
diff --git a/lib/istio/addon/components/istio-nav/template.hbs b/lib/istio/addon/components/istio-nav/template.hbs
index ebfd3130c..047de16b8 100644
--- a/lib/istio/addon/components/istio-nav/template.hbs
+++ b/lib/istio/addon/components/istio-nav/template.hbs
@@ -8,14 +8,14 @@
{{#link-to "project-istio.graph"}}{{t "istio.nav.graph"}}{{/link-to}}
{{/unless}}
- {{!--
-
- {{#link-to "project-istio.destination-rules"}}{{t "istio.nav.destinationRules.label"}}{{/link-to}}
-
-
- {{#link-to "project-istio.virtual-services"}}{{t "istio.nav.virtualServices.label"}}{{/link-to}}
-
- --}}
+ {{#if showVirtualServiceUI}}
+
+ {{#link-to "project-istio.destination-rules"}}{{t "istio.nav.destinationRules.label"}}{{/link-to}}
+
+
+ {{#link-to "project-istio.virtual-services"}}{{t "istio.nav.virtualServices.label"}}{{/link-to}}
+
+ {{/if}}
{{!--
{{#link-to "project-istio.rules"}}{{t "istio.nav.rules"}}{{/link-to}}
--}}
diff --git a/lib/istio/addon/project-istio/template.hbs b/lib/istio/addon/project-istio/template.hbs
index 302a5a717..824088597 100644
--- a/lib/istio/addon/project-istio/template.hbs
+++ b/lib/istio/addon/project-istio/template.hbs
@@ -18,42 +18,40 @@
>
{{t "rulesPage.new"}}
- {{!--
{{else if (eq currentRouteName "authenticated.project.istio.project-istio.destination-rules.index")}}
-
+
- {{#link-to
- "project-istio.destination-rules.new"
- scope.currentProject.id
- class="btn btn-sm bg-primary"
- disabled=(rbac-prevents resource="destinationrule" scope="project" permission="create")
- }}
- {{t "istio.nav.destinationRules.add"}}
- {{/link-to}}
+ {{#link-to
+ "project-istio.destination-rules.new"
+ scope.currentProject.id
+ class="btn btn-sm bg-primary"
+ disabled=(rbac-prevents resource="destinationrule" scope="project" permission="create")
+ }}
+ {{t "istio.nav.destinationRules.add"}}
+ {{/link-to}}
{{else if (eq currentRouteName "authenticated.project.istio.project-istio.virtual-services.index")}}
-
+
- {{#link-to
- "project-istio.virtual-services.new"
- scope.currentProject.id
- class="btn btn-sm bg-primary"
- disabled=(rbac-prevents resource="virtualservice" scope="project" permission="create")
- }}
- {{t "istio.nav.virtualServices.add"}}
- {{/link-to}}
- --}}
+ {{#link-to
+ "project-istio.virtual-services.new"
+ scope.currentProject.id
+ class="btn btn-sm bg-primary"
+ disabled=(rbac-prevents resource="virtualservice" scope="project" permission="create")
+ }}
+ {{t "istio.nav.virtualServices.add"}}
+ {{/link-to}}
{{/if}}