ref 17249: Save produced charts as report
https://support.d4science.org/issues/17249 Updated PDF support
This commit is contained in:
parent
7fa846fa24
commit
9e8e32a0d0
|
@ -0,0 +1,56 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
|
||||
## [v1.0.0] - 2020-05-28
|
||||
|
||||
### Added
|
||||
|
||||
**Features**
|
||||
|
||||
[#17249] Added PDF support
|
||||
|
||||
|
||||
## [v0.4.0] - 2019-11-07
|
||||
|
||||
### Added
|
||||
|
||||
**Features**
|
||||
|
||||
[#17252] Enabled DEA Analysis
|
||||
|
||||
|
||||
## [v0.3.0] - 2019-07-07
|
||||
|
||||
### Added
|
||||
|
||||
**Features**
|
||||
|
||||
[#17247] Add numbers to correlation charts
|
||||
|
||||
[#17225] Change Speedometer to Performeter
|
||||
|
||||
[#17570] Added synoptic tables for Pre-grow and Hatchery
|
||||
|
||||
|
||||
|
||||
## [v0.2.0] - 2019-06-07
|
||||
|
||||
### Added
|
||||
|
||||
**Features**
|
||||
|
||||
[#17166] Release Synoptic table functionality
|
||||
|
||||
|
||||
|
||||
## [v0.1.0] - 2019-05-07
|
||||
|
||||
### Added
|
||||
|
||||
**Features**
|
||||
|
||||
first release
|
||||
|
|
@ -1,21 +1,25 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset
|
||||
component="org.gcube.portlets.user.performfish-analytics-portlet.1-0-0"
|
||||
date="2020-05-28">
|
||||
<Change>[#17249] Added PDF support</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets.user.performfish-analytics-portlet.0-4-0"
|
||||
date="2019-11-07">
|
||||
<Change>[Task #17252] Enabled DEA Analysis</Change>
|
||||
<Change>[#17252] Enabled DEA Analysis</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets.user.performfish-analytics-portlet.0-3-0"
|
||||
date="2019-07-07">
|
||||
<Change>[Task #17247] Add numbers to correlation charts</Change>
|
||||
<Change>[Task #17225] Change Speedometer to Performeter</Change>
|
||||
<Change>[Task #17570] Added synoptic tables for Pre-grow and Hatchery</Change>
|
||||
<Change>[#17247] Add numbers to correlation charts</Change>
|
||||
<Change>[#17225] Change Speedometer to Performeter</Change>
|
||||
<Change>[#17570] Added synoptic tables for Pre-grow and Hatchery</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets.user.performfish-analytics-portlet.0-2-0"
|
||||
date="2019-06-07">
|
||||
<Change>[Task #17165]</Change>
|
||||
<Change>[]Task #17166] Release Synoptic table functionality</Change>
|
||||
<Change>[#17166] Release Synoptic table functionality</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets.user.performfish-analytics-portlet.0-1-0"
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>performfish-analytics-portlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>0.7.0-SNAPSHOT</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>PerformFish Analytics Portlet</name>
|
||||
|
||||
<scm>
|
||||
|
|
|
@ -30,8 +30,8 @@ import org.gcube.portlets.user.performfishanalytics.client.event.SelectedPopulat
|
|||
import org.gcube.portlets.user.performfishanalytics.client.event.SubmitRequestEvent;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.event.SubmitRequestEventHandler;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.resources.PerformFishResources;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.viewannualbinder.CorrelationAnnualPanelResult;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.viewannualbinder.BoxPlotAnnualPanelResult;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.viewannualbinder.CorrelationAnnualPanelResult;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.viewannualbinder.DeaAnnualPanelResult;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.viewannualbinder.ScatterAnnualPanelResult;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.viewannualbinder.SpeedometerAnnualPanelResult;
|
||||
|
@ -124,6 +124,8 @@ public class PerformFishAnnualAnalyticsController {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
eventBus.addHandler(SelectedPopulationTypeEvent.TYPE, new SelectedPopulationTypeEventHandler() {
|
||||
|
||||
@Override
|
||||
|
@ -171,116 +173,9 @@ public class PerformFishAnnualAnalyticsController {
|
|||
|
||||
@Override
|
||||
public void onLoadFocusEvent(LoadFocusEvent loadFocusEvent) {
|
||||
|
||||
final Map<String, List<String>> mapParameters = new HashMap<String, List<String>>();
|
||||
String farmId = decryptParameters.getParameters()
|
||||
.get(PerformFishAnalyticsConstant.PERFORM_FISH_FARMID_PARAM);
|
||||
String batchType = decryptParameters.getParameters()
|
||||
.get(PerformFishAnalyticsConstant.PERFORM_FISH_BATCH_TYPE_PARAM);
|
||||
|
||||
// String batchType =
|
||||
// viewAnnualController.getForm().getBatchType();
|
||||
|
||||
// List<String> listYear =
|
||||
// viewAnnualController.getForm().getYear();
|
||||
|
||||
mapParameters.put(PerformFishAnalyticsConstant.PERFORM_FISH_FARMID_PARAM, Arrays.asList(farmId));
|
||||
mapParameters.put(PerformFishAnalyticsConstant.PERFORM_FISH_BATCH_TYPE_PARAM, Arrays.asList(batchType));
|
||||
|
||||
PerformFishAnalyticsServiceAsync.Util.getInstance().submitRequestToPerformFishService(mapParameters,
|
||||
new AsyncCallback<PerformFishResponse>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// modal.hide();
|
||||
Window.alert(caught.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(PerformFishResponse performFishResponse) {
|
||||
thePerformFishResponse = performFishResponse;
|
||||
GWT.log("PerformFish Response: " + performFishResponse);
|
||||
|
||||
final String pfTableName = PerformFishAnalyticsConstant.PFSERVICE_TO_DM_MAPPING_TABLE.AnnualTable_internal
|
||||
.getPerformFishTable();
|
||||
|
||||
String fileURL = performFishResponse.getMapParameters().get(pfTableName);
|
||||
|
||||
GWT.log(pfTableName + " is: " + fileURL);
|
||||
|
||||
// Managing the Perform Fish Service Response
|
||||
if (fileURL == null) {
|
||||
viewAnnualController.showAlert(
|
||||
"No table found by searching for name: "
|
||||
+ PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL,
|
||||
AlertType.ERROR);
|
||||
} else {
|
||||
|
||||
PerformFishAnalyticsServiceAsync.Util.getInstance().readCSVFile(fileURL,
|
||||
new AsyncCallback<CSVFile>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Window.alert(caught.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(CSVFile result) {
|
||||
|
||||
if (result == null) {
|
||||
viewAnnualController.showAlert(
|
||||
"The focus was not found in the table " + pfTableName,
|
||||
AlertType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
int indexOfFARM = result.getHeaderRow().getListValues().indexOf(
|
||||
PerformFishAnalyticsConstant.POPULATION_LEVEL.FARM.name());
|
||||
|
||||
GWT.log("The index of column "
|
||||
+ PerformFishAnalyticsConstant.POPULATION_LEVEL.FARM.name()
|
||||
+ " is " + indexOfFARM);
|
||||
|
||||
if (indexOfFARM > -1) {
|
||||
List<CSVRow> rows = result.getValueRows();
|
||||
|
||||
if (rows == null || rows.isEmpty()) {
|
||||
viewAnnualController
|
||||
.showAlert("No valid focus was found in the table "
|
||||
+ pfTableName, AlertType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
String focusValue = null;
|
||||
// IN THE COLUMN WITH
|
||||
// HEADER 'FARM' THE
|
||||
// FOCUS VALUE IS THE
|
||||
// SAME FOR ALL ROWS
|
||||
for (CSVRow row : rows) {
|
||||
focusValue = row.getListValues().get(indexOfFARM);
|
||||
if (focusValue != null && !focusValue.isEmpty())
|
||||
break;
|
||||
}
|
||||
|
||||
if (focusValue == null) {
|
||||
viewAnnualController
|
||||
.showAlert("No valid focus was found in the table "
|
||||
+ pfTableName, AlertType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
theFocusValue = focusValue;
|
||||
GWT.log("Loaded the focus value: " + theFocusValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
manageLoadFocus();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
|
@ -319,6 +214,113 @@ public class PerformFishAnnualAnalyticsController {
|
|||
|
||||
}
|
||||
|
||||
private void manageLoadFocus() {
|
||||
final Map<String, List<String>> mapParameters = new HashMap<String, List<String>>();
|
||||
String farmId = decryptParameters.getParameters().get(PerformFishAnalyticsConstant.PERFORM_FISH_FARMID_PARAM);
|
||||
String batchType = decryptParameters.getParameters()
|
||||
.get(PerformFishAnalyticsConstant.PERFORM_FISH_BATCH_TYPE_PARAM);
|
||||
|
||||
// String batchType =
|
||||
// viewAnnualController.getForm().getBatchType();
|
||||
|
||||
// List<String> listYear =
|
||||
// viewAnnualController.getForm().getYear();
|
||||
|
||||
mapParameters.put(PerformFishAnalyticsConstant.PERFORM_FISH_FARMID_PARAM, Arrays.asList(farmId));
|
||||
mapParameters.put(PerformFishAnalyticsConstant.PERFORM_FISH_BATCH_TYPE_PARAM, Arrays.asList(batchType));
|
||||
|
||||
PerformFishAnalyticsServiceAsync.Util.getInstance().submitRequestToPerformFishService(mapParameters,
|
||||
new AsyncCallback<PerformFishResponse>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// modal.hide();
|
||||
Window.alert(caught.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(PerformFishResponse performFishResponse) {
|
||||
thePerformFishResponse = performFishResponse;
|
||||
GWT.log("PerformFish Response: " + performFishResponse);
|
||||
|
||||
final String pfTableName = PerformFishAnalyticsConstant.PFSERVICE_TO_DM_MAPPING_TABLE.AnnualTable_internal
|
||||
.getPerformFishTable();
|
||||
|
||||
String fileURL = performFishResponse.getMapParameters().get(pfTableName);
|
||||
|
||||
GWT.log(pfTableName + " is: " + fileURL);
|
||||
|
||||
// Managing the Perform Fish Service Response
|
||||
if (fileURL == null) {
|
||||
viewAnnualController.showAlert("No table found by searching for name: "
|
||||
+ PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR);
|
||||
} else {
|
||||
|
||||
PerformFishAnalyticsServiceAsync.Util.getInstance().readCSVFile(fileURL,
|
||||
new AsyncCallback<CSVFile>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Window.alert(caught.getMessage());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(CSVFile result) {
|
||||
|
||||
if (result == null) {
|
||||
viewAnnualController.showAlert(
|
||||
"The focus was not found in the table " + pfTableName,
|
||||
AlertType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
int indexOfFARM = result.getHeaderRow().getListValues()
|
||||
.indexOf(PerformFishAnalyticsConstant.POPULATION_LEVEL.FARM.name());
|
||||
|
||||
GWT.log("The index of column "
|
||||
+ PerformFishAnalyticsConstant.POPULATION_LEVEL.FARM.name() + " is "
|
||||
+ indexOfFARM);
|
||||
|
||||
if (indexOfFARM > -1) {
|
||||
List<CSVRow> rows = result.getValueRows();
|
||||
|
||||
if (rows == null || rows.isEmpty()) {
|
||||
viewAnnualController.showAlert(
|
||||
"No valid focus was found in the table " + pfTableName,
|
||||
AlertType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
String focusValue = null;
|
||||
// IN THE COLUMN WITH
|
||||
// HEADER 'FARM' THE
|
||||
// FOCUS VALUE IS THE
|
||||
// SAME FOR ALL ROWS
|
||||
for (CSVRow row : rows) {
|
||||
focusValue = row.getListValues().get(indexOfFARM);
|
||||
if (focusValue != null && !focusValue.isEmpty())
|
||||
break;
|
||||
}
|
||||
|
||||
if (focusValue == null) {
|
||||
viewAnnualController.showAlert(
|
||||
"No valid focus was found in the table " + pfTableName,
|
||||
AlertType.ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
theFocusValue = focusValue;
|
||||
GWT.log("Loaded the focus value: " + theFocusValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Call algorithm synoptic table farm.
|
||||
*/
|
||||
|
@ -581,7 +583,7 @@ public class PerformFishAnnualAnalyticsController {
|
|||
submitRequestPanel.showLoader(false, null);
|
||||
checkTabSpinner(submitRequestPanel, tab);
|
||||
CorrelationAnnualPanelResult analyticsPanelResult = new CorrelationAnnualPanelResult(requestId,
|
||||
eventBus, tabTitle, tabDescription);
|
||||
tabTitle, tabDescription);
|
||||
analyticsPanelResult.addSelectedKPIs(inputKPI);
|
||||
analyticsPanelResult.addListBatchIds(Arrays.asList(theFocusValue));
|
||||
analyticsPanelResult.addParameters(PerformFishAnalyticsConstant.DATA_INPUTS, mapParameters,
|
||||
|
@ -597,8 +599,8 @@ public class PerformFishAnnualAnalyticsController {
|
|||
submitRequestPanel.showLoader(false, null);
|
||||
checkTabSpinner(submitRequestPanel, tab);
|
||||
try {
|
||||
CorrelationAnnualPanelResult analyticsPanelResult = new CorrelationAnnualPanelResult(requestId,
|
||||
eventBus, tabTitle, tabDescription);
|
||||
CorrelationAnnualPanelResult analyticsPanelResult = new CorrelationAnnualPanelResult(
|
||||
requestId, tabTitle, tabDescription);
|
||||
analyticsPanelResult.addSelectedKPIs(inputKPI);
|
||||
analyticsPanelResult.addListBatchIds(Arrays.asList(theFocusValue));
|
||||
analyticsPanelResult.addParameters(PerformFishAnalyticsConstant.DATA_INPUTS, mapParameters,
|
||||
|
@ -655,6 +657,9 @@ public class PerformFishAnnualAnalyticsController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Append DM input table.
|
||||
*
|
||||
|
|
|
@ -50,6 +50,8 @@ public class BoxPlotAnnualPanelResult {
|
|||
private int outputNumber = 2;
|
||||
private int requestId = 0;
|
||||
|
||||
private Button savePDFButton;
|
||||
|
||||
public BoxPlotAnnualPanelResult(int reqId, PerformFishAnnualAnalyticsViewController viewAnnualController,
|
||||
PerformFishResponse thePerformFishResponse, final DataMinerAlgorithms algorithm, String focusID,
|
||||
List<KPI> inputKPI, final List<KPI> outputKPI) {
|
||||
|
@ -70,7 +72,7 @@ public class BoxPlotAnnualPanelResult {
|
|||
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -81,6 +83,7 @@ public class BoxPlotAnnualPanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -275,6 +278,7 @@ public class BoxPlotAnnualPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
final String toTitle = title;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Map;
|
|||
|
||||
import org.gcube.portlets.user.performfishanalytics.client.DataMinerAlgorithms;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.PerformFishAnalyticsServiceAsync;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.controllers.PerformFishAnalyticsController;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.annualcontrollers.PerformFishAnnualAnalyticsController;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.event.CallAlgorithmEvent;
|
||||
import org.gcube.portlets.user.performfishanalytics.client.view.util.CorrelationValueToColourUtil;
|
||||
import org.gcube.portlets.user.performfishanalytics.shared.FileContentType;
|
||||
|
@ -32,7 +32,6 @@ import com.google.gwt.dom.client.Style.Unit;
|
|||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.logical.shared.AttachEvent;
|
||||
import com.google.gwt.event.shared.HandlerManager;
|
||||
import com.google.gwt.uibinder.client.UiBinder;
|
||||
import com.google.gwt.uibinder.client.UiField;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
@ -114,8 +113,6 @@ public class CorrelationAnnualPanelResult extends Composite {
|
|||
|
||||
private List<String> selectedAreas;
|
||||
|
||||
// private HandlerManager theEventBus;
|
||||
|
||||
private Map<String, CSVFile> csvGenerated = new HashMap<String, CSVFile>();
|
||||
|
||||
private CorrelationAnnualPanelResult analyticsPanelResult;
|
||||
|
@ -123,7 +120,7 @@ public class CorrelationAnnualPanelResult extends Composite {
|
|||
private int outputNumber;
|
||||
private int requestId = 0;
|
||||
|
||||
public CorrelationAnnualPanelResult(int reqId, HandlerManager eventBus, final String tabTitle,
|
||||
public CorrelationAnnualPanelResult(int reqId, final String tabTitle,
|
||||
final String tabDescription) {
|
||||
GWT.log("RequestID: " + reqId);
|
||||
requestId = reqId;
|
||||
|
@ -564,7 +561,7 @@ public class CorrelationAnnualPanelResult extends Composite {
|
|||
GWT.log("Called ScatterChart at rowIndex: " + rowIndex + ", columnIndex: " + columnIndex);
|
||||
List<KPI> selectedKPI = getKPIForIndexes(rowIndex, columnIndex);
|
||||
GWT.log("Selected KPI: " + selectedKPI);
|
||||
PerformFishAnalyticsController.eventBus
|
||||
PerformFishAnnualAnalyticsController.eventBus
|
||||
.fireEvent(new CallAlgorithmEvent(DataMinerAlgorithms.SCATTER, focusID, selectedKPI, null));
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ public class ScatterAnnualPanelResult {
|
|||
private int requestId;
|
||||
private int outputIteration = 1;
|
||||
private int outputNumber = 1;
|
||||
private Button savePDFButton;
|
||||
|
||||
public ScatterAnnualPanelResult(int reqId, PerformFishAnnualAnalyticsViewController viewAnnualController,
|
||||
PerformFishResponse thePerformFishResponse, final DataMinerAlgorithms algorithm, String focusID,
|
||||
|
@ -67,7 +68,7 @@ public class ScatterAnnualPanelResult {
|
|||
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -78,6 +79,7 @@ public class ScatterAnnualPanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -268,6 +270,8 @@ public class ScatterAnnualPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
|
||||
final String toTitle = title;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
|
@ -50,6 +50,8 @@ public class SpeedometerAnnualPanelResult {
|
|||
private int outputIteration = 0;
|
||||
private int outputNumber = 1;
|
||||
|
||||
private Button savePDFButton;
|
||||
|
||||
public SpeedometerAnnualPanelResult(int reqId, PerformFishAnnualAnalyticsViewController viewAnnualController,
|
||||
PerformFishResponse thePerformFishResponse, final DataMinerAlgorithms algorithm, String focusID,
|
||||
List<KPI> inputKPI, final List<KPI> outputKPI) {
|
||||
|
@ -70,7 +72,7 @@ public class SpeedometerAnnualPanelResult {
|
|||
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -81,6 +83,7 @@ public class SpeedometerAnnualPanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -268,6 +271,8 @@ public class SpeedometerAnnualPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
|
||||
final String toTitle = title;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
|
@ -47,6 +47,8 @@ public class SynopticTableAnnualPanelResult {
|
|||
private int outputIteration = 1;
|
||||
private int outputNumber = 0;
|
||||
|
||||
private Button savePDFButton;
|
||||
|
||||
public SynopticTableAnnualPanelResult(int reqId, PerformFishAnnualAnalyticsViewController viewAnnualController,
|
||||
PerformFishResponse performFishResponse) {
|
||||
GWT.log("RequestID: " + reqId);
|
||||
|
@ -63,7 +65,7 @@ public class SynopticTableAnnualPanelResult {
|
|||
// TODO
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -74,6 +76,7 @@ public class SynopticTableAnnualPanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -210,9 +213,12 @@ public class SynopticTableAnnualPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
|
||||
final String toTitle = title;
|
||||
|
||||
outputNumber = 1;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
||||
final FileContentType fileContentType = outputFile.getDataType();
|
||||
|
|
|
@ -47,6 +47,8 @@ public class BoxPlotPanelResult {
|
|||
private int outputNumber = 3;
|
||||
private int requestId = 0;
|
||||
|
||||
private Button savePDFButton;
|
||||
|
||||
public BoxPlotPanelResult(int reqId, PerformFishAnalyticsViewController viewController,
|
||||
final DataMinerAlgorithms algorithm, String focusID, List<KPI> inputKPI, final List<KPI> outputKPI) {
|
||||
GWT.log("RequestID: " + reqId);
|
||||
|
@ -66,7 +68,7 @@ public class BoxPlotPanelResult {
|
|||
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -77,6 +79,7 @@ public class BoxPlotPanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -228,6 +231,7 @@ public class BoxPlotPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
final String toTitle = title;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
|
@ -43,6 +43,7 @@ public class ScatterPanelResult {
|
|||
private int requestId = 0;
|
||||
private int outputIteration = 1;
|
||||
private int outputNumber = 1;
|
||||
private Button savePDFButton;
|
||||
|
||||
public ScatterPanelResult(int reqId, PerformFishAnalyticsViewController viewController,
|
||||
final DataMinerAlgorithms algorithm, String focusID, List<KPI> inputKPI, final List<KPI> outputKPI) {
|
||||
|
@ -63,7 +64,7 @@ public class ScatterPanelResult {
|
|||
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -74,6 +75,7 @@ public class ScatterPanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -218,6 +220,7 @@ public class ScatterPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
final String toTitle = title;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
|
@ -43,6 +43,7 @@ public class SpeedometerPanelResult {
|
|||
private int requestId;
|
||||
private int outputIteration = 0;
|
||||
private int outputNumber = 1;
|
||||
private Button savePDFButton;
|
||||
|
||||
public SpeedometerPanelResult(int reqId, PerformFishAnalyticsViewController viewController,
|
||||
final DataMinerAlgorithms algorithm, String focusID, List<KPI> inputKPI, final List<KPI> outputKPI) {
|
||||
|
@ -63,7 +64,7 @@ public class SpeedometerPanelResult {
|
|||
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -73,6 +74,7 @@ public class SpeedometerPanelResult {
|
|||
saveFilePDF(algorithm.getId(), tabTitle, tabTitle, tabDescr, requestId, outputIteration, outputNumber);
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -215,6 +217,8 @@ public class SpeedometerPanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(true);
|
||||
|
||||
final String toTitle = title;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
|
@ -44,6 +44,8 @@ public class SynopticTablePanelResult {
|
|||
private int outputIteration = 1;
|
||||
private int outputNumber = 0;
|
||||
|
||||
private Button savePDFButton;
|
||||
|
||||
public SynopticTablePanelResult(int reqId, PerformFishAnalyticsViewController viewController,
|
||||
PerformFishResponse performFishResponse, final Map<String, List<String>> performFishRequestParameters) {
|
||||
GWT.log("RequestID: " + reqId);
|
||||
|
@ -105,7 +107,7 @@ public class SynopticTablePanelResult {
|
|||
PerformFishResources.INSTANCE.synopticTable().getText(), submitRequestPanel);
|
||||
HorizontalPanel res = new HorizontalPanel();
|
||||
|
||||
Button savePDFButton = new Button();
|
||||
savePDFButton = new Button();
|
||||
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
|
||||
savePDFButton.setIcon(IconType.PRINT);
|
||||
savePDFButton.addClickHandler(new ClickHandler() {
|
||||
|
@ -116,6 +118,7 @@ public class SynopticTablePanelResult {
|
|||
// dmResponse.getListOutput().size()
|
||||
}
|
||||
});
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
res.add(savePDFButton);
|
||||
submitRequestPanel.addWidget(res);
|
||||
|
@ -204,7 +207,10 @@ public class SynopticTablePanelResult {
|
|||
return;
|
||||
}
|
||||
|
||||
savePDFButton.setVisible(false);
|
||||
|
||||
final String toTitle = title;
|
||||
|
||||
outputNumber = 1;
|
||||
|
||||
for (OutputFile outputFile : dmResponse.getListOutput()) {
|
||||
|
|
Loading…
Reference in New Issue