Commit 8d688b2 1 parent 6b0667f commit 8d688b2 Copy full SHA for 8d688b2
File tree 3 files changed +3
-49
lines changed
routes/allocations/allocation/task
3 files changed +3
-49
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -51,12 +51,4 @@ export default Fragment.extend({
51
51
restart ( ) {
52
52
return this . allocation . restart ( this . name ) ;
53
53
} ,
54
-
55
- ls ( path ) {
56
- return this . store . adapterFor ( 'task-state' ) . ls ( this , path ) ;
57
- } ,
58
-
59
- stat ( path ) {
60
- return this . store . adapterFor ( 'task-state' ) . stat ( this , path ) ;
61
- } ,
62
54
} ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export default Route.extend({
6
6
model ( { path = '/' } ) {
7
7
const decodedPath = decodeURIComponent ( path ) ;
8
8
const task = this . modelFor ( 'allocations.allocation.task' ) ;
9
+ const allocation = task . allocation ;
9
10
10
11
const pathWithTaskName = `${ task . name } ${ decodedPath . startsWith ( '/' ) ? '' : '/' } ${ decodedPath } ` ;
11
12
@@ -16,13 +17,13 @@ export default Route.extend({
16
17
} ;
17
18
}
18
19
19
- return RSVP . all ( [ task . stat ( pathWithTaskName ) , task . get ( 'allocation.node' ) ] )
20
+ return RSVP . all ( [ allocation . stat ( pathWithTaskName ) , task . get ( 'allocation.node' ) ] )
20
21
. then ( ( [ statJson ] ) => {
21
22
if ( statJson . IsDir ) {
22
23
return RSVP . hash ( {
23
24
path : decodedPath ,
24
25
task,
25
- directoryEntries : task . ls ( pathWithTaskName ) . catch ( notifyError ( this ) ) ,
26
+ directoryEntries : allocation . ls ( pathWithTaskName ) . catch ( notifyError ( this ) ) ,
26
27
isFile : false ,
27
28
} ) ;
28
29
} else {
You can’t perform that action at this time.
0 commit comments