2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/f548b977ce33/ changeset: f548b977ce33 user: carlfeberhard date: 2012-11-08 22:14:15 summary: api/histories, show: state_ids now returns all ids (incl. deleted hdas); (alt)history: minor changes affected #: 6 files diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f lib/galaxy/webapps/galaxy/api/histories.py --- a/lib/galaxy/webapps/galaxy/api/histories.py +++ b/lib/galaxy/webapps/galaxy/api/histories.py @@ -80,7 +80,8 @@ if not dataset_dict['deleted']: state_counts[ item_state ] = state_counts[ item_state ] + 1 - state_ids[ item_state ].append( trans.security.encode_id( dataset_dict[ 'id' ] ) ) + + state_ids[ item_state ].append( trans.security.encode_id( dataset_dict[ 'id' ] ) ) return ( state_counts, state_ids ) @@ -114,7 +115,6 @@ state = states.NEW else: - if( ( state_counts[ states.RUNNING ] > 0 ) or ( state_counts[ states.SETTING_METADATA ] > 0 ) or ( state_counts[ states.UPLOAD ] > 0 ) ): @@ -131,13 +131,10 @@ state = states.OK history_data[ 'state' ] = state - history_data[ 'state_details' ] = state_counts history_data[ 'state_ids' ] = state_ids - history_data[ 'contents_url' ] = url_for( 'history_contents', history_id=history_id ) - except Exception, e: msg = "Error in history API at showing history detail: %s" % ( str( e ) ) log.error( msg, exc_info=True ) diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/mvc/history/history-model.js --- a/static/scripts/mvc/history/history-model.js +++ b/static/scripts/mvc/history/history-model.js @@ -9,7 +9,7 @@ //TODO: bind change events from items and collection to this (itemLengths, states) // uncomment this out see log messages - //logger : console, + logger : console, // values from api (may need more) defaults : { @@ -17,19 +17,14 @@ name : '', state : '', - ////TODO: wire these to items (or this) - //show_deleted : false, - //show_hidden : false, - // diskSize : 0, deleted : false, - tags : [], + //tags : [], annotation : null, - //TODO: quota msg and message? how to get those over the api? - message : null, - quotaMsg : false + //TODO: message? how to get over the api? + message : null }, url : function(){ @@ -52,36 +47,43 @@ //this.on( 'change', function( currModel, changedList ){ // this.log( this + ' has changed:', currModel, changedList ); //}); - //this.bind( 'all', function( event ){ - // this.log( this + '', arguments ); - //}); + this.bind( 'all', function( event ){ + //this.log( this + '', arguments ); + console.info( this + '', arguments ); + }); }, // get data via the api (alternative to sending options,hdas to initialize) - loadFromApi : function( historyId, callback ){ + //TODO: this needs work - move to more straightforward deferred + loadFromApi : function( historyId, success ){ var history = this; // fetch the history AND the user (mainly to see if they're logged in at this point) history.attributes.id = historyId; //TODO:?? really? fetch user here? - jQuery.when( jQuery.ajax( 'api/users/current' ), history.fetch() + jQuery.when( + jQuery.ajax( 'api/users/current' ), + history.fetch() ).then( function( userResponse, historyResponse ){ - //console.warn( 'fetched user, history: ', userResponse, historyResponse ); + console.warn( 'fetched user: ', userResponse[0] ); + console.warn( 'fetched history: ', historyResponse[0] ); history.attributes.user = userResponse[0]; //? meh. + history.trigger( 'loaded', historyResponse ); history.log( history ); }).then( function(){ // ...then the hdas (using contents?ids=...) jQuery.ajax( history.url() + '/contents?' + jQuery.param({ - ids : history.itemIdsFromStateIds().join( ',' ) + ids : history.hdaIdsFromStateIds().join( ',' ) // reset the collection to the hdas returned })).success( function( hdas ){ - //console.warn( 'fetched hdas' ); + //console.warn( 'fetched hdas', hdas ); history.hdas.reset( hdas ); history.checkForUpdates(); - callback(); + history.trigger( 'loaded:hdas', hdas ); + if( success ){ callback( history ); } }); }); }, diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/mvc/history/history-panel.js --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -20,7 +20,8 @@ ??: still happening? from loadFromApi: - BUG: not showing previous annotations + BUG: not loading deleted datasets + FIXED: history_contents, show: state_ids returns all ids now (incl. deleted) fixed: BUG: upload, history size, doesn't change @@ -217,6 +218,7 @@ this.setUpActionButton( newRender.find( '#history-action-popup' ) ); // render hda views (if any and any shown (show_deleted/hidden) + //TODO: this seems too elaborate if( !this.model.hdas.length || !this.renderItems( newRender.find( '#' + this.model.get( 'id' ) + '-datasets' ) ) ){ // if history is empty or no hdas would be rendered, show the empty message @@ -268,24 +270,27 @@ renderItems : function( $whereTo ){ this.hdaViews = {}; var historyView = this, + // only render the shown hdas + //TODO: switch to more general filtered pattern visibleHdas = this.model.hdas.getVisible( this.storage.get( 'show_deleted' ), this.storage.get( 'show_hidden' ) ); - // only render the shown hdas _.each( visibleHdas, function( hda ){ var hdaId = hda.get( 'id' ), expanded = historyView.storage.get( 'expandedHdas' ).get( hdaId ); + historyView.hdaViews[ hdaId ] = new HDAView({ model : hda, expanded : expanded, urlTemplates : historyView.hdaUrlTemplates }); historyView.setUpHdaListeners( historyView.hdaViews[ hdaId ] ); + // render it (NOTE: reverse order, newest on top (prepend)) //TODO: by default send a reverse order list (although this may be more efficient - it's more confusing) - $whereTo.prepend( historyView.hdaViews[ hdaId ].render().$el ); + $whereTo.prepend( historyView.hdaViews[ hdaId ].render().$el ); }); return visibleHdas.length; }, diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/templates/compiled/template-history-historyPanel.js --- a/static/scripts/templates/compiled/template-history-historyPanel.js +++ b/static/scripts/templates/compiled/template-history-historyPanel.js @@ -26,66 +26,71 @@ function program5(depth0,data) { + + return "Click to see more actions";} + +function program7(depth0,data) { + var buffer = "", stack1, foundHelper; buffer += "\n <div id=\"history-secondary-links\" style=\"float: right;\">\n <a id=\"history-tag\" title=\""; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); } - else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(6, program6, data)}); } - if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\""; - foundHelper = helpers.local; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(8, program8, data)}); } if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\"\n class=\"icon-button tags tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n <a id=\"history-annotate\" title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\"\n class=\"icon-button annotate tooltip\" target=\"galaxy_main\" href=\"javascript:void(0)\"></a>\n </div>\n "; return buffer;} -function program6(depth0,data) { +function program8(depth0,data) { return "Edit history tags";} -function program8(depth0,data) { +function program10(depth0,data) { return "Edit history annotation";} -function program10(depth0,data) { +function program12(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n "; foundHelper = helpers.warningmessagesmall; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); } else { stack1 = depth0.warningmessagesmall; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(11, program11, data)}); } + if (!helpers.warningmessagesmall) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(13, program13, data)}); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n "; return buffer;} -function program11(depth0,data) { +function program13(depth0,data) { var stack1, foundHelper; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); } + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); } if(stack1 || stack1 === 0) { return stack1; } else { return ''; }} -function program12(depth0,data) { +function program14(depth0,data) { return "You are currently viewing a deleted history!";} -function program14(depth0,data) { +function program16(depth0,data) { var buffer = "", stack1; buffer += "\n <div id=\"history-tag-annotation\">\n\n <div id=\"history-tag-area\" style=\"display: none\">\n <strong>Tags:</strong>\n <div class=\"tag-elt\"></div>\n </div>\n\n <div id=\"history-annotation-area\" style=\"display: none\">\n <strong>Annotation / Notes:</strong>\n <div id=\"history-annotation-container\">\n <div id=\"history-annotation\" class=\"tooltip editable-text\" title=\"Click to edit annotation\">\n "; stack1 = depth0.annotation; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(19, program19, data),fn:self.program(17, program17, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n </div>\n </div>\n </div>\n </div>\n "; return buffer;} -function program15(depth0,data) { +function program17(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n "; @@ -95,12 +100,12 @@ buffer += escapeExpression(stack1) + "\n "; return buffer;} -function program17(depth0,data) { +function program19(depth0,data) { return "\n <em>Describe or add notes to history</em>\n ";} -function program19(depth0,data) { +function program21(depth0,data) { var buffer = "", stack1, foundHelper; buffer += "\n <div id=\"message-container\">\n <div class=\""; @@ -114,7 +119,7 @@ buffer += escapeExpression(stack1) + "\n </div><br />\n </div>\n "; return buffer;} -function program21(depth0,data) { +function program23(depth0,data) { return "Your history is empty. Click 'Get Data' on the left pane to start";} @@ -125,29 +130,35 @@ stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email; stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.program(3, program3, data),fn:self.program(1, program1, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } - buffer += "\n </div>\n\n <a id=\"history-action-popup\" href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">"; + buffer += "\n </div>\n\n <a id=\"history-action-popup\" class=\"tooltip\" title=\""; + foundHelper = helpers.local; + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); } + else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); } + if(stack1 || stack1 === 0) { buffer += stack1; } + buffer += "\"\n href=\"javascript:void(0);\" style=\"float: right;\">\n <span class=\"ficon cog large\"></span>\n </a>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div id=\"history-subtitle-area\">\n <div id=\"history-size\" style=\"float:left;\">"; foundHelper = helpers.nice_size; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.nice_size; stack1 = typeof stack1 === functionType ? stack1() : stack1; } buffer += escapeExpression(stack1) + "</div>\n "; stack1 = depth0.user; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(5, program5, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(7, program7, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n <div style=\"clear: both;\"></div>\n </div>\n\n "; stack1 = depth0.deleted; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(10, program10, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(12, program12, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n\n "; buffer += "\n "; buffer += "\n "; stack1 = depth0.user; stack1 = stack1 == null || stack1 === false ? stack1 : stack1.email; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(14, program14, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(16, program16, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n\n "; stack1 = depth0.message; - stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(19, program19, data)}); + stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n\n <div id=\"quota-message-container\" style=\"display: none\">\n <div id=\"quota-message\" class=\"errormessage\">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id=\""; foundHelper = helpers.id; @@ -155,9 +166,9 @@ else { stack1 = depth0.id; stack1 = typeof stack1 === functionType ? stack1() : stack1; } buffer += escapeExpression(stack1) + "-datasets\" class=\"history-datasets-list\"></div>\n\n<div class=\"infomessagesmall\" id=\"emptyHistoryMessage\" style=\"display: none;\">\n "; foundHelper = helpers.local; - if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); } + if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); } else { stack1 = depth0.local; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(21, program21, data)}); } + if (!helpers.local) { stack1 = blockHelperMissing.call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(23, program23, data)}); } if(stack1 || stack1 === 0) { buffer += stack1; } buffer += "\n</div>"; return buffer;}); diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f static/scripts/templates/history-templates.html --- a/static/scripts/templates/history-templates.html +++ b/static/scripts/templates/history-templates.html @@ -120,7 +120,8 @@ {{/if}} </div> - <a id="history-action-popup" href="javascript:void(0);" style="float: right;"> + <a id="history-action-popup" class="tooltip" title="{{#local}}Click to see more actions{{/local}}" + href="javascript:void(0);" style="float: right;"><span class="ficon cog large"></span></a><div style="clear: both;"></div> diff -r 6344832c535aab0a8cc4a57be1414fc179e8540b -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f templates/root/alternate_history.mako --- a/templates/root/alternate_history.mako +++ b/templates/root/alternate_history.mako @@ -289,24 +289,31 @@ // i don't like this history+user relationship, but user authentication changes views/behaviour history.user = user; - var historyPanel = new HistoryPanel({ - model : new History( history, hdas ), + //var historyPanel = new HistoryPanel({ + // model : new History( history, hdas ), + // urlTemplates : galaxy_paths.attributes, + // logger : console, + // // is page sending in show settings? if so override history's + // show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) }, + // show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) } + //}); + //historyPanel.render(); + + // ...or LOAD FROM THE API + historyPanel = new HistoryPanel({ + model: new History(), urlTemplates : galaxy_paths.attributes, logger : console, // is page sending in show settings? if so override history's show_deleted : ${ 'true' if show_deleted == True else ( 'null' if show_deleted == None else 'false' ) }, show_hidden : ${ 'true' if show_hidden == True else ( 'null' if show_hidden == None else 'false' ) } }); - historyPanel.render(); + historyPanel.model.loadFromApi( history.id, historyPanel.show_deleted ); + if( !Galaxy.currHistoryPanel ){ Galaxy.currHistoryPanel = historyPanel; } if( !( historyPanel in Galaxy.historyPanels ) ){ Galaxy.historyPanels.unshift( historyPanel ); } + - - // ...or LOAD FROM THE API - //historyPanel = new HistoryView({ model: new History().setPaths( galaxy_paths ) }); - //historyPanel.loadFromApi( pageData.history.id ); - - // QUOTA METER is a cross-frame ui element (meter in masthead, over quota message in history) // create it and join them here for now (via events) //TODO: this really belongs in the masthead @@ -389,6 +396,10 @@ #history-secondary-links { } + #history-tag-area, #history-annotation-area { + margin-top: 10px; + } + </style><noscript> https://bitbucket.org/galaxy/galaxy-central/changeset/29d47f28af66/ changeset: 29d47f28af66 user: carlfeberhard date: 2012-11-08 22:15:03 summary: pack scripts affected #: 2 files diff -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f -r 29d47f28af664cf58941085332666de032a7e7d5 static/scripts/packed/mvc/history/history-model.js --- a/static/scripts/packed/mvc/history/history-model.js +++ b/static/scripts/packed/mvc/history/history-model.js @@ -1,1 +1,1 @@ -var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,tags:[],annotation:null,message:null,quotaMsg:false},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.itemIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();c()})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console}); \ No newline at end of file +var History=BaseModel.extend(LoggableMixin).extend({logger:console,defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}this.bind("all",function(c){console.info(this+"",arguments)})},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){console.warn("fetched user: ",e[0]);console.warn("fetched history: ",d[0]);b.attributes.user=e[0];b.trigger("loaded",d);b.log(b)}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}}).error(function(f,d,e){if(console&&console.warn){console.warn("Error getting history updates from the server:",f,d,e)}alert("Error getting history updates from the server.\n"+e)})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories",logger:console}); \ No newline at end of file diff -r f548b977ce33c8e0ba59a2d1586d0122cd9b963f -r 29d47f28af664cf58941085332666de032a7e7d5 static/scripts/packed/templates/compiled/template-history-historyPanel.js --- a/static/scripts/packed/templates/compiled/template-history-historyPanel.js +++ b/static/scripts/packed/templates/compiled/template-history-historyPanel.js @@ -1,1 +1,1 @@ -(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(f,s,q,m,A){q=q||f.helpers;var r="",j,i,e="function",d=this.escapeExpression,p=this,c=q.blockHelperMissing;function o(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function n(F,E){var C="",D,B;C+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';B=q.name;if(B){D=B.call(F,{hash:{}})}else{D=F.name;D=typeof D===e?D():D}C+=d(D)+"</div>\n ";return C}function l(F,E){var C="",D,B;C+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(6,k,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';B=q.local;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}else{D=F.local;D=typeof D===e?D():D}if(!q.local){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(8,h,E)})}if(D||D===0){C+=D}C+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return C}function k(C,B){return"Edit history tags"}function h(C,B){return"Edit history annotation"}function z(F,E){var C="",D,B;C+="\n ";B=q.warningmessagesmall;if(B){D=B.call(F,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}else{D=F.warningmessagesmall;D=typeof D===e?D():D}if(!q.warningmessagesmall){D=c.call(F,D,{hash:{},inverse:p.noop,fn:p.program(11,y,E)})}if(D||D===0){C+=D}C+="\n ";return C}function y(E,D){var C,B;B=q.local;if(B){C=B.call(E,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}else{C=E.local;C=typeof C===e?C():C}if(!q.local){C=c.call(E,C,{hash:{},inverse:p.noop,fn:p.program(12,x,D)})}if(C||C===0){return C}else{return""}}function x(C,B){return"You are currently viewing a deleted history!"}function w(E,D){var B="",C;B+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';C=E.annotation;C=q["if"].call(E,C,{hash:{},inverse:p.program(17,u,D),fn:p.program(15,v,D)});if(C||C===0){B+=C}B+="\n </div>\n </div>\n </div>\n </div>\n ";return B}function v(F,E){var C="",D,B;C+="\n ";B=q.annotation;if(B){D=B.call(F,{hash:{}})}else{D=F.annotation;D=typeof D===e?D():D}C+=d(D)+"\n ";return C}function u(C,B){return"\n <em>Describe or add notes to history</em>\n "}function t(F,E){var C="",D,B;C+='\n <div id="message-container">\n <div class="';B=q.status;if(B){D=B.call(F,{hash:{}})}else{D=F.status;D=typeof D===e?D():D}C+=d(D)+'message">\n ';B=q.message;if(B){D=B.call(F,{hash:{}})}else{D=F.message;D=typeof D===e?D():D}C+=d(D)+"\n </div><br />\n </div>\n ";return C}function g(C,B){return"Your history is empty. Click 'Get Data' on the left pane to start"}r+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.program(3,n,A),fn:p.program(1,o,A)});if(j||j===0){r+=j}r+='\n </div>\n\n <a id="history-action-popup" href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';i=q.nice_size;if(i){j=i.call(s,{hash:{}})}else{j=s.nice_size;j=typeof j===e?j():j}r+=d(j)+"</div>\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(5,l,A)});if(j||j===0){r+=j}r+='\n <div style="clear: both;"></div>\n </div>\n\n ';j=s.deleted;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(10,z,A)});if(j||j===0){r+=j}r+="\n\n ";r+="\n ";r+="\n ";j=s.user;j=j==null||j===false?j:j.email;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(14,w,A)});if(j||j===0){r+=j}r+="\n\n ";j=s.message;j=q["if"].call(s,j,{hash:{},inverse:p.noop,fn:p.program(19,t,A)});if(j||j===0){r+=j}r+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';i=q.id;if(i){j=i.call(s,{hash:{}})}else{j=s.id;j=typeof j===e?j():j}r+=d(j)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';i=q.local;if(i){j=i.call(s,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}else{j=s.local;j=typeof j===e?j():j}if(!q.local){j=c.call(s,j,{hash:{},inverse:p.noop,fn:p.program(21,g,A)})}if(j||j===0){r+=j}r+="\n</div>";return r})})(); \ No newline at end of file +(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a["template-history-historyPanel"]=b(function(g,t,r,n,B){r=r||g.helpers;var s="",k,j,e="function",d=this.escapeExpression,q=this,c=r.blockHelperMissing;function p(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip editable-text"\n title="Click to rename history">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function o(G,F){var D="",E,C;D+='\n <div id="history-name" class="tooltip"\n title="You must be logged in to edit your history name">';C=r.name;if(C){E=C.call(G,{hash:{}})}else{E=G.name;E=typeof E===e?E():E}D+=d(E)+"</div>\n ";return D}function m(D,C){return"Click to see more actions"}function l(G,F){var D="",E,C;D+='\n <div id="history-secondary-links" style="float: right;">\n <a id="history-tag" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(8,i,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button tags tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n <a id="history-annotate" title="';C=r.local;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}else{E=G.local;E=typeof E===e?E():E}if(!r.local){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(10,A,F)})}if(E||E===0){D+=E}D+='"\n class="icon-button annotate tooltip" target="galaxy_main" href="javascript:void(0)"></a>\n </div>\n ';return D}function i(D,C){return"Edit history tags"}function A(D,C){return"Edit history annotation"}function z(G,F){var D="",E,C;D+="\n ";C=r.warningmessagesmall;if(C){E=C.call(G,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}else{E=G.warningmessagesmall;E=typeof E===e?E():E}if(!r.warningmessagesmall){E=c.call(G,E,{hash:{},inverse:q.noop,fn:q.program(13,y,F)})}if(E||E===0){D+=E}D+="\n ";return D}function y(F,E){var D,C;C=r.local;if(C){D=C.call(F,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}else{D=F.local;D=typeof D===e?D():D}if(!r.local){D=c.call(F,D,{hash:{},inverse:q.noop,fn:q.program(14,x,E)})}if(D||D===0){return D}else{return""}}function x(D,C){return"You are currently viewing a deleted history!"}function w(F,E){var C="",D;C+='\n <div id="history-tag-annotation">\n\n <div id="history-tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n\n <div id="history-annotation-area" style="display: none">\n <strong>Annotation / Notes:</strong>\n <div id="history-annotation-container">\n <div id="history-annotation" class="tooltip editable-text" title="Click to edit annotation">\n ';D=F.annotation;D=r["if"].call(F,D,{hash:{},inverse:q.program(19,u,E),fn:q.program(17,v,E)});if(D||D===0){C+=D}C+="\n </div>\n </div>\n </div>\n </div>\n ";return C}function v(G,F){var D="",E,C;D+="\n ";C=r.annotation;if(C){E=C.call(G,{hash:{}})}else{E=G.annotation;E=typeof E===e?E():E}D+=d(E)+"\n ";return D}function u(D,C){return"\n <em>Describe or add notes to history</em>\n "}function h(G,F){var D="",E,C;D+='\n <div id="message-container">\n <div class="';C=r.status;if(C){E=C.call(G,{hash:{}})}else{E=G.status;E=typeof E===e?E():E}D+=d(E)+'message">\n ';C=r.message;if(C){E=C.call(G,{hash:{}})}else{E=G.message;E=typeof E===e?E():E}D+=d(E)+"\n </div><br />\n </div>\n ";return D}function f(D,C){return"Your history is empty. Click 'Get Data' on the left pane to start"}s+='\n<div id="history-controls">\n <div id="history-title-area" class="historyLinks">\n\n <div id="history-name-container" style="float: left;">\n ';s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.program(3,o,B),fn:q.program(1,p,B)});if(k||k===0){s+=k}s+='\n </div>\n\n <a id="history-action-popup" class="tooltip" title="';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(5,m,B)})}if(k||k===0){s+=k}s+='"\n href="javascript:void(0);" style="float: right;">\n <span class="ficon cog large"></span>\n </a>\n <div style="clear: both;"></div>\n </div>\n\n <div id="history-subtitle-area">\n <div id="history-size" style="float:left;">';j=r.nice_size;if(j){k=j.call(t,{hash:{}})}else{k=t.nice_size;k=typeof k===e?k():k}s+=d(k)+"</div>\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(7,l,B)});if(k||k===0){s+=k}s+='\n <div style="clear: both;"></div>\n </div>\n\n ';k=t.deleted;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(12,z,B)});if(k||k===0){s+=k}s+="\n\n ";s+="\n ";s+="\n ";k=t.user;k=k==null||k===false?k:k.email;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(16,w,B)});if(k||k===0){s+=k}s+="\n\n ";k=t.message;k=r["if"].call(t,k,{hash:{},inverse:q.noop,fn:q.program(21,h,B)});if(k||k===0){s+=k}s+='\n\n <div id="quota-message-container" style="display: none">\n <div id="quota-message" class="errormessage">\n You are over your disk quota. Tool execution is on hold until your disk usage drops below your allocated quota.\n </div>\n </div>\n</div>\n\n<div id="';j=r.id;if(j){k=j.call(t,{hash:{}})}else{k=t.id;k=typeof k===e?k():k}s+=d(k)+'-datasets" class="history-datasets-list"></div>\n\n<div class="infomessagesmall" id="emptyHistoryMessage" style="display: none;">\n ';j=r.local;if(j){k=j.call(t,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}else{k=t.local;k=typeof k===e?k():k}if(!r.local){k=c.call(t,k,{hash:{},inverse:q.noop,fn:q.program(23,f,B)})}if(k||k===0){s+=k}s+="\n</div>";return s})})(); \ No newline at end of file Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.