-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add gscan component #301
Add gscan component #301
Conversation
Note: it takes users to It also does not implement any hierarchy. |
Codecov Report
@@ Coverage Diff @@
## master #301 +/- ##
==========================================
+ Coverage 62.57% 67.44% +4.87%
==========================================
Files 22 24 +2
Lines 318 341 +23
Branches 17 20 +3
==========================================
+ Hits 199 230 +31
+ Misses 115 105 -10
- Partials 4 6 +2
Continue to review full report at Codecov.
|
Build failed due to sass-loader and vuetify. Removing node-sass to see if it will pass now (off to home, will log in again later to check if build passed). Only tested with the workflow five, so it would be good if a reviewer could test with other workflows and see if there's anything broken :) |
Build passed on Travis 🎉 |
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.
That was quick!
Looks nice, with your last PR merged this is starting to really look like the Cylc GUI now. It's getting pretty usable!
src/components/cylc/GScan.vue
Outdated
<v-layout align-center align-content-center wrap> | ||
<v-flex grow>{{ workflow.name }}</v-flex> | ||
<v-flex shrink ml-4> | ||
<!-- task summary tooltips --> |
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.
Nice.
I think we might want to factor out some of this functionality into a common component so all views can benefit from these features (e.g. tooltips).
I was thinking of something like JobBox
which either holds:
- State totals (as in this case).
- A collection of jobs (which collapses down to state totals if there are too many jobs).
Food for later thought...
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.
@oliver-sanders - can you post an issue for this, if you think it's needed.
src/App.vue
Outdated
const QUERIES = { | ||
root: ` | ||
{ | ||
workflows { |
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.
BTW: I think we will need to improve the whole gproxy
thing so it can merge this query properly, my bad I should have opened a follow on issue at the time.
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.
There are two or three issues created that involve changes in the gproxy
, so there's room for improvement, but it was a life saver. Without that early in the project, we would have a lot built on top of - probably - multiple queries spread over the project.
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.
@oliver-sanders - ditto this - is an issue needed, it will it be obvious later on?
Rebased, fixed conflicts. May still have to update the code based on further comments from @oliver-sanders (I think I replied with only more questions hehe) |
239778b
to
a1ea837
Compare
@kinow - have you tested this with more than one workflow? When I do, the first one I click on (in the scan bar) appears in the tree view, but then second one results in a blank view. The first view comes back if I click on the first one again in the sidebar. |
Oh! Interesting issue! I surely tested two workflows, Let me try it and see what happens. |
Ah! Mea culpa! I believe in the families PR I changed the code to build the workflow tree for the first workflow (implemented that for a single workflow, when looking at the Easy to cover with an e2e test. It might be time to start considering adding more e2e tests, and adding them to Travis/CI. (had added this comment to another issue wrongly, sorry) I think it's fixed now!
|
(just need to fix the tests) |
That's got it, looks great. |
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.
Approving this on the basis of functionality (my JS and Vue is still lacking 😬). Looks good, seems to work well, and we can extend and improve it later.
I'd like to get this merged this week to use in demos in the US. @oliver-sanders and @kinow can you figure out between you if all review comments have been addressed or moved to follow-up issues?
Finally, we need some way to access to the cytoscape graph view!
Without #98 there's no way to access the graph now 😞 unless one knows the URL. Do you have any suggestion where we could include a link for the Graph view? Or perhaps we should try to display both components at the same time by default? |
As a temporary measure, could we just keep the old scan table view via a link from the dashboard? |
Sure. Or should we add that link under the Dashboard entry in the drawer/left sidebar? It just occurred to me that I could have simply added it under the existing values (a bit of d'oh moment). If that's fine, it'll be a 5 min job. |
Yep that’s fine 👍🏻 |
136e1e3
to
45ed91d
Compare
45ed91d
to
eb4fff7
Compare
src/components/cylc/GScan.vue
Outdated
import { workflowService } from 'workflow-service' | ||
|
||
const QUERIES = { | ||
root: ` |
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.
@oliver-sanders 👆 moved query and methods/data/etc from App.vue
to this component
src/components/cylc/GScan.vue
Outdated
return 'mdi-pause-octagon' | ||
default: | ||
return 'mdi-help-circle' | ||
} |
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.
@oliver-sanders, @hjoliver also added an extra commit to choose the workflow icon. Given we have the icons loaded anyway, and they fit the CSS styles, would it be fine? Or do we need the component with SVG? They don't look exactly like the design sketch, but looks good to me.
(did a cylc hold five
to test both icons)
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.
(note that the Workflows menu item is activated as it matches the "/workflows*" route)
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.
The play and pause icons look fine to me, and we can change to custom svg later on if we want to.
I think @oliver-sanders pointed the http endpoint from where we used to get this data from, and in the discussion here and on Riot we were discussing that it would be possible to get state totals from the backend - though I believe it is not the same problem. I think this is the code in GScan that creates the message from your screenshot. It gets the data from this method from the I will try to reproduce this in JS ☝️ |
Thanks @kinow (and tomorrow is OK!) |
…tasks displayed to 5
e3575dc
to
fc9f14f
Compare
Rebased, and implemented:
Added a simple unit test, but would be good if someone else tested to confirm the values displayed make sense. I didn't use this feature in Cylc 7, so I'm not 100% sure that it's working OK. 👍 |
Nice, thanks @kinow. Looks great, works great! We'll need sorting by "time" not name (e.g. when looking at succeeded tasks, want the most recently succeeded ones first). But that can be a follow-up. This is great for my demo as-is (I won't tell anyone it's not really "most recent", he heh 😁 ) The Cylc 7 version also does this server side (I had forgotten) but it is probably better in principle that the UI does it (some future UI component might need to list all tasks in a state, not just a few.) |
@oliver-sanders - I'm going to merge this without your approval, as I need it in for demos soon. I believe all your comments have been addressed above, with some things punted to other issues (and/or updated the gscan Issue description). Note two questions on things that might need a new Issue page. |
These changes partially address #139
Initial version of the
GScan
component. Will need more iterations later until the requirements in #139 are fully addressed.Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.