This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a950e2d45 ISIS-3044 set LogEntry.type for Menubars
7a950e2d45 is described below

commit 7a950e2d451feb677a43a7bd967318ad02694b21
Author: Jörg Rade <[email protected]>
AuthorDate: Fri May 6 16:50:59 2022 +0200

    ISIS-3044 set LogEntry.type for Menubars
---
 .../kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
 
b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
index b0ea2defdd..eaaf436b54 100644
--- 
a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
+++ 
b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt
@@ -26,6 +26,7 @@ import 
org.apache.isis.client.kroviz.core.aggregator.ActionDispatcher
 import org.apache.isis.client.kroviz.core.aggregator.BaseAggregator
 import org.apache.isis.client.kroviz.to.*
 import org.apache.isis.client.kroviz.to.bs3.Grid
+import org.apache.isis.client.kroviz.to.mb.Menubars
 import org.apache.isis.client.kroviz.ui.core.Constants
 import org.apache.isis.client.kroviz.ui.core.ViewManager
 import org.w3c.files.Blob
@@ -140,6 +141,10 @@ data class LogEntry(
     fun setSuccess() {
         calculate()
         responseLength = response.length
+        if (responseLength == 0) {
+            // it's a blob
+            responseLength = blob?.size as Int
+        }
         state = when {
             url.startsWith(Constants.krokiUrl) -> EventState.SUCCESS_IMG
             subType == Constants.subTypeXml -> EventState.SUCCESS_XML
@@ -187,6 +192,9 @@ data class LogEntry(
             is Blob -> {
                 this.type = Represention.IMAGE_PNG.type
             }
+            is Menubars -> {
+                this.type = Represention.LAYOUT_MENUBARS.type
+            }
             else -> {
                 console.log("[LE.setTransferObject]")
                 console.log(to)

Reply via email to