cylc / cylc-ui

Web app for monitoring and controlling Cylc workflows
https://cylc.github.io
GNU General Public License v3.0
37 stars 27 forks source link

added cyclepoint grouping with subgraphs #1763

Closed markgrahamdawson closed 4 months ago

markgrahamdawson commented 5 months ago

Partly addresses #1130

---initial notes on work--- For the time being - figure out a means of drawing a dotted box around nodes that share a cyclepoint. This can be done with graphviz subgraphs The graphviz dot code is returned from the getDotCode function in Graph.vue view Dot code can be rendered with dot foo.dot -Tpng -o foo.png ultimately in the svg there will need to be a rect tag added...

**Check List** - [x] I have read `CONTRIBUTING.md` and added my name as a Code Contributor. - [x] Contains logically grouped changes (else tidy your branch by rebase). - [x] Does not contain off-topic changes (use other PRs for other changes). - [x] Applied any dependency changes to both `setup.cfg` (and `conda-environment.yml` if present). - [x] Tests are included (or explain why tests are not needed). - [x] `CHANGES.md` entry included if this is a change that can affect users - [x] [Cylc-Doc](https://github.com/cylc/cylc-doc) pull request opened if required at cylc/cylc-doc/pull/XXXX. - [x] If this is a bug fix, PR should be raised against the relevant `?.?.x` branch.
markgrahamdawson commented 5 months ago

The amount of margin between subgraphs is random unless made explicit

No margin image

Margin set in code image

Im guessing the second one is better?

hjoliver commented 5 months ago

Def prefer the second one.

oliver-sanders commented 4 months ago

Bumping this forward to the 8.3 meta-release as this should be ready to go in before cylc-flow blockers.

It would be good to get a screenshot of this into the "changes" section in cylc-doc: https://cylc.github.io/cylc-doc/nightly_8.3/html/reference/changes.html#cylc-8-3

MetRonnie commented 4 months ago

Got a PR against this at https://github.com/markgrahamdawson/cylc-ui/pull/5

MetRonnie commented 4 months ago

Managed to get a workflow into a state where there's an grouping with the title "undefined".

And transposing this graph gives a console error (resolved)

![image](https://github.com/cylc/cylc-ui/assets/61982285/4903fe47-ff9f-4c73-838e-0ec9ff4cddb9)

markgrahamdawson commented 4 months ago

to a state where there's an grouping with the title "undefined". And transposing this graph gives a console error. Will see if I can figure out anything else tomorrow

Do you have the flow.cylc file?

markgrahamdawson commented 4 months ago

I've also noticed that on the complex workflow switching on the 'group by cycle point' it can result in some graph edges (I think thats the correct term for arrows) go nowhere...

'group by cycle point off' image

'group by cycle point on' image

oliver-sanders commented 4 months ago

Hmm, I didn't notice any issues with the complex workflow when I tested it. Will need the dot code to debug this. Given that the edges (yes that's right word) lead outside of the subgraph, I expect there may be an issue with the formatting of the subgraph dot code.

When I read through the code I think I spotted a missing newline at the end of the subgraph. I thought it was harmless, but it might be worth checking that's not causing issues.

MetRonnie commented 4 months ago

Managed to get a workflow into a state where there's an grouping with the title "undefined"

Also the 3 tasks are showing as "state unknown" while the jobs are showing as running. But these are from an earlier cycle and have actually already succeeded. Might be something to do with simulation mode. Or actually #1635?

MetRonnie commented 4 months ago

Got a fix for the arrows pointing nowhere (and the console error) in https://github.com/markgrahamdawson/cylc-ui/pull/5

oliver-sanders commented 4 months ago

:+1:

oliver-sanders commented 4 months ago

(added a changes entry in cylc-doc https://github.com/cylc/cylc-doc/pull/733)