Skip to content

Commit c273088

Browse files
committed
Init correlations
1 parent 01e5144 commit c273088

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

app_upload/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ require (
5353
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
5454
github.com/felixge/httpsnoop v1.0.4 // indirect
5555
github.com/frikky/kin-openapi v0.42.0 // indirect
56-
github.com/frikky/schemaless v0.0.23 // indirect
56+
github.com/frikky/schemaless v0.0.24 // indirect
5757
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
5858
github.com/ghodss/yaml v1.0.0 // indirect
5959
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect

app_upload/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
127127
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
128128
github.com/frikky/kin-openapi v0.42.0 h1:d5Z6vnuQ6RnCCPIxZaDL+TH2ODLxT8abytOt+Zh+Kd0=
129129
github.com/frikky/kin-openapi v0.42.0/go.mod h1:ev9OZAw7Bv5p0w93j91++6a1ElPzGcCofst+kmrWsj4=
130-
github.com/frikky/schemaless v0.0.23 h1:fa1JR8HJat2obbAKB5+Rnwmr09LNUXlyjTMgKG/G7BA=
131-
github.com/frikky/schemaless v0.0.23/go.mod h1:m9s+6gALXhA5ZERCrJw+jI2rRtTPNa8mkl4vav9sxnY=
130+
github.com/frikky/schemaless v0.0.24 h1:1bNg96gm82yLbRlDS0haQH/96X3GlCAEuTCSasXIJZE=
131+
github.com/frikky/schemaless v0.0.24/go.mod h1:m9s+6gALXhA5ZERCrJw+jI2rRtTPNa8mkl4vav9sxnY=
132132
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
133133
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
134134
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=

app_upload/stitcher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,8 @@ func main() {
10071007
bucketName = os.Args[5]
10081008
}
10091009

1010-
appname := "shuffle-tools"
1011-
appversion := "1.2.0"
1010+
appname := "shuffle-ai"
1011+
appversion := "1.0.0"
10121012
err := deployConfigToBackend(appfolder, appname, appversion)
10131013
if err != nil {
10141014
log.Printf("[WARNING] Failed uploading config: %s", err)

blobs.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func GetDefaultWorkflowByType(workflow Workflow, orgId string, categoryAction Ca
139139
Name: actionName,
140140
AppID: "integration",
141141
AppName: "Singul",
142+
LargeImage: getSingulLogo(),
142143
ID: startActionId,
143144
AppVersion: "1.0.0",
144145
Environment: actionEnv,
@@ -192,6 +193,7 @@ func GetDefaultWorkflowByType(workflow Workflow, orgId string, categoryAction Ca
192193
Name: "Translate standard",
193194
AppID: "integration",
194195
AppName: "Singul",
196+
LargeImage: getSingulLogo(),
195197
ID: startActionId,
196198
AppVersion: "1.0.0",
197199
Environment: actionEnv,
@@ -636,6 +638,10 @@ func GetDefaultWorkflowByType(workflow Workflow, orgId string, categoryAction Ca
636638
return workflow, nil
637639
}
638640

641+
func getSingulLogo() string {
642+
return "/images/singul_green.png"
643+
}
644+
639645
func GetPublicDetections() []DetectionResponse {
640646
return []DetectionResponse{
641647
DetectionResponse{

correlations.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package shuffle
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
func GetCorrelations(resp http.ResponseWriter, request *http.Request) {
8+
cors := HandleCors(resp, request)
9+
if cors {
10+
return
11+
}
12+
13+
body, err := ioutil.ReadAll(request.Body)
14+
if err != nil {
15+
log.Printf("[WARNING] Failed to read body in GetCorrelations: %s", err)
16+
resp.WriteHeader(400)
17+
resp.Write([]byte(`{"success": false, "reason": "Invalid input body"}`))
18+
return
19+
}
20+
21+
}

0 commit comments

Comments
 (0)