Skip to content

Commit

Permalink
7467: Only use one version of d3
Browse files Browse the repository at this point in the history
Reviewed-by: aptmac
  • Loading branch information
thegreystone committed Feb 4, 2022
1 parent 9ec05b3 commit 7f42e4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@
<version>${download.maven.plugin.version}</version>
<executions>
<execution>
<id>d3-v5-js</id>
<id>download-d3</id>
<phase>${download-maven-plugin.phase}</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://d3js.org/d3.v5.min.js</url>
<url>https://d3js.org/d3.v6.min.js</url>
<unpack>false</unpack>
<outputDirectory>${download-maven-plugin.output}</outputDirectory>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
</configuration>
</execution>
<execution>
<id>wasm</id>
<id>download-wasm</id>
<phase>${download-maven-plugin.phase}</phase>
<goals>
<goal>wget</goal>
Expand All @@ -87,7 +87,7 @@
</configuration>
</execution>
<execution>
<id>d3-graphviz-js</id>
<id>download-graphviz</id>
<phase>${download-maven-plugin.phase}</phase>
<goals>
<goal>wget</goal>
Expand All @@ -101,7 +101,7 @@
</configuration>
</execution>
<execution>
<id>graphvizlib-wasm</id>
<id>download-graphvizlib-wasm</id>
<phase>${download-maven-plugin.phase}</phase>
<goals>
<goal>wget</goal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@
public class GraphView extends ViewPart implements ISelectionListener {
private static final String HTML_PAGE;
static {
String jsD3V5 = "jslibs/d3.v5.min.js";
String jsD3 = "jslibs/d3.v6.min.js";
String jsGraphviz = "jslibs/index.js";
String wasmGraphviz = "jslibs/graphvizlib.wasm";
String jsGraphizD3 = "jslibs/d3-graphviz.js";

String wasmBase64 = loadBase64FromFile(wasmGraphviz);

HTML_PAGE = String.format(loadStringFromFile("page.template"), loadLibraries(jsD3V5),
HTML_PAGE = String.format(loadStringFromFile("page.template"), loadLibraries(jsD3),
// we inline base64 wasm in the library code to avoid fetching it at runtime
loadStringFromFile(jsGraphviz, "wasmBinaryFile=\"graphvizlib.wasm\";",
"wasmBinaryFile=dataURIPrefix + '" + wasmBase64 + "';"),
Expand Down

0 comments on commit 7f42e4a

Please sign in to comment.