Compare commits

...

10 Commits

Author SHA1 Message Date
Giancarlo Panichi 6a4d266aad Updated descriptor.xml 2020-06-11 14:32:40 +02:00
Giancarlo Panichi b05a549b32 Updated CHANGELOG.md 2020-06-10 20:15:42 +02:00
Giancarlo Panichi 1d7cac9f1b Updated for release gCube 4.23.0 2020-06-03 10:47:17 +02:00
Giancarlo Panichi 352a394c1c Fixed SynopticTable dimensions 2020-05-28 18:17:30 +02:00
Giancarlo Panichi 11f2124a3e Fixed SynopticTable dimensions 2020-05-28 18:10:27 +02:00
Giancarlo Panichi 9e5baee0f6 Fixed SynopticTable width 2020-05-28 17:30:50 +02:00
Giancarlo Panichi 83a0a9b08f Fixed minor bug 2020-05-28 15:33:24 +02:00
Giancarlo Panichi 5137731dbb Fixed minor bug 2020-05-28 13:32:18 +02:00
Giancarlo Panichi abced0e5ad Added some log for support debug 2020-05-28 11:05:40 +02:00
Giancarlo Panichi c18f95a480 Merge pull request 'Feature/17249' (#1) from Feature/17249 into master 2020-05-27 20:13:32 +02:00
14 changed files with 827 additions and 651 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/performfish-analytics-portlet-0.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/performfish-analytics-portlet-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/performfish-analytics-portlet-0.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/performfish-analytics-portlet-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -35,5 +35,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/performfish-analytics-portlet-0.7.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/performfish-analytics-portlet-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="performfish-analytics-portlet-0.7.0-SNAPSHOT">
<wb-module deploy-name="performfish-analytics-portlet-1.0.0-SNAPSHOT">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>

45
CHANGELOG.md Normal file
View File

@ -0,0 +1,45 @@
# Changelog
## [v1.0.0] [r4.23.0] - 2020-05-28
### Features
- Added PDF support [#17249]
## [v0.4.0] - 2019-11-07
### Features
- Enabled DEA Analysis [#17252]
## [v0.3.0] - 2019-07-07
### Features
- Add numbers to correlation charts [#17247]
- Change Speedometer to Performeter [#17225]
- Added synoptic tables for Pre-grow and Hatchery [#17570]
## [v0.2.0] - 2019-06-07
### Features
- Release Synoptic table functionality [#17166]
## [v0.1.0] - 2019-05-07
### Features
- First Release
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

View File

@ -1,56 +0,0 @@
# 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

View File

@ -2,28 +2,28 @@
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.1-0-0"
date="2020-05-28">
<Change>[#17249] Added PDF support</Change>
<Change>Added PDF support [#17249]</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-4-0"
date="2019-11-07">
<Change>[#17252] Enabled DEA Analysis</Change>
<Change>Enabled DEA Analysis [#17252]</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-3-0"
date="2019-07-07">
<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>
<Change>Add numbers to correlation charts [#17247]</Change>
<Change>Change Speedometer to Performeter [#17225]</Change>
<Change>Added synoptic tables for Pre-grow and Hatchery [#17570]</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-2-0"
date="2019-06-07">
<Change>[#17166] Release Synoptic table functionality</Change>
<Change>Release Synoptic table functionality [#17166]</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-1-0"
date="2019-05-07">
<Change>first release</Change>
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

View File

@ -14,6 +14,7 @@
<includes>
<include>README.md</include>
<include>LICENSE.md</include>
<include>CHANGELOG.md</include>
<include>profile.xml</include>
<include>changelog.xml</include>
</includes>

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>performfish-analytics-portlet</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
<name>PerformFish Analytics Portlet</name>
<scm>

View File

@ -237,7 +237,7 @@ public class CorrelationAnnualPanelResult extends Composite {
public void addParameters(String keyToGet, Map<String, List<String>> parameters, String toShowBatchTypeValue) {
final FlexTable flexTable = new FlexTable();
flexTable.getElement().setId("CorrelationParameterInputKPIs");
flexTable.getElement().setId("CorrelationAnnualParameterInputKPIs_"+requestId);
flexTable.setStyleName("colgrouptable");
try {
@ -617,7 +617,7 @@ public class CorrelationAnnualPanelResult extends Composite {
yPos += 4;
var correlationParametersInputKPIs = $doc
.getElementById('CorrelationParameterInputKPIs');
.getElementById('CorrelationAnnualParameterInputKPIs_'+requestId);
console.log('InputKPIs: ' + correlationParametersInputKPIs);
@ -631,6 +631,9 @@ public class CorrelationAnnualPanelResult extends Composite {
fillColor : [ 211, 225, 241 ]
}
},
bodyStyles : {
minCellWidth: 20
},
html : correlationParametersInputKPIs
});

View File

@ -548,7 +548,7 @@ public class SpeedometerAnnualPanelResult {
}
if (i == outputNumber) {
if (i == outputIteration) {
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 4) {

View File

@ -77,7 +77,7 @@ public class SynopticTableAnnualPanelResult {
}
});
savePDFButton.setVisible(false);
res.add(savePDFButton);
submitRequestPanel.addWidget(res);
@ -212,13 +212,13 @@ public class SynopticTableAnnualPanelResult {
container.add(alert);
return;
}
savePDFButton.setVisible(true);
final String toTitle = title;
outputNumber = 1;
for (OutputFile outputFile : dmResponse.getListOutput()) {
final FileContentType fileContentType = outputFile.getDataType();
@ -424,51 +424,58 @@ public class SynopticTableAnnualPanelResult {
var checkColor = function(data) {
if (data.section === 'body') {
console.log(data);
var good = '<div class="gwt-HTML"><span style="padding-left: 10px; padding-right: 10px; background-color: limegreen; border: 1px solid limegreen;"></span></div>';
var normal = '<div class="gwt-HTML"><span style="padding-left: 10px; padding-right: 10px; background-color: yellow; border: 1px solid yellow;"></span></div>';
var bad = '<div class="gwt-HTML"><span style="padding-left: 10px; padding-right: 10px; background-color: red;border: 1px solid red;"></span></div>';
if (typeof data.cell !== 'undefined'
&& data.cell !== null) {
if (typeof data.cell.raw !== 'undefined'
&& data.cell.raw !== null) {
console.log(data.cell.raw.innerHTML);
if (data.cell.raw.innerHTML === good) {
var good = 'background-color: limegreen;';
var normal = 'background-color: yellow;';
var bad = 'background-color: red;';
if (data.cell.raw.innerHTML
.indexOf(good) >= 0) {
console.log('good');
var posIW = (data.cell.x + (data.cell.width / 2)-2);
var posIH = (data.cell.y + (data.cell.height / 2)-2);
var greenImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAbSM8+wB/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQIf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwIf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPyEf/9oADAMBAAIAAwAAABAAD//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8QH//Z'
pdoc.addImage(greenImg, 'JPEG', posIW, posIH, 4, 4);
//pdoc.setFontSize(10);
//pdoc.setFontType("normal");
//var posW = (data.cell.x + (data.cell.width / 2));
//var posH = (data.cell.y + (data.cell.height / 2));
//pdoc.text('G', posW, posH,'center');
data.cell.styles.fillColor = [ 50,
205, 50 ];
//var posIW = (data.cell.x
// + (data.cell.width / 2) - 2);
//var posIH = (data.cell.y
// + (data.cell.height / 2) - 2);
//var greenImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAbSM8+wB/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQIf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwIf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPyEf/9oADAMBAAIAAwAAABAAD//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8QH//Z'
//pdoc.addImage(greenImg, 'JPEG',
// posIW, posIH, 4, 4);
} else {
if (data.cell.raw.innerHTML === normal) {
if (data.cell.raw.innerHTML
.indexOf(normal) >= 0) {
console.log('normal');
var posIW = (data.cell.x + (data.cell.width / 2)-2);
var posIH = (data.cell.y + (data.cell.height / 2)-2);
var yellowImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAWAQEBAQAAAAAAAAAAAAAAAAAABwr/2gAMAwEAAhADEAAAAbEZ/wCqAD//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAEFAh//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Ah//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/IR//2gAMAwEAAgADAAAAEAAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPxAf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPxAf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPxAf/9k='
pdoc.addImage(yellowImg, 'JPEG', posIW, posIH, 4, 4);
//pdoc.setFontSize(10);
//pdoc.setFontType("normal");
//var posW = (data.cell.x + (data.cell.width / 2));
//var posH = (data.cell.y + (data.cell.height / 2));
//pdoc.text('N', posW, posH,'center');
data.cell.styles.fillColor = [
255, 255, 0 ];
//var posIW = (data.cell.x
// + (data.cell.width / 2) - 2);
//var posIH = (data.cell.y
// + (data.cell.height / 2) - 2);
//var yellowImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAWAQEBAQAAAAAAAAAAAAAAAAAABwr/2gAMAwEAAhADEAAAAbEZ/wCqAD//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAEFAh//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Ah//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/IR//2gAMAwEAAgADAAAAEAAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPxAf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPxAf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPxAf/9k='
//pdoc.addImage(yellowImg,
// 'JPEG', posIW, posIH,
// 4, 4);
} else {
if (data.cell.raw.innerHTML === bad) {
if (data.cell.raw.innerHTML
.indexOf(bad) >= 0) {
console.log('bad');
var posIW = (data.cell.x + (data.cell.width / 2)-2);
var posIH = (data.cell.y + (data.cell.height / 2)-2);
var redImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAj/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAYvlPfwAf//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8hH//aAAwDAQACAAMAAAAQAA//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/EB//2Q=='
pdoc.addImage(redImg, 'JPEG', posIW, posIH, 4, 4);
//pdoc.setFontSize(10);
//pdoc.setFontType("normal");
//var posW = (data.cell.x + (data.cell.width / 2));
//var posH = (data.cell.y + (data.cell.height / 2));
//pdoc.text('B', posW, posH,'center');
data.cell.styles.fillColor = [
255, 0, 0 ];
//var posIW = (data.cell.x
// + (data.cell.width / 2) - 2);
//var posIH = (data.cell.y
// + (data.cell.height / 2) - 2);
//var redImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAj/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAYvlPfwAf//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8hH//aAAwDAQACAAMAAAAQAA//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/EB//2Q=='
//pdoc.addImage(redImg,
// 'JPEG', posIW,
// posIH, 4, 4);
} else {
}
@ -487,9 +494,11 @@ public class SynopticTableAnnualPanelResult {
startY : yPos,
pageBreak : 'auto',
bodyStyles : {
fontSize : 9
fontSize : 6,
minCellWidth : 11
},
didDrawCell : checkColor,
//didDrawCell : checkColor,
didParseCell : checkColor,
html : secondTable
});
@ -529,15 +538,15 @@ public class SynopticTableAnnualPanelResult {
console.log('Result Type is undefined:' + i);
}
}
if (j == outputNumber) {
if (i == outputNumber) {
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
}
}
}
}

View File

@ -244,7 +244,7 @@ public class CorrelationPanelResult extends Composite {
public void addParameters(String keyToGet, Map<String, List<String>> parameters, String toShowBatchTypeValue) {
final FlexTable flexTable = new FlexTable();
flexTable.getElement().setId("CorrelationParameterInputKPIs");
flexTable.getElement().setId("CorrelationParameterInputKPIs_"+requestId);
flexTable.setStyleName("colgrouptable");
try {
@ -301,11 +301,12 @@ public class CorrelationPanelResult extends Composite {
private String getOutputId() {
outputNumber++;
String outputId = "OutputId_" + outputNumber;
String outputId = "OutputId_" + requestId + "_" + outputNumber;
GWT.log("Generated OutputId: " + outputId);
return outputId;
}
/**
* Adds the results.
*
@ -633,7 +634,7 @@ public class CorrelationPanelResult extends Composite {
yPos += 4;
var correlationParametersInputKPIs = $doc
.getElementById('CorrelationParameterInputKPIs');
.getElementById('CorrelationParameterInputKPIs_'+requestId);
console.log('InputKPIs: ' + correlationParametersInputKPIs);
@ -647,6 +648,9 @@ public class CorrelationPanelResult extends Composite {
fillColor : [ 211, 225, 241 ]
}
},
bodyStyles : {
minCellWidth: 20
},
html : correlationParametersInputKPIs
});

View File

@ -469,7 +469,7 @@ public class SpeedometerPanelResult {
}
if (i == outputNumber) {
if (i == outputIteration) {
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 4) {

View File

@ -107,7 +107,7 @@ public class SynopticTablePanelResult {
PerformFishResources.INSTANCE.synopticTable().getText(), submitRequestPanel);
HorizontalPanel res = new HorizontalPanel();
savePDFButton = new Button();
savePDFButton = new Button();
savePDFButton.getElement().getStyle().setMargin(10, Unit.PX);
savePDFButton.setIcon(IconType.PRINT);
savePDFButton.addClickHandler(new ClickHandler() {
@ -207,10 +207,10 @@ public class SynopticTablePanelResult {
return;
}
savePDFButton.setVisible(false);
savePDFButton.setVisible(true);
final String toTitle = title;
outputNumber = 1;
for (OutputFile outputFile : dmResponse.getListOutput()) {
@ -376,7 +376,7 @@ public class SynopticTablePanelResult {
//pdoc.text("Analysis:", xPos, yPos, 'left');
yPos += 6;
for (var i = 1; i <= outputIteration; i++) {
for (var i = 1; i <= outputIteration; i++) {
for (var j = 1; j <= outputNumber; j++) {
@ -419,51 +419,58 @@ public class SynopticTablePanelResult {
var checkColor = function(data) {
if (data.section === 'body') {
console.log(data);
var good = '<div class="gwt-HTML"><span style="padding-left: 10px; padding-right: 10px; background-color: limegreen; border: 1px solid limegreen;"></span></div>';
var normal = '<div class="gwt-HTML"><span style="padding-left: 10px; padding-right: 10px; background-color: yellow; border: 1px solid yellow;"></span></div>';
var bad = '<div class="gwt-HTML"><span style="padding-left: 10px; padding-right: 10px; background-color: red;border: 1px solid red;"></span></div>';
if (typeof data.cell !== 'undefined'
&& data.cell !== null) {
if (typeof data.cell.raw !== 'undefined'
&& data.cell.raw !== null) {
console.log(data.cell.raw.innerHTML);
if (data.cell.raw.innerHTML === good) {
var good = 'background-color: limegreen;';
var normal = 'background-color: yellow;';
var bad = 'background-color: red;';
if (data.cell.raw.innerHTML
.indexOf(good) >= 0) {
console.log('good');
var posIW = (data.cell.x + (data.cell.width / 2)-2);
var posIH = (data.cell.y + (data.cell.height / 2)-2);
var greenImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAbSM8+wB/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQIf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwIf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPyEf/9oADAMBAAIAAwAAABAAD//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8QH//Z'
pdoc.addImage(greenImg, 'JPEG', posIW, posIH, 4, 4);
//pdoc.setFontSize(10);
//pdoc.setFontType("normal");
//var posW = (data.cell.x + (data.cell.width / 2));
//var posH = (data.cell.y + (data.cell.height / 2));
//pdoc.text('G', posW, posH,'center');
data.cell.styles.fillColor = [ 50,
205, 50 ];
//var posIW = (data.cell.x
// + (data.cell.width / 2) - 2);
//var posIH = (data.cell.y
// + (data.cell.height / 2) - 2);
//var greenImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAbSM8+wB/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABBQIf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPwEf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQAGPwIf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPyEf/9oADAMBAAIAAwAAABAAD//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8QH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8QH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8QH//Z'
//pdoc.addImage(greenImg, 'JPEG',
// posIW, posIH, 4, 4);
} else {
if (data.cell.raw.innerHTML === normal) {
if (data.cell.raw.innerHTML
.indexOf(normal) >= 0) {
console.log('normal');
var posIW = (data.cell.x + (data.cell.width / 2)-2);
var posIH = (data.cell.y + (data.cell.height / 2)-2);
var yellowImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAWAQEBAQAAAAAAAAAAAAAAAAAABwr/2gAMAwEAAhADEAAAAbEZ/wCqAD//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAEFAh//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Ah//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/IR//2gAMAwEAAgADAAAAEAAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPxAf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPxAf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPxAf/9k='
pdoc.addImage(yellowImg, 'JPEG', posIW, posIH, 4, 4);
//pdoc.setFontSize(10);
//pdoc.setFontType("normal");
//var posW = (data.cell.x + (data.cell.width / 2));
//var posH = (data.cell.y + (data.cell.height / 2));
//pdoc.text('N', posW, posH,'center');
data.cell.styles.fillColor = [
255, 255, 0 ];
//var posIW = (data.cell.x
// + (data.cell.width / 2) - 2);
//var posIH = (data.cell.y
// + (data.cell.height / 2) - 2);
//var yellowImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAWAQEBAQAAAAAAAAAAAAAAAAAABwr/2gAMAwEAAhADEAAAAbEZ/wCqAD//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAEFAh//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AR//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAY/Ah//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/IR//2gAMAwEAAgADAAAAEAAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAwEBPxAf/8QAFBEBAAAAAAAAAAAAAAAAAAAAIP/aAAgBAgEBPxAf/8QAFBABAAAAAAAAAAAAAAAAAAAAIP/aAAgBAQABPxAf/9k='
//pdoc.addImage(yellowImg,
// 'JPEG', posIW, posIH,
// 4, 4);
} else {
if (data.cell.raw.innerHTML === bad) {
if (data.cell.raw.innerHTML
.indexOf(bad) >= 0) {
console.log('bad');
var posIW = (data.cell.x + (data.cell.width / 2)-2);
var posIH = (data.cell.y + (data.cell.height / 2)-2);
var redImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAj/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAYvlPfwAf//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8hH//aAAwDAQACAAMAAAAQAA//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/EB//2Q=='
pdoc.addImage(redImg, 'JPEG', posIW, posIH, 4, 4);
//pdoc.setFontSize(10);
//pdoc.setFontType("normal");
//var posW = (data.cell.x + (data.cell.width / 2));
//var posH = (data.cell.y + (data.cell.height / 2));
//pdoc.text('B', posW, posH,'center');
data.cell.styles.fillColor = [
255, 0, 0 ];
//var posIW = (data.cell.x
// + (data.cell.width / 2) - 2);
//var posIH = (data.cell.y
// + (data.cell.height / 2) - 2);
//var redImg = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wgARCAAKAAoDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAj/xAAWAQEBAQAAAAAAAAAAAAAAAAAACAn/2gAMAwEAAhADEAAAAYvlPfwAf//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAQUCH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQMBAT8BH//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEABj8CH//EABQQAQAAAAAAAAAAAAAAAAAAACD/2gAIAQEAAT8hH//aAAwDAQACAAMAAAAQAA//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/EB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/EB//xAAUEAEAAAAAAAAAAAAAAAAAAAAg/9oACAEBAAE/EB//2Q=='
//pdoc.addImage(redImg,
// 'JPEG', posIW,
// posIH, 4, 4);
} else {
}
@ -482,9 +489,11 @@ public class SynopticTablePanelResult {
startY : yPos,
pageBreak : 'auto',
bodyStyles : {
fontSize : 9
fontSize : 6,
minCellWidth : 11
},
didDrawCell : checkColor,
//didDrawCell : checkColor,
didParseCell : checkColor,
html : secondTable
});
@ -524,15 +533,15 @@ public class SynopticTablePanelResult {
console.log('Result Type is undefined:' + i);
}
}
if (j == outputNumber) {
if (i == outputNumber) {
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
}
}
}
}