This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.webapps.galaxy.controllers.external_services

import logging

from galaxy import web
from galaxy.model import ExternalService, Sample
from galaxy.web.base.controller import BaseUIController

log = logging.getLogger( __name__ )

class_name_to_class = {}

for model_class in [Sample]:
    class_name_to_class[ model_class.__name__ ] = model_class

[docs]class ExternalServiceController( BaseUIController ):
[docs] @web.expose @web.require_admin def access_action( self, trans, external_service_action, item, item_type, **kwd ): if item_type in class_name_to_class: item_type = class_name_to_class.get( item_type ) item = item_type.get( item ) external_service_action_parsed = external_service_action.split( '|' ) populated_external_service = ExternalService.get( external_service_action_parsed.pop( 0 ) ).populate_actions( trans, item ) populated_action = populated_external_service.perform_action_by_name( external_service_action_parsed ) results = populated_action.handle_results( trans ) return results else: raise Exception( 'unknown item class type' )