feat(k8s/sidebar): relocate setup entry as a sub-entry (#4192)

pull/4195/head
Anthony Lapenna 4 years ago committed by GitHub
parent 6720c31aa9
commit a3925c3371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,7 @@
</li>
<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>
</li>
<li class="sidebar-list" ng-if="$ctrl.adminAccess">
<a ui-sref="portainer.endpoints.endpoint.kubernetesConfig({id: $ctrl.endpointId})">Setup <span class="menu-icon fa fa-cog 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>
</div>
</li>

@ -3,5 +3,6 @@ angular.module('portainer.kubernetes').component('kubernetesSidebarContent', {
bindings: {
adminAccess: '<',
endpointId: '<',
currentState: '<',
},
});

@ -17,6 +17,7 @@
ng-if="applicationState.endpoint.mode && applicationState.endpoint.mode.provider === 'KUBERNETES'"
admin-access="isAdmin"
endpoint-id="endpointId"
current-state="$state.current.name"
>
</kubernetes-sidebar-content>
<azure-sidebar-content ng-if="applicationState.endpoint.mode && applicationState.endpoint.mode.provider === 'AZURE'" endpoint-id="endpointId"> </azure-sidebar-content>
@ -156,6 +157,7 @@
$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' ||
@ -173,6 +175,7 @@
$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' ||

Loading…
Cancel
Save