Move server to controls-vision

This commit is contained in:
Alexander Nozik 2023-11-05 10:18:26 +03:00
parent 0e963a7b13
commit 78b18ebda6
6 changed files with 11 additions and 11 deletions

View File

@ -10,8 +10,7 @@ description = """
val visionforgeVersion = "0.3.0-dev-10"
kscience {
jvm()
js()
fullStack("js/controls-vision.js", development = true)
useKtor()
useContextReceivers()
dependencies {
@ -19,6 +18,7 @@ kscience {
api(projects.controlsConstructor)
api("space.kscience:visionforge-plotly:$visionforgeVersion")
api("space.kscience:visionforge-markdown:$visionforgeVersion")
api("space.kscience:visionforge-tables:$visionforgeVersion")
}
jvmMain{

View File

@ -1,6 +1,11 @@
package space.kscience.controls.vision
import space.kscience.visionforge.markup.MarkupPlugin
import space.kscience.visionforge.plotly.PlotlyPlugin
import space.kscience.visionforge.runVisionClient
public fun main(): Unit = runVisionClient {
plugin(PlotlyPlugin)
plugin(MarkupPlugin)
// plugin(TableVisionJsPlugin)
}

View File

@ -33,7 +33,7 @@ public fun Context.showDashboard(
visionPage(
visionManager,
VisionPage.scriptHeader("js/constructor.js"),
VisionPage.scriptHeader("js/controls-vision.js"),
configurationBuilder = configurationBuilder,
visionFragment = visionFragment
)

View File

@ -4,7 +4,9 @@ plugins {
}
kscience {
fullStack("js/constructor.js", jvmConfig = {withJava()})
jvm{
withJava()
}
useKtor()
useContextReceivers()
dependencies {

View File

@ -21,7 +21,6 @@ import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
import kotlin.time.DurationUnit
@Suppress("ExtractKtorModule")
public fun main() {
val context = Context {
plugin(DeviceManager)
@ -73,12 +72,6 @@ public fun main() {
}
plot {
// plotBooleanState(context, state.atStartState) {
// name = "start"
// }
// plotBooleanState(context, state.atEndState) {
// name = "end"
// }
plotDeviceProperty(device["start"], LimitSwitch.locked.name) {
name = "start measured"
mode = ScatterMode.markers