Skip to content

Commit c0a5aa3

Browse files
committed
fix cloudk json log pattern changes and other changes
1 parent fb089c5 commit c0a5aa3

15 files changed

+339
-218
lines changed

build.gradle

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import net.ltgt.gradle.errorprone.CheckSeverity
33
plugins {
44
id 'java'
55
id 'application'
6-
id 'net.ltgt.errorprone' version '3.0.1'
7-
id 'com.github.spotbugs' version '5.0.13'
8-
id 'nebula.release' version '17.1.0'
6+
id 'net.ltgt.errorprone' version '3.1.0'
7+
id 'com.github.spotbugs' version '5.1.2'
8+
id 'nebula.release' version '17.2.2'
99
}
1010

1111
group = 'com.pega.gcs'
@@ -26,23 +26,23 @@ repositories {
2626

2727
dependencies {
2828

29-
errorprone("com.google.errorprone:error_prone_core:2.18.0")
29+
errorprone("com.google.errorprone:error_prone_core:2.21.1")
3030

3131
implementation 'gnu.getopt:java-getopt:1.0.13'
3232
implementation 'org.jfree:jfreechart:1.5.4'
33-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.0'
34-
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.0'
33+
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
34+
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.2'
3535
implementation 'com.fasterxml.woodstox:woodstox-core:6.5.1'
3636
implementation 'org.codehaus.woodstox:stax2-api:4.2.1'
3737
implementation 'org.apache.poi:poi-ooxml:5.2.3'
3838

3939
// Java 11 changes
4040
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
41-
implementation 'com.sun.xml.bind:jaxb-impl:4.0.2'
41+
implementation 'com.sun.xml.bind:jaxb-impl:4.0.3'
4242

43-
implementation 'com.github.pegasystems:fringeutils-common:v3.4.4'
43+
implementation 'com.github.pegasystems:fringeutils-common:v3.4.6'
4444

45-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
45+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
4646
}
4747

4848
java {
@@ -56,7 +56,7 @@ application {
5656
'XXX_SET_USER_DIR_XXX',
5757
'-Dfile.encoding=UTF-8',
5858
'-Xms1G',
59-
'-Xmx2G',
59+
'-Xmx4G',
6060
'-XX:+UseG1GC',
6161
'-XX:+UseStringDeduplication'
6262
]

gradle.properties

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,5 @@
11
buildGCS=false
22

3-
4-
// snapshot and release repo names
5-
snapshotRepository = libs-snapshot-local
6-
releaseRepository = libs-release-local
7-
8-
// which task to use for uploading artifacts: artifactoryPublish or bintrayUpload
9-
uploadTask = bintrayUpload
10-
11-
// Bintray Credentials which are only relevant if
12-
// the 'uploadTask' property is set to 'bintrayUpload'.
13-
//
14-
// !!! Should be overridden in your ~/.gradle/gradle.properties file !!!
15-
bintrayUsername = some_username
16-
bintrayKey = some_key
17-
18-
// Artifactory Credentials which are only relevant if
19-
// the 'uploadTask' property is set to 'artifactoryPublish'.
20-
//
21-
// !!! Should be overridden in your ~/.gradle/gradle.properties file !!!
22-
artifactoryURL = https://localhost:8081/artifactory
23-
artifactoryUser = some_username
24-
artifactoryPassword = some_password
25-
26-
27-
########################################################
28-
##### Github/git versioning and publishing props #####
29-
########################################################
30-
31-
// can bet set to either 'final' or 'SNAPSHOT'
32-
releaseStage = SNAPSHOT
33-
34-
// can bet set to either 'major', 'minor', or 'patch'
35-
releaseScope = patch
36-
37-
// Github Credentials to push tags/versions/branches/etc.
38-
//
39-
// !!! Should be overridden in your ~/.gradle/gradle.properties file !!!
40-
releaseUsername = some_username
41-
releasePassword = some_password
42-
43-
// whether to publish docs to github-pages or not
44-
publishGithubPages = true
45-
46-
473
###############################################################################
484
######## OOTB gradle properties ########
495
###############################################################################

src/main/java/com/pega/gcs/logviewer/AlertLogEntryPanel.java

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import com.pega.gcs.logviewer.model.AlertLogEntry;
4545
import com.pega.gcs.logviewer.model.AlertLogEntryModel;
4646
import com.pega.gcs.logviewer.model.LogEntryColumn;
47-
import com.pega.gcs.logviewer.model.LogEntryData;
4847
import com.pega.gcs.logviewer.model.LogEntryModel;
4948
import com.pega.gcs.logviewer.model.alert.AlertMessageList.AlertMessage;
5049
import com.pega.gcs.logviewer.model.alert.AlertMessageListProvider;
@@ -60,7 +59,9 @@ public class AlertLogEntryPanel extends JPanel {
6059
private AlertLogEntry alertLogEntry;
6160

6261
// multiple usages hence extract it once
63-
private LogEntryData logEntryData;
62+
private ArrayList<String> logEntryValueList;
63+
64+
private String logEntryText;
6465

6566
private Charset charset;
6667

@@ -80,7 +81,8 @@ public AlertLogEntryPanel(AlertLogEntry alertLogEntry, AlertLogEntryModel alertL
8081
this.alertLogEntry = alertLogEntry;
8182
this.charset = charset;
8283

83-
this.logEntryData = alertLogEntry.getLogEntryData();
84+
this.logEntryValueList = alertLogEntry.getLogEntryValueList();
85+
this.logEntryText = alertLogEntry.getLogEntryText();
8486

8587
this.alertLogEntryModel = alertLogEntryModel;
8688

@@ -222,6 +224,14 @@ public void stateChanged(ChangeEvent changeEvent) {
222224
alertTabbedPane.addChangeListener(changeListener);
223225
}
224226

227+
private ArrayList<String> getLogEntryValueList() {
228+
return logEntryValueList;
229+
}
230+
231+
private String getLogEntryText() {
232+
return logEntryText;
233+
}
234+
225235
private JTabbedPane getAlertTabbedPane() {
226236

227237
if (alertTabbedPane == null) {
@@ -274,7 +284,7 @@ public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
274284
List<AlertLogEntryPanelTableData> dataList = new ArrayList<AlertLogEntryPanelTableData>();
275285
List<AlertLogEntryPanelTableData> longDataList = new ArrayList<AlertLogEntryPanelTableData>();
276286

277-
List<String> logEntryValueList = logEntryData.getLogEntryValueList();
287+
List<String> logEntryValueList = getLogEntryValueList();
278288

279289
LogEntryModel logEntryModel = getAlertLogEntryModel();
280290
List<LogEntryColumn> logEntryColumnList = logEntryModel.getLogEntryColumnList();
@@ -470,7 +480,7 @@ private JScrollPane getPalComponent() {
470480

471481
if (columnIndex != -1) {
472482

473-
List<String> logEntryValueList = logEntryData.getLogEntryValueList();
483+
List<String> logEntryValueList = getLogEntryValueList();
474484

475485
String palData = logEntryValueList.get(columnIndex);
476486

@@ -579,7 +589,7 @@ private JComponent getTraceListComponent() {
579589

580590
if (columnIndex != -1) {
581591

582-
List<String> logEntryValueList = logEntryData.getLogEntryValueList();
592+
List<String> logEntryValueList = getLogEntryValueList();
583593

584594
String traceListData = logEntryValueList.get(columnIndex);
585595

@@ -661,7 +671,7 @@ private JComponent getPRStacktraceComponent() {
661671

662672
if (columnIndex != -1) {
663673

664-
List<String> logEntryValueList = logEntryData.getLogEntryValueList();
674+
List<String> logEntryValueList = getLogEntryValueList();
665675

666676
String prStacktraceData = logEntryValueList.get(columnIndex);
667677

@@ -734,7 +744,7 @@ private JComponent getParameterPageComponent() {
734744

735745
if (columnIndex != -1) {
736746

737-
List<String> logEntryValueList = logEntryData.getLogEntryValueList();
747+
List<String> logEntryValueList = getLogEntryValueList();
738748

739749
String parameterPageData = logEntryValueList.get(columnIndex);
740750

@@ -802,7 +812,9 @@ private JComponent getParameterPageComponent() {
802812

803813
private JComponent getRawTextComponent() {
804814

805-
JPanel rawTextJPanel = new LogEntryPanel(logEntryData.getLogEntryText(), charset);
815+
String logEntryText = getLogEntryText();
816+
817+
JPanel rawTextJPanel = new LogEntryPanel(logEntryText, charset);
806818

807819
return rawTextJPanel;
808820
}

src/main/java/com/pega/gcs/logviewer/alert/Pega0062Tab.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,15 @@ private StageRecord getStageRecord(Map<String, Object> stageMetric) {
151151

152152
String stageId = (String) stageMetric.get("stageId");
153153
String stageName = (String) stageMetric.get("stageName");
154-
double movingAverage = (double) stageMetric.get("movingAverage");
154+
Object movingAverageObject = stageMetric.get("movingAverage");
155+
156+
double movingAverage = -1d;
157+
158+
if (movingAverageObject instanceof Map) {
159+
movingAverage = (double) ((Map<String, Object>) stageMetric.get("movingAverage")).get("value");
160+
} else if (movingAverageObject instanceof Double) {
161+
movingAverage = (double) stageMetric.get("movingAverage");
162+
}
155163
int recordsIn = (int) stageMetric.get("recordsIn");
156164
int recordsOut = (int) stageMetric.get("recordsOut");
157165
int errorsCount = (int) stageMetric.get("errorsCount");

0 commit comments

Comments
 (0)