Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
75499001
Commit
75499001
authored
Feb 23, 2015
by
Jerome Mariette
Browse files
handle exclusion rules
parent
990f6173
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/jflow/workflow.py
View file @
75499001
...
@@ -256,7 +256,7 @@ class Workflow(threading.Thread):
...
@@ -256,7 +256,7 @@ class Workflow(threading.Thread):
self
.
__setattr__
(
name
,
new_param
)
self
.
__setattr__
(
name
,
new_param
)
def
add_exclusion_rule
(
self
,
*
args2exclude
):
def
add_exclusion_rule
(
self
,
*
args2exclude
):
# first of all,
are
this parameter exist
# first of all,
does
this parameter exist
params2exclude
=
[]
params2exclude
=
[]
for
arg2exclude
in
args2exclude
:
for
arg2exclude
in
args2exclude
:
try
:
try
:
...
@@ -269,20 +269,23 @@ class Workflow(threading.Thread):
...
@@ -269,20 +269,23 @@ class Workflow(threading.Thread):
paramsexclude
.
group
=
new_group
paramsexclude
.
group
=
new_group
# it might be a mutliple param rule
# it might be a mutliple param rule
else
:
else
:
for
attribute_value
in
self
.
__dict__
.
values
():
logging
.
getLogger
(
"wf."
+
str
(
self
.
__class__
.
__name__
)).
exception
(
"Exclusion rule cannot be applied within a MultiParameter or a MultiParameterList"
)
if
issubclass
(
attribute_value
.
__class__
,
MultiParameter
)
or
issubclass
(
attribute_value
.
__class__
,
MultiParameterList
):
raise
params2exclude
=
[]
# save this for MultiParameter internal exclusion rules, works on command line, not supported on gui
for
sub_param
in
attribute_value
.
sub_parameters
:
# for attribute_value in self.__dict__.values():
if
sub_param
.
name
in
args2exclude
:
# if issubclass(attribute_value.__class__, MultiParameter) or issubclass(attribute_value.__class__, MultiParameterList):
params2exclude
.
append
(
sub_param
)
# params2exclude = []
if
len
(
params2exclude
)
==
len
(
args2exclude
):
# for sub_param in attribute_value.sub_parameters:
new_group
=
"exclude-"
+
uuid
.
uuid4
().
hex
[:
5
]
# if sub_param.name in args2exclude:
flags2exclude
=
[]
# params2exclude.append(sub_param)
for
paramsexclude
in
params2exclude
:
# if len(params2exclude) == len(args2exclude):
paramsexclude
.
group
=
new_group
# new_group = "exclude-"+uuid.uuid4().hex[:5]
flags2exclude
.
append
(
paramsexclude
.
flag
)
# flags2exclude = []
attribute_value
.
type
.
excludes
[
new_group
]
=
flags2exclude
# for paramsexclude in params2exclude:
break
# paramsexclude.group = new_group
# flags2exclude.append(paramsexclude.flag)
# attribute_value.type.excludes[new_group] = flags2exclude
# break
def
_prepare_parameter
(
self
,
args
,
parameter
,
key
=
"name"
):
def
_prepare_parameter
(
self
,
args
,
parameter
,
key
=
"name"
):
new_param
=
None
new_param
=
None
...
@@ -339,7 +342,7 @@ class Workflow(threading.Thread):
...
@@ -339,7 +342,7 @@ class Workflow(threading.Thread):
if
param
.
__class__
==
MultiParameter
:
if
param
.
__class__
==
MultiParameter
:
new_param
=
MultiParameter
(
param
.
name
,
param
.
help
,
required
=
param
.
required
,
flag
=
param
.
flag
,
group
=
param
.
group
,
display_name
=
param
.
display_name
)
new_param
=
MultiParameter
(
param
.
name
,
param
.
help
,
required
=
param
.
required
,
flag
=
param
.
flag
,
group
=
param
.
group
,
display_name
=
param
.
display_name
)
new_param
.
sub_parameters
=
param
.
sub_parameters
new_param
.
sub_parameters
=
param
.
sub_parameters
if
args
[
param
.
name
]
:
if
args
.
has_key
(
param
.
name
)
:
sub_args
=
{}
sub_args
=
{}
for
sarg
in
args
[
param
.
name
]:
for
sarg
in
args
[
param
.
name
]:
sub_args
[
sarg
[
0
]]
=
sarg
[
1
]
sub_args
[
sarg
[
0
]]
=
sarg
[
1
]
...
...
src/js/jflow-wfform.js
View file @
75499001
...
@@ -113,30 +113,6 @@ var _isSet = function( $element ) {
...
@@ -113,30 +113,6 @@ var _isSet = function( $element ) {
errorClass
:
"
has-error
"
errorClass
:
"
has-error
"
});
});
jQuery
.
validator
.
addMethod
(
"
exclude_required
"
,
function
(
value
,
element
,
options
)
{
var
validator
=
this
,
selector
=
options
;
var
numberFilled
=
$
(
selector
,
element
.
form
).
filter
(
function
()
{
return
_isSet
(
$
(
this
));
}).
length
;
var
valid
=
false
;
if
(
numberFilled
===
1
)
{
valid
=
true
;
}
/*$(selector).each(function() {
if( !$(this).is(element) ){
if( valid ){
$( "#" + $(this).attr("id") + "-error" ).remove();
validator.settings.unhighlight( $(this), validator.settings.errorClass, validator.settings.validClass );
} else {
validator.settings.highlight( $(this), validator.settings.errorClass, validator.settings.validClass );
validator.showLabel( validator.findByName( $(this).attr("name") )[0], "Please fill one and only one of these fields." );
}
}
});*/
return
valid
;
},
jQuery
.
validator
.
format
(
"
Please fill one and only one of these fields.
"
));
jQuery
.
validator
.
addMethod
(
"
maxfilesize
"
,
function
(
value
,
element
,
params
)
{
jQuery
.
validator
.
addMethod
(
"
maxfilesize
"
,
function
(
value
,
element
,
params
)
{
if
(
params
[
0
]
!=
0
)
{
if
(
params
[
0
]
!=
0
)
{
if
(
$
(
element
).
data
(
"
data2upload
"
).
files
.
length
==
1
)
{
if
(
$
(
element
).
data
(
"
data2upload
"
).
files
.
length
==
1
)
{
...
@@ -386,15 +362,17 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -386,15 +362,17 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
// when serializing, multiple data are repeated, so build a hash to gather values from the same parameter
// when serializing, multiple data are repeated, so build a hash to gather values from the same parameter
$
.
each
(
$
(
'
#workflow_form
'
).
serializeArray
(),
function
(
_
,
kv
)
{
$
.
each
(
$
(
'
#workflow_form
'
).
serializeArray
(),
function
(
_
,
kv
)
{
if
(
hash_param
.
hasOwnProperty
(
kv
.
name
))
{
if
(
!
$
(
'
#
'
+
kv
.
name
).
hasClass
(
"
hidden-exclude
"
))
{
hash_param
[
kv
.
name
].
push
(
kv
.
value
);
if
(
hash_param
.
hasOwnProperty
(
kv
.
name
))
{
}
else
if
(
kv
.
value
!=
""
)
{
//Empty are not sended
hash_param
[
kv
.
name
].
push
(
kv
.
value
);
// if a multiple string, this is a textarea, split by lines
}
else
if
(
kv
.
value
!=
""
)
{
//Empty are not sended
if
(
$
(
"
#
"
+
kv
.
name
).
hasClass
(
"
list
"
))
{
// if a multiple string, this is a textarea, split by lines
hash_param
[
kv
.
name
]
=
$
(
"
#
"
+
kv
.
name
).
val
().
split
(
/
\n
/
);
if
(
$
(
"
#
"
+
kv
.
name
).
hasClass
(
"
list
"
))
{
}
else
{
hash_param
[
kv
.
name
]
=
$
(
"
#
"
+
kv
.
name
).
val
().
split
(
/
\n
/
);
hash_param
[
kv
.
name
]
=
new
Array
(
kv
.
value
);
}
else
{
}
hash_param
[
kv
.
name
]
=
new
Array
(
kv
.
value
);
}
}
}
}
});
});
...
@@ -661,11 +639,12 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -661,11 +639,12 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
}
}
var
id
=
$
(
this
).
attr
(
"
id
"
).
split
(
"
date_
"
)[
1
];
var
id
=
$
(
this
).
attr
(
"
id
"
).
split
(
"
date_
"
)[
1
];
$
(
"
#
"
+
id
).
focusout
();
$
(
"
#
"
+
id
).
focusout
();
});
});
// for exclude-required first check if there is no exclusion group with a required option
// for exclude-required first check if there is no exclusion group with a required option
var
excludereq
=
new
Array
(),
var
excludereq
=
new
Array
(),
params_per_name
=
{};
params_per_name
=
{},
params_per_group
=
{};
for
(
var
i
in
$this
.
workflow
.
parameters
)
{
for
(
var
i
in
$this
.
workflow
.
parameters
)
{
if
(
$this
.
workflow
.
parameters
[
i
].
group
.
indexOf
(
"
exclude-
"
)
!=
-
1
&&
$this
.
workflow
.
parameters
[
i
].
required
)
{
if
(
$this
.
workflow
.
parameters
[
i
].
group
.
indexOf
(
"
exclude-
"
)
!=
-
1
&&
$this
.
workflow
.
parameters
[
i
].
required
)
{
if
(
excludereq
.
indexOf
(
$this
.
workflow
.
parameters
[
i
].
group
)
==
-
1
)
{
if
(
excludereq
.
indexOf
(
$this
.
workflow
.
parameters
[
i
].
group
)
==
-
1
)
{
...
@@ -673,6 +652,10 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -673,6 +652,10 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
}
}
}
}
params_per_name
[
$this
.
workflow
.
parameters
[
i
].
name
]
=
$this
.
workflow
.
parameters
[
i
];
params_per_name
[
$this
.
workflow
.
parameters
[
i
].
name
]
=
$this
.
workflow
.
parameters
[
i
];
if
(
!
params_per_group
.
hasOwnProperty
(
$this
.
workflow
.
parameters
[
i
].
group
)
){
params_per_group
[
$this
.
workflow
.
parameters
[
i
].
group
]
=
new
Array
();
}
params_per_group
[
$this
.
workflow
.
parameters
[
i
].
group
].
push
(
$this
.
workflow
.
parameters
[
i
].
name
);
}
}
for
(
var
i
in
$this
.
workflow
.
parameters
)
{
for
(
var
i
in
$this
.
workflow
.
parameters
)
{
// if it's a multiple parameter add its sub parameters as rules
// if it's a multiple parameter add its sub parameters as rules
...
@@ -684,9 +667,49 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -684,9 +667,49 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
rules
[
$this
.
workflow
.
parameters
[
i
].
name
]
=
$this
.
_getParameterRule
(
$this
.
workflow
.
parameters
[
i
],
$this
.
options
.
serverURL
,
excludereq
);
rules
[
$this
.
workflow
.
parameters
[
i
].
name
]
=
$this
.
_getParameterRule
(
$this
.
workflow
.
parameters
[
i
],
$this
.
options
.
serverURL
,
excludereq
);
}
}
}
}
$
(
"
#workflow_form
"
).
validate
({
rules
:
rules
});
$
(
"
#workflow_form
"
).
validate
({
rules
:
rules
});
$
(
"
[id^=prev_btn_]
"
).
click
(
function
()
{
var
group
=
$
(
this
).
attr
(
"
id
"
).
split
(
"
prev_btn_
"
)[
1
],
current_param
=
$
(
'
.
'
+
group
+
'
:visible
'
),
param_name
=
current_param
.
attr
(
"
id
"
).
split
(
"
content_
"
)[
1
],
idx_param
=
params_per_group
[
group
].
indexOf
(
param_name
),
prev_idx
=
null
;
// Change content
current_param
.
addClass
(
"
hidden hidden-exclude
"
);
if
(
idx_param
==
0
)
{
prev_idx
=
params_per_group
[
group
].
length
-
1
;
}
else
{
prev_idx
=
idx_param
-
1
;
}
$
(
'
#content_
'
+
params_per_group
[
group
][
prev_idx
]).
removeClass
(
"
hidden hidden-exclude
"
);
// Change label
$
(
'
#label_
'
+
group
).
html
(
params_per_name
[
params_per_group
[
group
][
prev_idx
]].
display_name
);
});
$
(
"
[id^=next_btn_]
"
).
click
(
function
()
{
var
group
=
$
(
this
).
attr
(
"
id
"
).
split
(
"
next_btn_
"
)[
1
],
current_param
=
$
(
'
.
'
+
group
+
'
:visible
'
),
param_name
=
current_param
.
attr
(
"
id
"
).
split
(
"
content_
"
)[
1
],
idx_param
=
params_per_group
[
group
].
indexOf
(
param_name
),
next_idx
=
null
;
// Change content
current_param
.
addClass
(
"
hidden hidden-exclude
"
);
if
(
idx_param
==
params_per_group
[
group
].
length
-
1
)
{
next_idx
=
0
;
}
else
{
next_idx
=
idx_param
+
1
;
}
$
(
'
#content_
'
+
params_per_group
[
group
][
next_idx
]).
removeClass
(
"
hidden hidden-exclude
"
);
// Change label
$
(
'
#label_
'
+
group
).
html
(
params_per_name
[
params_per_group
[
group
][
next_idx
]].
display_name
);
});
// for multiple and append values, use the handsontable
// for multiple and append values, use the handsontable
$
(
"
[id^=handsontable_]
"
).
each
(
function
(){
$
(
"
[id^=handsontable_]
"
).
each
(
function
(){
var
id_parts
=
$
(
this
).
attr
(
"
id
"
).
split
(
"
handsontable_
"
),
var
id_parts
=
$
(
this
).
attr
(
"
id
"
).
split
(
"
handsontable_
"
),
...
@@ -946,9 +969,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -946,9 +969,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
}
}
};
};
}
}
if
(
excludereq
.
indexOf
(
param
.
group
)
!=
-
1
)
{
if
(
excludereq
.
indexOf
(
param
.
group
)
!=
-
1
)
{
crule
[
"
exclude_required
"
]
=
"
.
"
+
param
.
group
;
crule
[
"
required
"
]
=
true
;
crule
[
"
required
"
]
=
false
;
}
else
if
(
param
.
group
.
indexOf
(
"
exclude-
"
)
==
-
1
)
{
}
else
if
(
param
.
group
.
indexOf
(
"
exclude-
"
)
==
-
1
)
{
crule
[
"
required
"
]
=
param
.
required
;
crule
[
"
required
"
]
=
param
.
required
;
}
}
...
@@ -1021,7 +1044,7 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1021,7 +1044,7 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
'
{{else}}
'
,
'
{{else}}
'
,
'
<div id="date_${param.name}" class="input-group date" data-date="${param.default}" data-date-format="${param.format}">
'
,
'
<div id="date_${param.name}" class="input-group date" data-date="${param.default}" data-date-format="${param.format}">
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
<input id="${param.name}" name="${param.name}" class="form-control
${param.group}
" type="text" value="${param.default}">
'
,
'
<input id="${param.name}" name="${param.name}" class="form-control" type="text" value="${param.default}">
'
,
'
<span class="input-group-btn">
'
,
'
<span class="input-group-btn">
'
,
'
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-calendar"></span> </button>
'
,
'
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-calendar"></span> </button>
'
,
'
</span>
'
,
'
</span>
'
,
...
@@ -1031,9 +1054,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1031,9 +1054,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
choiceTemplate
:
[
choiceTemplate
:
[
'
<div>
'
,
'
<div>
'
,
'
{{if param.action == "append"}}
'
,
// if it's a multiple choice parameter, add a multiple select
'
{{if param.action == "append"}}
'
,
// if it's a multiple choice parameter, add a multiple select
'
<select id="${param.name}" multiple name="${param.name}" class="form-control
${param.group}
list">
'
,
'
<select id="${param.name}" multiple name="${param.name}" class="form-control list">
'
,
'
{{else}}
'
,
// if it's a single choice parameter, add a simple select
'
{{else}}
'
,
// if it's a single choice parameter, add a simple select
'
<select id="${param.name}" name="${param.name}" class="form-control
${param.group}
">
'
,
'
<select id="${param.name}" name="${param.name}" class="form-control">
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
{{if param.default != null}}
'
,
'
{{if param.default != null}}
'
,
'
<option></option>
'
,
'
<option></option>
'
,
...
@@ -1072,9 +1095,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1072,9 +1095,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
'
</ul>
'
,
'
</ul>
'
,
'
</div>
'
,
'
</div>
'
,
'
{{if param.action == "append"}}
'
,
'
{{if param.action == "append"}}
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" class="list form-control
${param.group}
">${param.default.join("
\n
")}</textarea>
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" class="list form-control">${param.default.join("
\n
")}</textarea>
'
,
'
{{else}}
'
,
'
{{else}}
'
,
'
<input id="${param.name}" name="${param.name}" class="form-control
${param.group}
" type="text" value="${param.default}">
'
,
'
<input id="${param.name}" name="${param.name}" class="form-control" type="text" value="${param.default}">
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
<span class="input-group-btn">
'
,
'
<span class="input-group-btn">
'
,
// ' {{if param.action == "append"}}',
// ' {{if param.action == "append"}}',
...
@@ -1090,9 +1113,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1090,9 +1113,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
'
<div>
'
,
'
<div>
'
,
'
<div class="input-group">
'
,
'
<div class="input-group">
'
,
'
{{if param.action == "append"}}
'
,
'
{{if param.action == "append"}}
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" readonly="readonly" class="list form-control
${param.group}
">${param.default.join("
\n
")}</textarea>
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" readonly="readonly" class="list form-control">${param.default.join("
\n
")}</textarea>
'
,
'
{{else}}
'
,
'
{{else}}
'
,
'
<input id="${param.name}" name="${param.name}" class="form-control
${param.group}
" type="text" value="${param.default}" readonly="readonly">
'
,
'
<input id="${param.name}" name="${param.name}" class="form-control" type="text" value="${param.default}" readonly="readonly">
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
<span class="input-group-btn">
'
,
'
<span class="input-group-btn">
'
,
'
<button id="urlfile_btn_${param.name}" class="btn btn-default" type="button"><span class="glyphicon glyphicon-folder-open"></span> </button>
'
,
'
<button id="urlfile_btn_${param.name}" class="btn btn-default" type="button"><span class="glyphicon glyphicon-folder-open"></span> </button>
'
,
...
@@ -1102,7 +1125,7 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1102,7 +1125,7 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
].
join
(
'
\n
'
),
].
join
(
'
\n
'
),
regexpfilesTemplate
:
[
regexpfilesTemplate
:
[
'
<div>
'
,
'
<div>
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" class="list form-control
${param.group}
">${param.default.join("
\n
")}</textarea>
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" class="list form-control">${param.default.join("
\n
")}</textarea>
'
,
'
</div>
'
'
</div>
'
].
join
(
'
\n
'
),
].
join
(
'
\n
'
),
booleanTemplate
:
[
booleanTemplate
:
[
...
@@ -1110,9 +1133,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1110,9 +1133,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
// ' <div class="checkbox-inline">',
// ' <div class="checkbox-inline">',
// ' <label>',
// ' <label>',
'
{{if param.default == true}}
'
,
'
{{if param.default == true}}
'
,
'
<input id="${param.name}" name="${param.name}"
class="${param.group}"
value="${param.default}" type="checkbox" checked> ${check_title}
'
,
'
<input id="${param.name}" name="${param.name}" value="${param.default}" type="checkbox" checked> ${check_title}
'
,
'
{{else}}
'
,
'
{{else}}
'
,
'
<input id="${param.name}" name="${param.name}"
class="${param.group}"
value="${param.default}" type="checkbox"> ${check_title}
'
,
'
<input id="${param.name}" name="${param.name}" value="${param.default}" type="checkbox"> ${check_title}
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
// ' </label>',
// ' </label>',
// ' </div>',
// ' </div>',
...
@@ -1121,9 +1144,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1121,9 +1144,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
textTemplate
:
[
textTemplate
:
[
'
<div>
'
,
'
<div>
'
,
'
{{if param.action == "append"}}
'
,
'
{{if param.action == "append"}}
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" class="list form-control
${param.group}
">${param.default.join("
\n
")}</textarea>
'
,
'
<textarea id="${param.name}" style="resize:none" name="${param.name}" class="list form-control">${param.default.join("
\n
")}</textarea>
'
,
'
{{else}}
'
,
'
{{else}}
'
,
'
<input id="${param.name}" name="${param.name}" value="${param.default}" class="form-control
${param.group}
" type="text">
'
,
'
<input id="${param.name}" name="${param.name}" value="${param.default}" class="form-control" type="text">
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
</div>
'
'
</div>
'
].
join
(
'
\n
'
),
].
join
(
'
\n
'
),
...
@@ -1137,44 +1160,62 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
...
@@ -1137,44 +1160,62 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
'
{{each(index, param) workflow.parameters_per_groups[group]}}
'
,
'
{{each(index, param) workflow.parameters_per_groups[group]}}
'
,
// it the parameter has not already been settled
// it the parameter has not already been settled
'
{{if Object.keys(parameters).indexOf(param.name) == -1 }}
'
,
'
{{if Object.keys(parameters).indexOf(param.name) == -1 }}
'
,
// if this is an exclusion group, only display one label and make only one structure
'
{{if (group.indexOf("exclude-") == 0 && index ==0) || group.indexOf("exclude-") != 0}}
'
,
'
<div class="form-group param-field">
'
,
'
<div class="form-group param-field">
'
,
'
<label class="col-sm-2 control-label" for="${param.name}">${param.display_name}</label>
'
,
'
<label id="label_${param.group}" class="col-sm-2 control-label" for="${param.name}">${param.display_name}</label>
'
,
'
{{/if}}
'
,
'
{{if group.indexOf("exclude-") == 0 }}
'
,
'
<div id="content_${param.name}" class="col-sm-9 ${param.group}{{if index != 0}} hidden hidden-exclude{{/if}}">
'
,
'
{{else}}
'
,
'
<div class="col-sm-10">
'
,
'
{{/if}}
'
,
// if it's a multiple type
// if it's a multiple type
'
{{if param.type == "MultipleParameters"}}
'
,
'
{{if param.type == "MultipleParameters"}}
'
,
'
<div class="col-sm-10">
'
,
'
<blockquote style="font-size:14px;">
'
,
'
<blockquote style="font-size:14px;">
'
,
'
{{if param.action == "MiltipleAppendAction"}}
'
,
// if it's an append and multiple type
'
{{if param.action == "MiltipleAppendAction"}}
'
,
// if it's an append and multiple type
'
<div id="handsontable_${param.name}" > </div>
'
,
'
<div id="handsontable_${param.name}" > </div>
'
,
'
<span id="error_handsontable_${param.name}" class="help-block" for="read_2"></span>
'
,
'
<span id="error_handsontable_${param.name}" class="help-block" for="read_2"></span>
'
,
'
<span id="help_handsontable_${param.name}" class="help-block">${param.help}</span>
'
,
'
<span id="help_handsontable_${param.name}" class="help-block">${param.help}</span>
'
,
'
{{else}}
'
,
// if it's a single and multiple type
'
{{else}}
'
,
// if it's a single and multiple type
'
{{each(spindex, sub_param) param.sub_parameters}}
'
,
'
{{each(spindex, sub_param) param.sub_parameters}}
'
,
'
<div class="param-field">
'
,
'
<div class="param-field">
'
,
'
{{if sub_param.type == "bool"}}
'
,
'
{{if sub_param.type == "bool"}}
'
,
'
{{html getParameterDisplay(templates, getTplName(sub_param), sub_param, sub_param.display_name)}}
'
,
'
{{html getParameterDisplay(templates, getTplName(sub_param), sub_param, sub_param.display_name)}}
'
,
'
{{else}}
'
,
'
{{else}}
'
,
'
<div class="input-group">
'
,
'
<div class="input-group">
'
,
'
<span class="input-group-addon">${sub_param.display_name}</span>
'
,
'
<span class="input-group-addon">${sub_param.display_name}</span>
'
,
'
{{html getParameterDisplay(templates, getTplName(sub_param), sub_param)}}
'
,
'
{{html getParameterDisplay(templates, getTplName(sub_param), sub_param)}}
'
,
'
</div>
'
,
'
</div>
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
<span class="help-block">${sub_param.help}</span> <br />
'
,
'
<span class="help-block">${sub_param.help}</span> <br />
'
,
'
</div>
'
,
'
</div>
'
,
'
{{/each}}
'
,
'
{{/each}}
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
</blockquote>
'
,
'
</blockquote>
'
,
// if it's a single type
'
</div>
'
,
// if it's a std type
'
{{else}}
'
,
'
{{else}}
'
,
'
<div class="col-sm-10">
'
,
'
{{html getParameterDisplay(templates, getTplName(param), param)}}
'
,
'
{{html getParameterDisplay(templates, getTplName(param), param)}}
'
,
'
<span class="help-block">${param.help}</span>
'
,
'
<span class="help-block">${param.help}</span>
'
,
'
{{/if}}
'
,
'
</div>
'
,
'
{{if group.indexOf("exclude-") == 0 && index == workflow.parameters_per_groups[group].length-1 }}
'
,
'
{{if group.indexOf("exclude-") == 0 }}
'
,
'
<div class="col-sm-1">
'
,
'
<span class="input-group-btn btn-group-xs">
'
,
'
<button id="prev_btn_${param.group}" class="btn btn-default" type="button"><span class="glyphicon glyphicon-chevron-left"></span> </button>
'
,
'
<button id="next_btn_${param.group}" class="btn btn-default" type="button"><span class="glyphicon glyphicon-chevron-right"></span> </button>
'
,
'
</span>
'
,
'
</div>
'
,
'
</div>
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
</div>
'
,
'
</div>
'
,
'
{{else group.indexOf("exclude-") != 0}}
'
,
'
</div>
'
,
'
{{/if}}
'
,
'
{{else}}
'
,
'
{{else}}
'
,
// if the param is already settled, hide it
// if the param is already settled, hide it
'
<input id="${param.name}" name="${param.name}"
class="${param.group}"
value="${parameters[param.name]}" type="hidden">
'
,
'
<input id="${param.name}" name="${param.name}" value="${parameters[param.name]}" type="hidden">
'
,
'
{{/if}}
'
,
'
{{/if}}
'
,
'
{{/each}}
'
,
'
{{/each}}
'
,
'
</fieldset>
'
,
'
</fieldset>
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment