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

Tasks page improvements #1017

Merged
merged 15 commits into from May 6, 2016

Conversation

Projects
None yet
2 participants
@Calvinp
Contributor

Calvinp commented Apr 29, 2016

Implements several improvements to the tasks table page:

  • Name field is changed to Task ID and Started is changed to Started At
  • Host and rack fields link to a page of all tasks on said host or rack. It is now possible to filter by rackId.
  • On screens that aren't extra small or large, the racks and memory columns now line up properly.
  • The protip is now a tooltip on both this page and the requests page
  • Tooltips on task state filter links now explain the meaning of those states. Please review the wording of these tooltips
  • Fix an error in the decommissioning tasks table that caused it to never render.
Show outdated Hide outdated SingularityUI/app/templates/tasksTable/tasksBase.hbs
</li>
<li {{#ifEqual tasksFilter "scheduled"}}class="active"{{/ifEqual}}>
<a href="{{appRoot}}/tasks/scheduled">Scheduled</a>
<a href="{{appRoot}}/tasks/scheduled" class='has-tooltip' title="Tasks that will run when the time comes" data-toggle='tooltip'>Scheduled</a>

This comment has been minimized.

@ssalinas

ssalinas Apr 29, 2016

Member

Maybe more like 'Tasks that will run at the next scheduled interval'

@ssalinas

ssalinas Apr 29, 2016

Member

Maybe more like 'Tasks that will run at the next scheduled interval'

Show outdated Hide outdated SingularityUI/app/templates/requestTypeFilter.hbs
<span class="glyphicon glyphicon-ok"></span>
On-demand
</a>
</li>
<li {{#unlessInSubFilter 'RUN_ONCE' requestsSubFilter}}class="active"{{/unlessInSubFilter}}>
<a data-filter="RUN_ONCE">
<a data-filter="RUN_ONCE" class='has-tooltip' title="Protip: press cmd to select multiple" data-toggle='tooltip'>

This comment has been minimized.

@ssalinas

ssalinas Apr 29, 2016

Member

Wondering if this is necessary, is there any reason they can't just be a toggle? Instead of having to hold down cmd, just clicking toggles that filter on/off, and all are selected by default to start with

@ssalinas

ssalinas Apr 29, 2016

Member

Wondering if this is necessary, is there any reason they can't just be a toggle? Instead of having to hold down cmd, just clicking toggles that filter on/off, and all are selected by default to start with

Show outdated Hide outdated SingularityUI/app/templates/tasksTable/tasksBase.hbs
</li>
<li {{#ifEqual tasksFilter "lbcleanup"}}class="active"{{/ifEqual}}>
<a href="{{appRoot}}/tasks/lbcleanup">LB Cleaning</a>
<a href="{{appRoot}}/tasks/lbcleanup" class='has-tooltip' title="Tasks that are load balancer cleaning" data-toggle='tooltip'>LB Cleaning</a>

This comment has been minimized.

@ssalinas

ssalinas Apr 29, 2016

Member

'Tasks that are being removed from the load balancer'

@ssalinas

ssalinas Apr 29, 2016

Member

'Tasks that are being removed from the load balancer'

Show outdated Hide outdated SingularityUI/app/templates/tasksTable/tasksBase.hbs
</li>
<li {{#ifEqual tasksFilter "cleaning"}}class="active"{{/ifEqual}}>
<a href="{{appRoot}}/tasks/cleaning">Cleaning</a>
<a href="{{appRoot}}/tasks/cleaning" class='has-tooltip' title="Tasks that are cleaning" data-toggle='tooltip'>Cleaning</a>

This comment has been minimized.

@ssalinas

ssalinas Apr 29, 2016

Member

Technically correct, but maybe for easier to read language something like, 'Tasks that have been asked to shut down'

@ssalinas

ssalinas Apr 29, 2016

Member

Technically correct, but maybe for easier to read language something like, 'Tasks that have been asked to shut down'

Show outdated Hide outdated SingularityUI/app/handlebarsHelpers.coffee
@@ -40,6 +40,7 @@ Handlebars.registerHelper 'ifTaskInList', (list, task, options) ->
return options.inverse @
Handlebars.registerHelper 'ifInSubFilter', (needle, haystack, options) ->
#return options.inverse @ unless haystack

This comment has been minimized.

@ssalinas

ssalinas May 3, 2016

Member

there a reason this comment was added?

@ssalinas

ssalinas May 3, 2016

Member

there a reason this comment was added?

This comment has been minimized.

@Calvinp

Calvinp May 3, 2016

Contributor

Artifact of one way I considered to fix a problem I was having. I'll remove it.

@Calvinp

Calvinp May 3, 2016

Contributor

Artifact of one way I considered to fix a problem I was having. I'll remove it.

Show outdated Hide outdated SingularityUI/app/templates/tasksTable/tasksActiveBody.hbs
</th>
<th class="hidden-xs" data-sort-attribute="host">
Host
</th>
<th class="hidden-xs" data-sort-attribute="taskId.rackId">
<th class="visible-lg" data-sort-attribute="taskId.rackId">

This comment has been minimized.

@ssalinas

ssalinas May 3, 2016

Member

What was the reasoning for making this visible vs not and lg vs xs? I would argue that just seeing the task id, cpu and mem on a small device is the more important. And probably host over rack if we were to choose one more to add

@ssalinas

ssalinas May 3, 2016

Member

What was the reasoning for making this visible vs not and lg vs xs? I would argue that just seeing the task id, cpu and mem on a small device is the more important. And probably host over rack if we were to choose one more to add

This comment has been minimized.

@Calvinp

Calvinp May 3, 2016

Contributor

Honestly, I just chose the one I saw first as the correct one. There probably won't be room for hosts on a smaller screen if we want to show disk resource too though.

@Calvinp

Calvinp May 3, 2016

Contributor

Honestly, I just chose the one I saw first as the correct one. There probably won't be room for hosts on a smaller screen if we want to show disk resource too though.

This comment has been minimized.

@ssalinas

ssalinas May 3, 2016

Member

If you have the bandwidth it'd be worth a quick pass over the bootstrap classes for the table columns to make sure they collapse nicely (e.g. are xs and lg good breakpoints or is sm better? What are the most important to display and what can we hide?). If I remember correctly, visible-lg is actually deprecated as of 3.2 in favor of visible-(size)-(display style)

@ssalinas

ssalinas May 3, 2016

Member

If you have the bandwidth it'd be worth a quick pass over the bootstrap classes for the table columns to make sure they collapse nicely (e.g. are xs and lg good breakpoints or is sm better? What are the most important to display and what can we hide?). If I remember correctly, visible-lg is actually deprecated as of 3.2 in favor of visible-(size)-(display style)

This comment has been minimized.

@Calvinp

Calvinp May 3, 2016

Contributor

I'll take a look at this now.

@Calvinp

Calvinp May 3, 2016

Contributor

I'll take a look at this now.

This comment has been minimized.

@Calvinp

Calvinp May 3, 2016

Contributor

At the smallest window sizes, the task ID and started at timestamp start running off the screen. But that happens regardless of what we're showing. hidden-xs seems to be ok - everything is able to display pretty much the same at the smaller sizes down to the xs cutoff. It might not be ok for a table with more columns though. Also, the actions icons (kill task and JSON) can fit without causing a change in the way the rest of the table looks even at the smallest sizes.

@Calvinp

Calvinp May 3, 2016

Contributor

At the smallest window sizes, the task ID and started at timestamp start running off the screen. But that happens regardless of what we're showing. hidden-xs seems to be ok - everything is able to display pretty much the same at the smaller sizes down to the xs cutoff. It might not be ok for a table with more columns though. Also, the actions icons (kill task and JSON) can fit without causing a change in the way the rest of the table looks even at the smallest sizes.

This comment has been minimized.

@Calvinp

Calvinp May 3, 2016

Contributor

Also, the actions icons (kill task and JSON) can fit without causing a change in the way the rest of the table looks even at the smallest sizes.

This does not appear to be the case, however, on the other tasks tables. Only on active. So I'm going to remove hidden-xs for the actions icons for active tasks only.

@Calvinp

Calvinp May 3, 2016

Contributor

Also, the actions icons (kill task and JSON) can fit without causing a change in the way the rest of the table looks even at the smallest sizes.

This does not appear to be the case, however, on the other tasks tables. Only on active. So I'm going to remove hidden-xs for the actions icons for active tasks only.

@Calvinp Calvinp added the hs_staging label May 3, 2016

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas May 4, 2016

Member

One more comment on this. When in a filter that isn't Active, it doesn't seem like the service/worker/etc filters are working properly. For example, filters out all pending tasks on the scheduled filter unless all the request type filters are active

Member

ssalinas commented May 4, 2016

One more comment on this. When in a filter that isn't Active, it doesn't seem like the service/worker/etc filters are working properly. For example, filters out all pending tasks on the scheduled filter unless all the request type filters are active

@ssalinas ssalinas modified the milestone: 0.6.0 May 4, 2016

@Calvinp

This comment has been minimized.

Show comment
Hide comment
@Calvinp

Calvinp May 4, 2016

Contributor

As it turns out, pending tasks don't store their request type - you'd have to fetch the task to acquire that, which is certainly not reasonable to do for every single task.
So instead of fixing that I removed the request type filters entirely for tasks that aren't active.

Contributor

Calvinp commented May 4, 2016

As it turns out, pending tasks don't store their request type - you'd have to fetch the task to acquire that, which is certainly not reasonable to do for every single task.
So instead of fixing that I removed the request type filters entirely for tasks that aren't active.

@Calvinp Calvinp added the hs_qa label May 5, 2016

@ssalinas ssalinas added the hs_stable label May 6, 2016

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas May 6, 2016

Member

Looks good @Calvinp , the new toggles are much nicer/easier

Member

ssalinas commented May 6, 2016

Looks good @Calvinp , the new toggles are much nicer/easier

@ssalinas ssalinas merged commit 70c746d into master May 6, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@ssalinas ssalinas deleted the task-page-improvements branch May 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment