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
3ceb3a7a
Commit
3ceb3a7a
authored
6 years ago
by
baigner
Browse files
Options
Downloads
Patches
Plain Diff
...now it also works for VISTOMS_Static.html
Former-commit-id: 27ce4eec738da994dc6e4e9a858c8b04765c20cf
parent
7983918b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#192842
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_Static.html
+133
-154
133 additions, 154 deletions
kadmos/vistoms/templates/VISTOMS_Static.html
with
133 additions
and
154 deletions
kadmos/vistoms/templates/VISTOMS_Static.html
+
133
−
154
View file @
3ceb3a7a
...
...
@@ -19962,71 +19962,67 @@
{
//Highlight function, that shows usage of a node in the XDSM
function highlight(data
,aText
)
function highlight(data)
{
aText = "/"+data.data.name+aText;
if (data.parent){highlight(data.parent,aText)}
else
{
scenarioKeys.forEach(function(k)
{
var xdsm_tmp;
xdsm_tmp = xdsms[k];
if (xdsm_tmp)
{
xdsm_tmp.svg.selectAll(".edge").each(function(p)
{
var firstElement_tmp = p.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
if (include(p.name,text_fromFirst))
{
var highlightEdge = d3.select(this).select("polygon");
highlightEdge
.style("stroke-width",5.)
.style("stroke","#CC0000")
d3.selectAll(".treeFrame")
.attr("fill-opacity", 0.5)
.attr("stroke-opacity", 0.5);
d3.selectAll(".nodeText").style("fill-opacity",0.5);
}
})
}
})
}
var xPath = data.data.xPath;
scenarioKeys.forEach(function(k)
{
var xdsm_tmp;
xdsm_tmp = xdsms[k];
if (xdsm_tmp)
{
xdsm_tmp.svg.selectAll(".edge").each(function(p)
{
var firstElement_tmp = p.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1]
if (include(p.name,text_fromFirst))
{
var highlightEdge = d3.select(this).select("polygon");
highlightEdge
.style("stroke-width",5.)
.style("stroke","#CC0000")
d3.selectAll(".treeFrame")
.attr("fill-opacity", 0.5)
.attr("stroke-opacity", 0.5);
d3.selectAll(".nodeText").style("fill-opacity",0.5);
}
})
}
})
}
//Unhighlight function again
function unhighlight(data
,aText
)
function unhighlight(data)
{
aText = "/"+data.data.name+aText;
if (data.parent){unhighlight(data.parent,aText)}
else
{
scenarioKeys.forEach(function(k)
{
var xdsm_tmp;
xdsm_tmp = xdsms[k];
if (xdsm_tmp)
{
xdsm_tmp.svg.selectAll(".edge").each(function(p)
{
var firstElement_tmp = p.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
if (include(p.name,text_fromFirst))
{
var highlightEdge = d3.select(this).select("polygon");
highlightEdge
.style("stroke-width",1.)
.style("stroke","black");
d3.selectAll(".treeFrame")
.attr("fill-opacity", 0.8)
.attr("stroke-opacity", 0.8);
d3.selectAll(".nodeText").style("fill-opacity",1);
}
})
}
})
}
var xPath = data.data.xPath;
scenarioKeys.forEach(function(k)
{
var xdsm_tmp;
xdsm_tmp = xdsms[k];
if (xdsm_tmp)
{
xdsm_tmp.svg.selectAll(".edge").each(function(p)
{
var firstElement_tmp = p.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1]
if (include(p.name,text_fromFirst))
{
var highlightEdge = d3.select(this).select("polygon");
highlightEdge
.style("stroke-width",1.)
.style("stroke","black");
d3.selectAll(".treeFrame")
.attr("fill-opacity", 0.8)
.attr("stroke-opacity", 0.8);
d3.selectAll(".nodeText").style("fill-opacity",1);
}
})
}
})
}
...
...
@@ -20087,12 +20083,10 @@
{
title: 'Show usage of node in XDSM',
onMouseDown: function(elm, d, i) {
var theText="";
highlight(d,theText);
highlight(d);
},
onMouseUp: function(elm, d, i) {
var theText="";
unhighlight(d,theText);
unhighlight(d);
},
onMouseOver: function(elm, d, i) {
},
...
...
@@ -21777,57 +21771,53 @@
var classes = currentGraph.edgeBundles;
//Highlight function, that shows usage of a node in the XDSM
function highlight(data
,aText
)
function highlight(data)
{
aText = "/"+data.name+aText;
if (data.parent){highlight(data.parent,aText)}
else
var xPath = data.xPath
var allLinks = d3.selectAll(".edgeBundlesLink");
allLinks[0].forEach(function(aLink)
{
var allLinks = d3.selectAll(".edgeBundlesLink");
allLinks[0].forEach(function(aLink)
aLink.__data__.pipeData_in = aLink.__data__.source.pipeline_data[aLink.__data__.target.name];
aLink.__data__.pipeData_out = aLink.__data__.target.pipeline_data[aLink.__data__.source.name];
aLink.__data__.pipeDataName_in = "";
aLink.__data__.pipeDataName_out = "";
aLink.__data__.name = "";
if (aLink.__data__.pipeData_in)
{
aLink.__data__.pipeData_in = aLink.__data__.source.pipeline_data[aLink.__data__.target.name];
aLink.__data__.pipeData_out = aLink.__data__.target.pipeline_data[aLink.__data__.source.name];
aLink.__data__.pipeDataName_in = "";
aLink.__data__.pipeDataName_out = "";
aLink.__data__.name = "";
if (aLink.__data__.pipeData_in)
{
for (var i=0; i<aLink.__data__.pipeData_in.length; i++)
{
if (i==0){aLink.__data__.pipeDataName_in += aLink.__data__.pipeData_in[i];}
else{aLink.__data__.pipeDataName_in += "," + aLink.__data__.pipeData_in[i];}
}
aLink.__data__.name += aLink.__data__.pipeDataName_in
}
if (aLink.__data__.pipeData_out)
for (var i=0; i<aLink.__data__.pipeData_in.length; i++)
{
for (var i=0; i<aLink.__data__.pipeData_out.length; i++)
{
if (i==0){aLink.__data__.pipeDataName_out += aLink.__data__.pipeData_out[i];}
else{aLink.__data__.pipeDataName_out += "," + aLink.__data__.pipeData_out[i];}
}
aLink.__data__.name += aLink.__data__.pipeDataName_out
}
})
//var allLinks_tmp = allLinks[0];
allLinks[0].forEach(function(p) {
var firstElement_tmp = p.__data__.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
if (include(p.__data__.name,text_fromFirst))
{
d3.select(p)
.style("stroke-opacity", 1.0)
if (i==0){aLink.__data__.pipeDataName_in += aLink.__data__.pipeData_in[i];}
else{aLink.__data__.pipeDataName_in += "," + aLink.__data__.pipeData_in[i];}
}
else
aLink.__data__.name += aLink.__data__.pipeDataName_in
}
if (aLink.__data__.pipeData_out)
{
for (var i=0; i<aLink.__data__.pipeData_out.length; i++)
{
d3.select(p).style("stroke-opacity", 0);
if (i==0){aLink.__data__.pipeDataName_out += aLink.__data__.pipeData_out[i];}
else{aLink.__data__.pipeDataName_out += "," + aLink.__data__.pipeData_out[i];}
}
});
}
aLink.__data__.name += aLink.__data__.pipeDataName_out
}
})
//var allLinks_tmp = allLinks[0];
allLinks[0].forEach(function(p) {
var firstElement_tmp = p.__data__.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1]
if (include(p.__data__.name,text_fromFirst))
{
d3.select(p)
.style("stroke-opacity", 1.0)
}
else
{
d3.select(p).style("stroke-opacity", 0);
}
});
}
//Function writeTreeToXML goes through tree nodes and puts the into an xml document
...
...
@@ -22060,8 +22050,7 @@
onMouseDown: function(elm, d, i) {
d3.selectAll(".treeFrame").attr("fill-opacity", .5);
d3.selectAll(".nodeText").style("fill-opacity", 0.5);
var theText="";
highlight(d,theText);
highlight(d);
},
onMouseUp: function(elm, d, i) {
d3.selectAll(".edgeBundlesLink")
...
...
@@ -24848,27 +24837,23 @@
//Highlight function, that shows usage of a node in the XDSM
function highlight(data
,aText
)
function highlight(data)
{
aText = "/"+data.name+aText;
if (data.parent){highlight(data.parent,aText)}
else
{
var allLinks = d3.selectAll(".link");
var allLinks_tmp = allLinks[0];
allLinks_tmp.forEach(function(p) {
var firstElement_tmp = p.__data__.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
if (include(p.__data__.name,text_fromFirst))
{
d3.select(p).style("opacity", .8);
}
else
{
d3.select(p).style("opacity", 0);
}
});
}
xPath = data.xPath;
var allLinks = d3.selectAll(".link");
var allLinks_tmp = allLinks[0];
allLinks_tmp.forEach(function(p) {
var firstElement_tmp = p.__data__.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1]
if (include(p.__data__.name,text_fromFirst))
{
d3.select(p).style("opacity", .8);
}
else
{
d3.select(p).style("opacity", 0);
}
});
}
function showVariableTable(aVariable)
...
...
@@ -24937,8 +24922,7 @@
onMouseDown: function(elm, d, i) {
d3.selectAll(".treeFrame").attr("fill-opacity", .5);
d3.selectAll(".nodeText").style("fill-opacity", 0.5);
var theText="";
highlight(d,theText);
highlight(d);
},
onMouseUp: function(elm, d, i) {
d3.selectAll(".link").style("opacity",.6)
...
...
@@ -26344,27 +26328,23 @@
varCategories = entireData.categories;
//Highlight function, that shows usage of a node in the XDSM
function highlight(data
,aText
)
function highlight(data)
{
aText = "/"+data.name+aText;
if (data.parent){highlight(data.parent,aText)}
else
{
var allLinks = d3.selectAll(".link");
var allLinks_tmp = allLinks[0];
allLinks_tmp.forEach(function(p) {
var firstElement_tmp = p.__data__.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
if (include(p.__data__.name,text_fromFirst))
{
d3.select(p).style("opacity", .8);
}
else
{
d3.select(p).style("opacity", 0);
}
});
}
var xPath = data.xPath;
var allLinks = d3.selectAll(".link");
var allLinks_tmp = allLinks[0];
allLinks_tmp.forEach(function(p) {
var firstElement_tmp = p.__data__.name.split("/")[1]
var text_fromFirst = "/"+firstElement_tmp+xPath.split(firstElement_tmp)[1]
if (include(p.__data__.name,text_fromFirst))
{
d3.select(p).style("opacity", .8);
}
else
{
d3.select(p).style("opacity", 0);
}
});
}
function showVariableTable(aVariable)
...
...
@@ -26433,8 +26413,7 @@
onMouseDown: function(elm, d, i) {
d3.selectAll(".treeFrame").attr("fill-opacity", .5);
d3.selectAll(".nodeText").style("fill-opacity", 0.5);
var theText="";
highlight(d,theText);
highlight(d);
},
onMouseUp: function(elm, d, i) {
d3.selectAll(".link").style("opacity",.6)
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