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:
@@ -121,7 +121,10 @@ const AuthenticationOauth2 = (props) => {
|
||||
var resources = "";
|
||||
if (scopes !== undefined && (scopes !== null) & (scopes.length > 0)) {
|
||||
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(" ");
|
||||
|
||||
@@ -1591,6 +1591,9 @@ const ParsedAction = (props) => {
|
||||
|
||||
datafield = (
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
SelectDisplayProps={{
|
||||
style: {
|
||||
marginLeft: 10,
|
||||
@@ -2091,6 +2094,9 @@ const ParsedAction = (props) => {
|
||||
Autocomplete
|
||||
</InputLabel>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
labelId="action-autocompleter"
|
||||
SelectDisplayProps={{
|
||||
style: {
|
||||
@@ -2388,6 +2394,9 @@ const ParsedAction = (props) => {
|
||||
selectedApp.versions !== undefined &&
|
||||
selectedApp.versions.length > 1 ? (
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
defaultValue={selectedAction.app_version}
|
||||
onChange={(event) => {
|
||||
console.log("VAL: ", event.target.value)
|
||||
@@ -2466,6 +2475,7 @@ const ParsedAction = (props) => {
|
||||
if (param.value.includes(baselabel)) {
|
||||
//if (param.value.toLowerCase().includes(baselabel)) {
|
||||
console.log("FOUND: ", param);
|
||||
|
||||
workflow.actions[key].parameters[subkey].value.replaceAll(
|
||||
baselabel,
|
||||
e.target.value
|
||||
@@ -2555,6 +2565,9 @@ const ParsedAction = (props) => {
|
||||
<Typography>Authentication</Typography>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
labelId="select-app-auth"
|
||||
value={
|
||||
Object.getOwnPropertyNames(
|
||||
@@ -2657,6 +2670,9 @@ const ParsedAction = (props) => {
|
||||
<div style={{ marginTop: "20px" }}>
|
||||
<Typography>Environment</Typography>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
value={
|
||||
selectedActionEnvironment === undefined ||
|
||||
selectedActionEnvironment.Name === undefined
|
||||
@@ -2711,6 +2727,9 @@ const ParsedAction = (props) => {
|
||||
<div style={{ marginTop: "20px" }}>
|
||||
<Typography>Set execution variable (optional)</Typography>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
value={
|
||||
selectedAction.execution_variable !== undefined
|
||||
? selectedAction.execution_variable.name
|
||||
@@ -2903,6 +2922,9 @@ const ParsedAction = (props) => {
|
||||
|
||||
{/*setNewSelectedAction !== undefined ?
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
value={selectedAction.name}
|
||||
fullWidth
|
||||
onChange={setNewSelectedAction}
|
||||
|
||||
@@ -1477,6 +1477,22 @@ const AngularWorkflow = (defaultprops) => {
|
||||
return response.json();
|
||||
})
|
||||
.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) {
|
||||
return
|
||||
}
|
||||
@@ -5657,12 +5673,14 @@ const AngularWorkflow = (defaultprops) => {
|
||||
}
|
||||
|
||||
// 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.parameters = JSON.parse(JSON.stringify(newaction.parameters))
|
||||
newSelectedAction.errors = [];
|
||||
newSelectedAction.isValid = true;
|
||||
newSelectedAction.is_valid = true;
|
||||
console.log(newSelectedAction)
|
||||
|
||||
// Simmple action swap autocompleter
|
||||
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(" ", "_");
|
||||
|
||||
selectedAction.label = event.target.value;
|
||||
setSelectedAction(selectedAction);
|
||||
};
|
||||
@@ -6240,6 +6259,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
Autocomplete
|
||||
</InputLabel>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
labelId="action-autocompleter"
|
||||
SelectDisplayProps={{
|
||||
style: {
|
||||
@@ -7356,6 +7378,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
</div>
|
||||
</div>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
multiple
|
||||
native
|
||||
rows="10"
|
||||
@@ -8830,6 +8855,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<div style={{ marginTop: "20px" }}>
|
||||
<Typography>Environment</Typography>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
value={selectedTrigger.environment}
|
||||
disabled={selectedTrigger.status === "running"}
|
||||
SelectDisplayProps={{
|
||||
@@ -9828,6 +9856,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
<div style={{ marginTop: "20px" }}>
|
||||
<Typography>Environment</Typography>
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
value={selectedTrigger.environment}
|
||||
disabled={selectedTrigger.status === "running"}
|
||||
SelectDisplayProps={{
|
||||
@@ -13012,6 +13043,9 @@ const parsedExecutionArgument = () => {
|
||||
data.schema !== null &&
|
||||
data.schema.type === "bool" ? (
|
||||
<Select
|
||||
MenuProps={{
|
||||
disableScrollLock: true,
|
||||
}}
|
||||
SelectDisplayProps={{
|
||||
style: {
|
||||
marginLeft: 10,
|
||||
|
||||
Reference in New Issue
Block a user