This repository was archived by the owner on Dec 27, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed
dmriprepViewer/src/components Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export default {
42
42
brain: null ,
43
43
showOrig: true ,
44
44
done: false ,
45
+ ready: false ,
45
46
};
46
47
},
47
48
methods: {
@@ -64,7 +65,10 @@ export default {
64
65
},
65
66
mounted () {
66
67
this .$nextTick (() => {
67
- setTimeout (() => { this .initBrainSprite (); }, 1 );
68
+ setTimeout (() => {
69
+ this .ready = true ;
70
+ this .initBrainSprite ();
71
+ }, 100 );
68
72
});
69
73
},
70
74
};
Original file line number Diff line number Diff line change @@ -148,10 +148,14 @@ export default {
148
148
},
149
149
updateReport () {
150
150
this .ready = false ;
151
- axios .get (` https://s3-us-west-2.amazonaws.com/${ this .bucket } /${ this .manifestEntries [this .currentReportIdx ]} ` )
151
+ const reportUrl = ` https://s3-us-west-2.amazonaws.com/${ this .bucket } /${ this .manifestEntries [this .currentReportIdx ]} ` ;
152
+ return axios .get (reportUrl)
152
153
.then ((resp ) => {
153
154
this .currentReport = resp .data ;
154
155
this .ready = true ;
156
+ this .$router .replace ({ name: ' Bucket' ,
157
+ params: { bucket: this .bucket },
158
+ query: { report: reportUrl } });
155
159
});
156
160
},
157
161
},
@@ -169,7 +173,19 @@ export default {
169
173
},
170
174
},
171
175
mounted () {
172
- this .getS3Manifest ().then (this .updateReport );
176
+ let path = null ;
177
+ if (this .$route .query ) {
178
+ if (this .$route .query .report ) {
179
+ path = this .$route .query .report .split (` https://s3-us-west-2.amazonaws.com/${ this .bucket } /` )[1 ];
180
+ }
181
+ }
182
+
183
+ this .getS3Manifest ().then (this .updateReport ).then (() => {
184
+ if (path) {
185
+ this .currentReportIdx = this .manifestEntries .indexOf (path);
186
+ }
187
+ this .getAllReports ();
188
+ });
173
189
},
174
190
};
175
191
</script >
Original file line number Diff line number Diff line change @@ -48,15 +48,13 @@ export default {
48
48
},
49
49
getColor (direction , zScore ) {
50
50
if (direction) {
51
- console .log (zScore);
52
51
// positive is good
53
52
if (zScore <= - 1 ) {
54
53
return ' danger' ;
55
54
} else if (zScore >= 1 ) {
56
55
return ' success' ;
57
56
}
58
57
}
59
- console .log (' here' , zScore);
60
58
if (zScore <= - 1 ) {
61
59
return ' success' ;
62
60
} else if (zScore >= 1 ) {
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export default {
107
107
// load the json
108
108
if (! this .$route .query .url && this .$route .name === ' Report' ) {
109
109
this .$router .push (' /' );
110
- } else {
110
+ } else if ( this . $route . query . url ) {
111
111
axios .get (this .$route .query .url ).then ((resp ) => {
112
112
this .report = resp .data ;
113
113
});
@@ -141,8 +141,9 @@ export default {
141
141
if (this .$route .query ) {
142
142
// load the json
143
143
if (! this .$route .query .url && this .$route .name === ' Report' ) {
144
- // this.$router.push('/');
144
+ this .$router .push (' /' );
145
145
} else {
146
+ console .log (' getting axios?' , this .$route .query .url );
146
147
axios .get (this .$route .query .url ).then ((resp ) => {
147
148
this .report = resp .data ;
148
149
});
You can’t perform that action at this time.
0 commit comments