show fullscreen image
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
package org.lucares.pdbui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.text.Collator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
@@ -120,8 +124,16 @@ public class PdbController implements HardcodedValues, PropertyKeys {
|
||||
? WEB_IMAGE_OUTPUT_PATH + "/" + result.getThumbnailName()
|
||||
: "img/no-thumbnail.png";
|
||||
|
||||
final Map<String, String> rendered = new HashMap<>();
|
||||
for (final Entry<String, Path> renderedImageEntry : result.getRenderedImages().entrySet()) {
|
||||
final String url = WEB_IMAGE_OUTPUT_PATH + "/"
|
||||
+ renderedImageEntry.getValue().getFileName();
|
||||
|
||||
rendered.put(renderedImageEntry.getKey(), url);
|
||||
}
|
||||
|
||||
final PlotResponseStats stats = PlotResponseStats.fromDataSeries(result.getDataSeries());
|
||||
final PlotResponse plotResponse = new PlotResponse(stats, imageUrl, thumbnailUrl);
|
||||
final PlotResponse plotResponse = new PlotResponse(stats, imageUrl, thumbnailUrl, rendered);
|
||||
|
||||
return ResponseEntity.ok().body(plotResponse);
|
||||
} catch (final NoDataPointsException e) {
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
package org.lucares.pdbui.domain;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PlotResponse {
|
||||
private String imageUrl = "";
|
||||
private PlotResponseStats stats;
|
||||
private String thumbnailUrl;
|
||||
private final Map<String, String> rendered;
|
||||
|
||||
public PlotResponse(final PlotResponseStats stats, final String imageUrl, final String thumbnailUrl) {
|
||||
public PlotResponse(final PlotResponseStats stats, final String imageUrl, final String thumbnailUrl,
|
||||
final Map<String, String> rendered) {
|
||||
this.stats = stats;
|
||||
this.imageUrl = imageUrl;
|
||||
this.thumbnailUrl = thumbnailUrl;
|
||||
this.rendered = rendered;
|
||||
}
|
||||
|
||||
public Map<String, String> getRendered() {
|
||||
return rendered;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
|
||||
Reference in New Issue
Block a user