render gallery items

This commit is contained in:
2019-11-16 15:14:21 +01:00
parent 3022edb1e1
commit 73ea635ac1
11 changed files with 220 additions and 19 deletions

View File

@@ -11,6 +11,7 @@
display: grid;
height: 100%;
margin: 0;
overflow: hidden;
grid:
"query-box query-box date-box" auto
"filters results results" 1fr
@@ -22,6 +23,7 @@
#visualization {
display: grid;
margin: 0;
overflow: hidden;
grid:
"query-box" auto
"date-box" auto
@@ -57,8 +59,8 @@
#results {
grid-area: results;
overflow: hidden;
margin-right: 0.5em;
position:relative; /* ??? */
overflow-y: scroll;
}
#plot-button-bar {

View File

@@ -46,6 +46,9 @@ export class VisualizationPageComponent implements OnInit {
@ViewChild(PlotViewComponent, {static: false})
plotView: PlotViewComponent;
@ViewChild(GalleryViewComponent, {static: false})
galleryView: GalleryViewComponent;
enableGallery = false;
splitBy = null;
@@ -108,13 +111,9 @@ export class VisualizationPageComponent implements OnInit {
gallery(){
const that = this;
this.plotService.splitQuery(this.query.query, this.splitBy.name).subscribe(function(valuesForSplitBy){
console.log("valuesForSplitBy: " + JSON.stringify(valuesForSplitBy));
},
error => {
that.plotView.imageUrl = '';
that.showError(error.error.message);
});
this.plotView.imageUrl = '';
const request = this.createPlotRequest();
this.galleryView.renderGallery(request, this.splitBy.name);
}
plot(){
@@ -122,7 +121,19 @@ export class VisualizationPageComponent implements OnInit {
that.plotView.imageUrl = '';
const request = this.createPlotRequest();
this.plotService.sendPlotRequest(request).subscribe(function(plotResponse){
console.log("response: " + JSON.stringify(plotResponse));
that.plotView.imageUrl = "http://"+window.location.hostname+':8080/'+plotResponse.imageUrl;
},
error => {
that.plotView.imageUrl = '';
that.showError(error.error.message);
});
}
createPlotRequest(): PlotRequest {
const aggregates = [];
aggregates.push(this.selectedPlotType.value.id);
if (this.selectedCombinePlotType.value){
@@ -144,16 +155,7 @@ export class VisualizationPageComponent implements OnInit {
request.yRangeMin = this.yAxisRangeComponent.minYValue;
request.yRangeMax = this.yAxisRangeComponent.maxYValue;
request.yRangeUnit = this.yAxisRangeComponent.yAxisUnit;
this.plotService.sendPlotRequest(request).subscribe(function(plotResponse){
console.log("response: " + JSON.stringify(plotResponse));
that.plotView.imageUrl = "http://"+window.location.hostname+':8080/'+plotResponse.imageUrl;
},
error => {
that.plotView.imageUrl = '';
that.showError(error.error.message);
});
return request;
}
/**