You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2024/10/08 13:43:59 UTC
(plc4x-extras) branch develop updated (83a7ffa -> 1c9854f)
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-extras.git
from 83a7ffa fix(plc4j): fix imports
new 6a74afc fix(plc4go/plc4xanalyzer): fix color rendering
new 1c9854f fix(plc4go/plc4xbrowser): fix color rendering
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
plc4go/go.mod | 4 +++-
plc4go/go.sum | 4 ++--
plc4go/tools/plc4xbrowser/ui/ui.go | 2 +-
plc4go/tools/plc4xpcapanalyzer/ui/ui.go | 4 ++--
4 files changed, 8 insertions(+), 6 deletions(-)
(plc4x-extras) 02/02: fix(plc4go/plc4xbrowser): fix color rendering
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-extras.git
commit 1c9854f745f3cf5beac92b3c8b012a7ad31bdbe4
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Oct 8 15:43:48 2024 +0200
fix(plc4go/plc4xbrowser): fix color rendering
---
plc4go/tools/plc4xbrowser/ui/ui.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plc4go/tools/plc4xbrowser/ui/ui.go b/plc4go/tools/plc4xbrowser/ui/ui.go
index 7e1878c..a59a455 100644
--- a/plc4go/tools/plc4xbrowser/ui/ui.go
+++ b/plc4go/tools/plc4xbrowser/ui/ui.go
@@ -286,7 +286,7 @@ func buildOutputArea(newPrimitive func(text string) tview.Primitive, application
receivedMessagesList.AddItem(fmt.Sprintf("No %d @%s", messageNumber, receiveTime.Format("15:04:05.999999")), "", 0x0, func() {
if ok := jumpToMessageItem(messageNumber); !ok {
plc4xBrowserLog.Debug().Msg("Adding new message to console output")
- _, _ = fmt.Fprintf(messageOutput, "Message nr: %d\n[\"%d\"]%s[\"\"]\n", messageNumber, messageNumber, message)
+ _, _ = fmt.Fprintf(tview.ANSIWriter(messageOutput), "Message nr: %[1]d\n[\"%[1]d\"]%s[\"\"]\n", messageNumber, message)
jumpToMessageItem(messageNumber)
}
})
(plc4x-extras) 01/02: fix(plc4go/plc4xanalyzer): fix color rendering
Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-extras.git
commit 6a74afc4733eb3bcad74d40e5daba1974da83063
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Oct 8 15:36:01 2024 +0200
fix(plc4go/plc4xanalyzer): fix color rendering
---
plc4go/go.mod | 4 +++-
plc4go/go.sum | 4 ++--
plc4go/tools/plc4xpcapanalyzer/ui/ui.go | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/plc4go/go.mod b/plc4go/go.mod
index ea4540b..f7aac84 100644
--- a/plc4go/go.mod
+++ b/plc4go/go.mod
@@ -30,7 +30,7 @@ require (
github.com/gopacket/gopacket v1.3.0
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213
github.com/pkg/errors v0.9.1
- github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854
+ github.com/rivo/tview v0.0.0-20240921122403-a64fc48d7654
github.com/rs/zerolog v1.33.0
github.com/schollz/progressbar/v3 v3.16.1
github.com/spf13/cobra v1.8.1
@@ -77,3 +77,5 @@ require (
golang.org/x/text v0.19.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
+
+replace github.com/rivo/tview v0.0.0-20240921122403-a64fc48d7654 => github.com/sruehl/tview v0.0.0-20241008132523-4319215719c9 // Fix for: https://github.com/rivo/tview/issues/1031
diff --git a/plc4go/go.sum b/plc4go/go.sum
index 72ab5b4..ba90002 100644
--- a/plc4go/go.sum
+++ b/plc4go/go.sum
@@ -75,8 +75,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854 h1:/IIOjnKLbuO5YtZUZaJVw9fc062ChPlaGWEBmJ6jyGY=
-github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854/go.mod h1:lBUy/T5kyMudFzWUH/C2moN+NlU5qF505vzOyINXuUQ=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
@@ -105,6 +103,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
+github.com/sruehl/tview v0.0.0-20241008132523-4319215719c9 h1:3+TF2TPGMlgj8pktMqGxE7Yw2sMKlOjBFD+PpG5ySOA=
+github.com/sruehl/tview v0.0.0-20241008132523-4319215719c9/go.mod h1:02iFIz7K/A9jGCvrizLPvoqr4cEIx7q54RH5Qudkrss=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
diff --git a/plc4go/tools/plc4xpcapanalyzer/ui/ui.go b/plc4go/tools/plc4xpcapanalyzer/ui/ui.go
index 98f3844..f76b6dd 100644
--- a/plc4go/tools/plc4xpcapanalyzer/ui/ui.go
+++ b/plc4go/tools/plc4xpcapanalyzer/ui/ui.go
@@ -293,7 +293,7 @@ func buildOutputArea(newPrimitive func(text string) tview.Primitive, application
receivedMessagesList.AddItem(fmt.Sprintf("No %d @%s (api)", messageNumber, receiveTime.Format("15:04:05.999999")), "", 0x0, func() {
if ok := jumpToMessageItem(messageNumber); !ok {
plc4xpcapanalyzerLog.Debug().Msg("Adding new message to console output")
- _, _ = fmt.Fprintf(messageOutput, "Message nr: %d\n[\"%d\"]%s[\"\"]\n", messageNumber, messageNumber, message)
+ _, _ = fmt.Fprintf(tview.ANSIWriter(messageOutput), "Message nr: %[1]d\n[\"%[1]d\"]%s[\"\"]\n", messageNumber, message)
jumpToMessageItem(messageNumber)
}
})
@@ -304,7 +304,7 @@ func buildOutputArea(newPrimitive func(text string) tview.Primitive, application
receivedMessagesList.AddItem(fmt.Sprintf("No %d @%s (spi)", messageNumber, receiveTime.Format("15:04:05.999999")), "", 0x0, func() {
if ok := jumpToMessageItem(messageNumber); !ok {
plc4xpcapanalyzerLog.Debug().Msg("Adding new spi message to console output")
- _, _ = fmt.Fprintf(messageOutput, "Message nr: %d\n[\"%d\"]%s[\"\"]\n", messageNumber, messageNumber, message)
+ _, _ = fmt.Fprintf(tview.ANSIWriter(messageOutput), "Message nr: %[1]d\n[\"%[1]d\"]%s[\"\"]\n", messageNumber, message)
jumpToMessageItem(messageNumber)
}
})