Compare commits

..

No commits in common. "master" and "Feature/17249" have entirely different histories.

14 changed files with 644 additions and 820 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/performfish-analytics-portlet-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/performfish-analytics-portlet-0.7.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-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/performfish-analytics-portlet-0.7.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-1.0.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/performfish-analytics-portlet-0.7.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-1.0.0-SNAPSHOT">
<wb-module deploy-name="performfish-analytics-portlet-0.7.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"/>

View File

@ -1,45 +0,0 @@
# 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).

56
changelog.md Normal file
View File

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

View File

@ -2,28 +2,28 @@
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.1-0-0"
date="2020-05-28">
<Change>Added PDF support [#17249]</Change>
<Change>[#17249] Added PDF support</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-4-0"
date="2019-11-07">
<Change>Enabled DEA Analysis [#17252]</Change>
<Change>[#17252] Enabled DEA Analysis</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-3-0"
date="2019-07-07">
<Change>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>
<Change>[#17247] Add numbers to correlation charts</Change>
<Change>[#17225] Change Speedometer to Performeter</Change>
<Change>[#17570] Added synoptic tables for Pre-grow and Hatchery</Change>
</Changeset>
<Changeset
component="org.gcube.portlets.user.performfish-analytics-portlet.0-2-0"
date="2019-06-07">
<Change>Release Synoptic table functionality [#17166]</Change>
<Change>[#17166] Release Synoptic table functionality</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,7 +14,6 @@
<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</version>
<version>1.0.0-SNAPSHOT</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("CorrelationAnnualParameterInputKPIs_"+requestId);
flexTable.getElement().setId("CorrelationParameterInputKPIs");
flexTable.setStyleName("colgrouptable");
try {
@ -617,7 +617,7 @@ public class CorrelationAnnualPanelResult extends Composite {
yPos += 4;
var correlationParametersInputKPIs = $doc
.getElementById('CorrelationAnnualParameterInputKPIs_'+requestId);
.getElementById('CorrelationParameterInputKPIs');
console.log('InputKPIs: ' + correlationParametersInputKPIs);
@ -631,9 +631,6 @@ 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 == outputIteration) {
if (i == outputNumber) {
} 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,58 +424,51 @@ 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);
var good = 'background-color: limegreen;';
var normal = 'background-color: yellow;';
var bad = 'background-color: red;';
if (data.cell.raw.innerHTML
.indexOf(good) >= 0) {
if (data.cell.raw.innerHTML === good) {
console.log('good');
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);
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');
} else {
if (data.cell.raw.innerHTML
.indexOf(normal) >= 0) {
if (data.cell.raw.innerHTML === normal) {
console.log('normal');
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);
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');
} else {
if (data.cell.raw.innerHTML
.indexOf(bad) >= 0) {
if (data.cell.raw.innerHTML === bad) {
console.log('bad');
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);
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');
} else {
}
@ -494,11 +487,9 @@ public class SynopticTableAnnualPanelResult {
startY : yPos,
pageBreak : 'auto',
bodyStyles : {
fontSize : 6,
minCellWidth : 11
fontSize : 9
},
//didDrawCell : checkColor,
didParseCell : checkColor,
didDrawCell : checkColor,
html : secondTable
});
@ -538,15 +529,15 @@ public class SynopticTableAnnualPanelResult {
console.log('Result Type is undefined:' + i);
}
if (j == outputNumber) {
}
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
}
if (i == outputNumber) {
} 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_"+requestId);
flexTable.getElement().setId("CorrelationParameterInputKPIs");
flexTable.setStyleName("colgrouptable");
try {
@ -301,12 +301,11 @@ public class CorrelationPanelResult extends Composite {
private String getOutputId() {
outputNumber++;
String outputId = "OutputId_" + requestId + "_" + outputNumber;
String outputId = "OutputId_" + outputNumber;
GWT.log("Generated OutputId: " + outputId);
return outputId;
}
/**
* Adds the results.
*
@ -634,7 +633,7 @@ public class CorrelationPanelResult extends Composite {
yPos += 4;
var correlationParametersInputKPIs = $doc
.getElementById('CorrelationParameterInputKPIs_'+requestId);
.getElementById('CorrelationParameterInputKPIs');
console.log('InputKPIs: ' + correlationParametersInputKPIs);
@ -648,9 +647,6 @@ 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 == outputIteration) {
if (i == outputNumber) {
} 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(true);
savePDFButton.setVisible(false);
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,58 +419,51 @@ 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);
var good = 'background-color: limegreen;';
var normal = 'background-color: yellow;';
var bad = 'background-color: red;';
if (data.cell.raw.innerHTML
.indexOf(good) >= 0) {
if (data.cell.raw.innerHTML === good) {
console.log('good');
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);
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');
} else {
if (data.cell.raw.innerHTML
.indexOf(normal) >= 0) {
if (data.cell.raw.innerHTML === normal) {
console.log('normal');
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);
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');
} else {
if (data.cell.raw.innerHTML
.indexOf(bad) >= 0) {
if (data.cell.raw.innerHTML === bad) {
console.log('bad');
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);
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');
} else {
}
@ -489,11 +482,9 @@ public class SynopticTablePanelResult {
startY : yPos,
pageBreak : 'auto',
bodyStyles : {
fontSize : 6,
minCellWidth : 11
fontSize : 9
},
//didDrawCell : checkColor,
didParseCell : checkColor,
didDrawCell : checkColor,
html : secondTable
});
@ -533,15 +524,15 @@ public class SynopticTablePanelResult {
console.log('Result Type is undefined:' + i);
}
if (j == outputNumber) {
}
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
}
if (i == outputNumber) {
} else {
if (pdfHeightInMM - yPos < pdfHeightInMM / 7) {
pdoc.addPage();
yPos = tMargin; // Restart position
}
}
}