Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit 36fc03e

Browse files
committed
some small fixes, still a brainsprite error but whatever
1 parent a8942fa commit 36fc03e

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

dmriprepViewer/src/components/BrainSprite.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default {
4242
brain: null,
4343
showOrig: true,
4444
done: false,
45+
ready: false,
4546
};
4647
},
4748
methods: {
@@ -64,7 +65,10 @@ export default {
6465
},
6566
mounted() {
6667
this.$nextTick(() => {
67-
setTimeout(() => { this.initBrainSprite(); }, 1);
68+
setTimeout(() => {
69+
this.ready = true;
70+
this.initBrainSprite();
71+
}, 100);
6872
});
6973
},
7074
};

dmriprepViewer/src/components/Bucket.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,14 @@ export default {
148148
},
149149
updateReport() {
150150
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)
152153
.then((resp) => {
153154
this.currentReport = resp.data;
154155
this.ready = true;
156+
this.$router.replace({ name: 'Bucket',
157+
params: { bucket: this.bucket },
158+
query: { report: reportUrl } });
155159
});
156160
},
157161
},
@@ -169,7 +173,19 @@ export default {
169173
},
170174
},
171175
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+
});
173189
},
174190
};
175191
</script>

dmriprepViewer/src/components/GroupStats.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,13 @@ export default {
4848
},
4949
getColor(direction, zScore) {
5050
if (direction) {
51-
console.log(zScore);
5251
// positive is good
5352
if (zScore <= -1) {
5453
return 'danger';
5554
} else if (zScore >= 1) {
5655
return 'success';
5756
}
5857
}
59-
console.log('here', zScore);
6058
if (zScore <= -1) {
6159
return 'success';
6260
} else if (zScore >= 1) {

dmriprepViewer/src/components/Report.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default {
107107
// load the json
108108
if (!this.$route.query.url && this.$route.name === 'Report') {
109109
this.$router.push('/');
110-
} else {
110+
} else if (this.$route.query.url) {
111111
axios.get(this.$route.query.url).then((resp) => {
112112
this.report = resp.data;
113113
});
@@ -141,8 +141,9 @@ export default {
141141
if (this.$route.query) {
142142
// load the json
143143
if (!this.$route.query.url && this.$route.name === 'Report') {
144-
// this.$router.push('/');
144+
this.$router.push('/');
145145
} else {
146+
console.log('getting axios?', this.$route.query.url);
146147
axios.get(this.$route.query.url).then((resp) => {
147148
this.report = resp.data;
148149
});

0 commit comments

Comments
 (0)