render gallery items
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user