Merge pull request #3270 from n313893254/22213

Add condiction to check cluster isReady for cluster Istio
This commit is contained in:
Vincent Fiduccia 2019-08-20 14:43:15 -07:00 committed by GitHub
commit dec488283d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -45,7 +45,7 @@
{{#each item.submenu as |subitem|}} {{#each item.submenu as |subitem|}}
{{#if subitem.route}} {{#if subitem.route}}
{{#if (or (not subitem.resource) (rbac-allows resource=subitem.resource scope=subitem.resourceScope))}} {{#if (or (not subitem.resource) (rbac-allows resource=subitem.resource scope=subitem.resourceScope))}}
<li class="{{if (and subitem.disableIfClusterNotReady (not cluster.isReady)) "pointer-events-none"}}"> <li>
{{#link-to-as-attrs {{#link-to-as-attrs
ourRoute=subitem.route ourRoute=subitem.route
ctx=subitem.ctx ctx=subitem.ctx

View File

@ -284,11 +284,10 @@ const rootNav = [
localizedLabel: 'nav.tools.istio', localizedLabel: 'nav.tools.istio',
route: 'authenticated.cluster.istio.cluster-setting', route: 'authenticated.cluster.istio.cluster-setting',
resourceScope: 'global', resourceScope: 'global',
disableIfClusterNotReady: true,
resource: [], resource: [],
ctx: [getClusterId], ctx: [getClusterId],
condition() { condition() {
return !get(this, 'cluster.isWindows'); return !get(this, 'cluster.isWindows') && get(this, 'cluster.isReady');
}, },
}, },
], ],