diff --git a/pom.xml b/pom.xml index b83c09f..001789d 100644 --- a/pom.xml +++ b/pom.xml @@ -286,6 +286,7 @@ ${webappDirectory} + ${project.build.finalName} @@ -301,7 +302,6 @@ org.apache.maven.plugins maven-assembly-plugin - 2.2 ${distroDirectory}/descriptor.xml diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/annualcontrollers/PerformFishAnnualAnalyticsController.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/annualcontrollers/PerformFishAnnualAnalyticsController.java index 55a03aa..2207bc6 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/annualcontrollers/PerformFishAnnualAnalyticsController.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/annualcontrollers/PerformFishAnnualAnalyticsController.java @@ -564,7 +564,6 @@ public class PerformFishAnnualAnalyticsController { DeaAnnualPanelResult deaAnnualPanelResult = new DeaAnnualPanelResult(); deaAnnualPanelResult.addSelectedKPIs(selectedKPI); - deaAnnualPanelResult.addListFocusIds(focusIds); deaAnnualPanelResult.addParameters(PerformFishAnalyticsConstant.DATA_INPUTS, mapParameters, viewAnnualController.getForm().getBatchType()); submitRequestPanel.addWidget(deaAnnualPanelResult); diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsController.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsController.java index 8677d55..62df3cc 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsController.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsController.java @@ -172,8 +172,8 @@ public class PerformFishAnalyticsController { selectedKPI.getSelectedPopulationType()); int selectedKPIsSize = viewController.getSelectedKPIs().size(); // viewController.manageAlgorithmsSubmit(selectedKPIsSize); - List batchIds = viewController.getSelectedBatchID(); - if (batchIds == null || batchIds.size() == 0) { + String selectedBatchId = viewController.getSelectedBatchID(); + if (selectedBatchId == null || selectedBatchId.isEmpty()) { viewController.enableAllAlgorithmsForSubmit(false); } else viewController.manageAlgorithmsSubmit(selectedKPIsSize); @@ -303,13 +303,13 @@ public class PerformFishAnalyticsController { case BOXPLOT: // UNARY - callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID().get(0), + callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID(), selectedKPI, null); break; case SCATTER: if (selectedKPI.size() == 2) - callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID().get(0), + callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID(), selectedKPI, null); else Window.alert("Something seems wrong... You must select exactly two KPIs to execute the " @@ -321,7 +321,7 @@ public class PerformFishAnalyticsController { break; case SPEEDOMETER: // UNARY - callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID().get(0), + callAlgorithm(submitRequestEvent.getChartType(), viewController.getSelectedBatchID(), selectedKPI, selectedKPI); break; case DEA_ANALYSIS: @@ -494,7 +494,7 @@ public class PerformFishAnalyticsController { dataInputsFormatter .append(PerformFishAnalyticsConstant.DM_CHARTTYPE_PARAM + "=" + DataMinerAlgorithms.CORRELATION + ";"); dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FARMFILE_PARAM + "=" + batchTableURL + ";"); - dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "=ID;"); + dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "="+viewController.getSelectedBatchID()+";"); String kpiCodes = ""; for (KPI kpi : viewController.getSelectedKPIs()) { @@ -518,11 +518,9 @@ public class PerformFishAnalyticsController { PerformFishResources.INSTANCE.batch_DEAANALYSIS().getText(), submitRequestPanel); viewController.noSpinner(tab); final List selectedKPI = new ArrayList(viewController.getSelectedKPIs()); - final List batchIDs = new ArrayList(viewController.getListBatchesID()); - + DeaPanelResult deaPanelResult = new DeaPanelResult(); deaPanelResult.addSelectedKPIs(selectedKPI); - deaPanelResult.addListFocusIds(batchIDs); deaPanelResult.addParameters(PerformFishAnalyticsConstant.DATA_INPUTS, mapParameters, viewController.getForm().getBatchType()); submitRequestPanel.addWidget(deaPanelResult); @@ -652,9 +650,9 @@ public class PerformFishAnalyticsController { private void callAlgorithm(DataMinerAlgorithms algorithm, String focusID, List inputKPI, final List outputKPI) { - List listBatchID = viewController.getSelectedBatchID(); + String selectedBatchID = viewController.getSelectedBatchID(); - if (listBatchID == null || listBatchID.size() == 0) + if (selectedBatchID == null || selectedBatchID.isEmpty()) Window.alert("Something seems wrong, no selected BatchID, try again"); // submitRequestPanel.getElement().addClassName("ext-horizontal-panel"); @@ -782,8 +780,7 @@ public class PerformFishAnalyticsController { dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_CHARTTYPE_PARAM + "=" + chartType + ";"); dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FARMFILE_PARAM + "=" + batchTableURL + ";"); dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "=" + focusID + ";"); - // dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM+"=ID;"); - + if (inputKPI != null && inputKPI.size() > 0) { String kpiCodes = ""; for (KPI kpi : inputKPI) { @@ -943,7 +940,7 @@ public class PerformFishAnalyticsController { break; case SPEEDOMETER: title = chartType.getTitle() + "
"; - title += "Selected BATCH ID: " + focusID + "
"; + title += "Selected Batch ID: " + focusID + "
"; title += "Normalized with respect to all batches in the VRE"; break; case DEA_CHART: diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsViewController.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsViewController.java index 96e197b..566829a 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsViewController.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/controllers/PerformFishAnalyticsViewController.java @@ -551,7 +551,7 @@ public class PerformFishAnalyticsViewController { * * @return the selected batch id */ - public List getSelectedBatchID() { + public String getSelectedBatchID() { return batchIDAndListKPI.getSelectedBatchID(); diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/resources/Farm_CORRELATION b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/resources/Farm_CORRELATION index b33b04d..549060c 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/resources/Farm_CORRELATION +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/resources/Farm_CORRELATION @@ -1 +1 @@ -The correlation matrix is a table displaying the correlation between pairs of KPIs. Correlation coefficients are calculated using the Person parametric correation test and coloured according to the value in red (significant positive correlation), yellow (significant negative correlation), and in light blue (non-significant correlation). The Student t-test is used to determine the ranges of correlation for Pearson coefficients. \ No newline at end of file +The correlation matrix is a table displaying the correlation between pairs of KPIs. Correlation coefficients are calculated using the Person parametric correlation test and coloured according to the value in red (significant positive correlation), yellow (significant negative correlation), and in light blue (non-significant correlation). The Student t-test is used to determine the ranges of correlation for Pearson coefficients. \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.java index 1c357ce..9c8a8bd 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.java @@ -9,7 +9,6 @@ import java.util.List; import java.util.Map; import org.gcube.portlets.user.performfishanalytics.client.DataMinerAlgorithms; -import org.gcube.portlets.user.performfishanalytics.client.PerformFishAnalyticsConstant; import org.gcube.portlets.user.performfishanalytics.client.PerformFishAnalyticsServiceAsync; import org.gcube.portlets.user.performfishanalytics.client.controllers.PerformFishAnalyticsController; import org.gcube.portlets.user.performfishanalytics.client.event.CallAlgorithmEvent; @@ -257,7 +256,7 @@ public class AnalyticsAnnualPanelResult extends Composite { flexTable.setWidget(2, 0, new HTML("KPI:")); flexTable.setWidget(2, 1, new HTML(KPINames)); - uib_label_focus_id.setText("FOCUS ID"); + } catch (Exception e) { // silent diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.ui.xml b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.ui.xml index 067c4da..7dcebf9 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.ui.xml +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/AnalyticsAnnualPanelResult.ui.xml @@ -14,17 +14,6 @@ addStyleNames="the_margin_top_bottom"> - - Focus ID - - - - - - - + + Focus ID + + + + + + + diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.java index a0381dd..2161c72 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.java @@ -41,7 +41,6 @@ import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; @@ -74,15 +73,6 @@ public class DeaAnnualPanelResult extends Composite { @UiField VerticalPanel field_parameters_container; - @UiField - Label uib_label_focus_id; - - @UiField - ControlGroup cg_focus_id_correlation; - - @UiField - ListBox field_list_focus_id_correlation; - @UiField ComplexPanel alert_info; @@ -428,18 +418,7 @@ public class DeaAnnualPanelResult extends Composite { return dataInputParameters; } - /** - * Adds the list focus ids. - * - * @param listFocusIDs - * the list focus I ds - */ - public void addListFocusIds(List listFocusIDs) { - for (String batchID : listFocusIDs) { - field_list_focus_id_correlation.addItem(batchID, batchID); - } - } - + /** * Show alert. * @@ -549,18 +528,18 @@ public class DeaAnnualPanelResult extends Composite { // flexTable.setWidget(1, 0, new HTML("Level:")); // flexTable.setWidget(1, 1, new // HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM))); + //flexTable.setWidget(1, 0, new HTML("Focus ID:")); + //flexTable.setWidget(1, 1, new HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_FOCUS_PARAM))); + String KPINames = ""; for (KPI kpi : selectedKPIs) { KPINames += kpi.getName() + ", "; } KPINames = KPINames.substring(0, KPINames.length() - 2); - flexTable.setWidget(2, 0, new HTML("KPI:")); - flexTable.setWidget(2, 1, new HTML(KPINames)); + flexTable.setWidget(1, 0, new HTML("KPI:")); + flexTable.setWidget(1, 1, new HTML(KPINames)); - // CHANGING LABEL TEXT TO SCAPE_PARAM - // uib_label_focus_id.setText(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM) - // + " ID"); fillDeaListBoxes(); @@ -629,7 +608,7 @@ public class DeaAnnualPanelResult extends Composite { hp.add(deaAnalysis); uib_vp_deanalanlysis_algorithm_container.add(hp); - // TODO + final FlexTable flexTable = new FlexTable(); flexTable.setStyleName("colgrouptable"); @@ -753,7 +732,7 @@ public class DeaAnnualPanelResult extends Composite { case BOXPLOT: break; case SPEEDOMETER: - title += " " + uib_label_focus_id.getText() + ": " + focusID; + title += " Focus ID: " + focusID; break; case CORRELATION: break; @@ -803,7 +782,7 @@ public class DeaAnnualPanelResult extends Composite { title += " Statistics on all data"; break; case SPEEDOMETER: - title += " " + uib_label_focus_id.getText() + ": " + focusID; + title += " Focus ID: " + focusID; break; case CORRELATION: break; diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.ui.xml b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.ui.xml index a24e4ba..587a2f3 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.ui.xml +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewannualbinder/DeaAnnualPanelResult.ui.xml @@ -14,18 +14,6 @@ addStyleNames="the_margin_top_bottom"> - - Focus - ID - - - - - - - @@ -108,9 +96,10 @@ - + + addStyleNames="the_margin_left" horizontalAlignment="ALIGN_LEFT"> diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.java index 593e9a9..4317ead 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.java @@ -265,8 +265,7 @@ public class AnalyticsPanelResult extends Composite { flexTable.setWidget(2, 1, new HTML(KPINames)); - //CHANGING LABEL TEXT TO SCAPE_PARAM - uib_label_focus_id.setText(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM) + " ID"); + }catch(Exception e){ //silent diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.ui.xml b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.ui.xml index 739f5b4..4881ce1 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.ui.xml +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/AnalyticsPanelResult.ui.xml @@ -14,18 +14,6 @@ addStyleNames="the_margin_top_bottom"> - - Focus - ID - - - - - - - + + Batch + ID + + + + + + + + { + interface BatchIDAndListKPIViewUiBinder extends UiBinder { } /** The the panel container. */ @@ -77,7 +72,7 @@ public class BatchIDAndListKPIView extends Composite { /** The cg batch id. */ @UiField ControlGroup cg_batch_id; - + /** The uib button load batches. */ @UiField Button uib_button_load_batches; @@ -88,11 +83,9 @@ public class BatchIDAndListKPIView extends Composite { /** The map parameters. */ private Map> mapParameters; - /** The list batches ID. */ private List listBatchesID = new ArrayList(); - /** * Instantiates a new batch id and list kpi view. */ @@ -100,10 +93,9 @@ public class BatchIDAndListKPIView extends Composite { initWidget(uiBinder.createAndBindUi(this)); uib_list_batch_id.setEnabled(false); - - + uib_button_load_batches.addClickHandler(new ClickHandler() { - + @Override public void onClick(ClickEvent event) { PerformFishAnalyticsController.eventBus.fireEvent(new LoadBatchesEvent()); @@ -111,13 +103,13 @@ public class BatchIDAndListKPIView extends Composite { }); } - /** * Adds the. * - * @param w the w + * @param w + * the w */ - public void add(Widget w){ + public void add(Widget w) { the_panel_container.add(w); } @@ -127,71 +119,54 @@ public class BatchIDAndListKPIView extends Composite { * * @return the all batches ID */ - public List getAllBatchesID(){ + public List getAllBatchesID() { return listBatchesID; } - - /** - * Gets the selected. - * - * @param listBox the list box - * @return the selected - */ - private List getSelected(ListBox listBox){ - - if(listBox==null) - listBox = uib_list_batch_id; - - List selected = new ArrayList(); - for (int i=0; i getSelectedBatchID(){ - return getSelected(uib_list_batch_id); + public String getSelectedBatchID() { + + return uib_list_batch_id.getSelectedItemText(); } /** * Manage perform fish service response. * - * @param performFishResponse the perform fish response - * @param mapParameters the map parameters - * @param level the level + * @param performFishResponse + * the perform fish response + * @param mapParameters + * the map parameters + * @param level + * the level */ - public void managePerformFishServiceResponse( - PerformFishResponse performFishResponse, - Map> mapParameters, final POPULATION_LEVEL level) { + public void managePerformFishServiceResponse(PerformFishResponse performFishResponse, + Map> mapParameters, final POPULATION_LEVEL level) { this.performFishResponse = performFishResponse; this.mapParameters = mapParameters; - GWT.log("PerformFish Response: "+performFishResponse); + GWT.log("PerformFish Response: " + performFishResponse); - String fileURL = performFishResponse.getMapParameters().get(PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL); + String fileURL = performFishResponse.getMapParameters() + .get(PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL); - GWT.log("BatchesTable_internal is: "+fileURL); + GWT.log("BatchesTable_internal is: " + fileURL); - //Resetting batch ID and panel error after calling Perform Fish Service + // Resetting batch ID and panel error after calling Perform Fish Service resetBatchIdStatus(); - //Managing the Perform Fish Service Response - if(fileURL==null){ - showAlert("No select found for "+PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR, false, the_panel_error); - }else{ + // Managing the Perform Fish Service Response + if (fileURL == null) { + showAlert("No select found for " + PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR, + false, the_panel_error); + } else { final LoaderIcon loader = new LoaderIcon("Loading Values..."); the_panel_container.insert(loader, 1); - //field_list_focus_id_dea.setEnabled(false); + // field_list_focus_id_dea.setEnabled(false); uib_list_batch_id.setEnabled(false); PerformFishAnalyticsServiceAsync.Util.getInstance().readCSVFile(fileURL, new AsyncCallback() { @@ -209,35 +184,38 @@ public class BatchIDAndListKPIView extends Composite { loader.setVisible(false); the_panel_container.remove(loader); - if(result==null){ - showAlert("No value found for "+PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, AlertType.ERROR, false, the_panel_error); + if (result == null) { + showAlert("No value found for " + PerformFishAnalyticsConstant.BATCHES_TABLE_INTERNAL, + AlertType.ERROR, false, the_panel_error); enableButtonLoadBatches(false); return; } - //field_list_focus_id_dea.setEnabled(true); + // field_list_focus_id_dea.setEnabled(true); uib_list_batch_id.setEnabled(true); - //IT CAN BE "BATCH", "FARM", etc. + // IT CAN BE "BATCH", "FARM", etc. String theScalePParamValue = level.name(); int indexOfTheScaleValue = result.getHeaderRow().getListValues().indexOf(theScalePParamValue); - if(indexOfTheScaleValue>-1){ + if (indexOfTheScaleValue > -1) { List rows = result.getValueRows(); - if(rows==null || rows.isEmpty()){ + if (rows == null || rows.isEmpty()) { PerformFishAnalyticsController.eventBus.fireEvent(new AddedBatchIdEvent()); return; } for (CSVRow row : rows) { String valuePerScaleP = row.getListValues().get(indexOfTheScaleValue); - //field_list_focus_id_dea.addItem(valuePerScaleP, valuePerScaleP); + // field_list_focus_id_dea.addItem(valuePerScaleP, + // valuePerScaleP); uib_list_batch_id.addItem(valuePerScaleP, valuePerScaleP); listBatchesID.add(valuePerScaleP); } - uib_list_batch_id.addItem(PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_TEXT, PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_VALUE); + uib_list_batch_id.addItem(PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_TEXT, + PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_VALUE); listBatchesID.add(PerformFishAnalyticsConstant.DM_FOCUS_ID_ALL_ITEM_VALUE); PerformFishAnalyticsController.eventBus.fireEvent(new AddedBatchIdEvent()); @@ -246,12 +224,12 @@ public class BatchIDAndListKPIView extends Composite { }); } } - + /** * Reset batch id status. */ public void resetBatchIdStatus() { - //Resetting batch ID and panel error after calling Perform Fish Service + // Resetting batch ID and panel error after calling Perform Fish Service uib_list_batch_id.clear(); the_panel_error.clear(); listBatchesID.clear(); @@ -260,12 +238,16 @@ public class BatchIDAndListKPIView extends Composite { /** * Show alert. * - * @param error the error - * @param type the type - * @param closable the closable - * @param panel the panel + * @param error + * the error + * @param type + * the type + * @param closable + * the closable + * @param panel + * the panel */ - private void showAlert(String error, AlertType type, boolean closable, ComplexPanel panel){ + private void showAlert(String error, AlertType type, boolean closable, ComplexPanel panel) { panel.clear(); Alert alert = new Alert(error); alert.setType(type); @@ -274,30 +256,32 @@ public class BatchIDAndListKPIView extends Composite { panel.add(alert); } - /** * Show alert. * - * @param error the error - * @param type the type - * @param closable the closable + * @param error + * the error + * @param type + * the type + * @param closable + * the closable */ - public void showAlert(String error, AlertType type, boolean closable){ + public void showAlert(String error, AlertType type, boolean closable) { showAlert(error, type, closable, the_panel_error); } - /** * Show selection ok. * - * @param msg the msg - * @param closable the closable + * @param msg + * the msg + * @param closable + * the closable */ - public void showSelectionOK(String msg, boolean closable){ + public void showSelectionOK(String msg, boolean closable) { showAlert(msg, AlertType.INFO, closable, the_panel_error); } - /** * Gets the control group batch id. * @@ -308,7 +292,6 @@ public class BatchIDAndListKPIView extends Composite { return cg_batch_id; } - /** * Gets the list box batch id. * @@ -319,7 +302,6 @@ public class BatchIDAndListKPIView extends Composite { return uib_list_batch_id; } - /** * Gets the perform fish response. * @@ -330,7 +312,6 @@ public class BatchIDAndListKPIView extends Composite { return performFishResponse; } - /** * Gets the map parameters. * @@ -340,21 +321,21 @@ public class BatchIDAndListKPIView extends Composite { return mapParameters; } - + /** * Enable button load batches. * - * @param enable the enable + * @param enable + * the enable */ public void enableButtonLoadBatches(boolean enable) { uib_button_load_batches.setEnabled(enable); - - if(enable) + + if (enable) uib_list_batch_id.setTitle("Click the 'Load Batches' button"); else uib_list_batch_id.setTitle(""); } - } diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/BatchIDAndListKPIView.ui.xml b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/BatchIDAndListKPIView.ui.xml index 40b1eb0..be1584c 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/BatchIDAndListKPIView.ui.xml +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/BatchIDAndListKPIView.ui.xml @@ -8,10 +8,10 @@ - BATCH ID + Batch ID - diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.java index 1116612..0a485a2 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.java @@ -40,7 +40,6 @@ import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; @@ -73,14 +72,14 @@ public class DeaPanelResult extends Composite { @UiField VerticalPanel field_parameters_container; - @UiField - Label uib_label_focus_id; + // @UiField + // Label uib_label_focus_id; - @UiField - ControlGroup cg_focus_id_correlation; + // @UiField + // ControlGroup cg_focus_id_correlation; - @UiField - ListBox field_list_focus_id_correlation; + // @UiField + // ListBox field_list_focus_id_correlation; @UiField ComplexPanel alert_info; @@ -421,18 +420,6 @@ public class DeaPanelResult extends Composite { return dataInputParameters; } - /** - * Adds the list focus ids. - * - * @param listFocusIDs - * the list focus I ds - */ - public void addListFocusIds(List listFocusIDs) { - for (String batchID : listFocusIDs) { - field_list_focus_id_correlation.addItem(batchID, batchID); - } - } - /** * Show alert. * @@ -541,6 +528,8 @@ public class DeaPanelResult extends Composite { flexTable.setWidget(0, 1, new HTML(toShowBatchTypeValue)); flexTable.setWidget(1, 0, new HTML("Level:")); flexTable.setWidget(1, 1, new HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM))); + //flexTable.setWidget(2, 0, new HTML("Batch ID:")); + //flexTable.setWidget(2, 1, new HTML(dataInputParameters.get(PerformFishAnalyticsConstant.DM_FOCUS_PARAM))); String KPINames = ""; for (KPI kpi : selectedKPIs) { @@ -550,13 +539,10 @@ public class DeaPanelResult extends Composite { flexTable.setWidget(2, 0, new HTML("KPI:")); flexTable.setWidget(2, 1, new HTML(KPINames)); - // CHANGING LABEL TEXT TO SCAPE_PARAM - uib_label_focus_id.setText(dataInputParameters.get(PerformFishAnalyticsConstant.DM_SCALEP_PARAM) + " ID"); - fillDeaListBoxes(); } catch (Exception e) { - // silent + GWT.log("Error in addParameters for DeaResulPanel: " + e.getLocalizedMessage(), e); } field_parameters_container.add(flexTable); @@ -663,7 +649,7 @@ public class DeaPanelResult extends Composite { GWT.log("Calling Dea Analysys... with input: " + inputKPI + " and output: " + outputKPI); uib_vp_deanalanlysis_algorithm.setVisible(true); - callDataMinerServiceForChart(dataInputParameters, inputKPI, outputKPI, DataMinerAlgorithms.DEA_ANALYSIS, "ID", + callDataMinerServiceForChart(dataInputParameters, inputKPI, outputKPI, DataMinerAlgorithms.DEA_ANALYSIS, deaAnalysis); } @@ -793,8 +779,7 @@ public class DeaPanelResult extends Composite { * the panel */ private void callDataMinerServiceForChart(Map dataInputParameters, final List inputKPI, - final List outputKPI, final DataMinerAlgorithms chartType, final String focusID, - final ComplexPanel panel) { + final List outputKPI, final DataMinerAlgorithms chartType, final ComplexPanel panel) { GWT.log("Call DM wiht Selected KPI: " + inputKPI); StringBuilder dataInputsFormatter = new StringBuilder(); @@ -834,6 +819,7 @@ public class DeaPanelResult extends Composite { } + final String focusID = dataInputParameters.get(PerformFishAnalyticsConstant.DM_FOCUS_PARAM); dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_FOCUS_PARAM + "=" + focusID + ";"); String dataInParameters = dataInputsFormatter.toString(); diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.ui.xml b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.ui.xml index a24e4ba..1b0d4f6 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.ui.xml +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/DeaPanelResult.ui.xml @@ -14,18 +14,18 @@ addStyleNames="the_margin_top_bottom"> - - Focus - ID - - - - - - - + + + + + + + + + + + +