From ef0406456715aaad2b1069a95a90a14cfb5fb029 Mon Sep 17 00:00:00 2001 From: frikky Date: Tue, 18 May 2021 05:47:11 +0200 Subject: [PATCH] Minor changes to action view --- backend/go-app/docker.go | 5 ++--- frontend/src/components/ParsedAction.jsx | 8 ++++++-- functions/extensions/wazuh/ossec.conf | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/backend/go-app/docker.go b/backend/go-app/docker.go index 43168202..7cd34b7d 100644 --- a/backend/go-app/docker.go +++ b/backend/go-app/docker.go @@ -688,7 +688,7 @@ func getDockerImage(resp http.ResponseWriter, request *http.Request) { tagFound := "" for _, image := range images { for _, tag := range image.RepoTags { - log.Printf("[INFO] Docker Image: %s", tag) + //log.Printf("[INFO] Docker Image: %s", tag) if strings.ToLower(tag) == strings.ToLower(version.Name) { img = image @@ -704,8 +704,7 @@ func getDockerImage(resp http.ResponseWriter, request *http.Request) { return } - _ = tagFound - log.Printf("Img (%s) found: %#v", tagFound, img) + log.Printf("[INFO] Img found (%s): %#v", tagFound, img) basepath := "base" location := fmt.Sprintf("%s.tar.gz", tagFound) diff --git a/frontend/src/components/ParsedAction.jsx b/frontend/src/components/ParsedAction.jsx index d9052c6d..9302df5b 100644 --- a/frontend/src/components/ParsedAction.jsx +++ b/frontend/src/components/ParsedAction.jsx @@ -53,11 +53,15 @@ const ParsedAction = (props) => { while(true) { for (var key in allkeys) { var currentnode = cy.getElementById(allkeys[key]) - if (handled.includes(currentnode.data().id)) { + if (currentnode === undefined) { + continue + } + + if (handled.includes(currentnode.data("id"))) { continue } else { // Get the name / label here too? - handled.push(currentnode.data().id) + handled.push(currentnode.data("id")) results.push(currentnode.data()) } diff --git a/functions/extensions/wazuh/ossec.conf b/functions/extensions/wazuh/ossec.conf index 5b55f5d3..6c281103 100644 --- a/functions/extensions/wazuh/ossec.conf +++ b/functions/extensions/wazuh/ossec.conf @@ -1,5 +1,5 @@ custom-shuffle - http://:3001/api/v1/hooks/webhook_ + http://:/api/v1/hooks/webhook_ json