#216: Added backend components for Org settings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
NAME=shuffle-app_sdk
|
||||
VERSION=0.8.3
|
||||
VERSION=0.8.31
|
||||
|
||||
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
|
||||
docker build . -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
|
||||
|
||||
+10
-7
@@ -3435,18 +3435,18 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
parsedBody := string(body)
|
||||
//parsedBody := string(body)
|
||||
//parsedBody = strings.Replace(parsedBody, "\"", "\\\"", -1)
|
||||
if len(parsedBody) > 0 {
|
||||
if string(parsedBody[0]) == `"` && string(parsedBody[len(parsedBody)-1]) == "\"" {
|
||||
parsedBody = parsedBody[1 : len(parsedBody)-1]
|
||||
}
|
||||
}
|
||||
//if len(parsedBody) > 0 {
|
||||
// if string(parsedBody[0]) == `"` && string(parsedBody[len(parsedBody)-1]) == "\"" {
|
||||
// parsedBody = parsedBody[1 : len(parsedBody)-1]
|
||||
// }
|
||||
//}
|
||||
|
||||
newBody := ExecutionStruct{
|
||||
Start: hook.Start,
|
||||
ExecutionSource: "webhook",
|
||||
ExecutionArgument: string(parsedBody),
|
||||
ExecutionArgument: string(body),
|
||||
}
|
||||
|
||||
b, err := json.Marshal(newBody)
|
||||
@@ -7615,6 +7615,7 @@ func handleEditOrg(resp http.ResponseWriter, request *http.Request) {
|
||||
Name string `json:"name" datastore:"name"`
|
||||
Description string `json:"description" datastore:"description"`
|
||||
OrgId string `json:"org_id" datastore:"org_id"`
|
||||
Defaults Defaults `json:"defaults" datastore:"defaults"`
|
||||
}
|
||||
|
||||
var tmpData ReturnData
|
||||
@@ -7685,6 +7686,8 @@ func handleEditOrg(resp http.ResponseWriter, request *http.Request) {
|
||||
org.Image = tmpData.Image
|
||||
org.Name = tmpData.Name
|
||||
org.Description = tmpData.Description
|
||||
org.Defaults = tmpData.Defaults
|
||||
|
||||
//log.Printf("Org: %#v", org)
|
||||
err = setOrg(ctx, *org, org.Id)
|
||||
if err != nil {
|
||||
|
||||
@@ -116,6 +116,14 @@ type Org struct {
|
||||
SyncFeatures SyncFeatures `json:"sync_features" datastore:"sync_features"`
|
||||
Created int64 `json:"created" datastore:"created"`
|
||||
Edited int64 `json:"edited" datastore:"edited"`
|
||||
Defaults Defaults `json:"defaults" datastore:"defaults"`
|
||||
}
|
||||
|
||||
type Defaults struct {
|
||||
AppDownloadRepo string `json:"app_download_repo" datastore:"app_download_repo"`
|
||||
AppDownloadBranch string `json:"app_download_branch" datastore:"app_download_branch"`
|
||||
WorkflowDownloadRepo string `json:"workflow_download_repo" datastore:"workflow_download_repo"`
|
||||
WorkflowDownloadBranch string `json:"workflow_download_branch" datastore:"workflow_download_branch"`
|
||||
}
|
||||
|
||||
type AppAuthenticationStorage struct {
|
||||
@@ -5134,9 +5142,12 @@ func loadSpecificApps(resp http.ResponseWriter, request *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Field1 & 2 can be a lot of things..
|
||||
// Field1 & 2 can be a lot of things.
|
||||
// Field1 = Username
|
||||
// Field2 = Password
|
||||
type tmpStruct struct {
|
||||
URL string `json:"url"`
|
||||
Branch string `json:"branch"`
|
||||
Field1 string `json:"field_1"`
|
||||
Field2 string `json:"field_2"`
|
||||
ForceUpdate bool `json:"force_update"`
|
||||
@@ -5159,6 +5170,10 @@ func loadSpecificApps(resp http.ResponseWriter, request *http.Request) {
|
||||
URL: tmpBody.URL,
|
||||
}
|
||||
|
||||
if len(tmpBody.Branch) > 0 && tmpBody.Branch != "master" && tmpBody.Branch != "main" {
|
||||
cloneOptions.ReferenceName = plumbing.ReferenceName(tmpBody.Branch)
|
||||
}
|
||||
|
||||
// FIXME: Better auth.
|
||||
if len(tmpBody.Field1) > 0 && len(tmpBody.Field2) > 0 {
|
||||
cloneOptions.Auth = &http2.BasicAuth{
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ services:
|
||||
- database
|
||||
orborus:
|
||||
#build: ./functions/onprem/orborus
|
||||
image: ghcr.io/frikky/shuffle-orborus:0.8.0
|
||||
image: ghcr.io/frikky/shuffle-orborus:0.8.3
|
||||
container_name: shuffle-orborus
|
||||
hostname: shuffle-orborus
|
||||
networks:
|
||||
|
||||
@@ -402,7 +402,7 @@ const AngularWorkflow = (props) => {
|
||||
|
||||
if (!visited.includes(item.action.label)) {
|
||||
if (executionRunning) {
|
||||
alert.show("WAITING FOR "+item.action.label+" with result "+item.result)
|
||||
//alert.show("WAITING FOR "+item.action.label+" with result "+item.result)
|
||||
visited.push(item.action.label)
|
||||
setVisited(visited)
|
||||
}
|
||||
@@ -424,7 +424,7 @@ const AngularWorkflow = (props) => {
|
||||
|
||||
if (!visited.includes(item.action.label)) {
|
||||
if (executionRunning) {
|
||||
alert.show("Success in node "+item.action.label)
|
||||
//alert.show("Success in node "+item.action.label)
|
||||
//+" with result "+item.result)
|
||||
visited.push(item.action.label)
|
||||
setVisited(visited)
|
||||
@@ -459,7 +459,7 @@ const AngularWorkflow = (props) => {
|
||||
currentnode.addClass('failure-highlight')
|
||||
|
||||
if (!visited.includes(item.action.label)) {
|
||||
alert.error("Success for "+item.action.label+" with result "+item.result)
|
||||
alert.error("Error for "+item.action.label+" with result "+item.result)
|
||||
visited.push(item.action.label)
|
||||
setVisited(visited)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ echo "Running docker build with $NAME:$VERSION"
|
||||
docker build . -t frikky/shuffle:$NAME -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
|
||||
|
||||
#docker push frikky/$NAME:$VERSION
|
||||
#docker push frikky/shuffle:$NAME
|
||||
# docker push docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION
|
||||
docker push frikky/shuffle:$NAME
|
||||
docker push ghcr.io/frikky/$NAME:$VERSION
|
||||
|
||||
Reference in New Issue
Block a user