Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

surface info about the pending deploy in request detail page #825

Merged
merged 2 commits into from
Dec 29, 2015
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SingularityUI/app/collections/RequestTasks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class RequestTasks extends PaginableCollection
parse: (data) ->
for task in data
task.id = task.taskId.id
task.deployId = task.taskId.deployId
data

getTasksForDeploy: (deployId) ->
Expand Down
5 changes: 5 additions & 0 deletions SingularityUI/app/templates/requestDetail/requestHeader.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
<b>Request is bouncing:</b> {{ runningInstanceCount }} of {{ data.instances }} replacement tasks are currently running.
</div>
{{/if}}
{{#if isDeploying}}
<div class="alert alert-warning" role="alert">
<b>Deploy <a href="{{appRoot}}/request/{{ data.id }}/deploy/{{ data.pendingDeploy.id }}">{{data.pendingDeploy.id}}</a> is pending:</b> {{ deployingInstanceCount }} of {{ data.instances }} new tasks are currently running.
</div>
{{/if}}

{{! Active deploy well }}
<div class="well">
Expand Down
8 changes: 8 additions & 0 deletions SingularityUI/app/views/requestHeader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ class requestHeaderSubview extends View
cleanupType: 'BOUNCING'
requestId: @model.get('id')

deployingInstanceCount = 0

if !!@model.get('pendingDeploy')
console.log @activeTasks
deployingInstanceCount = @activeTasks.where({deployId: @model.get('pendingDeploy').id, lastTaskState: 'TASK_RUNNING'}).length

isBouncing: bounces?.length > 0 and @taskCleanups.synced and @activeTasks.synced
runningInstanceCount: @activeTasks.where({lastTaskState: 'TASK_RUNNING'}).length
deployingInstanceCount: deployingInstanceCount
isDeploying: !!@model.get('pendingDeploy') and @model.synced and @activeTasks.synced
config: config
data: @model.toJSON()
synced: @model.synced
Expand Down