-
Notifications
You must be signed in to change notification settings - Fork 4
/
tripal_galaxy.views.inc
executable file
·354 lines (333 loc) · 10.3 KB
/
tripal_galaxy.views.inc
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<?php
/**
* @file
* Integrates with Drupal Views.
*/
/**
* Provides information arrays for Views integration.
*/
function tripal_galaxy_views_data() {
$data['tripal_galaxy']['table']['group'] = t('Galaxy Server');
$data['tripal_galaxy']['table']['base'] = array(
'field' => 'galaxy_id',
'title' => t('Galaxy Server'),
'help' => t('Galaxy Server'),
);
$data['tripal_galaxy']['galaxy_id'] = array(
'title' => t('Galaxy Host ID'),
'help' => t('The internal Galaxy host ID.'),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy']['servername'] = array(
'title' => t('Server Name'),
'help' => t('The galaxy server name.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow']['table']['group'] = t('Galaxy Workflow');
$data['tripal_galaxy_workflow']['table']['base'] = array(
'field' => 'galaxy_workflow_id',
'title' => t('Galaxy Workflow'),
'help' => t('Workflow ID.'),
);
$data['tripal_galaxy_workflow']['galaxy_workflow_id'] = array(
'title' => t('Internal ID'),
'help' => t('The internal Galaxy workflow ID.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow']['status'] = array(
'title' => t('Workflow Status'),
'help' => t('The status of the workflow.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow']['nid'] = array(
'title' => t('Node'),
'help' => t('The webform submission node for this workflow. If the workflow was not submitted via the webform then this value will be NULL.'),
'relationship' => array(
'base' => 'node',
'field' => 'nid',
'handler' => 'views_handler_relationship',
'label' => t('The submission node (webform).'),
),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow']['workflow_name'] = array(
'title' => t('Workflow Name'),
'help' => t('The workflow name as it is on the Galaxy server. This may be different from the workflow node title for the same workflow this site.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow']['workflow_id'] = array(
'title' => t('Workflow ID'),
'help' => t('The ID of the workflow on the Galaxy server.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow']['galaxy_id'] = array(
'title' => t('Galaxy Server ID'),
'help' => t('The galaxy server ID.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['table']['group'] = t('Galaxy Workflow Submission');
$data['tripal_galaxy_workflow_submission']['table']['base'] = array(
'field' => 'sid',
'title' => t('Galaxy Workflow Submission'),
'help' => t('Galaxy Workflow Submission'),
);
$data['tripal_galaxy_workflow_submission']['sid'] = array(
'title' => t('Submission ID'),
'help' => t('The submission ID for this workflow.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['uid'] = array(
'title' => t('Submitter ID'),
'help' => t('The user ID of the user that submitted this workflow.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['submit_date'] = array(
'title' => t('Submission Time'),
'help' => t('The time of submission for this workflow.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_date',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['start_time'] = array(
'title' => t('Start Time'),
'help' => t('The time the workflow was given to the Galaxy server for execution.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_date',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['end_time'] = array(
'title' => t('End Time'),
'help' => t('The time that the workfow completed execution on the Galaxy server.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_date',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['status'] = array(
'title' => t('Submission Status'),
'help' => t('The status of the workflow execution.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_workflow_submission']['uid'] = array(
'title' => t('Submitting User'),
'help' => t('The ID of the user submitting the workflow.'),
'relationship' => array(
'base' => 'users',
'field' => 'uid',
'handler' => 'views_handler_relationship',
'label' => t('The submitting User'),
),
);
$data['tripal_galaxy_workflow_submission']['galaxy_workflow_id'] = array(
'title' => t('The Galaxy Workflow'),
'help' => t('The ID of the user submitting the workflow.'),
'relationship' => array(
'base' => 'tripal_galaxy_workflow',
'field' => 'galaxy_workflow_id',
'handler' => 'views_handler_relationship',
'label' => t('The Galaxy Workflow'),
),
);
$data['tripal_galaxy_workflow_submission']['view_results'] = array(
'title' => t('View Results Link'),
'help' => t('Link to the submission result page.'),
'field' => array(
'handler' => 'views_handler_view_results_field',
),
);
// $data['tripal_galaxy_workflow_submission']['view_submission'] = array(
// 'title' => t('View Submissions Link'),
// 'help' => t('Link to the submission page.'),
// 'field' => array(
// 'handler' => 'views_handler_view_submission_field',
// ),
// );
// $data['tripal_galaxy_workflow_submission']['rerun'] = array(
// 'title' => t('Rerun Link'),
// 'help' => t('Link to re-run the workflow.'),
// 'field' => array(
// 'handler' => 'views_handler_view_rerun_field',
// ),
// );
// $data['tripal_galaxy_workflow_submission']['delete'] = array(
// 'title' => t('Delete Link'),
// 'help' => t('Link to the delete the submission.'),
// 'field' => array(
// 'handler' => 'views_handler_view_delete_field',
// ),
// );
$data['tripal_galaxy_webform']['table']['group'] = t('Galaxy Workflow to Webform Submission');
$data['tripal_galaxy_webform']['wf_sid'] = array(
'title' => t('Webform Submission ID'),
'help' => t('The webform submission ID for this workflow.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
$data['tripal_galaxy_webform']['tg_sid'] = array(
'title' => t('Galaxy Submission ID'),
'help' => t('The Galaxy submission ID for this workflow.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
// Joins.
$data['tripal_galaxy']['table']['join'] = array(
'tripal_galaxy_workflow' => array(
'left_field' => 'galaxy_id',
'field' => 'galaxy_id',
'type' => 'INNER',
),
);
$data['tripal_galaxy_workflow_submission']['table']['join'] = array(
'tripal_galaxy_workflow' => array(
'left_field' => 'galaxy_workflow_id',
'field' => 'galaxy_workflow_id',
'type' => 'INNER',
),
);
$data['tripal_galaxy_webform']['table']['join'] = array(
'tripal_galaxy_workflow_submission' => array(
'left_field' => 'sid',
'field' => 'tg_sid',
'type' => 'LEFT',
),
);
$data['tripal_galaxy_workflow_submission']['table']['join'] = array(
'users' => array(
'left_field' => 'uid',
'field' => 'uid',
'type' => 'LEFT',
),
);
return $data;
}