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

Dashboard page improvements #1023

Merged
merged 5 commits into from May 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion SingularityUI/app/templates/dashboard.hbs
@@ -1,6 +1,6 @@
<header>
{{#if deployUser}}
<h1>{{ deployUser }} <small><a data-action="change-user">change</a></small></h1>
<h1>{{ deployUser }}</h1>
{{else}}
<h1>Singularity</h1>
{{/if}}
Expand Down
Expand Up @@ -4,7 +4,8 @@
<tr>
<th>{{! Star column }}</th>
<th>Request</th>
<th class="hidden-xs">Requested</th>
<th>Type</th>
<th class="hidden-xs">Time of Last Deploy</th>
<th>Status</th>
<th class="visible-lg visible-md">Deploy user</th>
<th class="visible-lg visible-md">Instances</th>
Expand All @@ -24,6 +25,9 @@
{{ request.id }}
</a>
</td>
<td>
{{humanizeText request.requestType}}
</td>
<td class="hidden-xs" data-value="{{ requestDeployState.activeDeploy.timestamp }}">
<span title="{{ requestDeployState.activeDeploy.timestamp }}">
{{timestampFromNow requestDeployState.activeDeploy.timestamp}}
Expand Down
18 changes: 11 additions & 7 deletions SingularityUI/app/templates/requestsTable/requestsPausedBody.hbs
Expand Up @@ -10,11 +10,13 @@
Type
</th>
<th class="hidden-xs" data-sort-attribute="requestDeployState.activeDeploy.timestamp">
Requested
</th>
<th class="hidden-sm hidden-xs" data-sort-attribute="requestDeployState.activeDeploy.user">
Deploy user
Time of Last Deploy
</th>
{{#unless onDashboardPage}}
<th class="hidden-sm hidden-xs" data-sort-attribute="requestDeployState.activeDeploy.user">
Deploy user
</th>
{{/unless}}

{{#ifInSubFilter 'SCHEDULED' requestsSubFilter}}
<th class="visible-lg visible-xl schedule-header" data-sort-attribute="request.schedule">
Expand Down Expand Up @@ -45,9 +47,11 @@
<td class="hidden-xs" data-value="{{requestDeployState.activeDeploy.timestamp}}">
{{timestampFromNow requestDeployState.activeDeploy.timestamp}}
</td>
<td class="hidden-sm hidden-xs">
{{usernameFromEmail requestDeployState.activeDeploy.user}}
</td>
{{#unless ../onDashboardPage}}
<td class="hidden-sm hidden-xs">
{{usernameFromEmail requestDeployState.activeDeploy.user}}
</td>
{{/unless}}

{{#ifInSubFilter 'SCHEDULED' ../requestsSubFilter}}
<td class="visible-lg visible-xl">
Expand Down
5 changes: 1 addition & 4 deletions SingularityUI/app/views/dashboard.coffee
Expand Up @@ -9,7 +9,6 @@ class DashboardView extends View
events: ->
_.extend super,
'click [data-action="unstar"]': 'unstar'
'click [data-action="change-user"]': 'changeUser'
'click th[data-sort-attribute]': 'sortTable'
'click [data-action="viewJSON"]': 'viewJson'
'click [data-action="remove"]': 'removeRequest'
Expand Down Expand Up @@ -41,6 +40,7 @@ class DashboardView extends View
requests: pausedRequests
haveRequests: pausedRequests.length > 0
requestsSubFilter: ''
onDashboardPage: true
collectionSynced: @collection.synced

@$el.html @templateBase context, partials
Expand Down Expand Up @@ -119,9 +119,6 @@ class DashboardView extends View
if @$('tbody tr').length is 0
@render()

changeUser: =>
app.deployUserPrompt()

getRequest: (id) =>
maybeRequest = @collection.models.filter (model) ->
model.id is id
Expand Down