mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
Small tidy-up.
This commit is contained in:
parent
02323e8207
commit
10061107df
@ -5,6 +5,7 @@ import org.h2.tools.Server
|
|||||||
import org.h2.util.JdbcUtils
|
import org.h2.util.JdbcUtils
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
|
import kotlin.reflect.jvm.jvmName
|
||||||
|
|
||||||
|
|
||||||
class DBViewer : AutoCloseable {
|
class DBViewer : AutoCloseable {
|
||||||
@ -22,14 +23,14 @@ class DBViewer : AutoCloseable {
|
|||||||
|
|
||||||
fun openBrowser(h2Port: Int) {
|
fun openBrowser(h2Port: Int) {
|
||||||
val conn = JdbcUtils.getConnection(
|
val conn = JdbcUtils.getConnection(
|
||||||
"org.h2.Driver",
|
org.h2.Driver::class.jvmName,
|
||||||
"jdbc:h2:tcp://localhost:%d/node".format(h2Port),
|
"jdbc:h2:tcp://localhost:%d/node".format(h2Port),
|
||||||
"sa",
|
"sa",
|
||||||
""
|
""
|
||||||
)
|
)
|
||||||
|
|
||||||
val url = (webServer.service as LocalWebServer).addSession(conn)
|
val url = (webServer.service as LocalWebServer).addSession(conn)
|
||||||
log.info("URL: {}", url)
|
log.info("Session: {}", url)
|
||||||
|
|
||||||
pool.execute {
|
pool.execute {
|
||||||
Server.openBrowser(url)
|
Server.openBrowser(url)
|
||||||
|
@ -32,7 +32,7 @@ class NodeTerminalView : Fragment() {
|
|||||||
private val viewDatabaseButton by fxid<Button>()
|
private val viewDatabaseButton by fxid<Button>()
|
||||||
private val launchExplorerButton by fxid<Button>()
|
private val launchExplorerButton by fxid<Button>()
|
||||||
|
|
||||||
var viewer : DBViewer = DBViewer()
|
var viewer = DBViewer()
|
||||||
var pty : R3Pty? = null
|
var pty : R3Pty? = null
|
||||||
|
|
||||||
fun open(config: NodeConfig) {
|
fun open(config: NodeConfig) {
|
||||||
|
Loading…
Reference in New Issue
Block a user