Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
afc8bdc
Initial commit for collaboration on the k8s runner/job configuration.
pcm32 Mar 15, 2016
fa3da5a
Adds imports for pykube
pcm32 Mar 15, 2016
eff6d21
Changes import to handle missing dependency
pcm32 Mar 15, 2016
9c4ef02
Sample config file for k8s based execution.
pcm32 Mar 15, 2016
f2ef8de
First trial at the __init__
pcm32 Mar 15, 2016
97af646
Configures pykube to use the kubernetes config file path set in the j…
pcm32 Apr 6, 2016
6384258
Adds persistent volume claim name example in config.
pcm32 Apr 7, 2016
d5abfb6
Initial commit of queue_job plus required helper methods (not finished).
pcm32 Apr 7, 2016
2c485d7
Adds pieces for PersistentVolume and PersistentVolumesClaims
pcm32 Apr 7, 2016
2607be1
Adds namespace and port proposal for job_conf file.
pcm32 Apr 13, 2016
ac2a82c
Minor formatting
pcm32 Apr 13, 2016
af03b96
Job name and correct spec.
pcm32 Apr 13, 2016
c16fe16
Adds async jobs to monitor queue
pcm32 Apr 13, 2016
f6dc05f
Improves job name, prepending string to make it URLable as required b…
pcm32 Apr 13, 2016
0d21b52
Comments ports usage (we leave this feature for later) and other mino…
pcm32 Apr 13, 2016
6cbbbfe
changes way that 'command' option is passed to k8s on the Job object …
pcm32 Apr 13, 2016
96d86de
Implements stop job.
pcm32 Apr 13, 2016
820d33c
Minor correction of message.
pcm32 Apr 15, 2016
820913c
Adds some todo's
pcm32 Apr 15, 2016
ef70f0e
Implements watch_item and replaces the watched_items, to use the pare…
pcm32 Apr 18, 2016
f802420
Changes stop job to scale job to zero replicas instead of deleting th…
pcm32 Apr 18, 2016
0002595
Minor documentation improvement.
pcm32 Apr 18, 2016
25f4222
Adds pods retrials for per installation and individual docker destina…
pcm32 Apr 18, 2016
bdf283e
Removes unnecessary __get_job_states
pcm32 Apr 18, 2016
8ff8c1c
Uses k8s pod log as stdout/stderr.
pcm32 Apr 18, 2016
9fbf03d
Removes unnecessary get CLI plugins method.
pcm32 Apr 19, 2016
f686253
PEP8 compliant formatting
pcm32 Apr 19, 2016
58c9697
Clean up for queue method.
pcm32 Apr 19, 2016
e50ed67
Removes apparently unnecessary parse_destination_params...
pcm32 Apr 19, 2016
daf8ccb
Removes url_to_destination, as this is only for legacy destinations (…
pcm32 Apr 19, 2016
258c281
Adds some logging plus job state changes.
pcm32 Apr 19, 2016
0c08228
Fixes initial handling of runner params.
pcm32 Apr 20, 2016
43ff13d
Starts monitor thread and worker threads.
pcm32 Apr 20, 2016
e3d239a
Changes k8s job api path to extensions/v1beta1 as pykube doesn't supp…
pcm32 Apr 22, 2016
ffdc08b
Fixes labels and faulty spec hierarchy.
pcm32 Apr 22, 2016
cabfd83
Fixes volumes and containers to be as expected json arrays.
pcm32 Apr 22, 2016
ec97296
Fixes non-DNS persistent volume claim.
pcm32 Apr 22, 2016
943fb12
Improves formatting (PEP suggestions).
pcm32 Apr 25, 2016
a55afa5
Handles correctly error and output files.
pcm32 Apr 25, 2016
74a4772
Removes some unneeded imports.
pcm32 Apr 25, 2016
d98c896
Move metadata-related methods from shed_util_common to metadata_util.
davebx Apr 28, 2016
03102e5
Correct travis errors and missing imports.
davebx Apr 28, 2016
16dfca8
Merge branch 'release_16.04' of https://github.com/galaxyproject/gala…
bgruening Apr 30, 2016
94f38e7
Missing os environment functionality import (forgot to include in com…
pcm32 May 3, 2016
7abd09e
Merge pull request #1 from galaxyproject/dev
pcm32 May 3, 2016
7009151
Merge branch 'dev' into feature/k8s_job_runner
pcm32 May 4, 2016
3347713
Adds job_conf documentation for Kubernetes runner on the job_conf.xml…
pcm32 May 4, 2016
64f6a8b
Update method call.
davebx May 4, 2016
abb6176
Fix category/repositories API endpoint. Add test.
davebx May 4, 2016
d78fd5f
Placate Travis.
davebx May 4, 2016
951a931
Describes scenario with <interpreter> <script> inside assumed working…
pcm32 May 5, 2016
401ded6
Removes job_conf_k8s.xml file
pcm32 May 5, 2016
b2cf8b5
Adds temporary dependency on my version of pykube, until changes on p…
pcm32 May 5, 2016
33109d1
Fixes typo on comment of runner documentation.
pcm32 May 5, 2016
8cb13de
Fixes other errors spotted by travis.
pcm32 May 5, 2016
acaedd4
Refactor out repository-related methods from shed_util_common.
davebx May 5, 2016
e1d9ce9
Move more methods from shed_util_common to repository_util.
davebx May 5, 2016
b46b491
Small typos/issues fixed for travis.
pcm32 May 6, 2016
0400c17
Move a lot more things from shed_util_common to repository_util.
davebx May 9, 2016
26396ff
Fix travis errors.
davebx May 10, 2016
9f9e008
Remove another unused import.
davebx May 10, 2016
0016c51
Adheres to pykube new logs method instead of previous get_logs
pcm32 May 13, 2016
ac2fb6d
Merge remote-tracking branch 'upstream/dev' into refactor_suc
davebx May 17, 2016
8eb4f90
Remove merge conflict aftereffects.
davebx May 17, 2016
9647793
Fix another incorrectly resolved merge conflict.
davebx May 17, 2016
9ee0d88
Fix missing import and unused import.
davebx May 17, 2016
c6da8eb
Merge pull request #2 from galaxyproject/dev
pcm32 May 20, 2016
a54a2e0
Merge branch 'dev' into feature/k8s_job_runner
pcm32 May 20, 2016
46fb489
Adds the ability to build container ids for pieces for the centralise…
pcm32 May 20, 2016
8e176d4
Moves the kubernetes runner to use the centralised galaxy way of pick…
pcm32 May 20, 2016
f06d8a0
Additional new required parameter for destinations (that will be used…
pcm32 May 20, 2016
84a9ae3
Removes quotes to docker_enabled paramter value in documentation of d…
pcm32 May 20, 2016
c484ab3
Adds missing parenthesis for string formatting.
pcm32 May 20, 2016
4a90814
Fixes use of container object returned by underlying galaxy methods.
pcm32 May 20, 2016
c7929f8
Introduces additional parameter to avoid having the command-line modi…
pcm32 May 20, 2016
66947c2
Provide backward-compatible galaxy.datatypes.checkers module.
jmchilton May 20, 2016
110f0fe
add mothur.tre datatype (subclass)
shiltemann May 23, 2016
f63ab5c
scan entire file when setting metadata
shiltemann May 23, 2016
2eee6e2
add is_target_available() to conda utils
bgruening May 23, 2016
5360436
stdin and stdout needs a PIPE to retrive the stdout
bgruening May 23, 2016
0b3832b
Fix bad merge.
bgruening May 24, 2016
be97d7e
Replace frame dictionary with regular view
guerler May 19, 2016
b9e2983
Remove grid lock feature
guerler May 21, 2016
53fa566
Use regular initialization from frame shadow view
guerler May 21, 2016
44bd042
Add support for optional header items/icons
guerler May 21, 2016
e16c3f3
Remove unused class variables, reduce indention
guerler May 21, 2016
64cb97c
Parse view instead of content dom on click
guerler May 21, 2016
617cd2d
Add event handlers to navigate through history
guerler May 22, 2016
a12c1cb
Cache histories individually
guerler May 23, 2016
2e45e77
UI, history: correctly handle index API defaults
carlfeberhard May 25, 2016
69879af
Merge _complete_terminal_job() from BaseJobRunner into DRMAAJobRunner
nsoranzo May 24, 2016
ca12c37
Clarify _complete_terminal_job() return value
nsoranzo May 24, 2016
301f7db
SLURM: when scontrol fails, try to get job state with sacct
nsoranzo May 20, 2016
81702e7
Merge pull request #2395 from bgruening/conda_search
martenson May 25, 2016
f0a1bc8
Merge pull request #2413 from carlfeberhard/fix.history-collection
dannon May 25, 2016
ee314ee
Update galaxy-lib related modules to latest in that project.
jmchilton May 25, 2016
939a107
Fix to 4a61a4c: add hids for dataset inputs
carlfeberhard May 25, 2016
197f228
Merge branch 'dev' into scratchbook_slider_000
guerler May 25, 2016
71f9d96
Remove HTML_CHECK_LINES from checkers export.
jmchilton May 25, 2016
c63bf91
Merge pull request #2389 from jmchilton/checkers_restore
dannon May 25, 2016
50359e1
Merge remote-tracking branch 'upstream/release_16.04' into dev
dannon May 25, 2016
27b70ca
Merge pull request #2396 from guerler/scratchbook_slider_000
bgruening May 26, 2016
4bfcce0
Raise Exception if watch_tools has an unrecognized value
nsoranzo May 26, 2016
4eeb73e
Merge pull request #2418 from nsoranzo/toolbox_watcher
jmchilton May 26, 2016
03a92ab
Python3: use log.warning() instead of deprecated log.warn()
nsoranzo May 26, 2016
d72eee3
wrap bare str raises with generic Exception()
martenson May 26, 2016
1254537
fix the mess made with mass edit
martenson May 26, 2016
8aa629a
Updates and fixes of the run workflow ui elements and views
guerler May 25, 2016
1453dbd
Merge pull request #2414 from jmchilton/lib-fix
martenson May 26, 2016
35da049
Merge pull request #2420 from nsoranzo/log_warn
martenson May 26, 2016
ef41746
Merge pull request #2421 from martenson/wrap-str-raises
dannon May 26, 2016
a27e867
wrap bare str raises with generic Exception()
martenson May 26, 2016
fe64a81
fix the mess made with mass edit
martenson May 26, 2016
26ea340
Merge pull request #2415 from carlfeberhard/fix.show-params-hid
dannon May 26, 2016
6094990
Merge pull request #2424 from martenson/port-exceptionwrap-16.04
jmchilton May 26, 2016
b83f1b8
add otulabels metadata to mothur.otu datatype
shiltemann May 27, 2016
3afe316
minor docs touch
martenson May 27, 2016
3b73bb3
Merge pull request #2427 from martenson/minor-docs
dannon May 27, 2016
eefc73a
Merge pull request #2416 from guerler/tool_composite_000
jmchilton May 28, 2016
24451e7
add and/or correct missing EDAM formats/data to datatypes.
hmenager May 30, 2016
c450763
Merge branch 'dev' of https://github.com/galaxyproject/galaxy into dev
hmenager May 30, 2016
835797c
Merge pull request #2428 from hmenager/dev
bgruening May 30, 2016
61589b3
minimize number of lines read in set_meta functions
shiltemann May 31, 2016
214e757
Only scan the last 16 MB of a job's stderr for slurm memory warning
natefoo May 31, 2016
dcb28e0
Fix linting error
natefoo May 31, 2016
ceb825b
Merge pull request #2432 from natefoo/job-output-memory-fix
dannon May 31, 2016
6da3223
Update Galaxy testing to target latest galaxy-lib.
jmchilton May 31, 2016
2fc266e
fixed $defaults according to #2430
ThomasWollmann May 31, 2016
52a5f6e
Properly display subworkflows in new run workflow form
guerler Jun 1, 2016
dcd0722
Remove output details from success message
guerler Jun 1, 2016
25a26d8
Merge pull request #2436 from jmchilton/galaxy_lib_testing_update
nsoranzo Jun 1, 2016
c0b4119
Merge pull request #3 from galaxyproject/dev
pcm32 Jun 1, 2016
64ade00
Merge branch 'dev' into feature/k8s_job_runner
pcm32 Jun 1, 2016
7eaf40e
Re-add new history links to success message
guerler Jun 1, 2016
1695994
polish
ThomasWollmann Jun 2, 2016
63e28ef
Log SLURM accounting storage error
nsoranzo Jun 2, 2016
abdae95
update superclass accessing
shiltemann Jun 2, 2016
d458906
Raven: fix import in galaxy.panels.mako
carlfeberhard Jun 2, 2016
8ef5279
Raven: revert previous commit and move raven first
carlfeberhard Jun 2, 2016
f78d540
Raven: remove tracekit as raven has its own
carlfeberhard Jun 2, 2016
ec476c7
Merge pull request #2445 from carlfeberhard/fix.raven
martenson Jun 2, 2016
7cb527a
Overwrite the correct part of stderr
nsoranzo Jun 2, 2016
58f3f5c
Merge pull request #2447 from nsoranzo/release_16.04_fix_for_2432
dannon Jun 2, 2016
1b3eaeb
Fix batchmode labels
guerler Jun 2, 2016
84ece6d
Merge branch 'release_16.04' into dev
nsoranzo Jun 2, 2016
a0dbcb9
Merge pull request #2440 from guerler/fix_subworkflows_display
jmchilton Jun 2, 2016
697b01c
Merge pull request #2438 from ThomasWollmann/dev
bgruening Jun 3, 2016
30fd1d6
Merge pull request #2429 from shiltemann/mothur_datatypes
bgruening Jun 3, 2016
2e6317e
Add support to pdbqt datatype
leobiscassi Jun 3, 2016
172a477
Create categories in the right order.
davebx Jun 3, 2016
c213175
Adjust set_peek method of the pdbqt class
leobiscassi Jun 3, 2016
e428a80
fix pep8 errors
leobiscassi Jun 3, 2016
6abcbb8
Adjust sniff function
leobiscassi Jun 3, 2016
cc336f6
Make some files compatible with Python3
nsoranzo Jun 3, 2016
c78c279
isolate the data libraries css to affect only the libraries app
martenson Jun 1, 2016
789c300
Merge pull request #2452 from leobiscassi/add_pdbqt_datatype
bgruening Jun 3, 2016
037d88f
Merge pull request #2444 from martenson/isolate-lib-css
jmchilton Jun 3, 2016
78c866f
Relax validation condition
guerler Jun 4, 2016
a931b4b
Merge pull request #2314 from phnmnl/feature/k8s_job_runner
jmchilton Jun 5, 2016
a44f301
Revise contradicting test case, workflow injection through api attemp…
guerler Jun 5, 2016
a97cae3
Merge pull request #2403 from nsoranzo/slurm
jmchilton Jun 5, 2016
1d7ce30
Fix usage of super() in the mothur datatypes.
bgruening Jun 5, 2016
7b3e536
Merge pull request #2457 from bgruening/mothur_fix
martenson Jun 5, 2016
e2f2193
Merge pull request #2453 from nsoranzo/python3
martenson Jun 6, 2016
d9d51d3
Add break to interrupt loop
guerler Jun 6, 2016
b97c796
Filter missing inputs when processing data
guerler Jun 6, 2016
edca79a
Do not encode dict items that start with 'metadata_' in return value …
blankenberg Jun 6, 2016
42739c8
Add test for failing handling of BIOM1 metadata.
blankenberg Jun 7, 2016
37a4915
Merge pull request #2458 from guerler/fix_process_data
martenson Jun 7, 2016
10a3f23
Merge pull request #2459 from blankenberg/metadata-id-fix
jmchilton Jun 7, 2016
ed91980
Add parameter expansion caller and test cases as preparation for work…
guerler Jun 7, 2016
c0b5a28
Merge pull request #2269 from davebx/refactor_suc
martenson Jun 7, 2016
9e5419f
Delay import of DrmaaSessionFactory after runner initialization
nsoranzo Jun 8, 2016
8983e43
Merge pull request #2466 from nsoranzo/release_16.04_fix_for_2463
martenson Jun 8, 2016
bb5dc6e
Merge branch 'release_16.04' into dev
nsoranzo Jun 8, 2016
bcf2502
Fix py34-lint tox test
nsoranzo Jun 8, 2016
beed45a
Merge pull request #2469 from nsoranzo/python3
martenson Jun 8, 2016
4147fe6
Make pykube an optional dependency since we don't have wheels for it.
jmchilton Jun 8, 2016
e8c469a
Merge pull request #2468 from jmchilton/pykube_optional
martenson Jun 8, 2016
27a2a36
Merge pull request #2464 from guerler/add_workflow_parameter_expansio…
jmchilton Jun 8, 2016
d2be9dc
Prevent missing display to text values in workflow preview
guerler Jun 8, 2016
e370c55
Re-add get_updated_changeset_revisions_from_tool_shed() method
nsoranzo Jun 8, 2016
befe354
Merge pull request #2471 from guerler/fix_workflow_display
martenson Jun 8, 2016
4cd2af8
Avoid empty strings when converting values to display text
guerler May 20, 2016
04863c8
Merge pull request #2473 from martenson/port-value-to-display
nsoranzo Jun 8, 2016
2cf95d8
Merge branch 'release_16.04' of https://github.com/galaxyproject/gala…
bgruening Jun 8, 2016
66e4750
Merge branch 'release_16.04' into dev
nsoranzo Jun 8, 2016
b7108cf
Merge pull request #2472 from nsoranzo/fix_for_2269
martenson Jun 8, 2016
b3edbca
Workaround for circular import situation.
davebx Jun 9, 2016
4c6389f
Move directory_hash_id into galaxy/util.py. Use util.directory_hash_i…
davebx Jun 9, 2016
89ba1dd
Remove now-unused import.
davebx Jun 9, 2016
4da1f6a
Merge pull request #2477 from davebx/circular_workaround
jmchilton Jun 9, 2016
9f7d921
Set a default for tool_dependencies_dir.
jmchilton Jun 9, 2016
7610f82
fix markup for button links on sharing template
martenson Jun 9, 2016
8f647b7
Merge pull request #2480 from jmchilton/tool_dependencies_default
bgruening Jun 9, 2016
7c40c85
Fix for job handlers losing track of jobs when using DRMAA with inter…
nsoranzo Jun 10, 2016
933f426
Log all failed job status checks
nsoranzo Jun 10, 2016
fcc0690
don't generate error for pairwise distance matrices
shiltemann Jun 10, 2016
dbbf1ed
Merge pull request #2484 from nsoranzo/release_16.01_fix_for_4a024b88…
martenson Jun 10, 2016
14844e4
Merge branch 'release_16.01' into release_16.04
nsoranzo Jun 10, 2016
77bd1d9
Merge branch 'release_16.04' into dev
nsoranzo Jun 10, 2016
574740d
Reset exception retries after successful job status check
nsoranzo Jun 10, 2016
08fb160
Merge pull request #2481 from martenson/fix-html-sharing
bgruening Jun 10, 2016
4cf8d69
fix image generation for workflows with missing tools
martenson Jun 10, 2016
fdf9520
drop unnecessary raise and fix capitalization
martenson Jun 11, 2016
43694be
Merge pull request #2456 from guerler/fix_building_mode
martenson Jun 11, 2016
5245e8a
Merge pull request #2488 from martenson/wrap-svg-for-missing-tools
nsoranzo Jun 11, 2016
b3a32ac
Merge branch 'release_16.04' of https://github.com/galaxyproject/gala…
bgruening Jun 11, 2016
0017b3e
add IUC channel to the list
bgruening Jun 11, 2016
ec0d973
Merge pull request #2490 from bgruening/iuc_conda_channel
dannon Jun 13, 2016
c797d2b
Merge pull request #2489 from shiltemann/dev
bgruening Jun 13, 2016
6ccfd13
Merge pull request #2487 from nsoranzo/release_16.04_reset_exception_…
martenson Jun 13, 2016
20f035d
Merge branch 'release_16.04' into dev
nsoranzo Jun 13, 2016
e6bc77c
Reduce duplication in galaxy.tools.parameters.wrapped.
jmchilton Feb 4, 2016
680ae8d
Allow data parameters to specify optional defaults.
jmchilton Feb 4, 2016
92699e6
Implement framework for model tools.
jmchilton Aug 12, 2015
c447773
Library methods for dealing with sandboxed JavaScript expressions.
jmchilton Dec 13, 2015
eb49dd0
New model tool that filters failed datasets out of a collection.
jmchilton Dec 13, 2015
4184e50
New model tool that flattens any collection into a list.
jmchilton Dec 13, 2015
6c428ab
New model tool that filters datasets on user supplied expression.
jmchilton Dec 13, 2015
4a4d4b6
Check for nodejs and display useful log message if missing...
jmchilton Dec 14, 2015
6fb3a67
Refactor Filter tool toward more tools that allow expressions.
jmchilton Dec 14, 2015
6865aa4
New model tool that groups datasets in a collection.
jmchilton Dec 14, 2015
516e1ab
[WIP] Dynamic Galaxy tools.
jmchilton Nov 5, 2015
6ac9aa7
[WIP] Implement Expression tools in Galaxy.
jmchilton Nov 12, 2015
7e51e7d
Implement a subset of the Common Workflow Language Draft 3 tool format.
jmchilton May 12, 2016
c1d4cba
Update cwl processing for recent changes to cwltool and galaxy.
jmchilton Jun 13, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 48 additions & 4 deletions .ci/py3_sources.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
lib/galaxy/util/
lib/galaxy/jobs/runners/util/
contrib/
cron/
lib/galaxy/actions/
lib/galaxy/auth/
lib/galaxy/config.py
lib/galaxy/dependencies/
lib/galaxy/eggs/
lib/galaxy/exceptions/
lib/galaxy/external_services/
lib/galaxy/forms/
lib/galaxy/jobs/
lib/galaxy/objectstore/
lib/galaxy/openid/
lib/galaxy/quota/
lib/galaxy/sample_tracking/
lib/galaxy/tags/
lib/galaxy/tools/cwl/
lib/galaxy/tools/parser/
lib/galaxy/tools/lint.py
Expand All @@ -10,8 +24,38 @@ lib/galaxy/tools/linters/
lib/galaxy/tools/deps/
lib/galaxy/tools/toolbox/
lib/galaxy/tools/parser/
lib/galaxy/jobs/metrics/
lib/galaxy/objectstore/
lib/galaxy/tours/
lib/galaxy/util/
lib/galaxy/work/
lib/galaxy_ext/
lib/galaxy_utils/
lib/log_tempfile.py
lib/psyco_full.py
lib/tool_shed/capsule/
lib/tool_shed/dependencies/
lib/tool_shed/grids/
lib/tool_shed/managers/
lib/tool_shed/metadata/
lib/tool_shed/repository_types/
lib/tool_shed/tools/
lib/tool_shed/util/
lib/tool_shed/utility_containers/
scripts/api/common.py
scripts/api/display.py
scripts/api/workflow_execute_parameters.py
scripts/auth/
scripts/cleanup_datasets/admin_cleanup_datasets.py
scripts/cleanup_datasets/cleanup_datasets.py
test/api/test_workflows_from_yaml.py
test/base/
test/casperjs/
test/functional/
test/integration/
test/manual/
test/unit/tools/test_actions.py
test/unit/workflows/test_run_parameters.py
tool_list.py
tools/data_source/
tools/evolution/
tools/sr_mapping/
tools/visualization/
8 changes: 8 additions & 0 deletions CWL_TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Sniff the outputs so Galaxy can generate the correct dataytpes.
- More parameter types and constructs (e.g. tmap implementation).

- Explore Galaxy extensions to CWL -
- Annotate datatypes.
- Annotate parameter labels and help.
- Annotate tool help.
- Annotate requirements.
1 change: 0 additions & 1 deletion client/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"homepage": "usegalaxy.org",
"dependencies": {
"jquery": "~1.12",
"tracekit": "*",
"ravenjs": "~3",
"underscore": "~1",
"backbone": "~1.3",
Expand Down
109 changes: 70 additions & 39 deletions client/galaxy/scripts/layout/scratchbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,45 +41,82 @@ return Backbone.View.extend({
}).on( 'show hide ', function() {
self.buttonLoad.set( { 'toggle': this.visible, 'icon': this.visible && 'fa-eye' || 'fa-eye-slash' } );
});
this.history_cache = {};
},

/** Add a dataset to the frames */
addDataset: function( dataset_id ) {
var self = this;
var current_dataset = null;
if ( Galaxy && Galaxy.currHistoryPanel ) {
var history_id = Galaxy.currHistoryPanel.collection.historyId;
this.history_cache[ history_id ] = { name: Galaxy.currHistoryPanel.model.get( 'name' ), dataset_ids: [] };
Galaxy.currHistoryPanel.collection.each( function( model ) {
!model.get( 'deleted' ) && model.get( 'visible' ) && self.history_cache[ history_id ].dataset_ids.push( model.get( 'id' ) );
});
}
var _findDataset = function( dataset, offset ) {
if ( dataset ) {
var history_details = self.history_cache[ dataset.get( 'history_id' ) ];
if ( history_details && history_details.dataset_ids ) {
var dataset_list = history_details.dataset_ids;
var pos = dataset_list.indexOf( dataset.get( 'id' ) );
if ( pos !== -1 && pos + offset >= 0 && pos + offset < dataset_list.length ) {
return dataset_list[ pos + offset ];
}
}
}
};
var _loadDatasetOffset = function( dataset, offset, frame ) {
var new_dataset_id = _findDataset( dataset, offset );
if ( new_dataset_id ) {
self._loadDataset( new_dataset_id, function( new_dataset, config ) {
current_dataset = new_dataset;
frame.model.set( config );
});
} else {
frame.model.trigger( 'change' );
}
}
this._loadDataset( dataset_id, function( dataset, config ) {
current_dataset = dataset;
self.add( _.extend( { menu: [ { icon : 'fa fa-chevron-circle-left',
tooltip : 'Previous in History',
onclick : function( frame ) { _loadDatasetOffset( current_dataset, -1, frame ) },
disabled : function() { return !_findDataset( current_dataset, -1 ) } },
{ icon : 'fa fa-chevron-circle-right',
tooltip : 'Next in History',
onclick : function( frame ) { _loadDatasetOffset( current_dataset, 1, frame ) },
disabled : function() { return !_findDataset( current_dataset, 1 ) } } ] }, config ) )
});
},

_loadDataset: function( dataset_id, callback ) {
var self = this;
require([ 'mvc/dataset/data' ], function( DATA ) {
var dataset = new DATA.Dataset( { id : dataset_id } );
$.when( dataset.fetch() ).then( function() {
// Construct frame config based on dataset's type.
var frame_config = {
title: dataset.get('name')
},
// HACK: For now, assume 'tabular' and 'interval' are the only
// modules that contain tabular files. This needs to be replaced
// will a is_datatype() function.
is_tabular = _.find( [ 'tabular', 'interval' ] , function( data_type ) {
return dataset.get( 'data_type' ).indexOf( data_type ) !== -1;
});

// Use tabular chunked display if dataset is tabular; otherwise load via URL.
if ( is_tabular ) {
var tabular_dataset = new DATA.TabularDataset( dataset.toJSON() );
_.extend( frame_config, {
content: function( parent_elt ) {
DATA.createTabularDatasetChunkedView({
model : tabular_dataset,
parent_elt : parent_elt,
embedded : true,
height : '100%'
});
}
});
}
else {
_.extend( frame_config, {
url: Galaxy.root + 'datasets/' + dataset.id + '/display/?preview=True'
});
var is_tabular = _.find( [ 'tabular', 'interval' ] , function( data_type ) {
return dataset.get( 'data_type' ).indexOf( data_type ) !== -1;
});
var title = dataset.get( 'name' );
var history_details = self.history_cache[ dataset.get( 'history_id' ) ];
if ( history_details ) {
title = history_details.name + ': ' + title;
}
self.add( frame_config );
callback( dataset, is_tabular ? {
title : title,
url : null,
content : DATA.createTabularDatasetChunkedView({
model : new DATA.TabularDataset( dataset.toJSON() ),
embedded : true,
height : '100%'
}).$el
} : {
title : title,
url : Galaxy.root + 'datasets/' + dataset_id + '/display/?preview=True',
content : null
} );
});
});
},
Expand Down Expand Up @@ -136,15 +173,9 @@ return Backbone.View.extend({
window.location = options.url;
} else if ( !this.active ) {
var $galaxy_main = $( window.parent.document ).find( '#galaxy_main' );
if ( options.target == 'galaxy_main' || options.target == 'center' ){
if ( $galaxy_main.length === 0 ){
var href = options.url;
if ( href.indexOf( '?' ) == -1 )
href += '?';
else
href += '&';
href += 'use_panels=True';
window.location = href;
if ( options.target == 'galaxy_main' || options.target == 'center' ) {
if ( $galaxy_main.length === 0 ) {
window.location = options.url + ( href.indexOf( '?' ) == -1 ? '?' : '&' ) + 'use_panels=True';
} else {
$galaxy_main.attr( 'src', options.url );
}
Expand Down
Loading