diff --git a/kadmos/vistoms/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html index ec5a9104015ed808943f0eed76be41d6e6f459a1..5f6b4c8b19bbfc9434bd7894d05046a53cd1f470 100644 --- a/kadmos/vistoms/templates/VISTOMS.html +++ b/kadmos/vistoms/templates/VISTOMS.html @@ -459,10 +459,12 @@ .style("min-width","200px") .style("margin-left","10px") addButtonPanel.append("div").attr("class","panel-heading text-center align-top") + .style("background-color","#555555") .append("h3") .attr("class","panel-title") .style("font-family","Arial") .style("font-size","14pt") + .style("color","white") .style("display","inline-block") .text("Add graph") var panelBody = addButtonPanel.append("div").attr("class","panel-body") @@ -613,10 +615,12 @@ .style("min-width","200px") .style("margin-left","10px") saveButtonPanel.append("div").attr("class","panel-heading text-center align-top") + .style("background-color","#555555") .append("h3") .attr("class","panel-title") .style("font-family","Arial") .style("font-size","14pt") + .style("color","white") .style("display","inline-block") .text("Save all graphs") var savepanelBody = saveButtonPanel.append("div").attr("class","panel-body") @@ -18767,7 +18771,7 @@ var saveButton = revertDiv.append("button") - .attr("class","btn btn-primary button") + .attr("class","btn btn-primary") .attr("data-toggle","tooltip") .attr("data-placement","top") .attr("title","Save graph") @@ -18876,7 +18880,7 @@ var deleteButton = revertDiv.append("button") - .attr("class","btn btn-danger button") + .attr("class","btn btn-danger") .attr("data-toggle","tooltip") .attr("data-placement","top") .attr("title","Delete graph") @@ -18942,7 +18946,7 @@ var backButton = revertDiv.append("button") - .attr("class","btn btn-warning button") + .attr("class","btn btn-warning") .attr("data-toggle","tooltip") .attr("data-placement","top") .attr("title","Revert graph manipulation step") @@ -19006,7 +19010,7 @@ }) var fwdButton = revertDiv.append("button") - .attr("class","btn btn-warning button") + .attr("class","btn btn-warning") .attr("data-toggle","tooltip") .attr("data-placement","top") .attr("title","Restore graph manipulation step") diff --git a/kadmos/vistoms/vistoms.py b/kadmos/vistoms/vistoms.py index 2d437bd725255918b4cdcbad444269fe90b3f95e..6f1d17ef4b33fdbdef160afff448acac603df2e4 100644 --- a/kadmos/vistoms/vistoms.py +++ b/kadmos/vistoms/vistoms.py @@ -707,7 +707,8 @@ def kadmosChangeNodePos(): function_order.insert(newPos, nodeName) if isinstance(graph, FundamentalProblemGraph): graph.graph['problem_formulation']['function_order'] = function_order - graph.add_function_problem_roles() + if 'problem_role' in graph.nodes[function_order[0]]: + graph.add_function_problem_roles() # Add the graph with the updated function order to VISTOMS newVistomsData = graph.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) @@ -1091,7 +1092,8 @@ def kadmosGetPossibleFunctionOrder(): function_order = fpg.get_possible_function_order(method) fpg.assert_or_add_nested_attribute(['problem_formulation', 'mdao_architecture'], 'undefined') fpg.graph['problem_formulation']['function_order'] = function_order - fpg.add_function_problem_roles() + if 'problem_role' in fpg.nodes[function_order[0]]: + fpg.add_function_problem_roles() # Save the graph in temp/tmp.kdms fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE + '_' + graphID + '.kdms'),