Skip to content
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

gscan: information on hover. #1884

Merged

Conversation

oliver-sanders
Copy link
Member

Closes #1244

Added tooltip text for the status indicators in gscan. The 5 most recent tasks are displayed, ordered by the most recent of submitted_time_string, started_time_string and finished_time_string. If the row is displaying tasks at a given cycle point the tooltip will show only tasks at that point.

@hjoliver Please Review
@benfitzpatrick Please Review

@oliver-sanders oliver-sanders added this to the soon milestone Jun 10, 2016
@matthewrmshin matthewrmshin modified the milestones: next release, soon Jun 10, 2016
@hjoliver
Copy link
Member

This looks really good, but the tooltip information can be out-of-sync with the main state summary display, because the former is retrieved on-demand and the latter automatically at intervals.

So, do we need to do one of:

  • force a main display update when retrieving the tool-tip info, or
  • retrieve full tool-tip information - in case it's required - with each state summary update

The second option is probably the right thing to do, otherwise if the suite state has changed since last update you'll retrieve a tool-tip for a different state than intended.

@oliver-sanders
Copy link
Member Author

I'd opt for the latter as well.

@oliver-sanders
Copy link
Member Author

@hjoliver Task information is now obtained along with the main update procedure so as to keep everything in sync.

@hjoliver
Copy link
Member

Looks good now.

@benfitzpatrick
Copy link
Contributor

I'd rather this didn't grab the state_summary on every update, but just on demand - what do you think?

@hjoliver
Copy link
Member

(over-the-desktop) - Ben's worried about the additional network traffic, and the volume of state summary information.

But ... on-demand will necessarily be inconsistent with the summary display sometimes. What about:

  1. server-side, a new method to supply only the tooltip information
  2. or report the tooltip info in the scan output!

I like 2. Note that state summary information can be denied at "public" access level (once gscan follows the CLI scan functionality, to optionally show other users' suites).

@oliver-sanders
Copy link
Member Author

#1887 requires state summary information to be acquired on update, also if the user is skimming across the status indicators then if acquiring on-demand a lot of requests will be generated.

Acquiring data on update seems sensible to me, if so are the network traffic issues still a concern?

@hjoliver
Copy link
Member

@oliver-sanders - I think info on update, not on-demand, is required for consistency. But rather than retrieving the whole suite state summary we should extend the identify() method in lib/cylc/network/suite_identifier.py (i.e. the server side scan interface) to report the minimal amount of information needed for the tooltips. Note that this info (and even the state totals) may not be available from other users' suites (although gscan can't display these yet anyway).

@oliver-sanders
Copy link
Member Author

@hjoliver @benfitzpatrick 003cb78 acquires tooltip information along with suite.identify().

@hjoliver
Copy link
Member

One suggestion: if the summary ends with "And 1 more" we should just replace that string with the actual result since it takes up the same amount of screen space.

@oliver-sanders
Copy link
Member Author

@hjoliver Good point, have implemented.

@oliver-sanders
Copy link
Member Author

@hjoliver 3ed3ae7 Changes suite_state to only send the most recent 6 tasks (hard-coded) for each state.

@@ -981,6 +1035,10 @@ def update(self):
)
title = suite_info.get("title")

if 'tasks-by-state' in suite_info:
self.tasks_by_state[suite + host] = suite_info[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to use (suite, host) as the key for tasks_by_state, as elsewhere.

@benfitzpatrick
Copy link
Contributor

Looks good! One comment above, and can we have the numbers of tasks in each state text back in?

@oliver-sanders
Copy link
Member Author

@benfitzpatrick The task state summary text is still there, hover over the point string to see it, if the suite is collapsed then the point string is only a few pixels wide and it is a little hard to hover over.

I could change the tooltip text to:

state (tasks_in_state)
task.pointstring
...

or:

Tasks: tasks_in_state_1 state_1, tasks_in_state_2 state_2, ...
Recently state tasks
task.pointstring
...

to better incorporate this information.

@benfitzpatrick
Copy link
Contributor

Sorry for the delay - yes, could we have the second one? That looks good.

@oliver-sanders
Copy link
Member Author

@benfitzpatrick Changed tooltip text to the second proposed form in 53b6caa.

@hjoliver
Copy link
Member

I checked forward and backward compatibility, and nothing untoward happens, but for new gscan + old suite, the tooltip says "could not get info, try refreshing the scanner". Is it actually possible for the info to not be supplied until a refresh, or can we assume it must be an older suite daemon and say something like "could not get info; suite running at older cylc version?"

@oliver-sanders
Copy link
Member Author

@hjoliver I don't think it is possible for the info to be missing, I just put the exception in for safetys sake. Have updated the text to "could not get info; suite running at older cylc version?".

@hjoliver
Copy link
Member

Thanks, all good now from my perspective.

@benfitzpatrick
Copy link
Contributor

Yep, looks good.

@benfitzpatrick
Copy link
Contributor

Just bunging it through the test battery for safety's sake...

@benfitzpatrick
Copy link
Contributor

I think the failures are the ones that Matt fixed in #1917.

@benfitzpatrick benfitzpatrick merged commit 196ea84 into cylc:master Jul 1, 2016
@oliver-sanders oliver-sanders deleted the 1244.gscan-failed-information branch May 23, 2017 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants