Commit 382753fa authored by Jerome Mariette's avatar Jerome Mariette
Browse files

add the display_name of the input/inputs

parent 2d8a1085
......@@ -153,11 +153,11 @@ if __name__ == '__main__':
inputs, components = [], []
for node in gr.nodes():
if Workflow.INPUT_GRAPH_LABEL in gr.node_attributes(node):
inputs.append(node)
inputs.append(gr.node_attributes(node)[1])
elif Workflow.INPUTS_GRAPH_LABEL in gr.node_attributes(node):
inputs.append(node)
inputs.append(gr.node_attributes(node)[1])
elif Workflow.COMPONENT_GRAPH_LABEL in gr.node_attributes(node):
components.append(node)
components.append(gr.node_attributes(node)[1])
print "inputs: ", inputs
print "components: ", components
print "edges: ", gr.edges()
......
......@@ -412,11 +412,11 @@ class JFlowServer (object):
nodes = []
for node in g.nodes():
if Workflow.INPUT_GRAPH_LABEL in g.node_attributes(node):
nodes.append({"name": node, "type": "input"})
nodes.append({"name": node, "display_name": g.node_attributes(node)[1], "type": "input"})
elif Workflow.INPUTS_GRAPH_LABEL in g.node_attributes(node):
nodes.append({"name": node, "type": "inputs"})
nodes.append({"name": node, "display_name": g.node_attributes(node)[1], "type": "inputs"})
elif Workflow.COMPONENT_GRAPH_LABEL in g.node_attributes(node):
nodes.append({"name": node, "type": "component"})
nodes.append({"name": node, "display_name": g.node_attributes(node)[1], "type": "component"})
status["nodes"] = nodes
status["edges"] = g.edges()
return status
......
......@@ -346,14 +346,17 @@ class Workflow(threading.Thread):
if issubclass(ioparameter.__class__, InputFile):
gr.add_node(ioparameter.name)
gr.add_node_attribute(ioparameter.name, self.INPUT_GRAPH_LABEL)
gr.add_node_attribute(ioparameter.name, ioparameter.display_name)
all_nodes[ioparameter.name] = None
elif issubclass(ioparameter.__class__, InputFileList):
gr.add_node(ioparameter.name)
gr.add_node_attribute(ioparameter.name, self.INPUTS_GRAPH_LABEL)
gr.add_node_attribute(ioparameter.name, ioparameter.display_name)
all_nodes[ioparameter.name] = None
for cpt in self.components:
gr.add_node(cpt.get_nameid())
gr.add_node_attribute(cpt.get_nameid(), self.COMPONENT_GRAPH_LABEL)
gr.add_node_attribute(cpt.get_nameid(), cpt.get_nameid())
all_nodes[cpt.get_nameid()] = None
for cpt in self.components:
for ioparameter in cpt.__dict__.values():
......
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