Skip to content

Commit

Permalink
Remove dataset get caller
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 20, 2016
1 parent 4683302 commit d1b0c4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
25 changes: 0 additions & 25 deletions config/plugins/visualizations/charts/static/library/datasets.js
Expand Up @@ -5,31 +5,6 @@ define( [ 'utils/utils' ], function( Utils ) {
this.app = app;
},

/** Get dataset */
get: function( options ) {
var self = this;
this.dataset_list = this.dataset_list || [];
var dataset = this.dataset_list[ options.id ];
if ( dataset ) {
options.success( dataset );
} else {
Utils.request({
type : 'GET',
url : config.root + 'api/datasets/' + options.id,
success : function( dataset ) {
switch ( dataset.state ) {
case 'error':
options.error && options.error( dataset );
break;
default:
self.dataset_list[ options.id ] = dataset;
options.success( dataset );
}
}
});
}
},

/** Fills request dictionary with data from cache/response */
request: function( options ) {
var self = this;
Expand Down
5 changes: 3 additions & 2 deletions config/plugins/visualizations/charts/static/views/groups.js
Expand Up @@ -48,8 +48,9 @@ define( [ 'utils/utils', 'mvc/form/form-view', 'mvc/form/form-repeat', 'mvc/form
if ( dataset_id && chart_type ) {
this.chart.state( 'wait', 'Loading metadata...' );
this.app.deferred.execute( function( process ) {
self.app.datasets.get({
id : dataset_id,
Utils.get({
url : Galaxy.root + 'api/datasets/' + dataset_id,
cache : true,
success : function( dataset ) {
for ( var id in chart_definition.columns ) {
var columns = [];
Expand Down

0 comments on commit d1b0c4d

Please sign in to comment.