Skip to content

Commit

Permalink
Merge branch 'main' into release-please--branches--main--components--…
Browse files Browse the repository at this point in the history
…kurtosis
  • Loading branch information
adschwartz authored Sep 26, 2023
2 parents 4058668 + 5cfea2a commit 688f69d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 27 deletions.
2 changes: 1 addition & 1 deletion engine/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 38 additions & 26 deletions engine/frontend/src/component/PackageCatalogForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,32 +165,36 @@ const renderArgs = (args, handleChange, formData, errorData) => {
return args.map((arg, index) => {

// no need to process plan arg as it's internal!
if (arg["name"] === "plan") {
if (getArgName(arg)) {
return
}

let dataType = "";
switch (arg["typeV2"]["topLevelType"]) {
case "INTEGER":
dataType = "INTEGER"
break;
case "STRING":
dataType = "STRING"
break
case "BOOL":
dataType = "BOOL"
break
case "FLOAT":
dataType = "FLOAT"
break
case "DICT":
dataType = "DICT"
break
case "LIST":
dataType = "LIST"
break
default:
dataType = "JSON"
let dataType = "STRING";
try {
switch (getType(arg)) {
case "INTEGER":
dataType = "INTEGER"
break;
case "STRING":
dataType = "STRING"
break
case "BOOL":
dataType = "BOOL"
break
case "FLOAT":
dataType = "FLOAT"
break
case "DICT":
dataType = "DICT"
break
case "LIST":
dataType = "LIST"
break
default:
dataType = "JSON"
}
} catch (e) {
console.log("no data type provided, falling back to string")
}

return (
Expand Down Expand Up @@ -465,7 +469,11 @@ const PackageCatalogForm = ({createEnclave}) => {

Object.keys(formData).filter(key => {
const arg = kurtosisPackage.args[key]
const type = getType(arg)
let type = ""
try {
type = getType(arg)
} catch {
}
const required = isRequired(arg)

// if it's optional and empty it's fine
Expand Down Expand Up @@ -527,7 +535,11 @@ const PackageCatalogForm = ({createEnclave}) => {
Object.keys(formData).map(key => {
const arg = kurtosisPackage.args[key]
const argName = getArgName(arg)
const type = getType(arg)
let type = ""
try {
type = getType(arg)
} catch {
}
const value = formData[key]

let val;
Expand Down Expand Up @@ -561,7 +573,7 @@ const PackageCatalogForm = ({createEnclave}) => {
}

handleCreateEnclave(runKurtosisPackageArgs, enclaveName, productionMode)

} else {
const newErrorData = {
...errorData,
Expand Down

0 comments on commit 688f69d

Please sign in to comment.