mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-02 11:05:22 +00:00
Upgrade Basenine to 0.3.0
, do a refactor to enable redact
helper and update the cheatsheet (#614)
* Upgrade Basenine version from `0.2.26` to `0.3.0` * Remove `Summarize` method from `Dissector` interface and refactor the data structures in `tap/api/api.go` * Rename `MizuEntry` to `Entry` and `BaseEntryDetails` to `BaseEntry` * Populate `ContractStatus` field as well * Update the cheatsheet * Upgrade the Basenine version in the helm chart as well * Remove a forgoten `console.log` call
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/up9inc/mizu/shared"
|
||||
"github.com/up9inc/mizu/shared/debounce"
|
||||
"github.com/up9inc/mizu/shared/logger"
|
||||
tapApi "github.com/up9inc/mizu/tap/api"
|
||||
)
|
||||
|
||||
type EventHandlers interface {
|
||||
@@ -131,18 +132,10 @@ func websocketHandler(w http.ResponseWriter, r *http.Request, eventHandlers Even
|
||||
return
|
||||
}
|
||||
|
||||
var dataMap map[string]interface{}
|
||||
err = json.Unmarshal(bytes, &dataMap)
|
||||
var entry *tapApi.Entry
|
||||
err = json.Unmarshal(bytes, &entry)
|
||||
|
||||
var base map[string]interface{}
|
||||
switch dataMap["base"].(type) {
|
||||
case map[string]interface{}:
|
||||
base = dataMap["base"].(map[string]interface{})
|
||||
base["id"] = uint(dataMap["id"].(float64))
|
||||
default:
|
||||
logger.Log.Debugf("Base field has an unrecognized type: %+v", dataMap)
|
||||
continue
|
||||
}
|
||||
base := tapApi.Summarize(entry)
|
||||
|
||||
baseEntryBytes, _ := models.CreateBaseEntryWebSocketMessage(base)
|
||||
SendToSocket(socketId, baseEntryBytes)
|
||||
|
Reference in New Issue
Block a user