-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathmain.js
224 lines (214 loc) · 6.88 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueMaterial from 'vue-material';
import 'vue-material/dist/vue-material.css';
import App from '@/components/app.vue';
import Default from '@/components/default-list.vue';
import DefaultForm from '@/components/traceanalysis/ta-form.vue';
import CollabAuthentication from '@/mixins/collabAuthentication';
import axios from 'axios';
import '@/assets/general.css';
import '@/mixins/sentry';
import CBModelContainer from '@/components/circuitbuilding/model-container.vue';
import CBForm from '@/components/circuitbuilding/cb-form.vue';
import SCMForm from '@/components/singlecellmodeling/striatal/form-replacing.vue';
import SCMModelContainer from '@/components/singlecellmodeling/model-container.vue';
import SCMModelForm from '@/components/singlecellmodeling/model-form.vue';
import MorphAnalysis from '@/components/morphology/analysis-model-container.vue';
import MorphViewer from '@/components/morphology/viewer-model-container.vue';
import MorphForm from '@/components/morphology/form-replacing.vue';
import MoocCourseContainer from '@/components/mooc/course-container.vue';
import MoocForm from '@/components/mooc/mooc-form.vue';
import MoocWeekContainer from '@/components/mooc/weeks-container.vue';
import SCMStriatalContainer from '@/components/singlecellmodeling/striatal/striatal-container.vue';
import SSIEModelContainer from '@/components/singlecellinsilicoexperiments/model-container.vue';
import BACISEModelContainer from '@/components/brainareacircuitinsilicoexperiments/model-container.vue';
import SCIEModelContainer from '@/components/smallcircuitinsilicoexperiments/model-container.vue';
import HBPSchoolForm from '@/components/hbpschool/hbp-school-form.vue';
import TermAndConditions from '@/components/terms-and-conditions.vue';
import EntityFormReplace from '@/components/entitydashboard/form-replacing.vue';
Vue.use(VueMaterial);
Vue.use(VueRouter);
Vue.prototype.$http = axios;
const router = new VueRouter({
routes: [
// ============================ trace analysis ============================
{
path: '/traceanalysis/:uc_name',
component: DefaultForm,
props: true,
name: 'ta_form',
},
// ============================ circuit building ============================
{
path: '/circuitbuilding/:uc_name',
component: CBModelContainer,
props: true,
name: 'cb_models',
},
{
path: '/circuitbuilding/:uc_name/:model_name',
component: CBForm,
props: true,
name: 'cb_form',
},
// ============================ singlecellmodeling ============================
{
path: '/singlecellmodeling/form/:uc_name',
component: DefaultForm,
props: true,
name: 'sc_form',
},
{
path: '/singlecellmodeling/optimizeastriatalfast-spikinginterneuron',
component: SCMStriatalContainer,
name: 'sc_striatal_models',
},
{
path: '/singlecellmodeling/optimizeastriatalfast-spikinginterneuron/:folder_name',
component: SCMForm,
props: true,
name: 'sc_striatal_form_replacing',
},
{
path: '/singlecellmodeling/:uc_name',
component: SCMModelContainer,
props: true,
name: 'sc_models',
},
{
path: '/singlecellmodeling/:uc_name/:folder_name',
component: SCMModelForm,
props: true,
name: 'sc_models_form',
},
// ============================ moprhology ============================
{
path: '/morphology/morphologyvisualization/',
redirect: '/morphology/morphologyvisualization/view',
},
{
path: '/morphology/:uc_name',
component: MorphAnalysis,
props: true,
name: 'morph_analysis_models',
},
{
path: '/morphology/:uc_name/view',
component: MorphViewer,
props: true,
name: 'morph_viewer_models',
},
{
path: '/morphology/:uc_name/:folder_name',
component: MorphForm,
props: true,
name: 'morph_form_replacing',
},
// ================= singlecellinsilicoexperiments ================
{
path: '/singlecellinsilicoexperiments/:uc_name',
component: SSIEModelContainer,
props: true,
name: 'insilico_exp',
},
// ================= brainareacircuitinsilicoexperiments ================
{
path: '/brainareacircuitinsilicoexperiments/:uc_name',
component: BACISEModelContainer,
props: true,
name: 'brainarea_circuits',
},
{
path: '/brainareacircuitinsilicoexperiments/:uc_name/:model_name',
component: CBForm,
props: true,
name: 'brainarea_form',
},
// ============================ mooc ============================
{
path: '/mooc/',
component: MoocCourseContainer,
props: true,
name: 'mooc_container',
},
{
path: '/mooc/:uc_name/:week',
component: MoocForm,
props: true,
name: 'mooc_form',
},
{
path: '/mooc/:uc_name/',
component: MoocWeekContainer,
props: true,
name: 'weeks_container',
},
// ================= small circuit in silico experiments ================
{
path: '/smallcircuitinsilicoexperiments/:uc_name',
component: SCIEModelContainer,
props: true,
name: 'small_circuit_model_container',
},
{
path: '/smallcircuitinsilicoexperiments/:uc_name/:model_name',
component: CBForm,
props: true,
name: 'small_circuit_form',
},
// ================= hbp school ================
{
path: '/hbpschool/:uc_name/',
component: HBPSchoolForm,
props: true,
name: 'hbp_school_form',
},
// ================= terms and conditions ================
{
path: '/termsandconditions/:list_usecases/:uc_name',
component: TermAndConditions,
props: true,
name: 'termsandconditions',
},
// ================= entity dashboard integration ================
{
path: '/entitydashboard/',
component: EntityFormReplace,
props: true,
name: 'entitydashboard',
},
// ================= default ================
{
path: '/',
redirect: '/traceanalysis',
},
// ============================ rest of UC ============================
{
path: '/:list_usecases', // display the UC bases on the key of usecases.json
component: Default,
props: true, // to see in the component as props
},
{
path: '/:list_usecases/:uc_name',
component: DefaultForm,
props: true,
},
],
base: '/usecases/',
scrollBehavior() {
// to scroll to the top every change of route
return { x: 0, y: 0 };
},
});
/* eslint-disable no-new */
const app = new Vue({
router,
render: h => h(App),
});
CollabAuthentication.init()
.then(() => {
app.$mount('#app');
});