Fixed issue with trigger selection

This commit is contained in:
frikky
2022-03-18 22:14:17 +01:00
parent e5449a6f3c
commit 619fcac499
5 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ module main
go 1.16
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
+4 -4
View File
@@ -3732,12 +3732,12 @@ func remoteOrgJobController(org shuffle.Org, body []byte) error {
if err != nil {
log.Printf("[WARNING] Failed setting organization when stopping sync: %s", err)
} else {
log.Printf("[INFO] Successfully STOPPED org cloud sync for %s", org.Id)
log.Printf("[INFO] Successfully STOPPED org cloud sync for %s (%s)", org.Name, org.Id)
}
return errors.New("Stopped schedule for org locally because of bad apikey.")
} else {
return errors.New(fmt.Sprintf("Failed finding the schedule for org %s", org.Id))
return errors.New(fmt.Sprintf("Failed finding the schedule for org %s (%s)", org.Name, org.Id))
}
}
@@ -4048,7 +4048,7 @@ func runInitEs(ctx context.Context) {
continue
}
log.Printf("[DEBUG] Should start schedule for org %s", org.Name)
log.Printf("[DEBUG] Should start schedule for org %s (%s)", org.Name, org.Id)
job := func() {
err := remoteOrgJobHandler(org, interval)
if err != nil {
@@ -4737,7 +4737,7 @@ func runInit(ctx context.Context) {
continue
}
log.Printf("[DEBUG] Should start schedule for org %s", org.Name)
log.Printf("[DEBUG] Should start schedule for org %s (%s)", org.Name, org.Id)
job := func() {
err := remoteOrgJobHandler(org, interval)
if err != nil {
-2
View File
@@ -2881,8 +2881,6 @@ const ParsedAction = (props) => {
newActionname.substring(1)
).replaceAll("_", " ");
return (
<Tooltip
color="secondary"
+2
View File
@@ -1636,6 +1636,7 @@ const Admin = (props) => {
return
}
console.log("event: ", event.target.value)
setMatchingOrganizations(event.target.value)
// Workaround for empty orgs
if (event.target.value.length === 0) {
@@ -1643,6 +1644,7 @@ const Admin = (props) => {
}
setUser(selectedUser.id, "suborgs", event.target.value)
//setUser(selectedUser.id, "suborgs", matchingOrganizations)
}
const userOrgEdit = selectedUser.id !== undefined && selectedUser.orgs !== undefined && selectedUser.orgs !== null && selectedOrganization.child_orgs !== undefined && selectedOrganization.child_orgs !== null && selectedOrganization.child_orgs.length > 0 ?
+13 -3
View File
@@ -1852,6 +1852,7 @@ const AngularWorkflow = (defaultprops) => {
setTriggerAuthentication({})
setSelectedTriggerIndex(-1)
setTriggerFolders([])
setSubworkflow({})
// Can be used for right side view
setRightSideBarOpen(false);
@@ -2417,6 +2418,7 @@ const AngularWorkflow = (defaultprops) => {
//var newapps = JSON.parse(JSON.stringify(apps))
var newapps = apps
console.log(event.target.data())
const curapp = newapps.find(
(a) =>
a.name === curaction.app_name &&
@@ -2607,7 +2609,7 @@ const AngularWorkflow = (defaultprops) => {
selected: "",
});
})
};
}
const activateApp = (appid) => {
fetch(globalUrl+"/api/v1/apps/"+appid+"/activate", {
@@ -5815,11 +5817,19 @@ const AngularWorkflow = (defaultprops) => {
const newaction = selectedApp.actions.find(
(a) => a.name === e.target.value
);
if (newaction === undefined || newaction === null) {
alert.error("Failed to find the action");
return;
}
if (workflow.actions !== undefined && workflow.actions !== null) {
const foundInfo = workflow.actions.find(ac => ac.id === selectedAction.id)
console.log("aigo: ", foundInfo)
}
console.log("PRe: ", selectedAction)
// Does this one find the wrong one?
//var newSelectedAction = JSON.parse(JSON.stringify(selectedAction))
var newSelectedAction = selectedAction
@@ -5832,7 +5842,7 @@ const AngularWorkflow = (defaultprops) => {
// Simmple action swap autocompleter
if (selectedAction.parameters !== undefined && newSelectedAction.parameters !== undefined && selectedAction.id === newSelectedAction.id) {
//console.log("OLD: ", selectedAction, "NEW: ", newSelectedAction)
console.log("OLD: ", selectedAction, "NEW: ", newSelectedAction)
for (var paramkey in selectedAction.parameters) {
const param = selectedAction.parameters[paramkey];
@@ -5914,7 +5924,7 @@ const AngularWorkflow = (defaultprops) => {
//setSelectedActionEnvironment(env)
console.log("ACTION: ", newSelectedAction);
console.log("NEW ACTION: ", newSelectedAction);
setSelectedAction(newSelectedAction);
if (workflow.actions !== undefined && workflow.actions !== null && workflow.actions.length > 0) {
const foundActionIndex = workflow.actions.findIndex(actiondata => actiondata.id === newSelectedAction.id)