-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display dependency graph using DagreD3 #1817
Conversation
Martchus
commented
Oct 2, 2018
- See https://progress.opensuse.org/issues/40772
- Not fancy yet but a start
Codecov Report
@@ Coverage Diff @@
## master #1817 +/- ##
==========================================
- Coverage 90.36% 90.22% -0.15%
==========================================
Files 139 139
Lines 9937 9978 +41
==========================================
+ Hits 8980 9003 +23
- Misses 957 975 +18
Continue to review full report at Codecov.
|
/tests/2068098#settings looks like it can be better :) |
I know this WIP, but experimented a little with it:
|
For the interested: http://stephan.kulow.org/hpc.html |
Possibly a network is just the wrong way to think about it. Random links: https://mermaidjs.github.io/flowchart.html |
I had the same thought when testing vis.js. The mermaidjs example looks good. I'll change the PR to use that library. Shouldn't be much work if their API is similar. @coolo Do you have already code or is the example manually drafted? |
Their API is completely different (and IMO sucks): http://stephan.kulow.org/mermaid.html But if we render it like the above, I have the impression we can just as well do it on our own (and better suited to our problem). So some more links: |
DagreD3 is my favorite for now - e.g. it allows us to specify the parallel clusters as tables and then layout it within the graph: https://dagrejs.github.io/project/dagre-d3/latest/demo/dom.html |
3aa2960
to
2fcb63a
Compare
@coolo I think I've got the algo to compute the clusters. At least the results look plausible :-) |
And 2068098 ? :) |
This leaves "the current parents/children can disappear then" - the rest works great. |
And tests are missing or at least need to be adapted. |
f149818
to
1c5e7b4
Compare
I added/fixed tests and they pass now. The old table has been removed, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just nitpicks
assets/assetpack.def
Outdated
@@ -100,6 +100,13 @@ | |||
<< https://raw.githubusercontent.com/twbs/bootstrap/v4.1.1/scss/_print.scss | |||
< https://raw.githubusercontent.com/sorich87/bootstrap-tour/6a1028fb562f9aa68c451f0901f8cfeb43cad140/build/css/bootstrap-tour.css | |||
|
|||
! d3.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] It's not just d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to dagre-d3.js
assets/javascripts/test_result.js
Outdated
if (window.location.hash === '#live') { | ||
resumeLiveView(); | ||
} | ||
// setup dependency graph if it's the default tab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these blocks look pretty much repeated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
assets/javascripts/test_result.js
Outdated
tooltipText: node.tooltipText, | ||
testResultId: testResultId, | ||
testResultName: testResultName, | ||
fill: "#afa", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little worried to have a colour defined outside of scss. Perhaps this can be inherited from some (otherwise invisible) css?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fill is overridden in CSS anyways. I moved the other fill
(which was actually used) to CSS.
lib/OpenQA/WebAPI.pm
Outdated
@@ -130,6 +130,7 @@ sub startup { | |||
$test_r->get('/')->name('test')->to('test#show'); | |||
$test_r->get('/ajax')->name('job_next_previous_ajax')->to('test#job_next_previous_ajax'); | |||
$test_r->get('/modules/:moduleid/fails')->name('test_module_fails')->to('test#module_fails'); | |||
$test_r->get('dependencies')->name('test_dependencies')->to('test#dependencies'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency either have all $test_r->get calls with / or none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
* See https://progress.opensuse.org/issues/40772 * Not fancy yet but a start
* Show result/status in dependency graph * Highlight current job * Make the labels links
* Make boxes equally sized * Do text eliding in CSS * Mark current job more visible
314afec
to
91ace9e
Compare
* Fix duplicated code * Define all colors in CSS * Rename asset (d3.js => dagre-d3.js)
1c82219
to
693829b
Compare