Skip to content

Commit

Permalink
Sorting Project IDs and roles. Adjasting UI stepper width
Browse files Browse the repository at this point in the history
  • Loading branch information
abdolence committed Dec 7, 2023
1 parent b6e35e5 commit 23cf1df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public List<String> testIamPermissions(
}
}

public List<ProjectId> searchProjectIds(String query) throws NotAuthenticatedException, IOException {
public Set<ProjectId> searchProjectIds(String query) throws NotAuthenticatedException, IOException {
try {
var client = createClient();

Expand Down Expand Up @@ -287,7 +287,7 @@ public List<ProjectId> searchProjectIds(String query) throws NotAuthenticatedExc

return allProjects.stream()
.map(p -> new ProjectId(p.getProjectId()))
.collect(Collectors.toList());
.collect(Collectors.toCollection(TreeSet::new));
}
catch (GoogleJsonResponseException e) {
switch (e.getStatusCode()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public Set<ProjectId> listAvailableProjects(
return roleBindings
.stream()
.map(b -> ProjectId.fromFullResourceName(b.fullResourceName))
.collect(Collectors.toSet());
.collect(Collectors.toCollection(TreeSet::new));
}
else {
// Used as alternative option if availableProjectsQuery is set and the main approach with Asset API is not working fast enough.
Expand Down Expand Up @@ -297,7 +297,7 @@ public Result<ProjectRole> listEligibleProjectRoles(
Stream.ofNullable(analysisResult.getNonCriticalErrors())
.flatMap(Collection::stream)
.map(e -> e.getCause())
.collect(Collectors.toSet()));
.collect(Collectors.toCollection(TreeSet::new)));
}

/**
Expand Down Expand Up @@ -353,7 +353,7 @@ public Set<UserId> listEligibleUsersForProjectRole(

// Remove the caller.
.filter(user -> !user.equals(callerUserId))
.collect(Collectors.toSet());
.collect(Collectors.toCollection(TreeSet::new));
}

// -------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions sources/src/main/resources/META-INF/resources/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ a {
height: auto;
}

.mdl-stepper {
max-width: 1024px;
}

.mdl-step__transient {
height: calc(100% - 32px);
}
Expand Down

0 comments on commit 23cf1df

Please sign in to comment.