fix(k8s/sidebar): accessing cluster setup not expand endpoint sidebar (#4496)

pull/3937/head
Alice Groux 2020-12-10 03:11:45 +01:00 committed by GitHub
parent 865c8d899b
commit 890bbf4058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -16,6 +16,6 @@
<li class="sidebar-list">
<a ui-sref="kubernetes.cluster({endpointId: $ctrl.endpointId})" ui-sref-active="active">Cluster <span class="menu-icon fa fa-server fa-fw"></span></a>
<div class="sidebar-sublist" ng-if="$ctrl.adminAccess && ($ctrl.currentState === 'kubernetes.cluster' || $ctrl.currentState === 'portainer.endpoints.endpoint.kubernetesConfig')">
<a ui-sref="portainer.endpoints.endpoint.kubernetesConfig({id: $ctrl.endpointId})">Setup</a>
<a ui-sref="portainer.endpoints.endpoint.kubernetesConfig({id: $ctrl.endpointId})" ui-sref-active="active">Setup</a>
</div>
</li>

View File

@ -127,7 +127,11 @@
</div>
</li>
<li class="sidebar-list" ng-if="isAdmin">
<a ui-sref="portainer.endpoints" ui-sref-active="active">Endpoints <span class="menu-icon fa fa-plug fa-fw"></span></a>
<a
ui-sref="portainer.endpoints"
ng-class="{ active: $state.current.name.includes('portainer.endpoints') && $state.current.name !== 'portainer.endpoints.endpoint.kubernetesConfig' }"
>Endpoints <span class="menu-icon fa fa-plug fa-fw"></span
></a>
<div
class="sidebar-sublist"
ng-if="
@ -136,7 +140,6 @@
$state.current.name === 'portainer.endpoints.endpoint' ||
$state.current.name === 'portainer.endpoints.new' ||
$state.current.name === 'portainer.endpoints.endpoint.access' ||
$state.current.name === 'portainer.endpoints.endpoint.kubernetesConfig' ||
$state.current.name === 'portainer.groups' ||
$state.current.name === 'portainer.groups.group' ||
$state.current.name === 'portainer.groups.group.access' ||
@ -154,7 +157,6 @@
$state.current.name === 'portainer.endpoints.endpoint' ||
$state.current.name === 'portainer.endpoints.new' ||
$state.current.name === 'portainer.endpoints.endpoint.access' ||
$state.current.name === 'portainer.endpoints.endpoint.kubernetesConfig' ||
$state.current.name === 'portainer.groups' ||
$state.current.name === 'portainer.groups.group' ||
$state.current.name === 'portainer.groups.group.access' ||