Skip to content
Snippets Groups Projects
Commit cd8545cb authored by stevereis's avatar stevereis
Browse files

fix: Algorithm parameter value type is now string

parent 46aa7d12
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ const algoParamInputToData = (param: AlgorithmParamInput) => { ...@@ -74,7 +74,7 @@ const algoParamInputToData = (param: AlgorithmParamInput) => {
return { return {
name: param.id, name: param.id,
label: param.id, label: param.id,
value: param.value.join(','), value: param.value,
}; };
}; };
......
...@@ -33,7 +33,7 @@ export const transformToExperiment = jsonata(` ...@@ -33,7 +33,7 @@ export const transformToExperiment = jsonata(`
$params := ["y", "pathology", "dataset", "filter", "x"]; $params := ["y", "pathology", "dataset", "filter", "x"];
$toArray := function($x) { $type($x) = 'array' ? $x : [$x]}; $toArray := function($x) { $type($x) = 'array' ? $x : [$x]};
$convDate := function($v) { $type($v) = 'string' ? $toMillis($v) : $v }; $convDate := function($v) { $type($v) = 'string' ? $toMillis($v) : $v };
{ {
...@@ -57,7 +57,7 @@ export const transformToExperiment = jsonata(` ...@@ -57,7 +57,7 @@ export const transformToExperiment = jsonata(`
algorithm.parameters[$not(name in $params)].({ algorithm.parameters[$not(name in $params)].({
"id": name, "id": name,
"label": label, "label": label,
"value": $split(value, ',') "value": value
}) })
) )
} }
......
...@@ -5,8 +5,8 @@ export class AlgorithmParameter { ...@@ -5,8 +5,8 @@ export class AlgorithmParameter {
@Field() @Field()
id: string; id: string;
@Field(() => [String], { nullable: true }) @Field({ nullable: true })
value?: string[]; value?: string;
@Field({ nullable: true }) @Field({ nullable: true })
label?: string; label?: string;
......
...@@ -20,6 +20,6 @@ export class AlgorithmParamInput { ...@@ -20,6 +20,6 @@ export class AlgorithmParamInput {
}) })
type?: ParamType; type?: ParamType;
@Field(() => [String]) @Field(() => String)
value: string[]; value: string;
} }
...@@ -44,7 +44,7 @@ type Domain { ...@@ -44,7 +44,7 @@ type Domain {
type AlgorithmParameter { type AlgorithmParameter {
id: String! id: String!
value: [String!] value: String
label: String label: String
description: String description: String
defaultValue: String defaultValue: String
...@@ -233,7 +233,7 @@ input AlgorithmInput { ...@@ -233,7 +233,7 @@ input AlgorithmInput {
input AlgorithmParamInput { input AlgorithmParamInput {
id: String! id: String!
type: ParamType = STRING type: ParamType = STRING
value: [String!]! value: String!
} }
enum ParamType { enum ParamType {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment