-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathactivitySetup.ts
More file actions
299 lines (296 loc) · 8.08 KB
/
Copy pathactivitySetup.ts
File metadata and controls
299 lines (296 loc) · 8.08 KB
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
/**
* List of built-in activities
*/
import {
faBezierCurve,
faChartBar,
faColumns,
faComments,
faDatabase,
faDownload,
faFile,
faFileContract,
faFolder,
faHdd,
faLaptop,
faList,
faPlay,
faSitemap,
faTable,
faTrain,
faUpload,
faWrench} from "@fortawesome/free-solid-svg-icons";
import { ACTIVITY_LABELS } from "@/components/Page/constants";
import type { Activity } from "@/stores/activityStoreTypes";
import type { EventData } from "@/stores/eventStore";
export const defaultActivities = [
{
anonymous: true,
description: "Opens a data dialog, allowing uploads from URL, pasted content or disk.",
icon: faUpload,
id: "upload",
mutable: false,
optional: false,
panel: false,
title: "Upload",
to: null,
tooltip: "Download from URL or upload files from disk",
visible: true,
},
{
anonymous: true,
description: "Opens the new beta upload interface with experimental features.",
icon: faUpload,
id: "beta-upload",
mutable: false,
optional: true,
panel: true,
title: "Beta Upload",
to: null,
tooltip: "Try the new experimental upload interface",
visible: false,
},
{
anonymous: true,
description: "Displays the tool panel to search and access all available tools.",
icon: faWrench,
id: "tools",
mutable: false,
optional: false,
panel: true,
title: "Tools",
to: null,
tooltip: "Search and run tools",
visible: true,
},
{
anonymous: false,
description: "AI-powered assistant to help with Galaxy tasks and troubleshooting.",
icon: faComments,
id: "galaxyai",
mutable: false,
optional: true,
panel: true,
title: "GalaxyAI",
to: null,
click: true,
tooltip: "Chat with GalaxyAI",
visible: true,
windowTitle: "GalaxyAI",
},
{
anonymous: true,
description: "Displays a panel to search and access workflows.",
icon: faSitemap,
id: "workflows",
mutable: false,
optional: true,
panel: false,
title: "Workflows",
to: "/workflows/list",
tooltip: "Search and run workflows",
visible: true,
},
{
anonymous: false,
description: "Displays all job runs.",
icon: faTrain,
id: "jobs",
mutable: false,
optional: false,
panel: true,
title: "Jobs",
to: null,
tooltip: "Show all job runs",
visible: true,
},
{
anonymous: false,
description: "Displays all workflow runs.",
icon: faList,
id: "invocation",
mutable: false,
optional: true,
panel: true,
title: "Workflow Invocations",
tooltip: "Show all workflow runs",
to: null,
visible: true,
},
{
anonymous: false,
description: "Displays currently running interactive tools (ITs), if these are enabled by the administrator.",
icon: faLaptop,
id: "interactivetools",
mutable: false,
optional: true,
panel: true,
title: "Interactive Tools",
tooltip: "Show Active and available Interactive tools",
to: "/interactivetool_entry_points/list",
visible: true,
},
{
anonymous: true,
description: "Displays the list of available visualizations.",
icon: faChartBar,
id: "visualizations",
mutable: false,
optional: true,
panel: true,
title: "Visualization",
to: null,
tooltip: "Visualize datasets",
visible: true,
},
{
anonymous: true,
description: "Displays the list of all histories.",
icon: faHdd,
id: "histories",
mutable: false,
optional: true,
panel: false,
title: "Histories",
tooltip: "Show all histories",
to: "/histories/list",
visible: true,
},
{
anonymous: false,
description: "Lists histories to open in the History Graph view.",
icon: faBezierCurve,
id: "historygraph",
mutable: false,
optional: true,
panel: true,
title: "History Graphs",
tooltip: "Pick a history to view its provenance graph",
to: null,
visible: true,
},
{
anonymous: false,
description: "Displays the history selector panel and opens History Multiview in the center panel.",
icon: faColumns,
id: "multiview",
mutable: false,
optional: true,
panel: true,
title: "History Multiview",
tooltip: "Select histories to show in History Multiview",
to: "/histories/view_multiple",
visible: true,
},
{
anonymous: false,
description: "Displays all of your datasets across all histories.",
icon: faFolder,
id: "datasets",
mutable: false,
optional: true,
panel: false,
title: "Datasets",
tooltip: "Show all datasets",
to: "/datasets/list",
visible: true,
},
{
anonymous: true,
description: ACTIVITY_LABELS.description,
icon: faFileContract,
id: "pages",
mutable: false,
optional: true,
panel: false,
title: ACTIVITY_LABELS.title,
tooltip: ACTIVITY_LABELS.tooltip,
to: "/pages/list",
visible: true,
},
{
anonymous: false,
description: "Display Data Libraries with datasets available to all users.",
icon: faDatabase,
id: "libraries",
mutable: false,
optional: true,
panel: false,
title: "Libraries",
tooltip: "Access data libraries",
to: "/libraries",
visible: true,
},
{
anonymous: true,
description: "Rule-based advanced import of datasets or collections.",
icon: faTable,
id: "rules",
mutable: false,
optional: true,
panel: false,
title: "Rule-based Data Import",
tooltip: "Launch rule-based advanced import of datasets or collections",
to: "/rules",
visible: false,
},
{
anonymous: false,
description: "Displays tools defined by you.",
icon: faWrench,
id: "user-defined-tools",
mutable: false,
optional: true,
panel: true,
title: "Custom Tools",
to: null,
tooltip: "Search and run user-defined tools",
visible: true,
},
{
anonymous: false,
description: "Manage your recent downloads.",
icon: faDownload,
id: "recent-downloads",
mutable: false,
optional: true,
panel: false,
title: "Recent Exports",
to: "/downloads",
tooltip: "Access your recent exports and downloads to check their status or download them again.",
visible: true,
},
] as const;
export function convertDropData(data: EventData): Activity | null {
if (data.history_content_type === "dataset") {
return {
anonymous: true,
description: "Displays this dataset.",
icon: faFile,
id: `dataset-${data.id}`,
mutable: true,
optional: true,
panel: false,
title: data.name as string,
tooltip: "View your dataset",
to: `/datasets/${data.id}/preview`,
visible: true,
};
}
if (data.model_class === "StoredWorkflow") {
return {
anonymous: false,
description: data.description as string,
icon: faPlay,
id: `workflow-${data.id}`,
mutable: true,
optional: true,
panel: false,
title: data.name as string,
tooltip: data.name as string,
to: `/workflows/run?id=${data.id}`,
visible: true,
};
}
return null;
}