Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/dev' into CloudObjectS…
Browse files Browse the repository at this point in the history
…tore
  • Loading branch information
VJalili committed Aug 23, 2017
2 parents 4e17c8e + a834381 commit 0ec02b5
Show file tree
Hide file tree
Showing 1,408 changed files with 93,251 additions and 83,518 deletions.
2 changes: 2 additions & 0 deletions .ci/autopep8.sh
@@ -0,0 +1,2 @@
exclude=$(sed -e 's|^|./|' -e 's|/$||' .ci/flake8_blacklist.txt | paste -s -d ',' - )
autopep8 -i -r --exclude $exclude --select E11,E101,E127,E201,E202,E22,E301,E302,E303,E304,E306,E711,W291,W292,W293,W391 ./lib/ ./test/
8 changes: 5 additions & 3 deletions .ci/flake8_lint_include_list.txt
Expand Up @@ -79,9 +79,7 @@ lib/galaxy/visualization/__init__.py
lib/galaxy/visualization/plugins/__init__.py
lib/galaxy/visualization/plugins/utils.py
lib/galaxy/visualization/tracks/
lib/galaxy/web/base/controllers/__init__.py
lib/galaxy/web/base/__init__.py
lib/galaxy/web/base/interactive_environments.py
lib/galaxy/web/base/
lib/galaxy/web/buildapp.py
lib/galaxy/web/formatting.py
lib/galaxy/web/framework/base.py
Expand All @@ -96,6 +94,7 @@ lib/galaxy/web/framework/middleware/static.py
lib/galaxy/web/framework/middleware/statsd.py
lib/galaxy/web/framework/middleware/translogger.py
lib/galaxy/web/framework/middleware/xforwardedhost.py
lib/galaxy/web/framework/webapp.py
lib/galaxy/web/__init__.py
lib/galaxy/web/params.py
lib/galaxy/webapps/galaxy/api/genomes.py
Expand All @@ -108,6 +107,7 @@ lib/galaxy/webapps/galaxy/api/roles.py
lib/galaxy/webapps/galaxy/api/samples.py
lib/galaxy/webapps/galaxy/api/tools.py
lib/galaxy/webapps/galaxy/api/tours.py
lib/galaxy/webapps/galaxy/api/users.py
lib/galaxy/webapps/galaxy/api/workflows.py
lib/galaxy/webapps/galaxy/config_watchers.py
lib/galaxy/webapps/galaxy/controllers/async.py
Expand Down Expand Up @@ -190,6 +190,7 @@ scripts/build_universe_config.py
scripts/check_galaxy.py
scripts/check_python.py
scripts/cleanup_datasets/
scripts/communication/
scripts/create_db.py
scripts/data_libraries/
scripts/db_shell.py
Expand All @@ -216,6 +217,7 @@ scripts/migrate_tools/
scripts/nosetests.py
scripts/others/
scripts/runtime_stats.py
scripts/secret_decoder_ring.py
scripts/set_dataset_sizes.py
scripts/set_user_disk_usage.py
scripts/sync_reports_config.py
Expand Down
5 changes: 5 additions & 0 deletions .ci/py3_sources.txt
Expand Up @@ -27,16 +27,19 @@ lib/galaxy/tools/
lib/galaxy/tours/
lib/galaxy/util/
lib/galaxy/visualization/
lib/galaxy/web/base/
lib/galaxy/web/buildapp.py
lib/galaxy/web/framework/base.py
lib/galaxy/web/framework/decorators.py
lib/galaxy/web/framework/__init__.py
lib/galaxy/web/framework/middleware/error.py
lib/galaxy/web/framework/middleware/static.py
lib/galaxy/web/framework/middleware/statsd.py
lib/galaxy/web/framework/webapp.py
lib/galaxy/web/__init__.py
lib/galaxy/webapps/galaxy/api/histories.py
lib/galaxy/webapps/galaxy/api/tours.py
lib/galaxy/webapps/galaxy/api/users.py
lib/galaxy/webapps/galaxy/api/workflows.py
lib/galaxy/webapps/galaxy/controllers/external_services.py
lib/galaxy/webapps/galaxy/controllers/search.py
Expand All @@ -63,9 +66,11 @@ scripts/check_eggs.py
scripts/check_galaxy.py
scripts/check_python.py
scripts/cleanup_datasets/
scripts/communication/
scripts/data_libraries/build_whoosh_index.py
scripts/db_shell.py
scripts/drmaa_external_runner.py
scripts/secret_decoder_ring.py
test/
tool_list.py
tools/
37 changes: 37 additions & 0 deletions Makefile
Expand Up @@ -10,6 +10,7 @@ MY_UPSTREAM:=origin
VENV?=.venv
# Source virtualenv to execute command (flake8, sphinx, twine, etc...)
IN_VENV=if [ -f $(VENV)/bin/activate ]; then . $(VENV)/bin/activate; fi;
CONFIG_MANAGE=$(IN_VENV) python lib/galaxy/webapps/config_manage.py
PROJECT_URL?=https://github.com/galaxyproject/galaxy
GRUNT_DOCKER_NAME:=galaxy/client-builder:16.01
GRUNT_EXEC?=node_modules/grunt-cli/bin/grunt
Expand Down Expand Up @@ -52,6 +53,42 @@ open-project: ## open project on github
lint: ## check style using tox and flake8 for Python 2 and Python 3
$(IN_VENV) tox -e py27-lint && tox -e py34-lint

uwsgi-rebuild-validation: ## rebuild uwsgi_config.yml kwalify schema against latest uwsgi master.
$(CONFIG_MANAGE) build_uwsgi_yaml

tool-shed-config-validate: ## validate tool shed YAML configuration file
$(CONFIG_MANAGE) validate tool_shed

tool-shed-config-lint: ## lint tool shed YAML configuration file
$(CONFIG_MANAGE) lint tool_shed

tool-shed-config-convert-dry-run: ## convert old style tool shed ini to yaml (dry run)
$(CONFIG_MANAGE) convert tool_shed --dry-run

tool-shed-config-convert: ## convert old style tool shed ini to yaml
$(CONFIG_MANAGE) convert tool_shed

tool-shed-config-rebuild-sample: ## Rebuild sample tool shed yaml file from schema
$(CONFIG_MANAGE) build_sample_yaml tool_shed --add-comments

reports-config-validate: ## validate reports YAML configuration file
$(CONFIG_MANAGE) validate reports

reports-config-convert-dry-run: ## convert old style reports ini to yaml (dry run)
$(CONFIG_MANAGE) convert reports --dry-run

reports-config-convert: ## convert old style reports ini to yaml
$(CONFIG_MANAGE) convert reports

reports-config-rebuild-sample: ## Rebuild sample reports yaml file from schema
$(CONFIG_MANAGE) build_sample_yaml reports --add-comments

reports-config-lint: ## lint reports YAML configuration file
$(CONFIG_MANAGE) lint reports

reports-config-rebuild-rst: ## Rebuild sample reports RST docs
$(CONFIG_MANAGE) build_rst reports > doc/source/admin/reports_options.rst

release-ensure-upstream: ## Ensure upstream branch for release commands setup
ifeq (shell git remote -v | grep $(RELEASE_UPSTREAM), )
git remote add $(RELEASE_UPSTREAM) git@github.com:galaxyproject/galaxy.git
Expand Down
111 changes: 108 additions & 3 deletions client/galaxy/scripts/apps/admin.js
Expand Up @@ -2,16 +2,121 @@ var jQuery = require( 'jquery' ),
$ = jQuery,
GalaxyApp = require( 'galaxy' ).GalaxyApp,
AdminPanel = require( './panels/admin-panel' ),
FormWrapper = require( 'mvc/form/form-wrapper' ),
GridView = require( 'mvc/grid/grid-view' ),
Ui = require( 'mvc/ui/ui-misc' ),
QueryStringParsing = require( 'utils/query-string-parsing' ),
Router = require( 'layout/router' ),
Page = require( 'layout/page' );

window.app = function app( options, bootstrapped ){
window.Galaxy = new GalaxyApp( options, bootstrapped );
Galaxy.debug( 'admin app' );
Galaxy.params = Galaxy.config.params;
$(function(){

/** Routes */
var AdminRouter = Router.extend({
routes: {
'(/)admin(/)users' : 'show_users',
'(/)admin(/)roles' : 'show_roles',
'(/)admin(/)groups' : 'show_groups',
'(/)admin(/)tool_versions' : 'show_tool_versions',
'(/)admin(/)quotas' : 'show_quotas',
'(/)admin(/)forms(/)(:form_id)' : 'show_forms'
},

authenticate: function( args, name ) {
return Galaxy.user && Galaxy.user.id && Galaxy.user.get( 'is_admin' );
},

show_users: function() {
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/users_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_roles: function() {
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/roles_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_groups: function() {
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/groups_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_tool_versions: function() {
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/tool_versions_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_quotas: function() {
this.page.display( new GridView( { url_base: Galaxy.root + 'admin/quotas_list', url_data: Galaxy.params, dict_format: true } ) );
},

show_forms : function( form_id ) {
var id = '?id=' + QueryStringParsing.get( 'id' );
var form_defs = {
reset_user_password: {
title : 'Reset passwords',
url : 'admin/reset_user_password' + id,
icon : 'fa-user',
submit_title : 'Save new password',
redirect : 'admin/users'
},
manage_roles_and_groups_for_user: {
url : 'admin/manage_roles_and_groups_for_user' + id,
icon : 'fa-users',
redirect : 'admin/users'
},
manage_users_and_groups_for_role: {
url : 'admin/manage_users_and_groups_for_role' + id,
redirect : 'admin/roles'
},
manage_users_and_roles_for_group: {
url : 'admin/manage_users_and_roles_for_group' + id,
redirect : 'admin/groups'
},
manage_users_and_groups_for_quota: {
url : 'admin/manage_users_and_groups_for_quota' + id,
redirect : 'admin/quotas'
},
create_role: {
url : 'admin/create_role',
redirect : 'admin/roles'
},
create_group: {
url : 'admin/create_group',
redirect : 'admin/groups'
},
create_quota: {
url : 'admin/create_quota',
redirect : 'admin/quotas'
},
rename_role: {
url : 'admin/rename_role' + id,
redirect : 'admin/roles'
},
rename_group: {
url : 'admin/rename_group' + id,
redirect : 'admin/groups'
},
rename_quota: {
url : 'admin/rename_quota' + id,
redirect : 'admin/quotas'
},
edit_quota: {
url : 'admin/edit_quota' + id,
redirect : 'admin/quotas'
},
set_quota_default: {
url : 'admin/set_quota_default' + id,
redirect : 'admin/quotas'
},
};
this.page.display( new FormWrapper.View ( form_defs[ form_id ] ) );
}
});

$(function() {
_.extend( options.config, { active_view : 'admin' } );
Galaxy.page = new Page.View( _.extend( options, {
Left : AdminPanel
Left : AdminPanel,
Router : AdminRouter
} ) );
});
};

0 comments on commit 0ec02b5

Please sign in to comment.