From 516a6df35619412f64e6190a3aecef29b750b0ce Mon Sep 17 00:00:00 2001 From: frikky Date: Wed, 3 Mar 2021 16:16:43 +0100 Subject: [PATCH] Minor fixes to app creation process --- backend/go-app/main.go | 7 ++++++- backend/go-app/walkoff.go | 13 ++++++++----- frontend/src/views/AppCreator.jsx | 3 ++- frontend/src/views/Apps.jsx | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index d1d5c5aa..6e7bd0b4 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -6673,6 +6673,7 @@ func createFs(basepath, pathname string) (billy.Filesystem, error) { // Hotloads new apps from a folder func handleAppHotload(location string, forceUpdate bool) error { + basepath := "base" fs, err := createFs(basepath, location) if err != nil { @@ -6695,7 +6696,11 @@ func handleAppHotload(location string, forceUpdate bool) error { return err } - cacheKey := fmt.Sprintf("workflowapps-sorted") + cacheKey := fmt.Sprintf("workflowapps-sorted-100") + requestCache.Delete(cacheKey) + cacheKey = fmt.Sprintf("workflowapps-sorted-500") + requestCache.Delete(cacheKey) + cacheKey = fmt.Sprintf("workflowapps-sorted") requestCache.Delete(cacheKey) return nil diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index 0588c6bd..f2882d9a 100644 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -214,7 +214,7 @@ type WorkflowAppActionParameter struct { Description string `json:"description" datastore:"description,noindex" yaml:"description"` ID string `json:"id" datastore:"id" yaml:"id,omitempty"` Name string `json:"name" datastore:"name" yaml:"name"` - Example string `json:"example" datastore:"example" yaml:"example"` + Example string `json:"example" datastore:"example,noindex" yaml:"example"` Value string `json:"value" datastore:"value,noindex" yaml:"value,omitempty"` Multiline bool `json:"multiline" datastore:"multiline" yaml:"multiline"` Options []string `json:"options" datastore:"options" yaml:"options"` @@ -259,12 +259,12 @@ type WorkflowAppAction struct { } `json:"execution_variable" datastore:"execution_variables"` Returns struct { Description string `json:"description" datastore:"returns" yaml:"description,omitempty"` - Example string `json:"example" datastore:"example" yaml:"example"` + Example string `json:"example" datastore:"example,noindex" yaml:"example"` ID string `json:"id" datastore:"id" yaml:"id,omitempty"` Schema SchemaDefinition `json:"schema" datastore:"schema" yaml:"schema"` } `json:"returns" datastore:"returns"` AuthenticationId string `json:"authentication_id" datastore:"authentication_id"` - Example string `json:"example" datastore:"example" yaml:"example"` + Example string `json:"example,noindex" datastore:"example" yaml:"example"` AuthNotRequired bool `json:"auth_not_required" datastore:"auth_not_required" yaml:"auth_not_required"` } @@ -327,7 +327,7 @@ type Action struct { } `json:"position,omitempty"` Priority int `json:"priority,omitempty" datastore:"priority"` AuthenticationId string `json:"authentication_id" datastore:"authentication_id"` - Example string `json:"example,omitempty" datastore:"example"` + Example string `json:"example,omitempty" datastore:"example,noindex"` AuthNotRequired bool `json:"auth_not_required,omitempty" datastore:"auth_not_required" yaml:"auth_not_required"` Category string `json:"category" datastore:"category"` } @@ -461,7 +461,7 @@ type AuthenticationParams struct { Description string `json:"description" datastore:"description,noindex" yaml:"description"` ID string `json:"id" datastore:"id" yaml:"id"` Name string `json:"name" datastore:"name" yaml:"name"` - Example string `json:"example" datastore:"example" yaml:"example"` + Example string `json:"example" datastore:"example,noindex" yaml:"example"` Value string `json:"value,omitempty" datastore:"value,noindex" yaml:"value"` Multiline bool `json:"multiline" datastore:"multiline" yaml:"multiline"` Required bool `json:"required" datastore:"required" yaml:"required"` @@ -6532,9 +6532,12 @@ func iterateAppGithubFolders(fs billy.Filesystem, dir []os.FileInfo, extra strin var err error allapps := []WorkflowApp{} + + // These are slow apps to build with some funky mechanisms reservedNames := []string{ "OWA", "NLP", + "YARA", } buildLaterFirst := []buildLaterStruct{} diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index 5ed4bcb0..8252f2e4 100644 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -1238,6 +1238,7 @@ const AppCreator = (props) => { }) setActions(actions) + setActionAmount(actionAmount-1) setUpdate(Math.random()) } @@ -1914,7 +1915,7 @@ const AppCreator = (props) => { {fileUploadEnabled ? { } } - runAppSearch("") + //runAppSearch("") }) .catch(error => { alert.error(error.toString())