|
|
6842c8 |
diff --git a/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml b/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
|
|
|
6842c8 |
index 9e05408..733fcd4 100644
|
|
|
6842c8 |
--- a/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
|
|
|
6842c8 |
+++ b/application/org.openjdk.jmc.flightrecorder.graphview/pom.xml
|
|
|
6842c8 |
@@ -42,80 +42,4 @@
|
|
|
6842c8 |
</parent>
|
|
|
6842c8 |
<artifactId>org.openjdk.jmc.flightrecorder.graphview</artifactId>
|
|
|
6842c8 |
<packaging>eclipse-plugin</packaging>
|
|
|
6842c8 |
-
|
|
|
6842c8 |
- <properties>
|
|
|
6842c8 |
- <download.maven.plugin.version>1.4.2</download.maven.plugin.version>
|
|
|
6842c8 |
- <download-maven-plugin.phase>process-resources</download-maven-plugin.phase>
|
|
|
6842c8 |
- <download-maven-plugin.output>${project.basedir}/src/main/resources/jslibs</download-maven-plugin.output>
|
|
|
6842c8 |
- <spotless.config.path>${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
|
|
|
6842c8 |
- <spotless.config.path.js>${basedir}/../../configuration/ide/eclipse/formatting/formattingjs.xml</spotless.config.path.js>
|
|
|
6842c8 |
- </properties>
|
|
|
6842c8 |
-
|
|
|
6842c8 |
- <build>
|
|
|
6842c8 |
- <plugins>
|
|
|
6842c8 |
- <plugin>
|
|
|
6842c8 |
- <groupId>com.googlecode.maven-download-plugin</groupId>
|
|
|
6842c8 |
- <artifactId>download-maven-plugin</artifactId>
|
|
|
6842c8 |
- <version>${download.maven.plugin.version}</version>
|
|
|
6842c8 |
- <executions>
|
|
|
6842c8 |
- <execution>
|
|
|
6842c8 |
- <id>d3-v5-js</id>
|
|
|
6842c8 |
- <phase>${download-maven-plugin.phase}</phase>
|
|
|
6842c8 |
- <goals>
|
|
|
6842c8 |
- <goal>wget</goal>
|
|
|
6842c8 |
- </goals>
|
|
|
6842c8 |
- <configuration>
|
|
|
6842c8 |
- <url>https://d3js.org/d3.v5.min.js</url>
|
|
|
6842c8 |
- <unpack>false</unpack>
|
|
|
6842c8 |
- <outputDirectory>${download-maven-plugin.output}</outputDirectory>
|
|
|
6842c8 |
- <skipCache>true</skipCache>
|
|
|
6842c8 |
- <overwrite>true</overwrite>
|
|
|
6842c8 |
- </configuration>
|
|
|
6842c8 |
- </execution>
|
|
|
6842c8 |
- <execution>
|
|
|
6842c8 |
- <id>wasm</id>
|
|
|
6842c8 |
- <phase>${download-maven-plugin.phase}</phase>
|
|
|
6842c8 |
- <goals>
|
|
|
6842c8 |
- <goal>wget</goal>
|
|
|
6842c8 |
- </goals>
|
|
|
6842c8 |
- <configuration>
|
|
|
6842c8 |
- <url>https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/index.js</url>
|
|
|
6842c8 |
- <unpack>false</unpack>
|
|
|
6842c8 |
- <outputDirectory>${download-maven-plugin.output}</outputDirectory>
|
|
|
6842c8 |
- <skipCache>true</skipCache>
|
|
|
6842c8 |
- <overwrite>true</overwrite>
|
|
|
6842c8 |
- </configuration>
|
|
|
6842c8 |
- </execution>
|
|
|
6842c8 |
- <execution>
|
|
|
6842c8 |
- <id>d3-graphviz-js</id>
|
|
|
6842c8 |
- <phase>${download-maven-plugin.phase}</phase>
|
|
|
6842c8 |
- <goals>
|
|
|
6842c8 |
- <goal>wget</goal>
|
|
|
6842c8 |
- </goals>
|
|
|
6842c8 |
- <configuration>
|
|
|
6842c8 |
- <url>https://unpkg.com/d3-graphviz@3.1.0/build/d3-graphviz.js</url>
|
|
|
6842c8 |
- <unpack>false</unpack>
|
|
|
6842c8 |
- <outputDirectory>${download-maven-plugin.output}</outputDirectory>
|
|
|
6842c8 |
- <skipCache>true</skipCache>
|
|
|
6842c8 |
- <overwrite>true</overwrite>
|
|
|
6842c8 |
- </configuration>
|
|
|
6842c8 |
- </execution>
|
|
|
6842c8 |
- <execution>
|
|
|
6842c8 |
- <id>graphvizlib-wasm</id>
|
|
|
6842c8 |
- <phase>${download-maven-plugin.phase}</phase>
|
|
|
6842c8 |
- <goals>
|
|
|
6842c8 |
- <goal>wget</goal>
|
|
|
6842c8 |
- </goals>
|
|
|
6842c8 |
- <configuration>
|
|
|
6842c8 |
- <url>https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/graphvizlib.wasm</url>
|
|
|
6842c8 |
- <unpack>false</unpack>
|
|
|
6842c8 |
- <outputDirectory>${download-maven-plugin.output}</outputDirectory>
|
|
|
6842c8 |
- <skipCache>true</skipCache>
|
|
|
6842c8 |
- <overwrite>true</overwrite>
|
|
|
6842c8 |
- </configuration>
|
|
|
6842c8 |
- </execution>
|
|
|
6842c8 |
- </executions>
|
|
|
6842c8 |
- </plugin>
|
|
|
6842c8 |
- </plugins>
|
|
|
6842c8 |
- </build>
|
|
|
6842c8 |
</project>
|
|
|
6842c8 |
diff --git a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java
|
|
|
6842c8 |
index 1389545..d356c2e 100644
|
|
|
6842c8 |
--- a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java
|
|
|
6842c8 |
+++ b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/java/org/openjdk/jmc/flightrecorder/graphview/views/GraphView.java
|
|
|
6842c8 |
@@ -85,18 +85,7 @@ import org.openjdk.jmc.ui.misc.DisplayToolkit;
|
|
|
6842c8 |
public class GraphView extends ViewPart implements ISelectionListener {
|
|
|
6842c8 |
private static final String HTML_PAGE;
|
|
|
6842c8 |
static {
|
|
|
6842c8 |
- String jsD3V5 = "jslibs/d3.v5.min.js";
|
|
|
6842c8 |
- String jsGraphviz = "jslibs/index.js";
|
|
|
6842c8 |
- String wasmGraphviz = "jslibs/graphvizlib.wasm";
|
|
|
6842c8 |
- String jsGraphizD3 = "jslibs/d3-graphviz.js";
|
|
|
6842c8 |
-
|
|
|
6842c8 |
- String wasmBase64 = loadBase64FromFile(wasmGraphviz);
|
|
|
6842c8 |
-
|
|
|
6842c8 |
- HTML_PAGE = String.format(loadStringFromFile("page.template"), loadLibraries(jsD3V5),
|
|
|
6842c8 |
- // we inline base64 wasm in the library code to avoid fetching it at runtime
|
|
|
6842c8 |
- loadStringFromFile(jsGraphviz, "wasmBinaryFile=\"graphvizlib.wasm\";",
|
|
|
6842c8 |
- "wasmBinaryFile=dataURIPrefix + '" + wasmBase64 + "';"),
|
|
|
6842c8 |
- loadLibraries(jsGraphizD3));
|
|
|
6842c8 |
+ HTML_PAGE = String.format(loadStringFromFile("page.template"));
|
|
|
6842c8 |
}
|
|
|
6842c8 |
|
|
|
6842c8 |
private enum ModelState {
|
|
|
6842c8 |
diff --git a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template
|
|
|
6842c8 |
index eb7423a..e424576 100644
|
|
|
6842c8 |
--- a/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template
|
|
|
6842c8 |
+++ b/application/org.openjdk.jmc.flightrecorder.graphview/src/main/resources/page.template
|
|
|
6842c8 |
@@ -3,12 +3,13 @@
|
|
|
6842c8 |
|
|
|
6842c8 |
<head>
|
|
|
6842c8 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
|
6842c8 |
- <script>%1$s</script>
|
|
|
6842c8 |
- <script>%2$s</script>
|
|
|
6842c8 |
- <script>%3$s</script>
|
|
|
6842c8 |
</head>
|
|
|
6842c8 |
|
|
|
6842c8 |
<body>
|
|
|
6842c8 |
+ <script type="text/javascript" src="https://d3js.org/d3.v5.min.js"></script>
|
|
|
6842c8 |
+ <script type="text/javascript" src="https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/index.js"></script>
|
|
|
6842c8 |
+ <script type="text/javascript" src="https://unpkg.com/d3-graphviz@3.1.0/build/d3-graphviz.js"></script>
|
|
|
6842c8 |
+ <script type="text/javascript" src="https://unpkg.com/@hpcc-js/wasm@0.3.14/dist/graphvizlib.wasm"></script>
|
|
|
6842c8 |
|
|
|
6842c8 |
<script type="text/javascript">
|
|
|
6842c8 |
|