Commit Graph
94 Commits
Author SHA1 Message Date
Ross Lazarus d53c3e984f Backed out changeset 48bbe32beefe which introduced a whole bunch of unintended reversions from a broken hg repository
This is a backout of commit 5765
2011-07-06 09:44:56 +10:00
Ross Lazarus 86b55bb0c0 branch merge 2011-07-05 12:40:43 +10:00
Greg Von Kuster 77b1a84769 Move toward standardizing the way messages are displayed on Galaxy forms by using params 'message' and 'status' instead of 'msg' and 'messagetype'. 2010-04-02 16:06:43 -04:00
Greg Von Kuster 572dff9f8f Add a synopsis column to the library table, fix displaying the mast head when accessing a data library from an external url, and eliminate the display of all non-private roles on permissions forms. 2010-02-15 12:30:49 -05:00
Greg Von Kuster 14940be7cc Data library cleanup
- move / merge all duplicate methods from the library_and library_admin controllers into the library_common controller
- move / merge all duplicate mako templates into the ~/library/common directory
- make the admin view library browser a grid
- all library item ids are now encoded
2009-12-23 20:26:01 -05:00
Jeremy Goecks 6075d57507 Replace dbkey select boxes in library interface with search+select boxes. 2009-12-10 15:37:00 -05:00
Greg Von Kuster 29b55b8707 Make sqlalchemy queries use sa_session.query( object ) rather than object.query(). This eliminates the need for the _monkeypatch_query_method() in assignmapper.py. Also eliminate the need for the _monkeypatch_session_method() for everything except object.flush() - I just ran out of time and will handle flush() asap. I also eliminated the .all() call on several queries where it was not necessary - should improve performance. I fixed several bugs I found as well. 2009-10-22 23:02:28 -04:00
Greg Von Kuster 6e236907c6 Bug fix for adding a new folder template ( fixes # 193 ), more functioanl test coverage for folder templates, more code mering and cleanup in the library controllers, shortened the table buttons on the brose library grid and template. 2009-10-06 14:13:31 -04:00
Greg Von Kuster 6d573a9870 Only allow 'uload files' option when replacing a dataset with a new version, more code merging, a few bugs fixes and additional functional tests for libraries. 2009-10-01 15:07:22 -04:00
Nate Coraor 5d4513b585 Add a new option, 'allow_library_path_paste' that adds a new upload page
("Upload files from filesystem paths") to the admin-side library upload pages.
This form contains a textarea that allows Galaxy admins to paste any number of
filesystem paths (files or directories) from which Galaxy will import library
datasets, saving the directory structure (if desired).  Since such ability
allows admins access to any file on the Galaxy server which is readable by
Galaxy's system user, this option is disabled by default, and system
administrators should take care in assigning Galaxy administrators when this
feature is enabled.  Controls on what files are accessible to this tool based
on ownership or other properties can be added at a later date if there is
sufficient interest for such features.

This commit also includes a checkbox on the "Upload directory of files" page
(as well as the new "Upload files from filesystem paths" page above) that will
prevent Galaxy from copying data to its files directory (by default,
'database/files/').  This is useful for large library datasets that live in
their own managed locations on the filesystem, this will prevent the existence
of duplicate copies of datasets (but means administrators must take care to
manage data - moving or removing the data from its Galaxy-external location
will render these datasets invalid within Galaxy).

One unique feature to be aware of: when using the "Copy data into Galaxy?"
checkbox on the "Upload directory of files" page, any symbolic links
encountered in the chosen import directory will be made absolute and
dereferenced ONCE.  This allows administrators to link large datasets to the
import directory, rather than having to make full copies, while being able to
delete such links after importing.  Only the first symlink (the one in the
import directory itself) is dereferenced; all others remain.  See the following
for an example:

library_import_dir = /galaxy/import

% ls -lR /galaxy/import
/galaxy/import:
total 6
drwxr-xr-x   2 nate     nate         512 Oct  1 11:31 link/

/galaxy/import/link:
total 10
lrwxrwxrwx   1 nate     nate          71 Oct  1 10:38 1.bed -> ../../../home/nate/galaxy/test-data/1.bed
lrwxrwxrwx   1 nate     nate          60 Oct  1 10:38 2.bed -> /home/nate/galaxy/test-data/2.bed
lrwxrwxrwx   1 nate     nate          11 Oct  1 10:38 3.bed -> ../../3.bed
lrwxrwxrwx   1 nate     nate          35 Oct  1 11:30 4.bed -> ../../galaxy_symlink/test-data/4.bed
lrwxrwxrwx   1 nate     nate          41 Oct  1 11:31 5.bed -> /galaxy/galaxy_symlink/test-data/5.bed

% ls -l /galaxy/3.bed
lrwxrwxrwx   1 nate     nate          60 Oct  1 10:39 /galaxy/3.bed -> /home/nate/galaxy/test-data/3.bed

% ls -l /galaxy/galaxy_symlink
lrwxrwxrwx   1 nate     nate          44 Oct  1 11:30 /galaxy/galaxy_symlink -> /home/nate/galaxy/

In this example,

1.bed is a relative symbolic link to the real 1.bed.

2.bed is an absolute symlink to the real 2.bed.

3.bed is a relative symlink to ../../3.bed, aka /galaxy/3.bed, which itself is
a symlink to the real 3.bed.

4.bed is a relative symlink which follows another symlink
(/galaxy/galaxy_symlink) to the real 4.bed.

5.bed is an absolute symlink in the same fashion as 4.bed

If the 'link' server directory is chosen on the "Upload directory of files"
page, and "Copy data into Galaxy?" is checked "No", the following files will be
referenced by Galaxy:

/home/nate/galaxy/test-data/1.bed
/home/nate/galaxy/test-data/2.bed
/galaxy/3.bed
/galaxy/galaxy_symlink/test-data/4.bed
/galaxy/galaxy_symlink/test-data/5.bed

The Galaxy administrator may now safely delete /galaxy/import/link, but should
take care not to remove the referenced symbolic links (/galaxy/3.bed,
/galaxy/galaxy_symlink).

Not all symbolic links are dereferenced because it is assumed that if an
administrator links to a path in the import directory which itself is (or
contains) links, that is the preferred path for accessing the data.
2009-10-01 12:35:41 -04:00
Greg Von Kuster baa64fc6a7 Refactored the library_dataset_dataset_association methods in the library_admin and library controllers, renamed the library_dataset controller to be library_common and moved several common methods to it, and some other code cleanup. 2009-09-30 05:16:17 -04:00
Nate Coraor d14eb4d653 Reintroduce nginx upload module support.
http://www.grid.net.ru/nginx/upload.en.html

The following config variables are added to universe_wsgi.ini:

    nginx_upload_store = Path to nginx upload store
        ex: = database/upload_store
    nginx_upload_path = URL (from root of the Galaxy server) to direct upload POSTs to
        ex: = /_upload

The following nginx config supports such a configuration:

    location /_upload {
        upload_store /path/to/galaxy/database/upload_store;
        upload_pass_form_field "tool_id";
        upload_pass_form_field "tool_state";
        upload_pass_form_field "async_datasets";
        upload_pass_form_field "^files_[0-9]+\|.*";
        upload_pass_form_field "file_type";
        upload_pass_form_field "dbkey";
        upload_pass_form_field "runtool_btn";
        upload_pass_form_field "ajax_upload";
        upload_pass_form_field "upload_option";
        upload_pass_form_field "library_id";
        upload_pass_form_field "folder_id";
        upload_pass_form_field "message";
        upload_pass_form_field "roles";
        upload_set_form_field "__${upload_field_name}__is_composite" "true";
        upload_set_form_field "__${upload_field_name}__keys" "name path";
        upload_set_form_field "${upload_field_name}_name" "$upload_file_name";
        upload_set_form_field "${upload_field_name}_path" "$upload_tmp_path";
        upload_pass_args on;
        upload_pass /_upload_done;
    }

    location /_upload_done {
        set $dst /tool_runner/index;
        if ($args ~ nginx_redir=([^&]+)) {
            set $dst $1;
        }
        rewrite "" $dst;
    }
2009-09-29 17:14:20 -04:00
Nate Coraor 87db3952d3 Real Job(tm) support for the library upload tool. Does not include iframe upload for the library side yet. 2009-09-25 14:36:12 -04:00
Greg Von Kuster de1ea7ae0a Eliminate the use of the genetrack controller, merge the template code for uploading library datasets, and several bug fixes:
- The genetrack controller is no longer used ( I'll delete it soon ), so the GeneTrack application is now loosely coupled
- Merge the 2 new_dataset.mako templates into one common code module name library_dataset_common.mako
- Rename all of the library upload form fields to have the same names as the history upload form fields
- Eliminate a 2nd runtool_btn from being rendered on the same form in tool_form.mako
- Fix bug and add functional tests to cover uploading a library dataset that does not include a template
2009-09-22 14:04:48 -04:00
Greg Von Kuster 0f294b742c Bug fixes, enhancements, code refactoring and re-introduction of functional tests for library templates.
- Fixed bug where exception was thrown when chosing a role in the admin view
- The contents of inherited templates will no longer be displayed in the inherited container
- Old versions of library datasets will not be displayed in the lbrary browser
- Added the job.traceback information to the dataset error report
- Moved the get_form_wigets method the forms.py to the FormDefinition class, renaming it to get_wigets
2009-09-19 00:25:14 -04:00
Greg Von Kuster 715dc77d5d Move the data library admin methods to a separate library_admin controller. 2009-09-14 11:05:36 -04:00
Greg Von Kuster b0cb656b54 More performance improvements in checking security on datasets and generatng HTML for libraries, and a bit of code cleanup in these areas. 2009-09-04 10:31:23 -04:00
Greg Von Kuster 2a76267fbd Performance improvements in the GalaxyRBACAgent for checking access permissions on libraries. Also added information to main config regarding mysql timeouts ( resolves ticket # 132 ). 2009-08-28 16:52:58 -04:00
Greg Von Kuster 32eeb4496c Functional test fixes for my last commit. 2009-08-14 10:03:15 -04:00
Greg Von Kuster fb6e5ed8cc Change GUI references to Library to now be Data Library, and merge 2 history grid templates into 1. 2009-08-14 09:22:31 -04:00
Greg Von Kuster 63696f000e Re-introduce library templates which are now based on the new Galaxy forms. A library template can be added to a library item ( library, folder, library dataset ), and will be inherited downward in the library hierarchy. A new template can be added to a library item as long as no template field contents have previously been filled in. If template field contents were previously filled in, that template must remain for the current time.
More work is needed on for this feature, including additional work on the forms.  Functional tests are under way, but much more work is needed here as well.
2009-08-07 16:11:14 -04:00
Daniel Blankenberg 68eaea21f6 Add new flag, allow_datatype_change, to Datatypes. When set to False, datasets of this datatype cannot be changed from or into.
This is needed, i.e. for Rgenetics Datatypes to prevent loss of metadata ('base_name') which occurs when changing to datatypes without this metadata parameter and would render the dataset unusable (composite filenames could be incorrect).
2009-07-30 16:23:47 -04:00
Greg Von Kuster 97070efddf Remove restriction for displaying a dataset at UCSC if the dataset is not public - as long as you can access the dataset, you can send it outside of the Galaxy environment. Fix for sharing restricted histories - default the options for sharing, and some style fixes on a few library forms. 2009-07-24 11:22:31 -04:00
Greg Von Kuster 397abb1507 Fix for editing attributes of library datasets. 2009-07-22 21:28:26 -04:00
Greg Von Kuster 2b6f2c946a Fixes and functional tests for uploading directories of files from both the Admin view and the Libraries view ( requires new config setting ).
In addition to the config setting "library_import_dir" for the Admin view, the new config setting "user_library_import_dir" for the Libraries view will allow non-amin users to upload a directory of files.

The configured directory must contain sub-directories named the same as the non-admin user's Galaxy login ( email ).  The non-admin user is restricted to uploading files or sub-directories of files contained in their directoy.
2009-06-16 09:55:15 -04:00
Greg Von Kuster 6a135a2cf6 Temporarily eliminate access to templates until new forms are finished, and more fixes for functional tests. 2009-06-08 10:31:59 -04:00
Greg Von Kuster 27a0fdb80c Bug fixes and new functional tests for library features that were missing them. 2009-05-21 15:48:39 -04:00
Greg Von Kuster b190136165 Fixes for deleting library items on the admin side.
- Purged library items will not be displayed
- Deleted library items can only be viewed or undeleted
- Differentiate between displaying deleted libraries and displaying deleted items within an undeleted library
2009-05-05 13:48:01 -04:00
Greg Von Kuster 7c82fad57f Fix closing label tags in 2 ldda_info_templates. 2009-05-04 12:20:26 -04:00
Daniel Blankenberg da52bd848a Add ability for admins to delete and undelete library items.
Modify cleanup_datasets.py script and include a database migration script.
2009-04-23 12:42:05 -04:00
Greg Von Kuster 9f205bc852 Fix for library pop-up menus - menus will once again be displayed rather than hidden. 2009-04-14 08:49:32 -04:00
Greg Von Kuster 1aae6e02d9 Some fixes for uploading a new version of a library dataset. 2009-03-11 15:12:18 -04:00
Greg Von Kuster 9502a11563 More ibrary work - highlights:
1) For datasets in the library browser, display message, uploaded by, date instead of format, db, info
2) Replace "Manage this dataset's versions" with "Upload a new version of this dataset"
3) When a library dataset is clicked in the library browser, display it's information rahter than it's peek.
2009-03-11 10:21:08 -04:00
Greg Von Kuster 20c20ef3be No longer displaying the a library root folder, as well as several library feature bug fixes. 2009-03-10 12:56:59 -04:00
Greg Von Kuster e55a4d84f8 More library work - requires database schema update:
1) include templates in the upload form for library datasets
2) Add user_id column to library_dataset_dataset_association table
3) Add message column to library_dataset_dataset_association table
4) Several miscellaneous bug fixes related to uploading library datasets

SQL commands required:

ALTER TABLE library_dataset_dataset_association ADD COLUMN user_id INTEGER;
ALTER TABLE library_dataset_dataset_association ADD CONSTRAINT library_dataset_dataset_association_user_id_id_fkey FOREIGN KEY (user_id) REFERENCES galaxy_user(id);
ALTER TABLE library_dataset_dataset_association ADD COLUMN message VARCHAR(255);
2009-03-09 17:02:21 -04:00
Greg Von Kuster 1c67fb0994 More library template work: add permissions support for templates and template elements, add ability to edit template contents, restrict to 1 template per library item, display closest associated template on library item info page unless there are template contents ( in which case, display them ), eliminate the Display Templates drop down menu on library item info pages.
Next steps: 1) display closest associated template on the upload form for library datasets 2) add support for requiring template fields, add suppor tof different template field types besides "text"
2009-03-06 15:14:47 -05:00
Greg Von Kuster addae675f5 Fixes and cleanup for library templates, ability to edit template information still needs to be implemented. 2009-03-04 14:17:48 -05:00
Greg Von Kuster 803431833b Upload library dataset template fixes. 2009-03-01 09:05:55 -05:00
Greg Von Kuster c13b452941 Display only one option at a time for uploading library datasets ( upload files, upload a directory of files, import datasets from your history ), along with several bug fixes. 2009-03-01 08:17:22 -05:00
Greg Von Kuster 26b49cd6e0 Eliminate the LibraryDataset.__getattr__() method - fixes sqlite problems with uploading LibraryDatasets on Mac OS - as well as a bit of other miscellaneous cleanup and fixes. 2009-02-28 13:55:07 -05:00
Greg Von Kuster 022f827899 A few more library fixes. 2009-02-25 15:19:36 -05:00
Greg Von Kuster 88686d288b Lots os fixes for uploading datasets to a library, as well as some fixes for associating information templates with a library item. 2009-02-24 16:15:48 -05:00
Greg Von Kuster bef705eb14 Separate information from permissions at the LibraryDataset level, and fix a whole slew of bugs. There are still a few known weaknesses / issues, but this rev is fairly close to concluding phase 1 of the new library features for Encode. 2009-02-20 15:43:10 -05:00
Greg Von Kuster 093424000b Separate library item information from library item permissions, a bit more work needed at the LibraryDataset level. 2009-02-18 16:38:16 -05:00
Greg Von Kuster 0d820234e3 Fiixes for new library features, mostly with template / info rendering for library items. All library and security functional tests should now pass as well. 2009-02-17 16:41:09 -05:00
Greg Von Kuster e02819f696 Only render library names / descriptions on main browse_libraries page, move folder / dataset rendering to new browse_library page. Also eliminate all library stuff from the edit_attributes page ( fixes bug Guru submitted ), since all library dataset management has been moved to the library controller. 2009-02-16 16:42:29 -05:00
Greg Von Kuster 20f8c40083 New library feature support and additional library code cleanup.
- information templates can be created for libraries, folders, datasets - templates inherited downward, this still needs a bit of work, but current functionality should be reviewed.
- other new features are now also available on appropriate drop-down menus
- better naming for some templates / methods
2009-02-13 16:39:23 -05:00
Greg Von Kuster bd2388cb5e A bit of cleanup on the new library features, more is coming, but this is now good enough to use. A bunch of work remaining on the anlaysis side, as well as with the library item info templates. There are certainly a few bugs remaining int hei rev, but most have been resolved. Functional tests are still needed, and coming soon, for the new features. 2009-02-11 11:14:42 -05:00
Greg Von Kuster 03dbdba69a Fixes for some of the features that use the new library permissions. 2009-02-03 16:43:11 -05:00
Greg Von Kuster cfde4c4015 Normalize the model supporting the new library features. This rev assumes all current Library tables will be dropped so they are re-created at server start-up ( all library data will be lost ). Normalized objects are as follows:
1.  ActionDatasetRoleAssociation -> DatasetPermissions ( renamed )
2.  LibraryFolderDatasetAssociation -> LibraryDatasetDatasetAssociation ( renamed )
3.  ActionLibraryItemRoleAssociation -> LibraryPermissions, LibraryFolderPermissions, LibraryDatasetPermissions, LibraryDatasetDatasetPermissions, LibraryItemInfoPermissions, LibraryItemInfoTemplatePermissions
4.  LibraryItemInfoAssociation -> LibraryInfoAssociation, LibraryFolderInfoAssociation, LibraryDatasetInfoAssociation, LibraryDatasetDatasetInfoAssociation
5. LibraryItemInfoTemplateAssociation -> LibraryInfoTemplateAssociation, LibraryFolderInfoTemplateAssociation, LibraryDatasetInfoTemplateAssociation, LibraryDatasetDatasetInfoTemplateAssociation
2009-01-28 16:29:30 -05:00