diff --git a/docs/source/network-simulator.rst b/docs/source/network-simulator.rst index 93dba16ccb..a6542c3a48 100644 --- a/docs/source/network-simulator.rst +++ b/docs/source/network-simulator.rst @@ -7,11 +7,15 @@ map service and are notified of the changes to the map. The network simulator is **Windows**:: - gradlew.bat network-simulator:run + gradlew.bat :samples:network-visualiser:run **Other**:: - ./gradlew network-simulator:run + ./gradlew :samples:network-visualiser:run + +You can produce a standalone JAR of the tool by using the ``:samples:network-visualiser:deployVisualiser`` target +and then using the ``samples/network-visualiser/build/libs/network-visualiser-*-capsule.jar`` file, where * is +whatever the current Corda version is. Interface --------- diff --git a/samples/network-visualiser/README.md b/samples/network-visualiser/README.md index bbf7dd8956..11c4f50e1a 100644 --- a/samples/network-visualiser/README.md +++ b/samples/network-visualiser/README.md @@ -3,48 +3,6 @@ This package contains a network visualiser that uses a simulation to visualise the interaction and messages between nodes on the Corda network. -## Prerequisites +Please see the documentation site for more info on the simulator tool. You can run it like this: -You will need to have [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) -installed and available on your path. - -## Getting Started - -First clone this repository and the Corda repository locally. Then open a terminal window in the Corda directory and run: - -Unix: - - ./gradlew publishToMavenLocal - -Windows: - - gradle.bat publishToMavenLocal - -This will publish a copy of Corda to your local Maven repository for your Cordapp to use. Next open a terminal window -in your Cordapp directory (this one) and run: - -Unix: - - ./gradlew deployNodes - -Windows: - - gradlew.bat deployNodes - -This command will create several nodes in `build/nodes` that you can now run with: - -Unix: - - cd build/nodes - ./runnodes - -Windows: - -Windows users currently have to manually enter each directory in `build/nodes` and run `java -jar corda.jar` in each. -This will be updated soon. - -This will now have nodes running on your machine running this Cordapp. You can now begin developing your Cordapp. - -## Further Reading - -Tutorials and developer docs for Cordapps and Corda are [here](https://docs.corda.r3cev.com). \ No newline at end of file + gradle samples:network-visualiser:run \ No newline at end of file diff --git a/samples/network-visualiser/build.gradle b/samples/network-visualiser/build.gradle index 7069f2c7d6..7b493afc1a 100644 --- a/samples/network-visualiser/build.gradle +++ b/samples/network-visualiser/build.gradle @@ -14,6 +14,7 @@ buildscript { apply plugin: 'java' apply plugin: 'kotlin' apply plugin: 'idea' +apply plugin: 'application' apply plugin: 'net.corda.plugins.quasar-utils' apply plugin: 'us.kirchmeier.capsule' @@ -57,11 +58,13 @@ idea { } } +mainClassName = 'net.corda.netmap.NetworkMapVisualiser' + task deployVisualiser(type: FatCapsule) { - applicationClass 'net.corda.netmap.NetworkExplorerKt' + applicationClass 'net.corda.netmap.NetworkMapVisualiser' reallyExecutable capsuleManifest { minJavaVersion = '1.8.0' javaAgents = [configurations.quasar.singleFile.name] } -} +} \ No newline at end of file diff --git a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/NetworkMapVisualiser.kt b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/NetworkMapVisualiser.kt similarity index 97% rename from samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/NetworkMapVisualiser.kt rename to samples/network-visualiser/src/main/kotlin/net/corda/netmap/NetworkMapVisualiser.kt index e42a4c25bf..33d1b68327 100644 --- a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/NetworkMapVisualiser.kt +++ b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/NetworkMapVisualiser.kt @@ -1,14 +1,6 @@ -/* - * Copyright 2015 Distributed Ledger Group LLC. Distributed as Licensed Company IP to DLG Group Members - * pursuant to the August 7, 2015 Advisory Services Agreement and subject to the Company IP License terms - * set forth therein. - * - * All other rights reserved. - */ +package net.corda.netmap -package com.r3cev.corda.netmap - -import com.r3cev.corda.netmap.VisualiserViewModel.Style +import net.corda.netmap.VisualiserViewModel.Style import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.serialization.deserialize import net.corda.core.then diff --git a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserUtils.kt b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserUtils.kt similarity index 92% rename from samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserUtils.kt rename to samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserUtils.kt index 590b4e139f..8fc0ab99d7 100644 --- a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserUtils.kt +++ b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserUtils.kt @@ -1,4 +1,4 @@ -package com.r3cev.corda.netmap +package net.corda.netmap import javafx.scene.paint.Color diff --git a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserView.kt b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserView.kt similarity index 99% rename from samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserView.kt rename to samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserView.kt index dc2fb153d8..2d26b05bdd 100644 --- a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserView.kt +++ b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserView.kt @@ -1,7 +1,5 @@ -package com.r3cev.corda.netmap +package net.corda.netmap -import com.r3cev.corda.netmap.VisualiserViewModel.Style -import net.corda.core.utilities.ProgressTracker import javafx.animation.KeyFrame import javafx.animation.Timeline import javafx.application.Platform @@ -22,6 +20,8 @@ import javafx.scene.shape.Polygon import javafx.scene.text.Font import javafx.stage.Stage import javafx.util.Duration +import net.corda.core.utilities.ProgressTracker +import net.corda.netmap.VisualiserViewModel.Style data class TrackerWidget(val vbox: VBox, val cursorBox: Pane, val label: Label, val cursor: Polygon) diff --git a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserViewModel.kt b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserViewModel.kt similarity index 99% rename from samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserViewModel.kt rename to samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserViewModel.kt index 74ae8de987..ef50448c76 100644 --- a/samples/network-visualiser/src/main/kotlin/net/corda/corda/netmap/VisualiserViewModel.kt +++ b/samples/network-visualiser/src/main/kotlin/net/corda/netmap/VisualiserViewModel.kt @@ -1,4 +1,4 @@ -package com.r3cev.corda.netmap +package net.corda.netmap import net.corda.core.utilities.ProgressTracker import net.corda.simulation.IRSSimulation diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/Europe.jpg b/samples/network-visualiser/src/main/resources/net/corda/netmap/Europe.jpg similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/Europe.jpg rename to samples/network-visualiser/src/main/resources/net/corda/netmap/Europe.jpg diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/MainWindow.fxml b/samples/network-visualiser/src/main/resources/net/corda/netmap/MainWindow.fxml similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/MainWindow.fxml rename to samples/network-visualiser/src/main/resources/net/corda/netmap/MainWindow.fxml diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/R3 logo.png b/samples/network-visualiser/src/main/resources/net/corda/netmap/R3 logo.png similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/R3 logo.png rename to samples/network-visualiser/src/main/resources/net/corda/netmap/R3 logo.png diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SIL Open Font License.txt b/samples/network-visualiser/src/main/resources/net/corda/netmap/SIL Open Font License.txt similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SIL Open Font License.txt rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SIL Open Font License.txt diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Black.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Black.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Black.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Black.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-BlackIt.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-BlackIt.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-BlackIt.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-BlackIt.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Bold.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Bold.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Bold.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Bold.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-BoldIt.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-BoldIt.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-BoldIt.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-BoldIt.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-ExtraLight.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-ExtraLight.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-ExtraLight.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-ExtraLight.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-ExtraLightIt.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-ExtraLightIt.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-ExtraLightIt.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-ExtraLightIt.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-It.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-It.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-It.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-It.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Light.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Light.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Light.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Light.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-LightIt.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-LightIt.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-LightIt.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-LightIt.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Regular.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Regular.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Regular.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Regular.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Semibold.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Semibold.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-Semibold.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-Semibold.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-SemiboldIt.otf b/samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-SemiboldIt.otf similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/SourceSansPro-SemiboldIt.otf rename to samples/network-visualiser/src/main/resources/net/corda/netmap/SourceSansPro-SemiboldIt.otf diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/WorldMap.png b/samples/network-visualiser/src/main/resources/net/corda/netmap/WorldMap.png similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/WorldMap.png rename to samples/network-visualiser/src/main/resources/net/corda/netmap/WorldMap.png diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/WorldMapSquare.png b/samples/network-visualiser/src/main/resources/net/corda/netmap/WorldMapSquare.png similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/WorldMapSquare.png rename to samples/network-visualiser/src/main/resources/net/corda/netmap/WorldMapSquare.png diff --git a/samples/network-visualiser/src/main/resources/net/corda/corda/netmap/styles.css b/samples/network-visualiser/src/main/resources/net/corda/netmap/styles.css similarity index 100% rename from samples/network-visualiser/src/main/resources/net/corda/corda/netmap/styles.css rename to samples/network-visualiser/src/main/resources/net/corda/netmap/styles.css