mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Addressed review comments.
This commit is contained in:
@ -23,36 +23,40 @@ class CorDappInfoServlet(val plugins: List<CordaPluginRegistry>, val rpc: CordaR
|
|||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
h2 { +"Installed CorDapps" }
|
h2 { +"Installed CorDapps" }
|
||||||
plugins.forEach { plugin ->
|
if (plugins.isEmpty()) {
|
||||||
h3 { +plugin::class.java.name }
|
p { +"No installed custom CorDapps." }
|
||||||
if (plugin.requiredFlows.isNotEmpty()) {
|
} else {
|
||||||
div {
|
plugins.forEach { plugin ->
|
||||||
p { +"Whitelisted flows:" }
|
h3 { +plugin::class.java.name }
|
||||||
ul {
|
if (plugin.requiredFlows.isNotEmpty()) {
|
||||||
plugin.requiredFlows.map { it.key }.forEach { li { +it } }
|
div {
|
||||||
|
p { +"Whitelisted flows:" }
|
||||||
|
ul {
|
||||||
|
plugin.requiredFlows.map { it.key }.forEach { li { +it } }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (plugin.webApis.isNotEmpty()) {
|
||||||
if (plugin.webApis.isNotEmpty()) {
|
div {
|
||||||
div {
|
plugin.webApis.forEach { api ->
|
||||||
plugin.webApis.forEach { api ->
|
val resource = Resource.from(api.apply(rpc)::class.java)
|
||||||
val resource = Resource.from(api.apply(rpc)::class.java)
|
p { +"${resource.name}:" }
|
||||||
p { +"${resource.name}:" }
|
val endpoints = processEndpoints("", resource, mutableListOf<Endpoint>())
|
||||||
val endpoints = processEndpoints("", resource, mutableListOf<Endpoint>())
|
ul {
|
||||||
ul {
|
endpoints.forEach {
|
||||||
endpoints.forEach {
|
li { a(it.uri) { +"${it.method}\t${it.text}" } }
|
||||||
li { a(it.uri) { +"${it.method}\t${it.text}" } }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (plugin.staticServeDirs.isNotEmpty()) {
|
||||||
if (plugin.staticServeDirs.isNotEmpty()) {
|
div {
|
||||||
div {
|
p { +"Static web content:" }
|
||||||
p { +"Static web content:" }
|
ul {
|
||||||
ul {
|
plugin.staticServeDirs.map { it.key }.forEach {
|
||||||
plugin.staticServeDirs.map { it.key }.forEach {
|
li { a("web/$it") { +it } }
|
||||||
li { a("web/$it") { +it } }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user