Minor fixes to frontend
This commit is contained in:
@@ -54,7 +54,7 @@ These are the main areas to contribute in:
|
||||
* Workflow creation (GUI & Conceptualizing)
|
||||
* Content Creation (Blogs, videos etc)
|
||||
|
||||
Contributing guidelines for Github are outlined [here](https://github.com/frikky/Shuffle/blob/master/.github/CONTRIBUTING.md).
|
||||
Contributing guidelines are outlined [here](https://github.com/frikky/Shuffle/blob/master/.github/CONTRIBUTING.md).
|
||||
|
||||
## Contributors
|
||||

|
||||
|
||||
@@ -195,6 +195,11 @@ type WorkflowApp struct {
|
||||
DocumentationUrl string `json:"documentation_url" datastore:"documentation_url"`
|
||||
GithubUrl string `json:"github_url" datastore:"github_url"`
|
||||
}
|
||||
FolderMount struct {
|
||||
FolderMount bool `json:"folder_mount" datastore:"folder_mount"`
|
||||
SourceFolder string `json:"source_folder" datastore:"source_folder"`
|
||||
DestinationFolder string `json:"destination_folder" datastore:"destination_folder"`
|
||||
}
|
||||
Actions []WorkflowAppAction `json:"actions" yaml:"actions" required:true datastore:"actions,noindex"`
|
||||
Authentication Authentication `json:"authentication" yaml:"authentication" required:false datastore:"authentication"`
|
||||
Tags []string `json:"tags" yaml:"tags" required:false datastore:"activated"`
|
||||
|
||||
@@ -987,7 +987,7 @@ const AngularWorkflow = (props) => {
|
||||
setApps(responseJson)
|
||||
//getAppAuthentication()
|
||||
|
||||
setFilteredApps(responseJson.filter(app => !internalIds.includes(app.name)))
|
||||
setFilteredApps(responseJson.filter(app => !internalIds.includes(app.name) && !(!app.activated && app.generated)))
|
||||
setPrioritizedApps(responseJson.filter(app => internalIds.includes(app.name)))
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -6637,7 +6637,7 @@ const AngularWorkflow = (props) => {
|
||||
|
||||
<b>Actions</b>
|
||||
<div>
|
||||
{executionData.status !== undefined && executionData.status !== "ABORTED" && executionData.status !== "FINISHED" && executionData.status !== "FAILURE" && executionData.status !== "WAITING" ? <CircularProgress style={{marginLeft: 20}}/> : null}
|
||||
{executionData.status !== undefined && executionData.status !== "ABORTED" && executionData.status !== "FINISHED" && executionData.status !== "FAILURE" && executionData.status !== "WAITING" && !(executionData.results === undefined || executionData.results === null || executionData.results.length === 0 && executionData.status === "EXECUTING")? <CircularProgress style={{marginLeft: 20}}/> : null}
|
||||
</div>
|
||||
</div>
|
||||
{executionData.results === undefined || executionData.results === null || executionData.results.length === 0 && executionData.status === "EXECUTING" ?
|
||||
@@ -6712,7 +6712,7 @@ const AngularWorkflow = (props) => {
|
||||
}}
|
||||
name={"Results for "+data.action.label}
|
||||
/>
|
||||
{data.action.app_name === "shuffle-subflow" ?
|
||||
{data.action.app_name === "shuffle-subflow" && validate.result.success !== undefined && validate.result.success === true ?
|
||||
<span>
|
||||
{validate.valid && data.action.parameters !== undefined && data.action.parameters !== null ?
|
||||
<a rel="norefferer" href={`/workflows/${data.action.parameters[0].value}?view=executions&execution_id=${validate.result.execution_id}`} target="_blank" style={{textDecoration: "none", color: "#f85a3e"}}>See subflow execution</a>
|
||||
@@ -6724,7 +6724,7 @@ const AngularWorkflow = (props) => {
|
||||
}
|
||||
</span>
|
||||
:
|
||||
<div style={{maxHeight: 250, overflowX: "hidden", overflowY: "auto",}}>
|
||||
<div style={{maxHeight: 250, overflowX: "hidden", overflowY: "auto", whiteSpace: "pre-wrap"}}>
|
||||
<b>Result</b>
|
||||
{data.result}
|
||||
</div>
|
||||
|
||||
@@ -201,7 +201,8 @@ const Apps = (props) => {
|
||||
})
|
||||
.then((responseJson) => {
|
||||
//console.log("Apps: ", responseJson)
|
||||
responseJson = sortByKey(responseJson, "large_image")
|
||||
//responseJson = sortByKey(responseJson, "large_image")
|
||||
responseJson = sortByKey(responseJson, "generated")
|
||||
|
||||
setApps(responseJson)
|
||||
setFilteredApps(responseJson)
|
||||
@@ -781,6 +782,7 @@ const Apps = (props) => {
|
||||
var tmpapps = searchableApps.filter(data => data.name.toLowerCase().includes(searchfield) || data.description.toLowerCase().includes(searchfield))
|
||||
newapps.push(...tmpapps)
|
||||
|
||||
console.log(newapps)
|
||||
setFilteredApps(newapps)
|
||||
//if ((newapps.length === 0 || searchBackend) && !appSearchLoading) {
|
||||
|
||||
|
||||
@@ -2,20 +2,16 @@ FROM golang:1.16.0-buster as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY worker.go /app/worker.go
|
||||
RUN go env -w GO111MODULE=auto
|
||||
|
||||
RUN go get -u github.com/docker/docker/api/types
|
||||
RUN go get -u github.com/docker/docker/api/types/container
|
||||
RUN go get -u github.com/docker/docker/client
|
||||
RUN go get -u github.com/gorilla/mux
|
||||
RUN go get -u github.com/patrickmn/go-cache
|
||||
|
||||
COPY worker.go /app/worker.go
|
||||
RUN go env -w GO111MODULE=auto && \
|
||||
go get github.com/docker/docker/api/types && \
|
||||
go get github.com/docker/docker/api/types/container && \
|
||||
go get github.com/docker/docker/client && \
|
||||
go get github.com/gorilla/mux && \
|
||||
go get github.com/patrickmn/go-cache && \
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker .
|
||||
|
||||
FROM alpine:3.12
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/mount"
|
||||
dockerclient "github.com/docker/docker/client"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
@@ -877,6 +878,37 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
||||
hostConfig.AutoRemove = true
|
||||
}
|
||||
|
||||
// FIXME: Add proper foldermounts here
|
||||
//log.Printf("\n\nPRE FOLDERMOUNT\n\n")
|
||||
//volumeBinds := []string{"/tmp/shuffle-mount:/rules"}
|
||||
//volumeBinds := []string{"/tmp/shuffle-mount:/rules"}
|
||||
volumeBinds := []string{}
|
||||
if len(volumeBinds) > 0 {
|
||||
log.Printf("[INFO] Setting up binds for container!")
|
||||
hostConfig.Binds = volumeBinds
|
||||
hostConfig.Mounts = []mount.Mount{}
|
||||
for _, bind := range volumeBinds {
|
||||
if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") {
|
||||
log.Printf("[WARNING] Bind %s is invalid.", bind)
|
||||
continue
|
||||
}
|
||||
|
||||
log.Printf("[INFO] Appending bind %s", bind)
|
||||
bindSplit := strings.Split(bind, ":")
|
||||
sourceFolder := bindSplit[0]
|
||||
destinationFolder := bindSplit[0]
|
||||
hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{
|
||||
Type: mount.TypeBind,
|
||||
Source: sourceFolder,
|
||||
Target: destinationFolder,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
log.Printf("[WARNING] No mounted folders")
|
||||
}
|
||||
// hostConfig.Binds = volumeBinds
|
||||
//}
|
||||
|
||||
config := &container.Config{
|
||||
Image: image,
|
||||
Env: env,
|
||||
|
||||
Reference in New Issue
Block a user