Skip to content

Commit

Permalink
fix: fix storage name to be correct and not default to debug for all …
Browse files Browse the repository at this point in the history
…views
  • Loading branch information
MatthijsSmets committed Aug 26, 2024
1 parent 664dec9 commit 1c62a43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/nl/nn/testtool/filter/View.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ public String toString() {
return getName();
}

public Map<String, Object> toMap(boolean isDefaultView) {
public Map<String, Object> toMap(boolean isDefaultView, String storageName) {
Map<String, String> metadataTypes = new HashMap<>();
for (String metadataName : getMetadataNames()) {
metadataTypes.put(metadataName, metadataExtractor.getType(metadataName));
}

return new HashMap<String, Object>() {{
put("storageName", debugStorage.getName());
put("storageName", storageName);
put("defaultView", isDefaultView);
put("metadataNames", metadataNames);
put("metadataLabels", getMetadataLabels());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/nl/nn/testtool/web/api/TestToolApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public Response getViewsResponse() {
// ExtendedBeanInfo isn't used anymore with newer CXF versions)
Map<String, Map<String, Object>> response = new LinkedHashMap<>();
for (View view : views) {
response.put(view.getName(), view.toMap(view == views.getDefaultView()));
response.put(view.getName(), view.toMap(view == views.getDefaultView(), view.getDebugStorage().getName()));
}
return Response.ok(response).build();
}
Expand Down

0 comments on commit 1c62a43

Please sign in to comment.