diff --git a/Makefile b/Makefile
index 602c328..49106c1 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ clean-moc:
find ./internal -name 'moc*' -delete
clean:
- rm rcc.cpp rcc.qrc rcc_cgo_darwin_darwin_amd64.go
+ rm rcc.cpp rcc.qrc rcc_cgo_darwin_darwin_amd64.go rcc_cgo_linux_linux_amd64.go
define make_icns
mkdir _temp.iconset
diff --git a/internal/app/input_controller.go b/internal/app/input_controller.go
index a242a16..f497f23 100644
--- a/internal/app/input_controller.go
+++ b/internal/app/input_controller.go
@@ -65,8 +65,19 @@ func (c *inputController) with(store *db.Store, workspace *db.Workspace) *inputC
func (c *inputController) processReflectionAPI(conn *grpc.ClientConn) error {
+ meta := make(map[string]string)
+ for _, kv := range c.MetadataListModel().List() {
+ if kv.Key() == "" {
+ continue
+ }
+ meta[kv.Key()] = kv.Val()
+ }
+ if c.workspace != nil {
+ c.workspace.Metadata = meta
+ }
+
var err error
- c.pbSource, err = pb.GetSourceFromReflectionAPI(conn)
+ c.pbSource, err = pb.GetSourceFromReflectionAPI(conn, meta)
if err != nil {
return err
}
diff --git a/internal/app/output_text.go b/internal/app/output_text.go
index 2f9ad19..7e1e834 100644
--- a/internal/app/output_text.go
+++ b/internal/app/output_text.go
@@ -407,7 +407,7 @@ func marshalKnownFieldText(b *indentBuffer, fd *desc.FieldDescriptor, v interfac
if group {
return b.WriteByte('}')
}
- _, err := b.WriteString(">")
+ _, err = b.WriteString(">")
return err
}
}
diff --git a/internal/app/workspace_controller.go b/internal/app/workspace_controller.go
index b566b5c..b51d36b 100644
--- a/internal/app/workspace_controller.go
+++ b/internal/app/workspace_controller.go
@@ -151,6 +151,11 @@ func (c *workspaceController) connect(addr string) error {
ctx, c.cancelCtxFunc = context.WithCancel(context.Background())
go func() {
+ defer func() {
+ // TODO(rogchap) Should be a better way than swallowing this panic?
+ recover()
+ }()
+
for {
if c.grpcConn == nil {
c.SetConnState(connectivity.Shutdown.String())
diff --git a/internal/model/keyval_list.go b/internal/model/keyval_list.go
index 821342a..ae1fc3e 100644
--- a/internal/model/keyval_list.go
+++ b/internal/model/keyval_list.go
@@ -6,6 +6,7 @@ import (
"github.com/therecipe/qt/core"
)
+// The roles for the KeyvalList
const (
KeyvalKeyRole = int(core.Qt__UserRole) + 1< 1
}
diff --git a/qml/views/WorkspaceOptions.qml b/qml/views/WorkspaceOptions.qml
index f777719..2891adb 100644
--- a/qml/views/WorkspaceOptions.qml
+++ b/qml/views/WorkspaceOptions.qml
@@ -29,6 +29,10 @@ Modal {
TabButton {
text: qsTr("TLS")
}
+
+ TabButton {
+ text: qsTr("Metadata")
+ }
}
Rectangle {
@@ -48,6 +52,8 @@ Modal {
WorkspaceOptionsTls {}
+ Metadata {}
+
}
Rectangle {