Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KADMOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LR-FPP-MDO
KADMOS
Commits
682d65a1
Commit
682d65a1
authored
6 years ago
by
baigner
Browse files
Options
Downloads
Patches
Plain Diff
Continued adding of design competences (Not finished)
Former-commit-id: 170eb361201eeb91a358cadd5e01e6b7177825ce
parent
9d927588
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#192857
canceled
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kadmos/vistoms/templates/VISTOMS.html
+24
-123
24 additions, 123 deletions
kadmos/vistoms/templates/VISTOMS.html
with
24 additions
and
123 deletions
kadmos/vistoms/templates/VISTOMS.html
+
24
−
123
View file @
682d65a1
...
...
@@ -19609,132 +19609,33 @@
{
bootbox.hideAll();
var html = d3.select("html")
var form_content = html.append("div").attr("class","form-content").attr("style","display:none")
var form = form_content.append("form").attr("class","form").attr("role","form")
var form_group, input;
//Tool information
form_group = form.append("div").attr("class","form-group")
form_group.append("text").text("Name")
input = form_group.append("input")
.attr("id","function_node")
.attr("class","form-control")
.attr("name","function_node")
.attr("placeholder","Add a tool name here...")
//Tool input nodes
form_group = form.append("div").attr("class","form-group")
form_group.append("text").text("Tool input nodes")
input = form_group.append("input")
.attr("id","input_nodes_xPath")
.attr("class","form-control")
.attr("name","input_nodes_xPath")
.attr("placeholder","xPaths of the input nodes (please seperate with comma)")
input = form_group.append("input")
.attr("id","input_nodes_name")
.attr("class","form-control")
.attr("name","input_nodes_name")
.attr("placeholder","Variable names of the input nodes (Please separate with comma)")
//Tool output nodes
form_group = form.append("div").attr("class","form-group")
form_group.append("text").text("Tool output nodes")
input = form_group.append("input")
.attr("id","output_node_xPath")
.attr("class","form-control")
.attr("name","output_node_xPath")
.attr("placeholder","xPath of the output node")
input = form_group.append("input")
.attr("id","equation")
.attr("class","form-control")
.attr("name","equation")
.attr("placeholder","Equation for the output node")
input = form_group.append("input")
.attr("id","language")
.attr("class","form-control")
.attr("name","language")
.attr("placeholder","Programming language (e.g. 'Python')")
//aigner: HIER WEITER!!!
var modal = bootbox.dialog({
message: $(".form-content").html(),
bootbox.dialog({
title: "Add design competence",
size: "large",
buttons: [
{
label: "Cancel",
className: "btn btn-default pull-left",
callback: function() {
modal.modal("hide");
d3.selectAll(".form-content").remove();
}
},
{
label: "OK",
className: "btn btn-primary pull-left",
callback: function() {
//get form data
var form_data = {
function_node: $('form #function_node').val(),
input_nodes_xPath: $('form #input_nodes_xPath').val(),
input_nodes_name: $('form #input_nodes_name').val(),
output_node_xPath: $('form #output_node_xPath').val(),
equation: $('form #equation').val(),
language: $('form #language').val()
}
var bootboxContent = {title: "Add mathematical function", message: '<p>Please be patient...</p>'};
var xhr = $.ajax({
type: 'POST',
url: '/kadmos_add_mathematical_function',
data: {'graphID':graphID, 'currentOrder':nodeOrder, 'form_data':JSON.stringify(form_data)},
success: function(result)
{
if (result.includes("ERROR:"))
{
bootboxContent.message = result
kadmosErrorMessage(bootboxContent);
}
else
{
var updatedData = {};
updatedData = data;
var graphData = JSON.parse(result);
for (var i = 0; i < updatedData.graphs.length; i++)
{
if (graphID == updatedData.graphs[i].id)
{
updatedData.graphs[i] = graphData.graphs[0];
}
}
clearView();
makeKadmosMenu(updatedData);
xdsm_script(updatedData,graphID);
bootboxContent.message = "Success!"
kadmosSuccessMessage(bootboxContent)
}
},
error: function(result)
{
bootboxContent.message = result
kadmosErrorMessage(bootboxContent);
}
});
kadmosHavePatience(xhr, bootboxContent)
kadmosHavePatience(xhr, bootboxContent)
modal.modal("hide");
d3.selectAll(".form-content").remove();
message: "<form id='scriptForm' method='post' enctype='multipart/form-data'>"
+"<label>"
+"<text>Upload input xml file:</text>"
+"<input style='margin-bottom:20px;' type='file' name='file1' />"
+"<text>Upload output xml file:</text>"
+"<input type='file' name='file2' />"
+"<input style='margin-top:20px;' type='button' value='Submit' onclick='submitForms()'/>"
+"</label></form>",
buttons :
{
cancel: {
label: "Cancel",
className: 'btn-danger'
}
}
],
onEscape: function() {
modal.modal("hide");
d3.selectAll(".form-content").remove();
}
}
});
var submitForms = function(){
document.forms["file1"].submit();
document.forms["file2"].submit();
return true;
}
console.log(submitForms)
}
function addDCMetadata(aNode=null)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment