mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix center panel
This commit is contained in:
@@ -1,33 +1,19 @@
|
||||
define(['utils/utils', 'mvc/tools', 'mvc/upload/upload-view', 'mvc/ui/ui-misc', 'mvc/history/options-menu', 'mvc/history/history-panel-edit-current'],
|
||||
function( Utils, Tools, Upload, Ui, optionsMenu, HistoryPanel ) {
|
||||
|
||||
// create form view
|
||||
/* Builds the center panel */
|
||||
var CenterPanel = Backbone.View.extend({
|
||||
// initialize
|
||||
initialize: function( options ) {
|
||||
this.options = Utils.merge( options, {} );
|
||||
this.setElement( this._template() );
|
||||
|
||||
/*if trans.app.config.require_login and not trans.user:
|
||||
center_url = h.url_for( controller='user', action='login' )
|
||||
elif tool_id is not None:
|
||||
center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True, **params )
|
||||
elif workflow_id is not None:
|
||||
center_url = h.url_for( controller='workflow', action='run', id=workflow_id )
|
||||
elif m_c is not None:
|
||||
center_url = h.url_for( controller=m_c, action=m_a )
|
||||
else:
|
||||
center_url = h.url_for( controller="root", action="welcome" )*/
|
||||
|
||||
var src = 'welcome';
|
||||
window.console.log(Galaxy.config);
|
||||
if ( Galaxy.config.require_login && !Galaxy.user.valid ) {
|
||||
src = 'user/login';
|
||||
} else {
|
||||
if (true ) {
|
||||
}
|
||||
}
|
||||
this.$( '#galaxy_main' ).prop( 'src', galaxy_config.root + src );
|
||||
var params = this.options.params;
|
||||
this.$( '#galaxy_main' ).prop( 'src', galaxy_config.root + (
|
||||
( params.tool_id && ( 'tool_runner?' + $.param( params ) ) ) ||
|
||||
( params.workflow_id && ( 'workflow/run?workflow_id=' + params.workflow_id ) ) ||
|
||||
( params.m_c && ( params.m_c + '/' + params.m_a ) ) ||
|
||||
( !Galaxy.config.require_login && Galaxy.user.valid && 'user/login') ||
|
||||
'root/welcome'
|
||||
));
|
||||
},
|
||||
|
||||
_template: function() {
|
||||
@@ -37,7 +23,7 @@ define(['utils/utils', 'mvc/tools', 'mvc/upload/upload-view', 'mvc/ui/ui-misc',
|
||||
}
|
||||
});
|
||||
|
||||
// create form view
|
||||
/* Builds the tool panel on the left */
|
||||
var LeftPanel = Backbone.View.extend({
|
||||
initialize: function( options ) {
|
||||
this.options = Utils.merge( options, {} );
|
||||
@@ -120,6 +106,7 @@ define(['utils/utils', 'mvc/tools', 'mvc/upload/upload-view', 'mvc/ui/ui-misc',
|
||||
}
|
||||
});
|
||||
|
||||
/* Builds the history panel on the right */
|
||||
var RightPanel = Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
this.options = Utils.merge( options, {} );
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"app-analysis.js","sources":["../../../src/mvc/app/app-analysis.js"],"names":["define","Utils","Tools","Upload","Ui","optionsMenu","HistoryPanel","CenterPanel","Backbone","View","extend","initialize","options","this","merge","setElement","_template","src","window","console","log","Galaxy","config","require_login","user","valid","$","prop","galaxy_config","root","LeftPanel","tool_search","ToolSearch","spinner_url","search_url","hidden","tools","ToolCollection","toolbox","tool_panel","ToolPanel","layout","toolbox_in_panel","tool_panel_view","ToolPanelView","model","toolPanel","get","size","render","show","$el","append","click","parent","handle_minwidth_hint","attr","upload","components","header","title","buttons","RightPanel","buttonRefresh","ButtonLink","id","cls","icon","onclick","top","currHistoryPanel","loadCurrentHistory","buttonOptions","target","href","buttonViewMulti","body","historyOptionsMenu","anonymous","purgeAllowed","allow_user_dataset_purge","CurrentHistoryPanel","el","linkTarget","$scrollContainer","connectToQuotaMeter","quotaMeter","listenToGalaxy","left","center","right"],"mappings":"AAAAA,QAAQ,cAAe,YAAa,yBAA0B,iBAAkB,2BAA4B,0CACxG,SAAUC,EAAOC,EAAOC,EAAQC,EAAIC,EAAaC,GAGjD,GAAIC,GAAcC,SAASC,KAAKC,QAE5BC,WAAY,SAAUC,GAClBC,KAAKD,QAAUX,EAAMa,MAAOF,MAC5BC,KAAKE,WAAYF,KAAKG,YAatB,IAAIC,GAAM,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C,QAAU,WACFC,IAAIhD,QAAUgD,IAAIhD,OAAOiD,kBACzBD,IAAIhD,OAAOiD,iBAAiBC,wBAIpCC,EAAgB,GAAIpE,GAAG4D,YACvBC,GAAU,yBACVL,MAAU,kBACVM,IAAU,sBACVO,OAAU,cACVN,KAAU,YACVO,KAAUrD,OAAOQ,KAAO,yBAExB8C,EAAkB,GAAIvE,GAAG4D,YACzBC,GAAU,4BACVL,MAAU,qBACVM,IAAU,sBACVC,KAAU,gBACVO,KAAUrD,OAAOQ,KAAO,yBAI5BhB,MAAK6C,YACDC,QACIC,MAAU,UACVM,IAAU,uBACVL,SAAYE,EAAeS,EAAeG,IAE9CC,MACIV,IAAU,kCAKlB7C,OAAOwD,mBAAqBxE,EAAamE,EAAcrB,KACnD2B,UAAelE,EAAQY,KAAKC,OAAS,QAAU,QAC/CsD,aAAe1D,OAAOC,OAAO0D,0BAA4B,QAAU,QACnEnD,KAAeR,OAAOQ,OAI1BR,OAAOiD,iBAAmB,GAAIhE,GAAa2E,qBACvCC,GAAkBrE,KAAKsC,IACvB4B,aAAkB1D,OAAOC,OAAO0D,yBAChCG,WAAkB,cAClBC,iBAAkB,WAAY,MAAOvE,MAAKsC,IAAIG,YAElDjC,OAAOiD,iBAAiBe,oBAAqBhE,OAAOiE,YACpDjE,OAAOiD,iBAAiBiB,eAAgBlE,QACxCA,OAAOiD,iBAAiBC,sBAI5BvD,UAAW,WACP,MAAO,4DAIf,QACIwE,KAAU1D,EACV2D,OAAUlF,EACVmF,MAAU5B"}
|
||||
{"version":3,"file":"app-analysis.js","sources":["../../../src/mvc/app/app-analysis.js"],"names":["define","Utils","Tools","Upload","Ui","optionsMenu","HistoryPanel","CenterPanel","Backbone","View","extend","initialize","options","this","merge","setElement","_template","params","$","prop","galaxy_config","root","tool_id","param","workflow_id","m_c","m_a","Galaxy","config","require_login","user","valid","LeftPanel","tool_search","ToolSearch","spinner_url","search_url","hidden","tools","ToolCollection","toolbox","tool_panel","ToolPanel","layout","toolbox_in_panel","tool_panel_view","ToolPanelView","model","toolPanel","get","size","render","show","$el","append","click","parent","handle_minwidth_hint","attr","upload","components","header","title","buttons","RightPanel","buttonRefresh","ButtonLink","id","cls","icon","onclick","top","currHistoryPanel","loadCurrentHistory","buttonOptions","target","href","buttonViewMulti","body","historyOptionsMenu","anonymous","purgeAllowed","allow_user_dataset_purge","CurrentHistoryPanel","el","linkTarget","$scrollContainer","connectToQuotaMeter","quotaMeter","listenToGalaxy","left","center","right"],"mappings":"AAAAA,QAAQ,cAAe,YAAa,yBAA0B,iBAAkB,2BAA4B,0CACxG,SAAUC,EAAOC,EAAOC,EAAQC,EAAIC,EAAaC,GAGjD,GAAIC,GAAcC,SAASC,KAAKC,QAC5BC,WAAY,SAAUC,GAClBC,KAAKD,QAAUX,EAAMa,MAAOF,MAC5BC,KAAKE,WAAYF,KAAKG,YACtB,IAAIC,GAASJ,KAAKD,QAAQK,MAC1BJ,MAAKK,EAAG,gBAAiBC,KAAM,MAAOC,cAAcC,MAC9CJ,EAAOK,SAAa,eAAiBJ,EAAEK,MAAON,IAC9CA,EAAOO,aAAiB,4BAA8BP,EAAOO,aAC7DP,EAAOQ,KAASR,EAAOQ,IAAM,IAAMR,EAAOS,MACzCC,OAAOC,OAAOC,eAAiBF,OAAOG,KAAKC,OAAS,cACvD,kBAIRf,UAAW,WACP,MAAQ,2LAOZgB,EAAYxB,SAASC,KAAKC,QAC1BC,WAAY,SAAUC,GAKlB,GAJAC,KAAKD,QAAUX,EAAMa,MAAOF,MAC5BC,KAAKE,WAAYF,KAAKG,aAGjBW,OAAOG,KAAKC,QAAUJ,OAAOC,OAAOC,cAAgB,CACrD,GAAII,GAAc,GAAI/B,GAAMgC,YACxBC,YAAcvB,EAAQuB,YACtBC,WAAcxB,EAAQwB,WACtBC,QAAc,IAEdC,EAAQ,GAAIpC,GAAMqC,eAAgB3B,EAAQ4B,SAC1CC,EAAa,GAAIvC,GAAMwC,WACvBT,YAAcA,EACdK,MAAcA,EACdK,OA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,OAI1BM,OAAO6C,iBAAmB,GAAIlE,GAAa6E,qBACvCC,GAAkBvE,KAAKwC,IACvB4B,aAAkBtD,OAAOC,OAAOsD,yBAChCG,WAAkB,cAClBC,iBAAkB,WAAY,MAAOzE,MAAKwC,IAAIG,YAElD7B,OAAO6C,iBAAiBe,oBAAqB5D,OAAO6D,YACpD7D,OAAO6C,iBAAiBiB,eAAgB9D,QACxCA,OAAO6C,iBAAiBC,sBAI5BzD,UAAW,WACP,MAAO,4DAIf,QACI0E,KAAU1D,EACV2D,OAAUpF,EACVqF,MAAU5B"}
|
||||
@@ -1,2 +1,2 @@
|
||||
define(["utils/utils","mvc/tools","mvc/upload/upload-view","mvc/ui/ui-misc","mvc/history/options-menu","mvc/history/history-panel-edit-current"],function(a,b,c,d,e,f){var g=Backbone.View.extend({initialize:function(b){this.options=a.merge(b,{}),this.setElement(this._template());var c="welcome";window.console.log(Galaxy.config),Galaxy.config.require_login&&!Galaxy.user.valid&&(c="user/login"),this.$("#galaxy_main").prop("src",galaxy_config.root+c)},_template:function(){return'<div style="position: absolute; width: 100%; height: 100%"><iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;"/></div>'}}),h=Backbone.View.extend({initialize:function(d){if(this.options=a.merge(d,{}),this.setElement(this._template()),Galaxy.user.valid||!Galaxy.config.require_login){var e=new b.ToolSearch({spinner_url:d.spinner_url,search_url:d.search_url,hidden:!1}),f=new b.ToolCollection(d.toolbox),g=new b.ToolPanel({tool_search:e,tools:f,layout:d.toolbox_in_panel});tool_panel_view=new b.ToolPanelView({model:g}),Galaxy.toolPanel=g,g.get("layout").size()>0&&(tool_panel_view.render(),this.$(".toolMenu").show()),this.$el.append(tool_panel_view.$el),this.$("a[minsizehint]").click(function(){parent.handle_minwidth_hint&&parent.handle_minwidth_hint($(this).attr("minsizehint"))}),Galaxy.upload=new c(d),this.components={header:{title:"Tools",buttons:[Galaxy.upload]}}}},_template:function(){return'<div class="toolMenuContainer"><div class="toolMenu" style="display: none"><div id="search-no-results" style="display: none; padding-top: 5px"><em><strong>Search did not match any tools.</strong></em></div></div></div>'}}),i=Backbone.View.extend({initialize:function(b){this.options=a.merge(b,{}),this.setElement(this._template());var c=new d.ButtonLink({id:"history-refresh-button",title:"Refresh history",cls:"panel-header-button",icon:"fa fa-refresh",onclick:function(){top.Galaxy&&top.Galaxy.currHistoryPanel&&top.Galaxy.currHistoryPanel.loadCurrentHistory()}}),g=new d.ButtonLink({id:"history-options-button",title:"History options",cls:"panel-header-button",target:"galaxy_main",icon:"fa fa-cog",href:Galaxy.root+"root/history_options"}),h=new d.ButtonLink({id:"history-view-multi-button",title:"View all histories",cls:"panel-header-button",icon:"fa fa-columns",href:Galaxy.root+"history/view_multiple"});this.components={header:{title:"History",cls:"history-panel-header",buttons:[c,g,h]},body:{cls:"unified-panel-body-background"}},Galaxy.historyOptionsMenu=e(g.$el,{anonymous:b.user.valid&&"true"||"false",purgeAllowed:Galaxy.config.allow_user_dataset_purge&&"true"||"false",root:Galaxy.root}),Galaxy.currHistoryPanel=new f.CurrentHistoryPanel({el:this.$el,purgeAllowed:Galaxy.config.allow_user_dataset_purge,linkTarget:"galaxy_main",$scrollContainer:function(){return this.$el.parent()}}),Galaxy.currHistoryPanel.connectToQuotaMeter(Galaxy.quotaMeter),Galaxy.currHistoryPanel.listenToGalaxy(Galaxy),Galaxy.currHistoryPanel.loadCurrentHistory()},_template:function(){return'<div id="current-history-panel" class="history-panel"/>'}});return{left:h,center:g,right:i}});
|
||||
define(["utils/utils","mvc/tools","mvc/upload/upload-view","mvc/ui/ui-misc","mvc/history/options-menu","mvc/history/history-panel-edit-current"],function(a,b,c,d,e,f){var g=Backbone.View.extend({initialize:function(b){this.options=a.merge(b,{}),this.setElement(this._template());var c=this.options.params;this.$("#galaxy_main").prop("src",galaxy_config.root+(c.tool_id&&"tool_runner?"+$.param(c)||c.workflow_id&&"workflow/run?workflow_id="+c.workflow_id||c.m_c&&c.m_c+"/"+c.m_a||!Galaxy.config.require_login&&Galaxy.user.valid&&"user/login"||"root/welcome"))},_template:function(){return'<div style="position: absolute; width: 100%; height: 100%"><iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;"/></div>'}}),h=Backbone.View.extend({initialize:function(d){if(this.options=a.merge(d,{}),this.setElement(this._template()),Galaxy.user.valid||!Galaxy.config.require_login){var e=new b.ToolSearch({spinner_url:d.spinner_url,search_url:d.search_url,hidden:!1}),f=new b.ToolCollection(d.toolbox),g=new b.ToolPanel({tool_search:e,tools:f,layout:d.toolbox_in_panel});tool_panel_view=new b.ToolPanelView({model:g}),Galaxy.toolPanel=g,g.get("layout").size()>0&&(tool_panel_view.render(),this.$(".toolMenu").show()),this.$el.append(tool_panel_view.$el),this.$("a[minsizehint]").click(function(){parent.handle_minwidth_hint&&parent.handle_minwidth_hint($(this).attr("minsizehint"))}),Galaxy.upload=new c(d),this.components={header:{title:"Tools",buttons:[Galaxy.upload]}}}},_template:function(){return'<div class="toolMenuContainer"><div class="toolMenu" style="display: none"><div id="search-no-results" style="display: none; padding-top: 5px"><em><strong>Search did not match any tools.</strong></em></div></div></div>'}}),i=Backbone.View.extend({initialize:function(b){this.options=a.merge(b,{}),this.setElement(this._template());var c=new d.ButtonLink({id:"history-refresh-button",title:"Refresh history",cls:"panel-header-button",icon:"fa fa-refresh",onclick:function(){top.Galaxy&&top.Galaxy.currHistoryPanel&&top.Galaxy.currHistoryPanel.loadCurrentHistory()}}),g=new d.ButtonLink({id:"history-options-button",title:"History options",cls:"panel-header-button",target:"galaxy_main",icon:"fa fa-cog",href:Galaxy.root+"root/history_options"}),h=new d.ButtonLink({id:"history-view-multi-button",title:"View all histories",cls:"panel-header-button",icon:"fa fa-columns",href:Galaxy.root+"history/view_multiple"});this.components={header:{title:"History",cls:"history-panel-header",buttons:[c,g,h]},body:{cls:"unified-panel-body-background"}},Galaxy.historyOptionsMenu=e(g.$el,{anonymous:b.user.valid&&"true"||"false",purgeAllowed:Galaxy.config.allow_user_dataset_purge&&"true"||"false",root:Galaxy.root}),Galaxy.currHistoryPanel=new f.CurrentHistoryPanel({el:this.$el,purgeAllowed:Galaxy.config.allow_user_dataset_purge,linkTarget:"galaxy_main",$scrollContainer:function(){return this.$el.parent()}}),Galaxy.currHistoryPanel.connectToQuotaMeter(Galaxy.quotaMeter),Galaxy.currHistoryPanel.listenToGalaxy(Galaxy),Galaxy.currHistoryPanel.loadCurrentHistory()},_template:function(){return'<div id="current-history-panel" class="history-panel"/>'}});return{left:h,center:g,right:i}});
|
||||
//# sourceMappingURL=../../../maps/mvc/app/app-analysis.js.map
|
||||
@@ -11,6 +11,7 @@
|
||||
app = trans.app
|
||||
app_config = {
|
||||
'active_view' : 'analysis',
|
||||
'params' : dict( trans.request.params ),
|
||||
'brand' : app.config.get("brand", ""),
|
||||
'nginx_upload_path' : app.config.get("nginx_upload_path", h.url_for(controller='api', action='tools')),
|
||||
'use_remote_user' : app.config.use_remote_user,
|
||||
|
||||
Reference in New Issue
Block a user