Skip to content
Open
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
3 changes: 3 additions & 0 deletions .changelog/28137.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: fixes an issue where streaming task logs would error
```
13 changes: 12 additions & 1 deletion ui/app/routes/allocations/allocation/task/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@
*/

import Route from '@ember/routing/route';
import { service } from '@ember/service';

export default class LogsRoute extends Route {
@service abilities;
model() {
return this.modelFor('allocations.allocation.task');
const task = this.modelFor('allocations.allocation.task');
// streaming logs can require the node object to be loaded
// in order for the logUrl() function to correctly use the
// allocation.node.httpAddr property.
// An alternative option here is to use just allocation.node
// as the computed property for logUrl()
if (this.abilities.can('read client')) {
return task && task.get('allocation.node').then(() => task);
}
return task;
}
}
Loading