From db00155c2f571ab534efbd1c51a95afb800e5c50 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Wed, 13 Mar 2019 14:39:05 +0000 Subject: [PATCH] Created responsive GUI for central and right panel; Overwritten bootstrap css for form field; Updated h2 dependency at 1.4.198. This version should remove the lock.db issue git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/performfish-analytics-portlet@178569 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 2 +- .../PerformFishAnalyticsViewController.java | 9 +- .../client/view/BodyPanel.java | 18 +++ .../client/view/totest/CellTreeExample.java | 67 ---------- .../client/view/totest/LeafCell.java | 122 ------------------ .../view/totest/NewCustomTreeModel.java | 111 ---------------- .../view/totest/PopulationTypeCell.java | 60 --------- .../PerformFishAnalitycsFormView.java | 30 ----- .../client/viewbinder/RecapSubmitPage.java | 14 +- .../client/viewbinder/RecapSubmitPage.ui.xml | 2 +- .../PerformFishAnalyticsServiceImpl.java | 4 +- .../database/EntityManagerFactoryCreator.java | 2 +- .../GROW_OUT_AGGREGATED_CLOSED_BATCHES.csv | 16 +-- .../BATCH/KPI/GROW_OUT_INDIVIDUAL.csv | 2 +- .../GROW_OUT_INDIVIDUAL_CLOSED_BATCHES.csv | 2 +- .../BATCH/KPI/HATCHERY_INDIVIDUAL.csv | 2 +- .../HATCHERY_INDIVIDUAL_CLOSED_BATCHES.csv | 2 +- .../resources/BATCH/KPI/PRE_ONGROWING.csv | 2 +- .../KPI/PRE_ONGROWING_CLOSED_BATCHES.csv | 2 +- src/main/webapp/PerformFishAnalytics.css | 20 +++ 20 files changed, 70 insertions(+), 419 deletions(-) delete mode 100644 src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/CellTreeExample.java delete mode 100644 src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/LeafCell.java delete mode 100644 src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/NewCustomTreeModel.java delete mode 100644 src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/PopulationTypeCell.java diff --git a/pom.xml b/pom.xml index 8939cda..a7c41c3 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ com.h2database h2 - 1.3.170 + 1.4.198 compile 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 6a0ebae..6a0d095 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 @@ -107,12 +107,13 @@ public class PerformFishAnalyticsViewController { tree = new CellTree(customTreeModel, null); //tree.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED); westPanel.add(form); - estPanel.add(recapPage); + //estPanel.add(recapPage); //bodyPage.add(form); //tree.setWidth("600px"); //tree.setSize("600px", "800px"); batchIDAndListKPI.add(tree); - bodyPage.add(batchIDAndListKPI); + bodyPage.addWidget(batchIDAndListKPI); + bodyPage.addWidget(recapPage); } /** @@ -133,8 +134,8 @@ public class PerformFishAnalyticsViewController { headerPage.add(new PortletTitle("PerformFISH Statistical Analysis")); //baseDockLayoutPanel.addNorth(headerPage, 60); - baseDockLayoutPanel.addWest(westPanel, 600); - baseDockLayoutPanel.addEast(estPanel, 500); + baseDockLayoutPanel.addWest(westPanel, 500); + //baseDockLayoutPanel.addEast(estPanel, 250); baseDockLayoutPanel.add(bodyPage); tabPanel.getTabCreateRequestPanel().add(baseDockLayoutPanel); diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/BodyPanel.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/BodyPanel.java index f03b692..90191eb 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/BodyPanel.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/BodyPanel.java @@ -7,7 +7,9 @@ import com.github.gwtbootstrap.client.ui.Alert; import com.github.gwtbootstrap.client.ui.constants.AlertType; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.VerticalPanel; +import com.google.gwt.user.client.ui.Widget; // TODO: Auto-generated Javadoc /** @@ -23,6 +25,9 @@ public class BodyPanel extends VerticalPanel{ /** The panel error. */ private FlowPanel panelError = new FlowPanel(); + + /** The hp. */ + private HorizontalPanel hp = new HorizontalPanel(); /** * Instantiates a new body page. @@ -30,6 +35,10 @@ public class BodyPanel extends VerticalPanel{ public BodyPanel() { this.init(); add(panelError); + getElement().getStyle().setProperty("width", "98%"); + add(hp); + hp.addStyleName("the-central-table"); + } /** @@ -39,6 +48,15 @@ public class BodyPanel extends VerticalPanel{ add(loader); loader.setVisible(false); } + + /** + * Adds the widget. + * + * @param w the w + */ + public void addWidget(Widget w){ + hp.add(w); + } /** * Sets the loading. diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/CellTreeExample.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/CellTreeExample.java deleted file mode 100644 index d9680c2..0000000 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/CellTreeExample.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * - */ -package org.gcube.portlets.user.performfishanalytics.client.view.totest; - -import com.google.gwt.cell.client.TextCell; -import com.google.gwt.core.client.EntryPoint; -import com.google.gwt.user.cellview.client.CellTree; -import com.google.gwt.user.client.ui.RootLayoutPanel; -import com.google.gwt.view.client.ListDataProvider; -import com.google.gwt.view.client.TreeViewModel; - - -/** - * - * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * Mar 4, 2019 - */ -public class CellTreeExample implements EntryPoint { - - /** - * The model that defines the nodes in the tree. - */ - private static class CustomTreeModel implements TreeViewModel { - - /** - * Get the {@link NodeInfo} that provides the children of the specified - * value. - */ - public NodeInfo getNodeInfo(T value) { - /* - * Create some data in a data provider. Use the parent value as a prefix - * for the next level. - */ - ListDataProvider dataProvider = new ListDataProvider(); - for (int i = 0; i < 2; i++) { - dataProvider.getList().add(value + "." + String.valueOf(i)); - } - - // Return a node info that pairs the data with a cell. - return new DefaultNodeInfo(dataProvider, new TextCell()); - } - - /** - * Check if the specified value represents a leaf node. Leaf nodes cannot be - * opened. - */ - public boolean isLeaf(Object value) { - // The maximum length of a value is ten characters. - return value.toString().length() > 10; - } - } - - public void onModuleLoad() { - // Create a model for the tree. - TreeViewModel model = new CustomTreeModel(); - - /* - * Create the tree using the model. We specify the default value of the - * hidden root node as "Item 1". - */ - CellTree tree = new CellTree(model, "Item 1"); - - // Add the tree to the root layout panel. - RootLayoutPanel.get().add(tree); - } - } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/LeafCell.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/LeafCell.java deleted file mode 100644 index 90aa464..0000000 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/LeafCell.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * - */ - -package org.gcube.portlets.user.performfishanalytics.client.view.totest; - -import java.util.List; - -import org.gcube.portlets.user.performfishanalytics.client.controllers.PerformFishAnalyticsController; -import org.gcube.portlets.user.performfishanalytics.client.event.SelectedKPIEvent; -import org.gcube.portlets.user.performfishanalytics.client.view.KPICell; -import org.gcube.portlets.user.performfishanalytics.shared.KPI; - -import com.google.gwt.cell.client.Cell; -import com.google.gwt.cell.client.CheckboxCell; -import com.google.gwt.cell.client.CompositeCell; -import com.google.gwt.cell.client.FieldUpdater; -import com.google.gwt.cell.client.HasCell; -import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Element; -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.gwt.view.client.SingleSelectionModel; - -/** - * The Class LeafCell. - * - * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) - * Mar 4, 2019 - */ -public class LeafCell extends CompositeCell { - - private final SingleSelectionModel multiSelectionModel = - new SingleSelectionModel(); - private List> hasCells; - - /** - * @param hasCells - */ - public LeafCell(List> hasCells) { - - super(hasCells); - this.hasCells = hasCells; - - hasCells.add(new HasCell() { - - private CheckboxCell cell = new CheckboxCell(true, true); - - public Cell getCell() { - - return cell; - } - - public FieldUpdater getFieldUpdater() { - - return new FieldUpdater() { - - @Override - public void update(int index, KPI object, Boolean value) { - - // TODO Auto-generated method stub - GWT.log("Checked: " + object.getName() + " value: " + - value); - PerformFishAnalyticsController.eventBus.fireEvent(new SelectedKPIEvent( - null, object, value)); - // cell.set(value); - // dataGrid.redraw(); - } - }; - } - - public Boolean getValue(KPI object) { - - return multiSelectionModel.isSelected(object); - } - }); - hasCells.add(new HasCell() { - - private KPICell cell = new KPICell(null); - - public Cell getCell() { - - return cell; - } - - public FieldUpdater getFieldUpdater() { - - return null; - } - - public KPI getValue(KPI object) { - - return object; - } - }); - // TODO Auto-generated constructor stub - } - - @Override - public void render(Context context, KPI value, SafeHtmlBuilder sb) { - - sb.appendHtmlConstant(""); - sb.appendHtmlConstant(value.getName()); - sb.appendHtmlConstant("
"); - } - - @Override - protected Element getContainerElement(Element parent) { - - // Return the first TR element in the table. - return parent.getFirstChildElement().getFirstChildElement().getFirstChildElement(); - } - - @Override - protected void render( - Context context, KPI value, SafeHtmlBuilder sb, HasCell hasCell) { - - Cell cell = hasCell.getCell(); - sb.appendHtmlConstant(""); - cell.render(context, hasCell.getValue(value), sb); - sb.appendHtmlConstant(""); - } -} diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/NewCustomTreeModel.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/NewCustomTreeModel.java deleted file mode 100644 index fb8536c..0000000 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/NewCustomTreeModel.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * - */ -package org.gcube.portlets.user.performfishanalytics.client.view.totest; - -import java.util.ArrayList; -import java.util.List; - -import org.gcube.portlets.user.performfishanalytics.client.view.KPICell; -import org.gcube.portlets.user.performfishanalytics.shared.KPI; -import org.gcube.portlets.user.performfishanalytics.shared.PopulationType; - -import com.google.gwt.cell.client.AbstractCell; -import com.google.gwt.cell.client.HasCell; -import com.google.gwt.cell.client.TextCell; -import com.google.gwt.core.shared.GWT; -import com.google.gwt.view.client.ListDataProvider; -import com.google.gwt.view.client.TreeViewModel; - - -/** - * - * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * Mar 4, 2019 - */ -public class NewCustomTreeModel implements TreeViewModel { - - private ListDataProvider populationTypeProvider = new ListDataProvider(); - - public void setNewBatchType(PopulationType populationType) { - - //GWT.log("Displayng KPI for: " + populationType.toString()); - if (this.populationTypeProvider != null) { - //removing all data from base data provider - this.populationTypeProvider.getList().clear(); - this.populationTypeProvider.getList().addAll(populationType.getListKPI()); - } - } - - /** - * Get the {@link NodeInfo} that provides the children of the specified - * value. - */ - public NodeInfo getNodeInfo(T value) { - - GWT.log("Get Node Info fired: " + value); - if (value == null) { - // LEVEL 0. - // We passed null as the root value. Create a fake root KPIs - PopulationType rootKPI = new PopulationType("", "KPIs", "", "", null); - rootKPI.setListKPI(rootKPI.getListKPI()); - ListDataProvider dataProvider = new ListDataProvider(); - dataProvider.getList().add("KPIs"); - TextCell textCell = new TextCell(); - return new DefaultNodeInfo(dataProvider, textCell); - } - else if (value instanceof PopulationType) { - - - // LEVEL 1. - // We want the children of PopulationType. Getting its list of KPI. -// - //PopulationTypeCell populatioCell = new PopulationTypeCell(null); -// ListDataProvider dataProvider = new ListDataProvider(); -// dataProvider.getList().addAll(listOfKpi); - //List listOfKpi = ((PopulationType) value).getListKPI(); - KPICell kpi = new KPICell(null); - PopulationType populationType = (PopulationType) value; - GWT.log("populationType: "+populationType); - List listOfKpi = populationType.getListKPI(); - populationTypeProvider.getList().addAll(listOfKpi); - return new DefaultNodeInfo(populationTypeProvider, kpi); - - } - else if (value instanceof KPI) { - // LEVEL 2 - LEAF. - // We want the children of the KPI. Return them. - KPI kpiValue = (KPI) value; - List listOfKpi = kpiValue.getListKPI(); - //populationTypeProvider.getList().addAll(listOfKpi); - //GWT.log("KPI type listOfKpi: " + listOfKpi.toString()); - ListDataProvider kpiProvider = new ListDataProvider(listOfKpi); - AbstractCell cell = null; - if(kpiValue.isLeaf()){ - List> hasCells = new ArrayList>(); - cell = new LeafCell(hasCells); - }else{ - cell = new KPICell(null); - } - - return new DefaultNodeInfo(kpiProvider, cell); - } - - return null; - } - - /** - * Check if the specified value represents a leaf node. Leaf nodes cannot be - * opened. - */ - public boolean isLeaf(Object value) { - - // The leaf nodes are the songs, which are Strings. - if (value instanceof KPI) { - KPI toKPI = (KPI) value; - return toKPI.isLeaf(); - } - return false; - } - -} diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/PopulationTypeCell.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/PopulationTypeCell.java deleted file mode 100644 index 5490723..0000000 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/view/totest/PopulationTypeCell.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * - */ - -package org.gcube.portlets.user.performfishanalytics.client.view.totest; - -import org.gcube.portlets.user.performfishanalytics.shared.PopulationType; - -import com.google.gwt.cell.client.AbstractCell; -import com.google.gwt.resources.client.ImageResource; -import com.google.gwt.safehtml.shared.SafeHtmlBuilder; -import com.google.gwt.user.client.ui.AbstractImagePrototype; -/** - * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 18, 2019 - */ -public class PopulationTypeCell extends AbstractCell { - - /** - * The html of the image used for contacts. - */ - private String imageHtml; - - public PopulationTypeCell(ImageResource image) { - - if (image == null) - return; - - this.imageHtml = AbstractImagePrototype.create(image).getHTML(); - } - - /* - * (non-Javadoc) - * @see - * com.google.gwt.cell.client.AbstractCell#render(com.google.gwt.cell.client - * .Cell.Context, java.lang.Object, - * com.google.gwt.safehtml.shared.SafeHtmlBuilder) - */ - @Override - public void render( - com.google.gwt.cell.client.Cell.Context context, PopulationType value, - SafeHtmlBuilder sb) { - - // Value can be null, so do a null check.. - if (value == null) { - return; - } - sb.appendHtmlConstant(""); - // Add the contact image. - sb.appendHtmlConstant(""); - // sb.appendHtmlConstant(""); - // Add the name and address. - sb.appendHtmlConstant(""); - // sb.appendEscaped(value.getAddress()); - sb.appendHtmlConstant("
"); - // sb.appendHtmlConstant(imageHtml); - // sb.appendHtmlConstant(""); - sb.appendEscaped(value.getName()); - sb.appendHtmlConstant("
"); - } -} diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/PerformFishAnalitycsFormView.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/PerformFishAnalitycsFormView.java index 772aa0f..0affba8 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/PerformFishAnalitycsFormView.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/PerformFishAnalitycsFormView.java @@ -210,38 +210,8 @@ public class PerformFishAnalitycsFormView extends Composite { } }); -// KPI kpi = new KPI("", "", "Number fish/FTE employees in 2nd year", "", null, null, 1); -// getKPIForName("Number fish/FTE employees in 2nd year", Arrays.asList(kpi)); } -// /** -// * Gets the KPI for name. -// * -// * @param name the name -// * @return the KPI for name -// */ -// public KPI getKPIForName(String name, List selectedKPIs){ -// -// //GWT.log("Selected KPIs: "+selectedKPIs); -// GWT.log("Searching name: "+name); -// KPI foundKPI = null; -// String purgedName = name.replace("\\", "\\\\"); -// GWT.log("Purged name: "+purgedName); -// //String purgedName = name.trim(); -// for (KPI kpi : selectedKPIs) { -// String purgedKPIName = kpi.getName().replace("\\", "\\\\"); -// GWT.log("Purged Selected KPI name: "+purgedName); -// //String purgedKPIName = kpi.getName().trim(); -// if(purgedKPIName.compareToIgnoreCase(purgedName)==0) { -// foundKPI = kpi; -// break; -// } -// -// } -// GWT.log("FOUND KPI: "+foundKPI); -// return foundKPI; -// } - /** * Select all fields. * diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.java index 5da7ba4..4cbdfa9 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.java @@ -15,15 +15,14 @@ import org.gcube.portlets.user.performfishanalytics.shared.KPI; import com.github.gwtbootstrap.client.ui.Alert; import com.github.gwtbootstrap.client.ui.Button; -import com.github.gwtbootstrap.client.ui.Label; import com.github.gwtbootstrap.client.ui.constants.AlertType; -import com.github.gwtbootstrap.client.ui.constants.LabelType; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; @@ -58,7 +57,7 @@ public class RecapSubmitPage extends Composite { VerticalPanel errorPanelSubmit; private HashMap mapSelected = new HashMap(); - private HashMap mapLabel = new HashMap(); + private HashMap mapLabel = new HashMap(); /** * The Interface RecapSubmitPageUiBinder. @@ -83,6 +82,8 @@ public class RecapSubmitPage extends Composite { public RecapSubmitPage() { initWidget(uiBinder.createAndBindUi(this)); + + recapPanel.getElement().getStyle().setProperty("width", "98%"); uib_butt_descriptive_statistics.addClickHandler(new ClickHandler() { @@ -232,8 +233,9 @@ public class RecapSubmitPage extends Composite { */ private void addSelected(KPI kpi){ errorPanelSubmit.clear(); - Label label = new Label(kpi.getName()); - label.setType(LabelType.INFO); + HTML label = new HTML("* "+kpi.getName()); +// Label label = new Label(kpi.getName()); +// label.setType(LabelType.INFO); recapPanel.add(label); mapSelected.put(kpi.getId(), kpi); mapLabel.put(kpi.getId(), label); @@ -245,7 +247,7 @@ public class RecapSubmitPage extends Composite { */ private void removeSelected(KPI kpi){ - Label label = mapLabel.get(kpi.getId()); + HTML label = mapLabel.get(kpi.getId()); mapSelected.remove(kpi.getId()); try{ diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.ui.xml b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.ui.xml index 75706ea..07e10a5 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.ui.xml +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/client/viewbinder/RecapSubmitPage.ui.xml @@ -13,7 +13,7 @@ - + Selected KPIs diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/server/PerformFishAnalyticsServiceImpl.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/server/PerformFishAnalyticsServiceImpl.java index 4fa4a06..e834e86 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/server/PerformFishAnalyticsServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/server/PerformFishAnalyticsServiceImpl.java @@ -329,10 +329,10 @@ public class PerformFishAnalyticsServiceImpl extends RemoteServiceServlet public PerformFishInitParameter validParameters(PerformFishInitParameter initParams) throws Exception{ Map inputParameters = initParams.getParameters(); - String farmID = inputParameters.get(PerformFishAnalyticsConstant.FARMID_PARAM); + /*String farmID = inputParameters.get(PerformFishAnalyticsConstant.FARMID_PARAM); boolean grantAccess = checkGrantToAccessFarmID(farmID); if(!grantAccess) - throw new Exception("You have no rights to access to this FARM. You does not belong to it."); + throw new Exception("You have no rights to access to this FARM. You does not belong to it.");*/ return initParams; diff --git a/src/main/java/org/gcube/portlets/user/performfishanalytics/server/database/EntityManagerFactoryCreator.java b/src/main/java/org/gcube/portlets/user/performfishanalytics/server/database/EntityManagerFactoryCreator.java index 7614988..674dd9d 100644 --- a/src/main/java/org/gcube/portlets/user/performfishanalytics/server/database/EntityManagerFactoryCreator.java +++ b/src/main/java/org/gcube/portlets/user/performfishanalytics/server/database/EntityManagerFactoryCreator.java @@ -151,7 +151,7 @@ public class EntityManagerFactoryCreator { public static String getJDBCConnectionUrl(boolean localMode) throws SessionExpired, Exception{ if(localMode){ - log.warn("DB EMBEDDED MODE ACTIVATED"); + log.info("DB EMBEDDED MODE ACTIVATED"); return "jdbc:h2:"+getPersistenceFolderPath()+"/H2AnalyticsDB;create=true"; } diff --git a/src/main/resources/BATCH/KPI/GROW_OUT_AGGREGATED_CLOSED_BATCHES.csv b/src/main/resources/BATCH/KPI/GROW_OUT_AGGREGATED_CLOSED_BATCHES.csv index c87e1eb..50459eb 100644 --- a/src/main/resources/BATCH/KPI/GROW_OUT_AGGREGATED_CLOSED_BATCHES.csv +++ b/src/main/resources/BATCH/KPI/GROW_OUT_AGGREGATED_CLOSED_BATCHES.csv @@ -1,12 +1,12 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Dependency on treatments KPIs -,,G9,,,Total number of antiparasitic treatments -,,G10,,,Total number of antibiotic treatments -,,G11,,,Amount of active compounds - antiparasitic -,,G12,,,Amount of active compounds - antibiotic +G9,,Total number of antiparasitic treatments +G10,,Total number of antibiotic treatments +G11,,Amount of active compounds - antiparasitic +G12,,Amount of active compounds - antibiotic ,Grow-out Productivity KPIs -,,G20,,,Biomass produced per number of FTE employees -,,G21,,,Biomass produced per volumes of sea water used +G20,,Biomass produced per number of FTE employees +G21,,Biomass produced per volumes of sea water used ,Environmental KPIs ,,Preservation of biodiversity and habitats KPIs G22,,,Oxygen depletion persistence days @@ -20,4 +20,4 @@ G30,,,Freshwater use G31,,,Energy used G32,,,Fuel (Diesel) used for transport G33,,,Fuel (Diesel) used for other uses -G35,,,Use of renewable energy +G35,,,Use of renewable energy diff --git a/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL.csv b/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL.csv index 074af11..e72187e 100644 --- a/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL.csv +++ b/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL.csv @@ -1,4 +1,4 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Fish Losses KPIs ,,Mortalities - total G1_1,,,Mortalities - Stocking-50g (%) diff --git a/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL_CLOSED_BATCHES.csv b/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL_CLOSED_BATCHES.csv index 074af11..e72187e 100644 --- a/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL_CLOSED_BATCHES.csv +++ b/src/main/resources/BATCH/KPI/GROW_OUT_INDIVIDUAL_CLOSED_BATCHES.csv @@ -1,4 +1,4 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Fish Losses KPIs ,,Mortalities - total G1_1,,,Mortalities - Stocking-50g (%) diff --git a/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL.csv b/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL.csv index 306ca40..a335ae9 100644 --- a/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL.csv +++ b/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL.csv @@ -1,4 +1,4 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Hatchery Total Productivity KPIs ,,Weaned fish H1,,,Weaned fish (%) diff --git a/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL_CLOSED_BATCHES.csv b/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL_CLOSED_BATCHES.csv index 9b2f8b9..fa4a1c9 100644 --- a/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL_CLOSED_BATCHES.csv +++ b/src/main/resources/BATCH/KPI/HATCHERY_INDIVIDUAL_CLOSED_BATCHES.csv @@ -1,4 +1,4 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Hatchery Total Productivity KPIs,, ,,Weaned fish, H1,,,Weaned fish (%) diff --git a/src/main/resources/BATCH/KPI/PRE_ONGROWING.csv b/src/main/resources/BATCH/KPI/PRE_ONGROWING.csv index dcf0f29..86acec8 100644 --- a/src/main/resources/BATCH/KPI/PRE_ONGROWING.csv +++ b/src/main/resources/BATCH/KPI/PRE_ONGROWING.csv @@ -1,4 +1,4 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Pre-grow Total Productivity KPIs,, ,,Deformed fish, P1,,,Deformed fish (%) diff --git a/src/main/resources/BATCH/KPI/PRE_ONGROWING_CLOSED_BATCHES.csv b/src/main/resources/BATCH/KPI/PRE_ONGROWING_CLOSED_BATCHES.csv index dcf0f29..86acec8 100644 --- a/src/main/resources/BATCH/KPI/PRE_ONGROWING_CLOSED_BATCHES.csv +++ b/src/main/resources/BATCH/KPI/PRE_ONGROWING_CLOSED_BATCHES.csv @@ -1,4 +1,4 @@ -KPI CODE,KPI NAME – LEVEL 1,KPI NAME – LEVEL 2,KPI NAME – LEVEL 3 +KPI CODE,KPI NAME - LEVEL 1,KPI NAME - LEVEL 2,KPI NAME - LEVEL 3 ,Pre-grow Total Productivity KPIs,, ,,Deformed fish, P1,,,Deformed fish (%) diff --git a/src/main/webapp/PerformFishAnalytics.css b/src/main/webapp/PerformFishAnalytics.css index 8ebbb77..3493dd2 100644 --- a/src/main/webapp/PerformFishAnalytics.css +++ b/src/main/webapp/PerformFishAnalytics.css @@ -170,3 +170,23 @@ table.fixedtable td { margin-left: 20px; } + +.selected-kpi-panel{ + overflow-wrap: break-word; +} + +.form-horizontal .controls{ + margin-left: 100px !important; +} + +.form-horizontal .control-label{ + width: 90px !important; +} + +.the-central-table { + width: 100%; +} + +the-central-table td { + padding: 2px; +}