Maintenance - Mise à jour mensuelle Lundi 1 Juin 2020 entre 7h00 et 9h00

Commit 4811a740 authored by Penom Nom's avatar Penom Nom

jflow update

parent b336757c
......@@ -256,7 +256,7 @@ class Workflow(threading.Thread):
self.__setattr__(name, new_param)
def add_exclusion_rule(self, *args2exclude):
# first of all, are this parameter exist
# first of all, does this parameter exist
params2exclude = []
for arg2exclude in args2exclude:
try:
......@@ -269,20 +269,23 @@ class Workflow(threading.Thread):
paramsexclude.group = new_group
# it might be a mutliple param rule
else:
for attribute_value in self.__dict__.values():
if issubclass(attribute_value.__class__, MultiParameter) or issubclass(attribute_value.__class__, MultiParameterList):
params2exclude = []
for sub_param in attribute_value.sub_parameters:
if sub_param.name in args2exclude:
params2exclude.append(sub_param)
if len(params2exclude) == len(args2exclude):
new_group = "exclude-"+uuid.uuid4().hex[:5]
flags2exclude = []
for paramsexclude in params2exclude:
paramsexclude.group = new_group
flags2exclude.append(paramsexclude.flag)
attribute_value.type.excludes[new_group] = flags2exclude
break
logging.getLogger("wf." + str(self.__class__.__name__)).exception("Exclusion rule cannot be applied within a MultiParameter or a MultiParameterList")
raise
# save this for MultiParameter internal exclusion rules, works on command line, not supported on gui
# for attribute_value in self.__dict__.values():
# if issubclass(attribute_value.__class__, MultiParameter) or issubclass(attribute_value.__class__, MultiParameterList):
# params2exclude = []
# for sub_param in attribute_value.sub_parameters:
# if sub_param.name in args2exclude:
# params2exclude.append(sub_param)
# if len(params2exclude) == len(args2exclude):
# new_group = "exclude-"+uuid.uuid4().hex[:5]
# flags2exclude = []
# for paramsexclude in params2exclude:
# paramsexclude.group = new_group
# flags2exclude.append(paramsexclude.flag)
# attribute_value.type.excludes[new_group] = flags2exclude
# break
def _prepare_parameter(self, args, parameter, key="name"):
new_param = None
......@@ -339,7 +342,7 @@ class Workflow(threading.Thread):
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.sub_parameters = param.sub_parameters
if args[param.name]:
if args.has_key(param.name):
sub_args = {}
for sarg in args[param.name]:
sub_args[sarg[0]] = sarg[1]
......@@ -536,8 +539,11 @@ class Workflow(threading.Thread):
error["title"] = lines[line_idx].rstrip()
error["msg"] = list()
error["traceback"] = list()
line_idx += 2 # skip : "Traceback (most recent call last):"
# Traceback
# skip all lines before the traceback
while not lines[line_idx].startswith("Traceback"):
line_idx += 1
# skip : "Traceback (most recent call last):"
line_idx += 1
while lines[line_idx] != lines[line_idx].lstrip():
error["traceback"].append({
"location" : lines[line_idx].strip(),
......@@ -546,7 +552,10 @@ class Workflow(threading.Thread):
line_idx += 2
# Error message
while line_idx < len(lines) and not lines[line_idx].strip().startswith("##"):
error["msg"].append( lines[line_idx].strip().split(":", 1)[1][1:] )
try:
error["msg"].append( lines[line_idx].strip().split(":", 1)[1][1:] )
except:
error["msg"].append( lines[line_idx].strip() )
line_idx += 1
line_idx -= 1
line_idx += 1
......
......@@ -15,11 +15,11 @@ import functools
import glob
import os
try:
from MySQLdb import connect as MySQLConnect
from MySQLdb.cursors import SSDictCursor as MySQLSSDictCursor
except ImportError as e:
warn(D_DATASET, 'Unable to import MySQL: {0}'.format(e))
# try:
# from MySQLdb import connect as MySQLConnect
# from MySQLdb.cursors import SSDictCursor as MySQLSSDictCursor
# except ImportError as e:
# warn(D_DATASET, 'Unable to import MySQL: {0}'.format(e))
# Base Dataset class
......
18,22c18,22
< # try:
< # from MySQLdb import connect as MySQLConnect
< # from MySQLdb.cursors import SSDictCursor as MySQLSSDictCursor
< # except ImportError as e:
< # warn(D_DATASET, 'Unable to import MySQL: {0}'.format(e))
---
> try:
> from MySQLdb import connect as MySQLConnect
> from MySQLdb.cursors import SSDictCursor as MySQLSSDictCursor
> except ImportError as e:
> warn(D_DATASET, 'Unable to import MySQL: {0}'.format(e))
......@@ -40,6 +40,7 @@
.ui-cytoscape-panzoom-reset {
top: 55px;
padding-top: 2px;
}
.ui-cytoscape-panzoom-zoom-in {
......@@ -143,7 +144,7 @@
}
.ui-cytoscape-panzoom-slider-handle .icon {
margin: 0 4px;
margin: -1px 4px 1px 4px;
line-height: 10px;
}
......@@ -183,5 +184,23 @@
z-index: 999;
}
.fa {
font-family: courier;
display: inline-block;
font-style: normal;
font-weight: bold;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 15px;
margin-top: -2px;
}
.fa-expand:before {
content: "o";
}
.fa-plus:before {
content: "+";
}
.fa-minus:before {
content: "-";
}
\ No newline at end of file
......@@ -81,7 +81,7 @@
$.tmpl($this.options.template, {workflows: workflows_sorted}).appendTo($this.$element);
$("[id^=activewf_btn_]").click(function(){
var workflow_id = $(this).attr("id").split("activewf_btn_")[1];
$this.$element.trigger('select.active', workflow_by_id[workflow_id]);
$this.$element.trigger('select.activewf', workflow_by_id[workflow_id]);
});
$("[id^=activewf_refresh_]").click(function(){
$this.reload();
......
......@@ -67,7 +67,7 @@
$.tmpl($this.options.template, {workflows: data, filters: $this.options.filters}).appendTo($this.$element);
$("[id^=availablewf_btn_]").click(function(){
var workflow_class = $(this).attr("id").split("availablewf_btn_")[1];
$this.$element.trigger('select.available', workflow_by_class[workflow_class]);
$this.$element.trigger('select.availablewf', workflow_by_class[workflow_class]);
});
}
});
......
This diff is collapsed.
......@@ -1820,7 +1820,7 @@ function addRunHandler() {
filters:["AddAnalysis", "AddProject", "AddFiles"],
serverURL: $("#server_url").val()
});
$('#availableWorkflows').on('select.available', function(event, workflow) {
$('#availableWorkflows').on('select.availablewf', function(event, workflow) {
$("#myCarousel").carousel('next');
$("#myCarousel").carousel('pause');
$("#reset_workflow, #run_workflow, #back_to_workflows_list").show();
......@@ -1845,7 +1845,7 @@ function addRunHandler() {
serverURL: $("#server_url").val()
});
});
$('#wfForm').on('run', function(event, running_wf) {
$('#wfForm').on('run.wfform', function(event, running_wf) {
$("#reset_workflow, #run_workflow, #back_to_workflows_list").hide();
$("#refresh_workflow, #rerun_workflow").show();
$("#myCarousel").carousel('next');
......@@ -1884,7 +1884,7 @@ function addProjectHandler(){
$("#reset_workflow, #run_workflow").hide();
$("#close").show();
$('#setAndRunModalBody').on("loaded", function(event, workflow) {
$('#setAndRunModalBody').on("loaded.wfform", function(event, workflow) {
$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
$("#reset_workflow, #run_workflow").show();
$("#close").hide();
......@@ -1896,7 +1896,7 @@ function addProjectHandler(){
parameters: {"admin_login": $("#user_login").val()},
serverURL: $("#server_url").val()
});
$('#setAndRunModalBody').on('run', function(event, running_wf) {
$('#setAndRunModalBody').on('run.wfform', function(event, running_wf) {
$.ajax({
url: 'index.php?eID=tx_nG6&type=projects_table&user_id='+$("#user_id").val()+'&login_user='+$("#login_user").val()+'&page_id='+page_id,
dataType: "html",
......@@ -2028,7 +2028,7 @@ function addFileHandler( event ){
parameters["admin_login"] = $("#user_login").val();
$("#close").show();
$('#wfForm').on("loaded", function(event, workflow) {
$('#wfForm').on("loaded.wfform", function(event, workflow) {
$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
$("#reset_workflow, #run_workflow").show();
$("#close").hide();
......@@ -2042,7 +2042,7 @@ function addFileHandler( event ){
serverURL: $("#server_url").val()
});
$('#wfForm').on('run', function(event, running_wf) {
$('#wfForm').on('run.wfform', function(event, running_wf) {
$("#reset_workflow, #run_workflow").hide();
$("#refresh_workflow, #rerun_workflow").show();
$("#myCarousel").carousel('next');
......@@ -2110,7 +2110,7 @@ function addAnalysisHandler(){
}
parameters["admin_login"] = $("#user_login").val();
$('#wfForm').on("loaded", function(event, workflow) {
$('#wfForm').on("loaded.wfform", function(event, workflow) {
$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
$("#reset_workflow, #run_workflow").show();
$("#close").hide();
......@@ -2124,7 +2124,7 @@ function addAnalysisHandler(){
serverURL: $("#server_url").val()
});
$('#wfForm').on('run', function(event, running_wf) {
$('#wfForm').on('run.wfform', function(event, running_wf) {
$("#reset_workflow, #run_workflow").hide();
$("#refresh_workflow, #rerun_workflow").show();
$("#myCarousel").carousel('next');
......
......@@ -103,7 +103,7 @@ $(function () {
serverURL: $("#server_url").val()
});
$("#refresh_workflow").click(function(){ $('#statusModalBody').wfstatus('reload'); });
$("#wf_monitoring").on("select.active", function(event, workflow) {
$("#wf_monitoring").on("select.activewf", function(event, workflow) {
$('#statusModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
$('#statusModalBody').wfstatus({
serverURL: $("#server_url").val(),
......
Markdown is supported
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