Fixed auto-unmapping of e.g. names and authentication during action change. Re-mapped with pointers rather than JSON parsing
This commit is contained in:
@@ -1519,6 +1519,11 @@ class AppBase:
|
|||||||
newvalue = []
|
newvalue = []
|
||||||
firstitem = actualitem[0][0]
|
firstitem = actualitem[0][0]
|
||||||
seconditem = actualitem[0][1]
|
seconditem = actualitem[0][1]
|
||||||
|
if isinstance(firstitem, int):
|
||||||
|
firstitem = str(firstitem)
|
||||||
|
if isinstance(seconditem, int):
|
||||||
|
seconditem = str(seconditem)
|
||||||
|
|
||||||
print("[DEBUG] ACTUAL PARSED: %s" % actualitem)
|
print("[DEBUG] ACTUAL PARSED: %s" % actualitem)
|
||||||
|
|
||||||
# Means it's a single item -> continue
|
# Means it's a single item -> continue
|
||||||
@@ -1858,8 +1863,8 @@ class AppBase:
|
|||||||
self.action_result["status"] = "FAILURE"
|
self.action_result["status"] = "FAILURE"
|
||||||
data = {
|
data = {
|
||||||
"success": False,
|
"success": False,
|
||||||
"input": template,
|
|
||||||
"reason": f"Failed to parse LiquidPy: {error_msg}",
|
"reason": f"Failed to parse LiquidPy: {error_msg}",
|
||||||
|
"input": template,
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
self.action_result["result"] = json.dumps(data)
|
self.action_result["result"] = json.dumps(data)
|
||||||
|
|||||||
@@ -121,7 +121,10 @@ const AuthenticationOauth2 = (props) => {
|
|||||||
var resources = "";
|
var resources = "";
|
||||||
if (scopes !== undefined && (scopes !== null) & (scopes.length > 0)) {
|
if (scopes !== undefined && (scopes !== null) & (scopes.length > 0)) {
|
||||||
if (offlineAccess === true && !scopes.includes("offline_access")) {
|
if (offlineAccess === true && !scopes.includes("offline_access")) {
|
||||||
scopes.push("offline_access")
|
if (authenticationType.redirect_uri.includes("microsoft")) {
|
||||||
|
console.log("Appending offline access")
|
||||||
|
scopes.push("offline_access")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resources = scopes.join(" ");
|
resources = scopes.join(" ");
|
||||||
|
|||||||
@@ -1591,6 +1591,9 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
datafield = (
|
datafield = (
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
style: {
|
style: {
|
||||||
marginLeft: 10,
|
marginLeft: 10,
|
||||||
@@ -2091,6 +2094,9 @@ const ParsedAction = (props) => {
|
|||||||
Autocomplete
|
Autocomplete
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
labelId="action-autocompleter"
|
labelId="action-autocompleter"
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
style: {
|
style: {
|
||||||
@@ -2388,6 +2394,9 @@ const ParsedAction = (props) => {
|
|||||||
selectedApp.versions !== undefined &&
|
selectedApp.versions !== undefined &&
|
||||||
selectedApp.versions.length > 1 ? (
|
selectedApp.versions.length > 1 ? (
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
defaultValue={selectedAction.app_version}
|
defaultValue={selectedAction.app_version}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
console.log("VAL: ", event.target.value)
|
console.log("VAL: ", event.target.value)
|
||||||
@@ -2466,6 +2475,7 @@ const ParsedAction = (props) => {
|
|||||||
if (param.value.includes(baselabel)) {
|
if (param.value.includes(baselabel)) {
|
||||||
//if (param.value.toLowerCase().includes(baselabel)) {
|
//if (param.value.toLowerCase().includes(baselabel)) {
|
||||||
console.log("FOUND: ", param);
|
console.log("FOUND: ", param);
|
||||||
|
|
||||||
workflow.actions[key].parameters[subkey].value.replaceAll(
|
workflow.actions[key].parameters[subkey].value.replaceAll(
|
||||||
baselabel,
|
baselabel,
|
||||||
e.target.value
|
e.target.value
|
||||||
@@ -2555,6 +2565,9 @@ const ParsedAction = (props) => {
|
|||||||
<Typography>Authentication</Typography>
|
<Typography>Authentication</Typography>
|
||||||
<div style={{ display: "flex" }}>
|
<div style={{ display: "flex" }}>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
labelId="select-app-auth"
|
labelId="select-app-auth"
|
||||||
value={
|
value={
|
||||||
Object.getOwnPropertyNames(
|
Object.getOwnPropertyNames(
|
||||||
@@ -2657,6 +2670,9 @@ const ParsedAction = (props) => {
|
|||||||
<div style={{ marginTop: "20px" }}>
|
<div style={{ marginTop: "20px" }}>
|
||||||
<Typography>Environment</Typography>
|
<Typography>Environment</Typography>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
value={
|
value={
|
||||||
selectedActionEnvironment === undefined ||
|
selectedActionEnvironment === undefined ||
|
||||||
selectedActionEnvironment.Name === undefined
|
selectedActionEnvironment.Name === undefined
|
||||||
@@ -2711,6 +2727,9 @@ const ParsedAction = (props) => {
|
|||||||
<div style={{ marginTop: "20px" }}>
|
<div style={{ marginTop: "20px" }}>
|
||||||
<Typography>Set execution variable (optional)</Typography>
|
<Typography>Set execution variable (optional)</Typography>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
value={
|
value={
|
||||||
selectedAction.execution_variable !== undefined
|
selectedAction.execution_variable !== undefined
|
||||||
? selectedAction.execution_variable.name
|
? selectedAction.execution_variable.name
|
||||||
@@ -2903,6 +2922,9 @@ const ParsedAction = (props) => {
|
|||||||
|
|
||||||
{/*setNewSelectedAction !== undefined ?
|
{/*setNewSelectedAction !== undefined ?
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
value={selectedAction.name}
|
value={selectedAction.name}
|
||||||
fullWidth
|
fullWidth
|
||||||
onChange={setNewSelectedAction}
|
onChange={setNewSelectedAction}
|
||||||
|
|||||||
@@ -1477,6 +1477,22 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then((responseJson) => {
|
.then((responseJson) => {
|
||||||
|
if (responseJson === null) {
|
||||||
|
console.log("No response")
|
||||||
|
const pretend_apps = [{
|
||||||
|
"name": "TBD",
|
||||||
|
"app_name": "TBD",
|
||||||
|
"app_version": "TBD",
|
||||||
|
"description": "TBD",
|
||||||
|
"version": "TBD",
|
||||||
|
"large_image": "",
|
||||||
|
}]
|
||||||
|
setApps(pretend_apps)
|
||||||
|
setFilteredApps(pretend_apps)
|
||||||
|
setPrioritizedApps(pretend_apps);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (responseJson.success === false) {
|
if (responseJson.success === false) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -5657,12 +5673,14 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Does this one find the wrong one?
|
// Does this one find the wrong one?
|
||||||
var newSelectedAction = JSON.parse(JSON.stringify(selectedAction))
|
//var newSelectedAction = JSON.parse(JSON.stringify(selectedAction))
|
||||||
|
var newSelectedAction = selectedAction
|
||||||
newSelectedAction.name = newaction.name;
|
newSelectedAction.name = newaction.name;
|
||||||
newSelectedAction.parameters = JSON.parse(JSON.stringify(newaction.parameters))
|
newSelectedAction.parameters = JSON.parse(JSON.stringify(newaction.parameters))
|
||||||
newSelectedAction.errors = [];
|
newSelectedAction.errors = [];
|
||||||
newSelectedAction.isValid = true;
|
newSelectedAction.isValid = true;
|
||||||
newSelectedAction.is_valid = true;
|
newSelectedAction.is_valid = true;
|
||||||
|
console.log(newSelectedAction)
|
||||||
|
|
||||||
// Simmple action swap autocompleter
|
// Simmple action swap autocompleter
|
||||||
if (selectedAction.parameters !== undefined && newSelectedAction.parameters !== undefined && selectedAction.id === newSelectedAction.id) {
|
if (selectedAction.parameters !== undefined && newSelectedAction.parameters !== undefined && selectedAction.id === newSelectedAction.id) {
|
||||||
@@ -5804,6 +5822,7 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
event.target.value = event.target.value.replaceAll(".", "");
|
event.target.value = event.target.value.replaceAll(".", "");
|
||||||
event.target.value = event.target.value.replaceAll(",", "");
|
event.target.value = event.target.value.replaceAll(",", "");
|
||||||
event.target.value = event.target.value.replaceAll(" ", "_");
|
event.target.value = event.target.value.replaceAll(" ", "_");
|
||||||
|
|
||||||
selectedAction.label = event.target.value;
|
selectedAction.label = event.target.value;
|
||||||
setSelectedAction(selectedAction);
|
setSelectedAction(selectedAction);
|
||||||
};
|
};
|
||||||
@@ -6240,6 +6259,9 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
Autocomplete
|
Autocomplete
|
||||||
</InputLabel>
|
</InputLabel>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
labelId="action-autocompleter"
|
labelId="action-autocompleter"
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
style: {
|
style: {
|
||||||
@@ -7356,6 +7378,9 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
multiple
|
multiple
|
||||||
native
|
native
|
||||||
rows="10"
|
rows="10"
|
||||||
@@ -8830,6 +8855,9 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
<div style={{ marginTop: "20px" }}>
|
<div style={{ marginTop: "20px" }}>
|
||||||
<Typography>Environment</Typography>
|
<Typography>Environment</Typography>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
value={selectedTrigger.environment}
|
value={selectedTrigger.environment}
|
||||||
disabled={selectedTrigger.status === "running"}
|
disabled={selectedTrigger.status === "running"}
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
@@ -9828,6 +9856,9 @@ const AngularWorkflow = (defaultprops) => {
|
|||||||
<div style={{ marginTop: "20px" }}>
|
<div style={{ marginTop: "20px" }}>
|
||||||
<Typography>Environment</Typography>
|
<Typography>Environment</Typography>
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
value={selectedTrigger.environment}
|
value={selectedTrigger.environment}
|
||||||
disabled={selectedTrigger.status === "running"}
|
disabled={selectedTrigger.status === "running"}
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
@@ -13012,6 +13043,9 @@ const parsedExecutionArgument = () => {
|
|||||||
data.schema !== null &&
|
data.schema !== null &&
|
||||||
data.schema.type === "bool" ? (
|
data.schema.type === "bool" ? (
|
||||||
<Select
|
<Select
|
||||||
|
MenuProps={{
|
||||||
|
disableScrollLock: true,
|
||||||
|
}}
|
||||||
SelectDisplayProps={{
|
SelectDisplayProps={{
|
||||||
style: {
|
style: {
|
||||||
marginLeft: 10,
|
marginLeft: 10,
|
||||||
|
|||||||
@@ -871,7 +871,7 @@ func main() {
|
|||||||
|
|
||||||
zombiecounter := 0
|
zombiecounter := 0
|
||||||
req.Header.Add("Content-Type", "application/json")
|
req.Header.Add("Content-Type", "application/json")
|
||||||
req.Header.Add("Org-Id", orgId)
|
req.Header.Add("Org-Id", environment)
|
||||||
log.Printf("[INFO] Waiting for executions at %s with Environment %s", fullUrl, environment)
|
log.Printf("[INFO] Waiting for executions at %s with Environment %s", fullUrl, environment)
|
||||||
hasStarted := false
|
hasStarted := false
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in New Issue
Block a user