feat(sidebar): update endpoint selection UX (#1902)

* style(sidebar): update selected endpoint name color

* feat(sidebar): sort groups/endpoints alphabetically
pull/1907/head
Anthony Lapenna 2018-05-16 08:49:14 +02:00 committed by GitHub
parent 5df09923b6
commit 32800a843a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -14,7 +14,7 @@
groups="groups"
select-endpoint="switchEndpoint"
></endpoint-selector>
<li class="sidebar-title"><span>{{ activeEndpoint.Name }}</span></li>
<li class="sidebar-title"><span class="endpoint-name">{{ activeEndpoint.Name }}</span></li>
<docker-sidebar-content
endpoint-api-version="applicationState.endpoint.apiVersion"
swarm-management="applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE' && applicationState.endpoint.mode.role === 'MANAGER'"

View File

@ -58,8 +58,8 @@ function ($q, $scope, $state, EndpointService, GroupService, StateManager, Endpo
})
.then(function success(data) {
var endpoints = data.endpoints;
$scope.groups = data.groups;
$scope.endpoints = endpoints;
$scope.groups = _.sortBy(data.groups, ['Name']);
$scope.endpoints = _.sortBy(endpoints, ['Name']);
setActiveEndpoint(endpoints);

View File

@ -304,6 +304,10 @@ ul.sidebar .sidebar-title {
height: auto;
}
ul.sidebar .sidebar-title .endpoint-name {
color: #fff;
}
ul.sidebar .sidebar-list a {
font-size: 14px;
}