Fixed hybrid features

This commit is contained in:
frikky
2021-03-25 19:53:31 +01:00
parent 8d37549846
commit 45f20e1326
5 changed files with 28 additions and 21 deletions
+3 -3
View File
@@ -2,8 +2,8 @@ module shuffle
go 1.13 go 1.13
replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared //replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
require ( require (
cloud.google.com/go v0.75.0 cloud.google.com/go v0.75.0
@@ -18,7 +18,7 @@ require (
github.com/docker/docker v1.13.1 github.com/docker/docker v1.13.1
github.com/docker/go-connections v0.4.0 github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect
github.com/frikky/shuffle-shared v0.0.12 // indirect github.com/frikky/shuffle-shared v0.0.15
github.com/ghodss/yaml v1.0.0 github.com/ghodss/yaml v1.0.0
github.com/go-git/go-billy/v5 v5.0.0 github.com/go-git/go-billy/v5 v5.0.0
github.com/go-git/go-git/v5 v5.0.0 github.com/go-git/go-git/v5 v5.0.0
+3 -3
View File
@@ -4395,7 +4395,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
if test.Editing { if test.Editing {
// Quick verification test // Quick verification test
ctx := context.Background() ctx := context.Background()
app, err := shuffle.GetApp(ctx, test.Id) app, err := shuffle.GetApp(ctx, test.Id, user)
if err != nil { if err != nil {
log.Printf("Error getting app when editing: %s", app.Name) log.Printf("Error getting app when editing: %s", app.Name)
resp.WriteHeader(401) resp.WriteHeader(401)
@@ -4748,7 +4748,7 @@ func handleAppHotload(ctx context.Context, location string, forceUpdate bool) er
shuffle.DeleteCache(ctx, cacheKey) shuffle.DeleteCache(ctx, cacheKey)
cacheKey = fmt.Sprintf("workflowapps-sorted-500") cacheKey = fmt.Sprintf("workflowapps-sorted-500")
shuffle.DeleteCache(ctx, cacheKey) shuffle.DeleteCache(ctx, cacheKey)
shuffle.DeleteCache(ctx, fmt.Sprintf("apps_%s", user.Id)) //shuffle.DeleteCache(ctx, fmt.Sprintf("apps_%s", user.Id))
return nil return nil
} }
@@ -5562,7 +5562,7 @@ func runInit(ctx context.Context) {
// Getting apps to see if we should initialize a test // Getting apps to see if we should initialize a test
log.Printf("Getting remote workflow apps") log.Printf("Getting remote workflow apps")
workflowapps, err := shuffle.GetPrioritizedApps(ctx, user) workflowapps, err := shuffle.GetAllWorkflowApps(ctx, 500)
if err != nil { if err != nil {
log.Printf("Failed getting apps (runInit): %s", err) log.Printf("Failed getting apps (runInit): %s", err)
} else if err == nil && len(workflowapps) > 0 { } else if err == nil && len(workflowapps) > 0 {
+2 -2
View File
@@ -3466,7 +3466,7 @@ func deleteWorkflowApp(resp http.ResponseWriter, request *http.Request) {
ctx := context.Background() ctx := context.Background()
log.Printf("ID: %s", fileId) log.Printf("ID: %s", fileId)
app, err := shuffle.GetApp(ctx, fileId) app, err := shuffle.GetApp(ctx, fileId, user)
if err != nil { if err != nil {
log.Printf("Error getting app (delete) %s: %s", fileId, err) log.Printf("Error getting app (delete) %s: %s", fileId, err)
resp.WriteHeader(401) resp.WriteHeader(401)
@@ -3618,7 +3618,7 @@ func getWorkflowAppConfig(resp http.ResponseWriter, request *http.Request) {
fileId = location[4] fileId = location[4]
} }
app, err := shuffle.GetApp(ctx, fileId) app, err := shuffle.GetApp(ctx, fileId, shuffle.User{})
if err != nil { if err != nil {
log.Printf("[WARNING] Error getting app %s (app config): %s", fileId, err) log.Printf("[WARNING] Error getting app %s (app config): %s", fileId, err)
resp.WriteHeader(401) resp.WriteHeader(401)
-4
View File
@@ -15,8 +15,6 @@ import AngularWorkflow from "./views/AngularWorkflow";
import Header from './components/Header'; import Header from './components/Header';
import Apps from './views/Apps'; import Apps from './views/Apps';
import AppCreator from './views/AppCreator'; import AppCreator from './views/AppCreator';
import Contact from './views/Contact';
import Oauth2 from './views/Oauth2';
import Dashboard from "./views/Dashboard"; import Dashboard from "./views/Dashboard";
import AdminSetup from "./views/AdminSetup"; import AdminSetup from "./views/AdminSetup";
@@ -133,8 +131,6 @@ const App = (message, props) => {
<div style={{ backgroundColor: "#1F2023", color: "rgba(255, 255, 255, 0.65)", minHeight: "100vh" }}> <div style={{ backgroundColor: "#1F2023", color: "rgba(255, 255, 255, 0.65)", minHeight: "100vh" }}>
<ScrollToTop setCurpath={setCurpath} /> <ScrollToTop setCurpath={setCurpath} />
<Header cookies={cookies} removeCookie={removeCookie} isLoaded={isLoaded} globalUrl={globalUrl} setIsLoggedIn={setIsLoggedIn} isLoggedIn={isLoggedIn} userdata={userdata} {...props} /> <Header cookies={cookies} removeCookie={removeCookie} isLoaded={isLoaded} globalUrl={globalUrl} setIsLoggedIn={setIsLoggedIn} isLoggedIn={isLoggedIn} userdata={userdata} {...props} />
<Route exact path="/oauth2" render={props => <Oauth2 isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
<Route exact path="/contact" render={props => <Contact isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
<Route exact path="/login" render={props => <LoginPage isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} /> <Route exact path="/login" render={props => <LoginPage isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} />
<Route exact path="/admin" render={props => <Admin userdata={userdata} isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} /> <Route exact path="/admin" render={props => <Admin userdata={userdata} isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} />
<Route exact path="/admin/:key" render={props => <Admin isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} /> <Route exact path="/admin/:key" render={props => <Admin isLoggedIn={isLoggedIn} setIsLoggedIn={setIsLoggedIn} register={true} isLoaded={isLoaded} globalUrl={globalUrl} setCookie={setCookie} cookies={cookies} {...props} />} />
File diff suppressed because one or more lines are too long