Skip to content

Commit

Permalink
Remove task state adapter
Browse files Browse the repository at this point in the history
It makes more sense to concentrate these functions in the
allocation adapter.
  • Loading branch information
backspace committed May 28, 2020
1 parent 6b0667f commit ab9e57c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
39 changes: 0 additions & 39 deletions ui/app/adapters/task-state.js

This file was deleted.

5 changes: 3 additions & 2 deletions ui/app/routes/allocations/allocation/task/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default Route.extend({
model({ path = '/' }) {
const decodedPath = decodeURIComponent(path);
const task = this.modelFor('allocations.allocation.task');
const allocation = task.allocation;

const pathWithTaskName = `${task.name}${decodedPath.startsWith('/') ? '' : '/'}${decodedPath}`;

Expand All @@ -16,13 +17,13 @@ export default Route.extend({
};
}

return RSVP.all([task.stat(pathWithTaskName), task.get('allocation.node')])
return RSVP.all([allocation.stat(pathWithTaskName), task.get('allocation.node')])
.then(([statJson]) => {
if (statJson.IsDir) {
return RSVP.hash({
path: decodedPath,
task,
directoryEntries: task.ls(pathWithTaskName).catch(notifyError(this)),
directoryEntries: allocation.ls(pathWithTaskName).catch(notifyError(this)),
isFile: false,
});
} else {
Expand Down

0 comments on commit ab9e57c

Please sign in to comment.