mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Package GalaxyApp in extended bundle for bootstrapping outside the primary entrypoints; TODO: Refactor this to be import-based and keep a singleton
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import _l from "utils/localization";
|
||||
import GalaxyApp from "galaxy";
|
||||
import WorkflowView from "mvc/workflow/workflow-view";
|
||||
import Trackster from "viz/trackster";
|
||||
import Circster from "viz/circster";
|
||||
@@ -184,7 +185,8 @@ export const bundleEntries = {
|
||||
Trackster,
|
||||
StructureView,
|
||||
HDAListItemEdit,
|
||||
HDAModel
|
||||
HDAModel,
|
||||
GalaxyApp
|
||||
};
|
||||
|
||||
window.bundleEntries = bundleEntries;
|
||||
|
||||
@@ -24,19 +24,16 @@ ${ h.dumps( dictionary, indent=( 2 if trans.debug else 0 ) ) }
|
||||
## 1) bootstrap kwargs (as above), 2) build Galaxy global var, 3) load 'app' by AMD (optional)
|
||||
${ self.bootstrap( **kwargs ) }
|
||||
<script type="text/javascript">
|
||||
require([ 'require', 'galaxy' ], function( require, galaxy ){
|
||||
//TODO: global...
|
||||
window.Galaxy = new galaxy.default.GalaxyApp({
|
||||
root : '${h.url_for( "/" )}',
|
||||
config : ${ render_json( get_config_dict() )},
|
||||
user : ${ render_json( get_user_dict() )},
|
||||
session_csrf_token : '${ trans.session_csrf_token }'
|
||||
}, window.bootstrapped );
|
||||
window.Galaxy = new window.bundleEntries.GalaxyApp.GalaxyApp({
|
||||
root : '${h.url_for( "/" )}',
|
||||
config : ${ render_json( get_config_dict() )},
|
||||
user : ${ render_json( get_user_dict() )},
|
||||
session_csrf_token : '${ trans.session_csrf_token }'
|
||||
}, window.bootstrapped );
|
||||
|
||||
%if app:
|
||||
require([ '${app}' ]);
|
||||
%endif
|
||||
});
|
||||
%if app:
|
||||
require([ '${app}' ]);
|
||||
%endif
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
<%inherit file="/webapps/galaxy/base_panels.mako"/>
|
||||
<%namespace file="/galaxy_client_app.mako" name="galaxy_client"/>
|
||||
|
||||
@@ -24,12 +23,16 @@
|
||||
|
||||
<%def name="javascript_app()">
|
||||
<script type="text/javascript">
|
||||
define( 'app', function(){
|
||||
$(function(){bundleEntries.multiHistory(bootstrapped)});
|
||||
});
|
||||
define( 'app', function(){
|
||||
bundleEntries.multiHistory(bootstrapped);
|
||||
});
|
||||
</script>
|
||||
${ galaxy_client.load( app='app', current_history_id=current_history_id,
|
||||
includingDeleted=include_deleted_histories, order=order, limit=limit ) }
|
||||
##${ galaxy_client.load( app='app', histories=histories,
|
||||
## includingDeleted=include_deleted_histories, order=order, limit=limit ) }
|
||||
|
||||
${galaxy_client.load(
|
||||
app='app',
|
||||
current_history_id=current_history_id,
|
||||
includingDeleted=include_deleted_histories,
|
||||
order=order,
|
||||
limit=limit
|
||||
)}
|
||||
</%def>
|
||||
|
||||
Reference in New Issue
Block a user