|
|
|
@ -16,6 +16,7 @@ import org.gcube.portlets.user.performfishanalytics.client.controllers.PerformFi
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.client.event.CallAlgorithmEvent;
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.client.view.LoaderIcon;
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.client.view.util.CorrelationValueToColourUtil;
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.shared.FileContentType;
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.shared.KPI;
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.shared.OutputFile;
|
|
|
|
|
import org.gcube.portlets.user.performfishanalytics.shared.csv.CSVFile;
|
|
|
|
@ -28,10 +29,7 @@ import com.github.gwtbootstrap.client.ui.CheckBox;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.ControlGroup;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.ListBox;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.constants.AlertType;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.constants.ControlGroupType;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
|
|
|
|
import com.github.gwtbootstrap.client.ui.resources.ButtonSize;
|
|
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
|
import com.google.gwt.core.client.Scheduler;
|
|
|
|
|
import com.google.gwt.dom.client.Style.Unit;
|
|
|
|
@ -154,6 +152,8 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
private List<KPI> selectedKPIs;
|
|
|
|
|
|
|
|
|
|
private List<String> selectedAreas;
|
|
|
|
|
|
|
|
|
|
private Map<String, CSVFile> csvGenerated = new HashMap<String, CSVFile>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Because this class has a default constructor, it can
|
|
|
|
@ -192,7 +192,7 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
|
|
|
|
|
List<String> inputKPINames = getSelected(list_dea_input_kpi);
|
|
|
|
|
List<String> outputKPINames = getSelected(list_dea_output_kpi);
|
|
|
|
|
callDeaAnalysis(inputKPINames, outputKPINames, button_dea_analys_request);
|
|
|
|
|
//callDeaAnalysis(inputKPINames, outputKPINames, button_dea_analys_request);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -447,12 +447,11 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
*/
|
|
|
|
|
public void addResults(DataMinerResponse dmResponse) {
|
|
|
|
|
this.dmResponse = dmResponse;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (final OutputFile outputFile : dmResponse.getListOutput()) {
|
|
|
|
|
|
|
|
|
|
switch (outputFile.getDataType()) {
|
|
|
|
|
case IMAGE:
|
|
|
|
|
PerformFishAnalyticsServiceAsync.Util.getInstance().getImageFile(outputFile, new AsyncCallback<String>() {
|
|
|
|
|
|
|
|
|
|
if(outputFile.getDataType().equals(FileContentType.CSV)){
|
|
|
|
|
PerformFishAnalyticsServiceAsync.Util.getInstance().getCSVFile(outputFile, true, new AsyncCallback<CSVFile>() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
@ -461,53 +460,60 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess(String base64Content) {
|
|
|
|
|
ShowResult showResult = new ShowResult(outputFile.getName());
|
|
|
|
|
showResult.showImage(base64Content);
|
|
|
|
|
uib_vp_correlation_results_container.add(showResult);
|
|
|
|
|
|
|
|
|
|
public void onSuccess(CSVFile result) {
|
|
|
|
|
|
|
|
|
|
csvGenerated.put(result.getFileName(), result);
|
|
|
|
|
fillCorrelationMatrix();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case CSV:
|
|
|
|
|
|
|
|
|
|
//CORRELATION MATRIX
|
|
|
|
|
PerformFishAnalyticsServiceAsync.Util.getInstance().getCSVFile(outputFile, true, new AsyncCallback<CSVFile>() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
showAlert(caught.getMessage(), AlertType.ERROR, true, uib_vp_correlation_results_container);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void fillCorrelationMatrix() {
|
|
|
|
|
|
|
|
|
|
if(csvGenerated.size()<2)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
String corrIndexFilename = null;
|
|
|
|
|
String corrFilename = null;
|
|
|
|
|
for (String fileName : csvGenerated.keySet()) {
|
|
|
|
|
if(fileName.contains("index")) {
|
|
|
|
|
corrIndexFilename = fileName;
|
|
|
|
|
}else {
|
|
|
|
|
corrFilename = fileName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GWT.log("Correlation Matrix Index File: "+corrIndexFilename);
|
|
|
|
|
GWT.log("Correlation Matrix File: "+corrFilename);
|
|
|
|
|
CSVFile corrIndexCsvFile = csvGenerated.get(corrIndexFilename);
|
|
|
|
|
CSVFile corrCsvFile = csvGenerated.get(corrFilename);
|
|
|
|
|
GWT.log("Correlation Matrix Index CSV: "+corrIndexCsvFile);
|
|
|
|
|
GWT.log("Correlation Matrix CSV: "+corrCsvFile);
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSuccess(CSVFile result) {
|
|
|
|
|
|
|
|
|
|
GWT.log("Displaying: "+result);
|
|
|
|
|
HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
final FlexTable flexTable = new FlexTable();
|
|
|
|
|
flexTable.setStyleName("fixedtable");
|
|
|
|
|
flexTable.getElement().getStyle().setMarginBottom(10, Unit.PX);
|
|
|
|
|
HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
final FlexTable flexTable = new FlexTable();
|
|
|
|
|
flexTable.setStyleName("fixedtable");
|
|
|
|
|
flexTable.getElement().getStyle().setMarginBottom(10, Unit.PX);
|
|
|
|
|
|
|
|
|
|
flexTable.setWidget(0, 0,new Label(""));
|
|
|
|
|
|
|
|
|
|
// for (KPI kpi : selectedKPIs) {
|
|
|
|
|
// GWT.log("Selected KPIs are: "+kpi);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
CSVRow headerRow = result.getHeaderRow();
|
|
|
|
|
//HEADER
|
|
|
|
|
for (int i=1; i<headerRow.getListValues().size(); i++) {
|
|
|
|
|
flexTable.setWidget(0, 0,new Label(""));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CSVRow headerRow = corrIndexCsvFile.getHeaderRow();
|
|
|
|
|
//HEADER
|
|
|
|
|
for (int i=1; i<headerRow.getListValues().size(); i++) {
|
|
|
|
|
|
|
|
|
|
final String headerValue = headerRow.getListValues().get(i);
|
|
|
|
|
final String headerValue = headerRow.getListValues().get(i);
|
|
|
|
|
// final Button button = new Button(headerValue);
|
|
|
|
|
// button.setType(ButtonType.LINK);
|
|
|
|
|
HTML label = new HTML(headerValue);
|
|
|
|
|
label.getElement().getStyle().setFontSize(16, Unit.PX);
|
|
|
|
|
HTML label = new HTML(headerValue);
|
|
|
|
|
label.getElement().getStyle().setFontSize(16, Unit.PX);
|
|
|
|
|
|
|
|
|
|
final int columnIndex = i;
|
|
|
|
|
KPI kpi = getKPIForName(headerValue);
|
|
|
|
|
fillKPIReferenceForIndex(0, columnIndex, Arrays.asList(kpi));
|
|
|
|
|
final int columnIndex = i;
|
|
|
|
|
KPI kpi = getKPIForName(headerValue);
|
|
|
|
|
fillKPIReferenceForIndex(0, columnIndex, Arrays.asList(kpi));
|
|
|
|
|
// button.addClickHandler(new ClickHandler() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
@ -517,28 +523,34 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
flexTable.setWidget(0, i,label);
|
|
|
|
|
}
|
|
|
|
|
//DATA
|
|
|
|
|
for (int i=0; i<result.getValueRows().size(); i++) {
|
|
|
|
|
CSVRow row = result.getValueRows().get(i);
|
|
|
|
|
final int rowIndex = i+1; //adding +1 for header row
|
|
|
|
|
for (int j=0; j<row.getListValues().size(); j++) {
|
|
|
|
|
final String rowValue = row.getListValues().get(j);
|
|
|
|
|
final String theColor = CorrelationValueToColourUtil.getRGBColor(rowValue);
|
|
|
|
|
final int columnIndex = j;
|
|
|
|
|
final Button button = new Button(rowValue);
|
|
|
|
|
|
|
|
|
|
//only the first column
|
|
|
|
|
if(j==0){
|
|
|
|
|
HTML label = new HTML(rowValue);
|
|
|
|
|
label.getElement().getStyle().setFontSize(16, Unit.PX);
|
|
|
|
|
flexTable.setWidget(rowIndex, j,label);
|
|
|
|
|
//rowValue is a KPI name
|
|
|
|
|
KPI kpi = getKPIForName(rowValue);
|
|
|
|
|
fillKPIReferenceForIndex(rowIndex, columnIndex, Arrays.asList(kpi));
|
|
|
|
|
continue;
|
|
|
|
|
//rowValue is a KPI name
|
|
|
|
|
flexTable.setWidget(0, i,label);
|
|
|
|
|
}
|
|
|
|
|
//DATA
|
|
|
|
|
for (int i=0; i<corrIndexCsvFile.getValueRows().size(); i++) {
|
|
|
|
|
CSVRow row = corrIndexCsvFile.getValueRows().get(i);
|
|
|
|
|
CSVRow rowMatrixColor = corrCsvFile.getValueRows().get(i);
|
|
|
|
|
final int rowIndex = i+1; //adding +1 for header row
|
|
|
|
|
for (int j=0; j<row.getListValues().size(); j++) {
|
|
|
|
|
final String rowValue = row.getListValues().get(j);
|
|
|
|
|
final String rowMatrixColorValue = rowMatrixColor.getListValues().get(j);
|
|
|
|
|
final String theColor = CorrelationValueToColourUtil.getRGBColor(rowMatrixColorValue);
|
|
|
|
|
final int columnIndex = j;
|
|
|
|
|
//final Button button = new Button(rowValue);
|
|
|
|
|
final HTML buttonHTML = new HTML(rowValue);
|
|
|
|
|
buttonHTML.addStyleName("my-active-html");
|
|
|
|
|
// button.setType(ButtonType.LINK);
|
|
|
|
|
// button.setSize(ButtonSize.LARGE);
|
|
|
|
|
|
|
|
|
|
//only the first column
|
|
|
|
|
if(j==0){
|
|
|
|
|
HTML label = new HTML(rowValue);
|
|
|
|
|
label.getElement().getStyle().setFontSize(16, Unit.PX);
|
|
|
|
|
flexTable.setWidget(rowIndex, j,label);
|
|
|
|
|
//rowValue is a KPI name
|
|
|
|
|
KPI kpi = getKPIForName(rowValue);
|
|
|
|
|
fillKPIReferenceForIndex(rowIndex, columnIndex, Arrays.asList(kpi));
|
|
|
|
|
continue;
|
|
|
|
|
//rowValue is a KPI name
|
|
|
|
|
// KPI kpi = getKPIForName(rowValue);
|
|
|
|
|
// fillKPIReferenceForIndex(rowIndex, columnIndex, Arrays.asList(kpi));
|
|
|
|
|
// button.addClickHandler(new ClickHandler() {
|
|
|
|
@ -550,92 +562,86 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
//diagonal
|
|
|
|
|
else if(rowIndex==j){
|
|
|
|
|
HTML dg = new HTML("1");
|
|
|
|
|
dg.getElement().getStyle().setFontSize(18, Unit.PX);
|
|
|
|
|
flexTable.setWidget(rowIndex, j,dg);
|
|
|
|
|
continue;
|
|
|
|
|
//j > 0
|
|
|
|
|
}else{
|
|
|
|
|
KPI columnKPI = getKPIForName(headerRow.getListValues().get(columnIndex));
|
|
|
|
|
//Here the first index is the KPI name
|
|
|
|
|
KPI rowKPI = getKPIForName(row.getListValues().get(0));
|
|
|
|
|
fillKPIReferenceForIndex(rowIndex, columnIndex, Arrays.asList(columnKPI, rowKPI));
|
|
|
|
|
button.setText(" ");
|
|
|
|
|
button.setIcon(IconType.COMPASS);
|
|
|
|
|
button.setSize(ButtonSize.LARGE);
|
|
|
|
|
|
|
|
|
|
button.addClickHandler(new ClickHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
|
|
|
|
|
|
//callScatterAndDeaChart(rowIndex, columnIndex, button);
|
|
|
|
|
callScatter(rowIndex, columnIndex, button);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button.setType(ButtonType.LINK);
|
|
|
|
|
//APPLYING STYLE ONLY ON INTERNAL VALUES OF CSV
|
|
|
|
|
if(j>0)
|
|
|
|
|
button.getElement().getStyle().setColor("#000");
|
|
|
|
|
|
|
|
|
|
button.addAttachHandler(new AttachEvent.Handler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onAttachOrDetach(AttachEvent event) {
|
|
|
|
|
if(theColor.startsWith("#")){
|
|
|
|
|
GWT.log("Setting backgrounf color: "+theColor);
|
|
|
|
|
button.getElement().getParentElement().getStyle().setBackgroundColor(theColor);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
flexTable.setWidget(rowIndex, j,button);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//diagonal
|
|
|
|
|
else if(rowIndex==j){
|
|
|
|
|
//rowValue should be 1
|
|
|
|
|
//HTML dg = new HTML("1");
|
|
|
|
|
HTML dg = new HTML(rowValue);
|
|
|
|
|
dg.getElement().getStyle().setFontSize(18, Unit.PX);
|
|
|
|
|
flexTable.setWidget(rowIndex, j,dg);
|
|
|
|
|
continue;
|
|
|
|
|
//j > 0
|
|
|
|
|
}else{
|
|
|
|
|
KPI columnKPI = getKPIForName(headerRow.getListValues().get(columnIndex));
|
|
|
|
|
//Here the first index is the KPI name
|
|
|
|
|
KPI rowKPI = getKPIForName(row.getListValues().get(0));
|
|
|
|
|
fillKPIReferenceForIndex(rowIndex, columnIndex, Arrays.asList(columnKPI, rowKPI));
|
|
|
|
|
//button.setText(" ");
|
|
|
|
|
//button.setIcon(IconType.COMPASS);
|
|
|
|
|
//button.setSize(ButtonSize.LARGE);
|
|
|
|
|
|
|
|
|
|
buttonHTML.addClickHandler(new ClickHandler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
|
|
|
|
|
|
//callScatterAndDeaChart(rowIndex, columnIndex, button);
|
|
|
|
|
callScatter(rowIndex, columnIndex, buttonHTML);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hp.add(flexTable);
|
|
|
|
|
|
|
|
|
|
final FlexTable flexLegend = new FlexTable();
|
|
|
|
|
flexLegend.setStyleName("simpletable");
|
|
|
|
|
//flexLegend.getElement().getStyle().setBorderWidth(0, Unit.PX);
|
|
|
|
|
Map<String, String> map = CorrelationValueToColourUtil.getMap();
|
|
|
|
|
flexLegend.setWidget(0, 0, new Label("Legend"));
|
|
|
|
|
flexLegend.setWidget(0, 1, new HTML(""));
|
|
|
|
|
int i = 1;
|
|
|
|
|
for (String key : map.keySet()) {
|
|
|
|
|
final String rgbColor = map.get(key);
|
|
|
|
|
final HTML theLegendColor = new HTML("");
|
|
|
|
|
flexLegend.setWidget(i, 0, theLegendColor);
|
|
|
|
|
flexLegend.setWidget(i, 1, new HTML(key));
|
|
|
|
|
theLegendColor.addAttachHandler(new AttachEvent.Handler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onAttachOrDetach(AttachEvent event) {
|
|
|
|
|
theLegendColor.getElement().getParentElement().getStyle().setBackgroundColor(rgbColor);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
//button.setType(ButtonType.LINK);
|
|
|
|
|
//APPLYING STYLE ONLY ON INTERNAL VALUES OF CSV
|
|
|
|
|
if(j>0)
|
|
|
|
|
buttonHTML.getElement().getStyle().setColor("#000");
|
|
|
|
|
|
|
|
|
|
flexLegend.getElement().getStyle().setMarginLeft(15, Unit.PX);
|
|
|
|
|
hp.add(flexLegend);
|
|
|
|
|
uib_vp_correlation_results_container.insert(hp,0);
|
|
|
|
|
}
|
|
|
|
|
buttonHTML.addAttachHandler(new AttachEvent.Handler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onAttachOrDetach(AttachEvent event) {
|
|
|
|
|
if(theColor.startsWith("#")){
|
|
|
|
|
GWT.log("Setting backgrounf color: "+theColor);
|
|
|
|
|
buttonHTML.getElement().getParentElement().getStyle().setBackgroundColor(theColor);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
flexTable.setWidget(rowIndex, j,buttonHTML);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hp.add(flexTable);
|
|
|
|
|
|
|
|
|
|
final FlexTable flexLegend = new FlexTable();
|
|
|
|
|
flexLegend.setStyleName("simpletable");
|
|
|
|
|
//flexLegend.getElement().getStyle().setBorderWidth(0, Unit.PX);
|
|
|
|
|
Map<String, String> map = CorrelationValueToColourUtil.getMap();
|
|
|
|
|
flexLegend.setWidget(0, 0, new Label("Legend"));
|
|
|
|
|
flexLegend.setWidget(0, 1, new HTML(""));
|
|
|
|
|
int i = 1;
|
|
|
|
|
for (String key : map.keySet()) {
|
|
|
|
|
final String rgbColor = map.get(key);
|
|
|
|
|
final HTML theLegendColor = new HTML("");
|
|
|
|
|
flexLegend.setWidget(i, 0, theLegendColor);
|
|
|
|
|
flexLegend.setWidget(i, 1, new HTML(key));
|
|
|
|
|
theLegendColor.addAttachHandler(new AttachEvent.Handler() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onAttachOrDetach(AttachEvent event) {
|
|
|
|
|
theLegendColor.getElement().getParentElement().getStyle().setBackgroundColor(rgbColor);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flexLegend.getElement().getStyle().setMarginLeft(15, Unit.PX);
|
|
|
|
|
hp.add(flexLegend);
|
|
|
|
|
uib_vp_correlation_results_container.insert(hp,0);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -691,36 +697,36 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Call box plot and speedo meter.
|
|
|
|
|
*
|
|
|
|
|
* @param rowIndex the row index
|
|
|
|
|
* @param columnIndex the column index
|
|
|
|
|
* @param button the button
|
|
|
|
|
*/
|
|
|
|
|
private void callBoxPlotAndSpeedoMeter(int rowIndex, int columnIndex, Button button){
|
|
|
|
|
|
|
|
|
|
String focusID = checkValidFocusID();
|
|
|
|
|
|
|
|
|
|
if(focusID==null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
GWT.log("Called BoxPlotAndSpeedoMeter at rowIndex: "+rowIndex +", columnIndex: "+columnIndex);
|
|
|
|
|
HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
HorizontalPanel boxPlot = new HorizontalPanel();
|
|
|
|
|
HorizontalPanel speedometer = new HorizontalPanel();
|
|
|
|
|
hp.add(boxPlot);
|
|
|
|
|
hp.add(speedometer);
|
|
|
|
|
//hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
field_unary_algorithm_container.add(hp);
|
|
|
|
|
//KPI selectKPI = getKPIForName(button.getText());
|
|
|
|
|
List<KPI> selectedKPI = getKPIForIndexes(rowIndex, columnIndex);
|
|
|
|
|
GWT.log("Selected KPI: "+selectedKPI);
|
|
|
|
|
field_unary_algorithm.setVisible(true);
|
|
|
|
|
callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.BOXPLOT, focusID, boxPlot);
|
|
|
|
|
callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.SPEEDOMETER, focusID, speedometer);
|
|
|
|
|
}
|
|
|
|
|
// /**
|
|
|
|
|
// * Call box plot and speedo meter.
|
|
|
|
|
// *
|
|
|
|
|
// * @param rowIndex the row index
|
|
|
|
|
// * @param columnIndex the column index
|
|
|
|
|
// * @param button the button
|
|
|
|
|
// */
|
|
|
|
|
// private void callBoxPlotAndSpeedoMeter(int rowIndex, int columnIndex, Button button){
|
|
|
|
|
//
|
|
|
|
|
// String focusID = checkValidFocusID();
|
|
|
|
|
//
|
|
|
|
|
// if(focusID==null)
|
|
|
|
|
// return;
|
|
|
|
|
//
|
|
|
|
|
// GWT.log("Called BoxPlotAndSpeedoMeter at rowIndex: "+rowIndex +", columnIndex: "+columnIndex);
|
|
|
|
|
// HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
// hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
// HorizontalPanel boxPlot = new HorizontalPanel();
|
|
|
|
|
// HorizontalPanel speedometer = new HorizontalPanel();
|
|
|
|
|
// hp.add(boxPlot);
|
|
|
|
|
// hp.add(speedometer);
|
|
|
|
|
// //hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
// field_unary_algorithm_container.add(hp);
|
|
|
|
|
// //KPI selectKPI = getKPIForName(button.getText());
|
|
|
|
|
// List<KPI> selectedKPI = getKPIForIndexes(rowIndex, columnIndex);
|
|
|
|
|
// GWT.log("Selected KPI: "+selectedKPI);
|
|
|
|
|
// field_unary_algorithm.setVisible(true);
|
|
|
|
|
// callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.BOXPLOT, focusID, boxPlot);
|
|
|
|
|
// callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.SPEEDOMETER, focusID, speedometer);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -754,35 +760,35 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Call scatter and dea chart.
|
|
|
|
|
*
|
|
|
|
|
* @param rowIndex the row index
|
|
|
|
|
* @param columnIndex the column index
|
|
|
|
|
* @param button the button
|
|
|
|
|
*/
|
|
|
|
|
private void callScatterAndDeaChart(int rowIndex, int columnIndex, Button button){
|
|
|
|
|
|
|
|
|
|
String focusID = checkValidFocusID();
|
|
|
|
|
|
|
|
|
|
if(focusID==null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
GWT.log("Called ScatterAndDeaChart at rowIndex: "+rowIndex +", columnIndex: "+columnIndex);
|
|
|
|
|
HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
HorizontalPanel scatter = new HorizontalPanel();
|
|
|
|
|
HorizontalPanel deaChart = new HorizontalPanel();
|
|
|
|
|
hp.add(scatter);
|
|
|
|
|
hp.add(deaChart);
|
|
|
|
|
//hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
field_binary_algorithm_container.add(hp);
|
|
|
|
|
List<KPI> selectedKPI = getKPIForIndexes(rowIndex, columnIndex);
|
|
|
|
|
GWT.log("Selected KPI: "+selectedKPI);
|
|
|
|
|
field_binary_algorithm.setVisible(true);
|
|
|
|
|
callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.SCATTER, focusID, scatter);
|
|
|
|
|
callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.DEA_CHART, focusID, deaChart);
|
|
|
|
|
}
|
|
|
|
|
// /**
|
|
|
|
|
// * Call scatter and dea chart.
|
|
|
|
|
// *
|
|
|
|
|
// * @param rowIndex the row index
|
|
|
|
|
// * @param columnIndex the column index
|
|
|
|
|
// * @param button the button
|
|
|
|
|
// */
|
|
|
|
|
// private void callScatterAndDeaChart(int rowIndex, int columnIndex, Button button){
|
|
|
|
|
//
|
|
|
|
|
// String focusID = checkValidFocusID();
|
|
|
|
|
//
|
|
|
|
|
// if(focusID==null)
|
|
|
|
|
// return;
|
|
|
|
|
//
|
|
|
|
|
// GWT.log("Called ScatterAndDeaChart at rowIndex: "+rowIndex +", columnIndex: "+columnIndex);
|
|
|
|
|
// HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
// hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
// HorizontalPanel scatter = new HorizontalPanel();
|
|
|
|
|
// HorizontalPanel deaChart = new HorizontalPanel();
|
|
|
|
|
// hp.add(scatter);
|
|
|
|
|
// hp.add(deaChart);
|
|
|
|
|
// //hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
// field_binary_algorithm_container.add(hp);
|
|
|
|
|
// List<KPI> selectedKPI = getKPIForIndexes(rowIndex, columnIndex);
|
|
|
|
|
// GWT.log("Selected KPI: "+selectedKPI);
|
|
|
|
|
// field_binary_algorithm.setVisible(true);
|
|
|
|
|
// callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.SCATTER, focusID, scatter);
|
|
|
|
|
// callDataMinerServiceForChart(dataInputParameters, selectedKPI, null, DataMinerAlgorithms.DEA_CHART, focusID, deaChart);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -792,7 +798,7 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
* @param columnIndex the column index
|
|
|
|
|
* @param button the button
|
|
|
|
|
*/
|
|
|
|
|
private void callScatter(int rowIndex, int columnIndex, Button button){
|
|
|
|
|
private void callScatter(int rowIndex, int columnIndex, HTML button){
|
|
|
|
|
|
|
|
|
|
String focusID = checkValidFocusID();
|
|
|
|
|
|
|
|
|
@ -806,37 +812,37 @@ public class AnalyticsPanelResult extends Composite {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Call dea analysis.
|
|
|
|
|
*
|
|
|
|
|
* @param inputKPINames the input kpi names
|
|
|
|
|
* @param outputKPINames the output kpi names
|
|
|
|
|
* @param button the button
|
|
|
|
|
*/
|
|
|
|
|
private void callDeaAnalysis(List<String> inputKPINames, List<String> outputKPINames, Button button){
|
|
|
|
|
|
|
|
|
|
HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
HorizontalPanel deaAnalysis = new HorizontalPanel();
|
|
|
|
|
hp.add(deaAnalysis);
|
|
|
|
|
//hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
uib_vp_deanalanlysis_algorithm_container.add(hp);
|
|
|
|
|
|
|
|
|
|
List<KPI> inputKPI = new ArrayList<KPI>();
|
|
|
|
|
for (String kpiName : inputKPINames) {
|
|
|
|
|
inputKPI.add(getKPIForName(kpiName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<KPI> outputKPI = new ArrayList<KPI>();
|
|
|
|
|
for (String kpiName : outputKPINames) {
|
|
|
|
|
outputKPI.add(getKPIForName(kpiName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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", deaAnalysis);
|
|
|
|
|
}
|
|
|
|
|
// /**
|
|
|
|
|
// * Call dea analysis.
|
|
|
|
|
// *
|
|
|
|
|
// * @param inputKPINames the input kpi names
|
|
|
|
|
// * @param outputKPINames the output kpi names
|
|
|
|
|
// * @param button the button
|
|
|
|
|
// */
|
|
|
|
|
// private void callDeaAnalysis(List<String> inputKPINames, List<String> outputKPINames, Button button){
|
|
|
|
|
//
|
|
|
|
|
// HorizontalPanel hp = new HorizontalPanel();
|
|
|
|
|
// hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
// HorizontalPanel deaAnalysis = new HorizontalPanel();
|
|
|
|
|
// hp.add(deaAnalysis);
|
|
|
|
|
// //hp.getElement().addClassName("ext-horizontal-panel");
|
|
|
|
|
// uib_vp_deanalanlysis_algorithm_container.add(hp);
|
|
|
|
|
//
|
|
|
|
|
// List<KPI> inputKPI = new ArrayList<KPI>();
|
|
|
|
|
// for (String kpiName : inputKPINames) {
|
|
|
|
|
// inputKPI.add(getKPIForName(kpiName));
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// List<KPI> outputKPI = new ArrayList<KPI>();
|
|
|
|
|
// for (String kpiName : outputKPINames) {
|
|
|
|
|
// outputKPI.add(getKPIForName(kpiName));
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// 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", deaAnalysis);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|