Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@Library('dh_jenkins@develop')
import io.deephaven.jenkins.DeephavenPipeline
import io.deephaven.jenkins.settings.BuildRepo
DeephavenPipeline.builder(this, steps, 'build-reporting-plugin')
.withEnv([ DH_CACHING: 'false' ])
.withBuildRepo(BuildRepo.plugin)
.withGradle('Build and Publish', 'publishAllPublicationsToCustomerRepository', false)
.withBuildImage('dh-ci-rocky8-v12')
.build()
64 changes: 54 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
url new URI('https://illumon.jfrog.io/illumon/plugin-tools')
}
dependencies {
classpath 'io.deephaven.gradle:plugins:1.20200123.006'
classpath 'io.deephaven.gradle:plugins:1.20201022.033'
}
}
}
Expand All @@ -20,9 +20,12 @@ plugins {
id 'java-library'
id 'groovy'
id 'idea'
id 'maven-publish'
id 'com.diffplug.gradle.spotless' version '4.1.0'
}

evaluationDependsOn(':reporting-tools')

apply plugin: 'io.deephaven.plugins'

java {
Expand All @@ -43,22 +46,26 @@ group = project.property('pluginGroup')
version = project.property('pluginVersion')

repositories {
jcenter()
mavenCentral()
}

configurations {
global
local
client
auth
}

// this is only "safe" because we used evaluationDependsOn() at the top of this file.
TaskProvider<?> shadowJar = project(":reporting-tools").tasks.named('shadowJar')

dependencies {
api Deps.iris('DB')
api Deps.iris('Plot')
api 'org.apache.commons:commons-email:1.4'
api(Deps.iris('DB')) {
exclude group: 'org.apache.commons'
}
api(Deps.iris('Plot')) {
exclude group: 'org.apache.commons'
}

global 'com.slack.api:slack-api-client:1.0.7'
// add our dependencies on commons-email and slack api via a shadow jar, to avoid package conflicts
global provider({shadowJar.get().outputs.files})

annotationProcessor 'org.immutables:value:2.8.8'
compileOnly 'org.immutables:value-annotations:2.8.8'
Expand All @@ -76,10 +83,14 @@ tasks.withType(JavaCompile) {
// https://github.com/immutables/immutables/issues/672
options.compilerArgs.add('-Xlint:-processing')
options.compilerArgs.add('-Werror')
dependsOn shadowJar
}

test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}

wrapper {
Expand Down Expand Up @@ -113,4 +124,37 @@ spotless {
//}
}

check.dependsOn(':spotlessCheck')
check.dependsOn(':spotlessCheck')

group 'io.deephaven.reporting.plugin'
// using bard versioning b/c building for a bard customer. Need to cut jackson and then sanluis updates w/ newer plugin tools / gradle version
version '1.20211129.002'
sourceCompatibility = 1.8

gradle.projectsEvaluated {
publishing {
publications {
pluginDeploy(MavenPublication) {
groupId = 'io.deephaven.plugins'
artifactId = 'report-generation-plugin'
from(components.java)
artifact(tasks['makeReport-generationRpm']) {
extension = 'rpm'
}
artifact(tasks['makeReport-generationTar']) {
extension = 'tgz'
}
}
}
repositories {
maven {
credentials {
username = findProperty('artifactoryUser') ?: System.getProperty('user.name')
password = findProperty('artifactoryAPIKey') ?: ''
}
url "https://illumon.jfrog.io/illumon/libs-plugin-customer"
name "customer"
}
}
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginVersion=0.3.0
pluginVersion=1.20211129.002
pluginGroup=io.deephaven.plugins

libSource=libs-local
irisVersion=1.20200331.132
irisVersion=1.20211129.430
2 changes: 1 addition & 1 deletion gradle/versions/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3
17
36 changes: 36 additions & 0 deletions reporting-tools/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
*/

plugins {
id 'java-library'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
configurations {
output
}
repositories {
mavenCentral()
}
dependencies {
// use the newest version which does not have any security issues
runtimeOnly 'org.apache.commons:commons-text:1.10.0'
runtimeOnly 'org.apache.commons:commons-email:1.6.0'
runtimeOnly 'com.slack.api:slack-api-client:1.46.0'
}
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
tasks.named('shadowJar', ShadowJar).configure {
ShadowJar s ->
s.relocate('org', 'io.deephaven.reporting.org')
s.relocate('com', 'io.deephaven.reporting.com')
s.relocate('okio', 'io.deephaven.reporting.okio')
s.relocate('okhttp3', 'io.deephaven.reporting.okhttp3')
s.relocate('kotlin', 'io.deephaven.reporting.kotlin')
s.mergeServiceFiles()
}

artifacts {
output(tasks.shadowJar) {
builtBy tasks.shadowJar
}
}
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ rootProject.name = 'report-generation'

// https://docs.gradle.org/6.5/userguide/single_versions.html
enableFeaturePreview("VERSION_ORDERING_V2")

include(':reporting-tools')
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
import io.deephaven.plugins.html.Trailer;
import io.deephaven.plugins.report.Figure;
import io.deephaven.plugins.report.Report;
import io.deephaven.reporting.org.apache.commons.mail.DefaultAuthenticator;
import io.deephaven.reporting.org.apache.commons.mail.EmailException;
import io.deephaven.reporting.org.apache.commons.mail.ImageHtmlEmail;
import io.deephaven.reporting.org.apache.commons.mail.resolver.DataSourceFileResolver;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.List;
import java.util.Objects;
import org.apache.commons.mail.DefaultAuthenticator;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.ImageHtmlEmail;
import org.apache.commons.mail.resolver.DataSourceFileResolver;

class EmailHtmlRenderer extends InlineHtmlRenderer {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
import com.illumon.util.FunctionalInterfaces.ThrowingSupplier;
import io.deephaven.plugins.html.Trailer;
import io.deephaven.plugins.report.Report;
import io.deephaven.reporting.org.apache.commons.mail.ImageHtmlEmail;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.time.Duration;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.mail.ImageHtmlEmail;
import org.immutables.value.Value.Check;
import org.immutables.value.Value.Default;
import org.immutables.value.Value.Immutable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
import io.deephaven.plugins.report.TableLocal;
import io.deephaven.plugins.report.TablePQ;
import io.deephaven.plugins.report.Text;
import io.deephaven.reporting.org.apache.commons.text.StringEscapeUtils;
import java.io.File;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import org.apache.commons.lang.StringEscapeUtils;

public abstract class InlineHtmlRenderer implements Visitor, Table.Visitor {

Expand Down Expand Up @@ -191,7 +191,7 @@ public void visit(Text text) {
}

private static String escape(String raw) {
return StringEscapeUtils.escapeHtml(raw);
return StringEscapeUtils.escapeHtml4(raw);
}

private void indent() {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/deephaven/plugins/html/TableToHtml.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import com.illumon.iris.db.tables.utils.DBTimeZone;
import com.illumon.iris.db.v2.sources.ColumnSource;
import com.illumon.iris.db.v2.utils.Index;
import io.deephaven.reporting.org.apache.commons.text.StringEscapeUtils;
import java.util.Collection;
import java.util.List;
import org.apache.commons.lang.StringEscapeUtils;

public class TableToHtml {
public static String html(Table source) {
Expand Down Expand Up @@ -50,12 +50,12 @@ public static String html(Table source) {
out.append("<td>");
final Object value = columnSource.get(key);
if (value instanceof String) {
out.append(StringEscapeUtils.escapeHtml((String) value));
out.append(StringEscapeUtils.escapeHtml4((String) value));
} else if (value instanceof DBDateTime) {
final DBDateTime dbDateTime = (DBDateTime) value;
out.append(StringEscapeUtils.escapeHtml(dbDateTime.toString(DBTimeZone.TZ_DEFAULT)));
out.append(StringEscapeUtils.escapeHtml4(dbDateTime.toString(DBTimeZone.TZ_DEFAULT)));
} else if (value != null) {
out.append(StringEscapeUtils.escapeHtml(value.toString()));
out.append(StringEscapeUtils.escapeHtml4(value.toString()));
} else {
// For now, don't output anything for null values.
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/deephaven/plugins/report/FigurePQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public final FigureLocal toLocal(Logger log, Duration timeout) throws Exception
db.executeConcurrentQuery(ReportFigureCARQ.of(figureName()))
.inflate(db.getProcessorConnection());

figure.waitForData();
figure.waitForData(log, figure.getFigure());

return ImmutableFigureLocal.builder()
.figure(figure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package io.deephaven.plugins.report;

import io.deephaven.plugins.report.Item.Visitor;
import io.deephaven.reporting.org.apache.commons.text.StringEscapeUtils;
import java.util.Objects;
import java.util.stream.Collectors;
import org.apache.commons.lang.StringEscapeUtils;

class ItemToGroovyish implements Visitor, Table.Visitor, Figure.Visitor {

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/io/deephaven/plugins/slack/ClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

import com.fishlib.io.logger.Logger;
import com.illumon.iris.db.tables.live.LiveTableMonitor;
import com.slack.api.Slack;
import com.slack.api.methods.MethodsClient;
import com.slack.api.methods.SlackApiException;
import com.slack.api.methods.request.chat.ChatPostMessageRequest;
import com.slack.api.methods.response.chat.ChatPostMessageResponse;
import com.slack.api.model.block.SectionBlock;
import com.slack.api.model.block.composition.MarkdownTextObject;
import io.deephaven.plugins.report.Report;
import io.deephaven.reporting.com.slack.api.Slack;
import io.deephaven.reporting.com.slack.api.methods.MethodsClient;
import io.deephaven.reporting.com.slack.api.methods.SlackApiException;
import io.deephaven.reporting.com.slack.api.methods.request.chat.ChatPostMessageRequest;
import io.deephaven.reporting.com.slack.api.methods.response.chat.ChatPostMessageResponse;
import io.deephaven.reporting.com.slack.api.model.block.SectionBlock;
import io.deephaven.reporting.com.slack.api.model.block.composition.MarkdownTextObject;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.time.Duration;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/deephaven/plugins/slack/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package io.deephaven.plugins.slack;

import com.slack.api.Slack;
import io.deephaven.plugins.slack.ClientImpl.LockType;
import io.deephaven.reporting.com.slack.api.Slack;

public class Functions {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package io.deephaven.plugins.slack;

import com.slack.api.Slack;
import io.deephaven.plugins.report.Report;
import io.deephaven.reporting.com.slack.api.Slack;
import java.util.List;
import org.immutables.value.Value.Immutable;

Expand Down
Loading