Skip to content

Commit a9041d4

Browse files
authored
fix 1.0.62
1 parent 739c4b6 commit a9041d4

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.62
4+
5+
WebSocket Data Source Plugin Launch added connection string and fix plugin name
6+
37
## 1.0.61
48

59
WebSocket Data Source Plugin Launch added connection string and fix plugin name

pkg/plugin/ws_data_proxy.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,15 @@ func (wsdp *wsDataProxy) wsConnect() (*websocket.Conn, error) {
136136
}
137137
log.DefaultLogger.Info("Ws Connect", "connected to", wsdp.wsUrl)
138138
//wsdp.wsDataSource.customQueryParameters
139-
if val, ok := wsdp.wsDataSource.customQueryParameters["connectionString"]; ok {
140-
log.DefaultLogger.Info("Ws Connect", "connected to connectionString", val)
139+
if val, ok := wsdp.wsDataSource.customQueryParameters["Connectionstring"]; ok {
140+
log.DefaultLogger.Info("Ws Connect", "connected to Connectionstring", val)
141+
// send connection string
142+
stringJSON := `{"id":1}`
143+
connectionErr := c.WriteMessage(websocket.TextMessage, []byte(stringJSON))
144+
if connectionErr != nil {
145+
return nil, connectionErr
146+
}
147+
time.Sleep(2* time.Second)
141148
// send connection string
142149
connectionErr := c.WriteMessage(websocket.TextMessage, []byte(val))
143150
if connectionErr != nil {

src/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{"name": "Websockets Payloads", "path": "img/assets/grafana-websockets-graphing.png"},
3434
{"name": "Streaming", "path": "img/assets/grafana-websockets-plugin-streaming.png"}
3535
],
36-
"version": "1.0.61",
36+
"version": "1.0.62",
3737
"updated": "%TODAY%"
3838
},
3939
"dependencies": {

0 commit comments

Comments
 (0)