mirror of https://github.com/rancher/ui.git
dedup import yaml button when istio feature flag is enabled
When adding the vitual services and destination rules are enabeld we were showing the import yaml button twice. It needs to be visible on both tabs and we should be able to pass the or to the rbac check so I removed the duplicates and moved the button to before the potential other buttons in the istio nav. rancher/rancher#23155
This commit is contained in:
parent
dd9e2d427c
commit
0848e5a519
|
|
@ -2,6 +2,13 @@
|
|||
{{#istio-nav
|
||||
iconDisabled=model.iconDisabled
|
||||
}}
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{or (rbac-prevents resource="virtualservice" scope="project" permission="create") (rbac-prevents resource="destinationrule" scope="project" permission="create")}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
{{#if (eq currentRouteName "authenticated.project.istio.project-istio.rules")}}
|
||||
<a
|
||||
class="btn btn-sm bg-primary mr-10"
|
||||
|
|
@ -19,14 +26,6 @@
|
|||
<span>{{t "rulesPage.new"}}</span>
|
||||
</a>
|
||||
{{else if (eq currentRouteName "authenticated.project.istio.project-istio.destination-rules.index")}}
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{rbac-prevents resource="destinationrule" scope="project" permission="create"}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
|
||||
{{#link-to
|
||||
"project-istio.destination-rules.new"
|
||||
scope.currentProject.id
|
||||
|
|
@ -36,14 +35,6 @@
|
|||
{{t "istio.nav.destinationRules.add"}}
|
||||
{{/link-to}}
|
||||
{{else if (eq currentRouteName "authenticated.project.istio.project-istio.virtual-services.index")}}
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{rbac-prevents resource="virtualservice" scope="project" permission="create"}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
|
||||
{{#link-to
|
||||
"project-istio.virtual-services.new"
|
||||
scope.currentProject.id
|
||||
|
|
@ -53,13 +44,6 @@
|
|||
{{t "istio.nav.virtualServices.add"}}
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
<button
|
||||
{{action "importYaml"}}
|
||||
class="btn btn-sm bg-default mr-10"
|
||||
disabled={{or (rbac-prevents resource="virtualservice" scope="project" permission="create") (rbac-prevents resource="destinationrule" scope="project" permission="create")}}
|
||||
>
|
||||
{{t "nav.containers.importCompose"}}
|
||||
</button>
|
||||
{{/istio-nav}}
|
||||
{{outlet}}
|
||||
{{else}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue