Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
39736ff
ISIS-2949 catch NPE's
joerg-rade Feb 11, 2022
6f9addb
ISIS-2957 barchartExample is rendered
joerg-rade Feb 11, 2022
64d8ea7
ISIS-2957 upgrade to kvision 5.8.1, Kotlin 1.6.10, changes regarding …
joerg-rade Feb 11, 2022
b785bf2
ISIS-2957 EventBubbleChart with color/responseLength and size/runnin…
joerg-rade Feb 20, 2022
b27556d
ISIS-2957 EventBubbleChart with js function for title, serialization …
joerg-rade Mar 4, 2022
7824acd
ISIS-2957 clicking bubbles opens event url
joerg-rade Mar 5, 2022
0e192b0
ISIS-2957 clicking bubble opens EventLogDetail
joerg-rade Mar 5, 2022
847de2b
Merge remote-tracking branch 'origin/ISIS-2957' into ISIS-2957
joerg-rade Mar 13, 2022
af7efcb
ISIS-2957 clicking bubble opens EventLogDetail
joerg-rade Mar 13, 2022
16be0bc
ISIS-2957 add legend to EventBubbleChart
joerg-rade Mar 16, 2022
b393710
ISIS-2957 upgrade to gradle 7.4, js functions in companion object
joerg-rade Mar 23, 2022
8ddcee4
ISIS-2957 functions nested
joerg-rade Mar 23, 2022
a019c2f
ISIS-2957 determineLegendLabel as extension function
joerg-rade Mar 24, 2022
f1eb5a2
ISIS-2957 generateLabels for legend
joerg-rade Mar 24, 2022
e129eb8
ISIS-2957 legend with error and size
joerg-rade Mar 25, 2022
89a7b86
ISIS-2957 tests fixed (Value), extended
joerg-rade Mar 25, 2022
a843674
ISIS-2957 tooltip data formatted
joerg-rade Mar 26, 2022
24bb0e8
ISIS-2957 map renamed
joerg-rade Mar 27, 2022
5f70c50
ISIS-2957 unused classes removed, PieChart prepared
joerg-rade Mar 27, 2022
5c906d6
ISIS-2957 ResponseHandler chain based on stats
joerg-rade Mar 27, 2022
534e8d0
ISIS-2957 duration added to chart data tooltip, title shortended for …
joerg-rade Mar 29, 2022
b85766e
ISIS-2957 running included in legend, end time used when available
joerg-rade Mar 30, 2022
58e3443
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade Mar 30, 2022
ca5feff
ISIS-2957 logging statistics to console added, cleanup, upgraded to K…
joerg-rade Apr 5, 2022
437c35b
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade Apr 5, 2022
c328fc6
ISIS-2957 logging statistics updated
joerg-rade Apr 7, 2022
8d81694
ISIS-2957 ContextMenuBuilder introduced for TabIcon menu, menu builde…
joerg-rade Apr 11, 2022
0a8a183
ISIS-2957 set ActionPrompt height, remove library target plain, CorsH…
joerg-rade Apr 15, 2022
b35ab7e
ISIS-2957 Event statistics amended, response types amended, StatusBar…
joerg-rade Apr 21, 2022
ce51b6b
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade Apr 21, 2022
22588d5
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade Apr 21, 2022
ec35a15
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade Apr 21, 2022
bacecec
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade Apr 23, 2022
74815c3
ISIS-2957 keep up with layout transfer object changes
joerg-rade Apr 29, 2022
fc2657b
Merge remote-tracking branch 'origin/master' into ISIS-2957
joerg-rade May 3, 2022
bc66544
ISIS-2957 http error transfer object allows for empty message
joerg-rade May 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions incubator/clients/kroviz/.travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion incubator/clients/kroviz/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins {
var version = "2.0.0-SNAPSHOT"

kotlin.sourceSets.all {
languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn")
languageSettings.optIn("org.mylibrary.OptInAnnotation")
}

repositories {
Expand Down Expand Up @@ -118,6 +118,7 @@ afterEvaluate {
tasks {
create("jar", Jar::class) {
dependsOn("browserProductionWebpack")
// manifest.writeTo("$buildDir/mymanifest.mf")
group = "package"
destinationDirectory.set(file("$buildDir/libs"))
val distribution =
Expand All @@ -133,6 +134,7 @@ afterEvaluate {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
inputs.files(distribution, webDir)
outputs.file(archiveFile)

}
}

Expand Down
4 changes: 2 additions & 2 deletions incubator/clients/kroviz/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#
javaVersion=1.8
#Plugins
systemProp.kotlinVersion=1.5.31
systemProp.kotlinVersion=1.6.10
serializationVersion=1.3.0
#Dependencies
systemProp.kvisionVersion=5.5.1
systemProp.kvisionVersion=5.8.3
coroutinesVersion=1.5.2

kotlin.mpp.stability.nowarn=true
Expand Down
Binary file modified incubator/clients/kroviz/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
25 changes: 7 additions & 18 deletions incubator/clients/kroviz/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 7 additions & 37 deletions incubator/clients/kroviz/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,39 +125,9 @@
</arguments>
</configuration>
</execution>
<!-- DOES NOT WORK ON WINDOWS (replaced by ant-tasks below ...)
<execution>
<id>copy-jar</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cp</executable>
<arguments>
<argument>${project.basedir}/build/libs/kroviz-${project.version}.jar</argument>
<argument>${project.build.directory}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rename-jar</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mv</executable>
<arguments>
<argument>${project.build.directory}/kroviz-${project.version}.jar</argument>
<argument>${project.build.directory}/${project.artifactId}-${project.version}.jar
</argument>
</arguments>
</configuration>
</execution> -->
</executions>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
Expand All @@ -166,11 +136,11 @@
<configuration>
<target>
<copy
file="${project.basedir}/build/libs/kroviz-${project.version}.jar"
todir="${project.build.directory}" />
<move
file="${project.build.directory}/kroviz-${project.version}.jar"
tofile="${project.build.directory}/${project.artifactId}-${project.version}.jar" />
file="${project.basedir}/build/libs/kroviz-${project.version}.jar"
todir="${project.build.directory}"/>
<move
file="${project.build.directory}/kroviz-${project.version}.jar"
tofile="${project.build.directory}/${project.artifactId}-${project.version}.jar"/>
</target>
</configuration>
<goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ import org.apache.isis.client.kroviz.ui.core.RoApp
import org.apache.isis.client.kroviz.ui.core.ViewManager

class App : Application() {
private val appName = "kroviz"

var roApp : RoApp? = null

init {
Pace.init()
require("css/kroviz.css")
require("css/$appName.css")
initRoApp()
}

override fun start() {
val r = root("kroviz", addRow = true)
val r = root(appName, addRow = true)
val v = VPanel()
v.add(roApp!!)
r.add(v)
Expand All @@ -46,7 +47,7 @@ class App : Application() {
return mapOf()
}

fun initRoApp() {
private fun initRoApp() {
roApp = RoApp()
ViewManager.app = this
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ActionDispatcher(private val at: Point = Point(100, 100)) : BaseAggregator
to is Restful -> {}
else -> {
console.log(to)
throw Throwable("[ActionDispatcher.update] ${to!!::class.simpleName}")
// throw Throwable("[ActionDispatcher.update] ${to!!::class.simpleName}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class AggregatorWithLayout : BaseAggregator() {

protected fun invokeLayoutLink(obj: TObject, aggregator: AggregatorWithLayout, referrer: String) {
val l = obj.getLayoutLink()
if (l.representation() == Represention.OBJECT_LAYOUT_BS3) {
if (l.representation() == Represention.OBJECT_LAYOUT_BS) {
invoke(l, aggregator, Constants.subTypeXml, referrer)
} else {
invoke(l, aggregator, referrer = referrer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ abstract class BaseAggregator {
logEntry.setUndefined("no handler found")
console.log("[BaseAggregator.log] ")
console.log(logEntry)
console.log(logEntry.response)
val className = this::class.simpleName
throw Throwable("no handler found: $className")
throw Throwable("No handler found: $className. " +
"Probable cause is a format change in response, that leads to a parsing error, hence response is passed on." +
"logEntry.obj is likely null, i.e. no TransferObject was created in parse function.")
}

fun TObject.getLayoutLink(): Link? {
Expand All @@ -85,10 +88,11 @@ abstract class BaseAggregator {
}

protected fun invoke(
link: Link,
aggregator: BaseAggregator,
subType: String = Constants.subTypeJson,
referrer: String) {
link: Link,
aggregator: BaseAggregator,
subType: String = Constants.subTypeJson,
referrer: String,
) {
ResourceProxy().fetch(link, aggregator, subType, referrer = referrer)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() {
when (val obj = logEntry.getTransferObject()) {
is TObject -> handleObject(obj, referrer)
is ResultObject -> handleResultObject(obj)
is ResultValue -> handleResultValue(obj)
is Property -> handleProperty(obj)
is Layout -> handleLayout(obj, dpm as ObjectDM, referrer)
is Grid -> handleGrid(obj)
Expand Down Expand Up @@ -98,6 +99,12 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() {
(dpm as ObjectDM).addResult(resultObject)
}

fun handleResultValue(resultValue: ResultValue) {
// TODO (dpm as ObjectDM).addResult(resultObject)
console.log("[OA.handleResultValue]")
console.log(resultValue)
}

override fun getObject(): TObject? {
return dpm.getObject()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,42 @@
*/
package org.apache.isis.client.kroviz.core.aggregator

import org.apache.isis.client.kroviz.core.event.CorsHttpRequest
import org.apache.isis.client.kroviz.core.event.LogEntry
import org.apache.isis.client.kroviz.to.Link
import org.apache.isis.client.kroviz.to.Relation
import org.apache.isis.client.kroviz.to.Restful
import org.apache.isis.client.kroviz.ui.core.SessionManager

class RestfulDispatcher() : BaseAggregator() {

override fun update(logEntry: LogEntry, subType: String) {
val restful = logEntry.getTransferObject() as Restful
restful.links.forEach {
val rel = it.rel
when {
it.rel.endsWith(Relation.SELF.name) -> { }
it.rel.endsWith("/menuBars") -> invokeNavigation(it)
it.rel.endsWith("/services") -> {
}
/* it.rel.endsWith("/brand-logo-signin") -> {
}
it.rel.endsWith("/brand-logo-header") -> {
} */
rel.endsWith(Relation.SELF.name) -> {}
rel.endsWith("/menuBars") -> invokeNavigation(it)
rel.endsWith("/services") -> {}
rel.endsWith("/logout") -> {}
rel.endsWith("/brand-logo-signin") -> invokeDisgustingCorsWorkaround(it)
rel.endsWith("/brand-logo-header") -> invokeDisgustingCorsWorkaround(it)
else -> invokeSystem(it)
}
}
}

private fun invokeNavigation(it: Link) {
invoke(it, NavigationDispatcher(), referrer = "")
private fun invokeNavigation(link: Link) {
invoke(link, NavigationDispatcher(), referrer = "")
}

private fun invokeSystem(it: Link) {
invoke(it, SystemAggregator(), referrer = "")
private fun invokeSystem(link: Link) {
invoke(link, SystemAggregator(), referrer = "")
}

private fun invokeDisgustingCorsWorkaround(link: Link) {
val credentials = SessionManager.getCredentials()!!
CorsHttpRequest().invoke(link.href, credentials)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SvgDispatcher(val callBack: Any) : BaseAggregator() {
val response = logEntry.response
when (callBack) {
is UUID -> DomUtil.appendTo(callBack, response)
is SvgPanel -> callBack.renderSvg(response)
//TODO is SvgPanel -> callBack.renderSvg(response)
else -> {
}
}
Expand Down
Loading