diff --git a/config/plugins/visualizations/charts/static/app.js b/config/plugins/visualizations/charts/static/app.js index 1c8ecc7b93e..1edfee691ec 100644 --- a/config/plugins/visualizations/charts/static/app.js +++ b/config/plugins/visualizations/charts/static/app.js @@ -51,7 +51,6 @@ return Backbone.View.extend( // append views this.$el.append(this.viewer_view.$el); this.$el.append(this.editor_view.$el); - this.$el.css('height', 'inherit'); // pick start screen if (!this.storage.load()) { diff --git a/config/plugins/visualizations/charts/static/charts/nvd3/config.js b/config/plugins/visualizations/charts/static/charts/nvd3/config.js index 605dec03627..1dd630d816f 100644 --- a/config/plugins/visualizations/charts/static/charts/nvd3/config.js +++ b/config/plugins/visualizations/charts/static/charts/nvd3/config.js @@ -1,15 +1,15 @@ define([], function() { return { - title : '', - library : 'nvd3.js', - element : 'svg', + title : '', + library : 'nvd3.js', + element : 'svg', columns : { y : { title : 'Values for y-axis' } }, - settings : { + settings : { separator_label : { title : 'X axis', type : 'separator' diff --git a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js index a3dba7865ee..9ff09be93f4 100644 --- a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js +++ b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js @@ -1,7 +1,18 @@ -define(['plugin/charts/nvd3/config'], function(nvd3_config) { +define([], function() { -return $.extend(true, {}, nvd3_config, { - title : 'Pie chart', -}); +return { + title : 'Pie chart', + library : 'nvd3.js', + element : 'svg', + columns : { + label : { + title : 'Labels', + any_type : true + }, + y : { + title : 'Values' + } + } +}; }); \ No newline at end of file diff --git a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js index a98498f0597..b6bdd02b2a4 100644 --- a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js +++ b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js @@ -27,29 +27,29 @@ return Backbone.View.extend( for (var key in group.values) { var value = group.values[key]; pie_data.push ({ - key : value.x, - y : value.y + y : value.y, + x : value.label }); } - - // add graph to screen - nv.addGraph(function() { - self.chart_3d = nv.models.pieChart() - .donut(true) - .showLegend(false); - - self.options.canvas.datum(pie_data) - .call(self.chart_3d); - - nv.utils.windowResize(self.chart_3d.update); - - // set chart state - chart.state('ok', 'Pie chart drawn.'); - - // unregister process - chart.deferred.done(process_id); - }); } + + // add graph to screen + nv.addGraph(function() { + self.chart_3d = nv.models.pieChart() + .donut(true) + .showLegend(false); + + self.options.canvas.datum(pie_data) + .call(self.chart_3d); + + nv.utils.windowResize(self.chart_3d.update); + + // set chart state + chart.state('ok', 'Chart has been drawn.'); + + // unregister process + chart.deferred.done(process_id); + }); }); } }); diff --git a/config/plugins/visualizations/charts/static/library/deferred.js b/config/plugins/visualizations/charts/static/library/deferred.js index 26690a9ca67..3666af7c79c 100644 --- a/config/plugins/visualizations/charts/static/library/deferred.js +++ b/config/plugins/visualizations/charts/static/library/deferred.js @@ -59,17 +59,19 @@ return Backbone.Model.extend( // unregister process done: function(id) { - // delete tag - delete this.process[id]; - - // decrease process counter - this.counter--; - - // log - console.debug('Deferred:done() - Unregistering ' + id); - - // trigger change - this.trigger('refresh'); + if (this.process[id]) { + // delete tag + delete this.process[id]; + + // decrease process counter + this.counter--; + + // log + console.debug('Deferred:done() - Unregistering ' + id); + + // trigger change + this.trigger('refresh'); + } }, // ready diff --git a/config/plugins/visualizations/charts/static/views/group.js b/config/plugins/visualizations/charts/static/views/group.js index a5262682fb7..1dd204f2e63 100644 --- a/config/plugins/visualizations/charts/static/views/group.js +++ b/config/plugins/visualizations/charts/static/views/group.js @@ -5,9 +5,6 @@ define(['plugin/library/ui-table', 'plugin/library/ui', 'utils/utils'], // widget return Backbone.View.extend( { - // columns - columns: [], - // initialize initialize: function(app, options) { // link app @@ -121,24 +118,29 @@ return Backbone.View.extend( // get dataset this.app.datasets.request({id : dataset_id}, function(dataset) { - // configure columns - self.columns = []; - var meta = dataset.metadata_column_types; - for (var key in meta) { - // check type - if(meta[key] == 'int' || meta[key] == 'float') { - // add to selection - self.columns.push({ - 'label' : 'Column: ' + (parseInt(key) + 1) + ' [' + meta[key] + ']', - 'value' : key - }); - } - } - // update select fields - for (var key in list) { - list[key].update(self.columns); - list[key].show(); + for (var id in list) { + + // is a numeric number required + var any_type = chart_settings.columns[id].any_type; + + // configure columns + var columns = []; + var meta = dataset.metadata_column_types; + for (var key in meta) { + // check type + if (meta[key] == 'int' || meta[key] == 'float' || any_type) { + // add to selection + columns.push({ + 'label' : 'Column: ' + (parseInt(key) + 1) + ' [' + meta[key] + ']', + 'value' : key + }); + } + } + + // list + list[id].update(columns); + list[id].show(); } // loading diff --git a/doc/source/lib/galaxy.webapps.galaxy.api.rst~ b/doc/source/lib/galaxy.webapps.galaxy.api.rst~ deleted file mode 100644 index 3f6f5a1c5d5..00000000000 --- a/doc/source/lib/galaxy.webapps.galaxy.api.rst~ +++ /dev/null @@ -1,179 +0,0 @@ -api Package -=========== - -:mod:`datasets` Module ----------------------- - -.. automodule:: galaxy.webapps.galaxy.api.datasets - :members: - :undoc-members: - :show-inheritance: - -:mod:`folder_contents` Module ------------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.folder_contents - :members: - :undoc-members: - :show-inheritance: - -:mod:`folders` Module ---------------------- - -.. automodule:: galaxy.webapps.galaxy.api.folders - :members: - :undoc-members: - :show-inheritance: - -:mod:`forms` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.forms - :members: - :undoc-members: - :show-inheritance: - -:mod:`genomes` Module ---------------------- - -.. automodule:: galaxy.webapps.galaxy.api.genomes - :members: - :undoc-members: - :show-inheritance: - -:mod:`group_roles` Module -------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.group_roles - :members: - :undoc-members: - :show-inheritance: - -:mod:`group_users` Module -------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.group_users - :members: - :undoc-members: - :show-inheritance: - -:mod:`groups` Module --------------------- - -.. automodule:: galaxy.webapps.galaxy.api.groups - :members: - :undoc-members: - :show-inheritance: - -:mod:`histories` Module ------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.histories - :members: - :undoc-members: - :show-inheritance: - -:mod:`history_contents` Module ------------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.history_contents - :members: - :undoc-members: - :show-inheritance: - -:mod:`libraries` Module ------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.libraries - :members: - :undoc-members: - :show-inheritance: - -:mod:`library_contents` Module ------------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.library_contents - :members: - :undoc-members: - :show-inheritance: - -:mod:`permissions` Module -------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.permissions - :members: - :undoc-members: - :show-inheritance: - -:mod:`quotas` Module --------------------- - -.. automodule:: galaxy.webapps.galaxy.api.quotas - :members: - :undoc-members: - :show-inheritance: - -:mod:`request_types` Module ---------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.request_types - :members: - :undoc-members: - :show-inheritance: - -:mod:`requests` Module ----------------------- - -.. automodule:: galaxy.webapps.galaxy.api.requests - :members: - :undoc-members: - :show-inheritance: - -:mod:`roles` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.roles - :members: - :undoc-members: - :show-inheritance: - -:mod:`samples` Module ---------------------- - -.. automodule:: galaxy.webapps.galaxy.api.samples - :members: - :undoc-members: - :show-inheritance: - -:mod:`tools` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.tools - :members: - :undoc-members: - :show-inheritance: - -:mod:`users` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.users - :members: - :undoc-members: - :show-inheritance: - -:mod:`visualizations` Module ----------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.visualizations - :members: - :undoc-members: - :show-inheritance: - -:mod:`workflows` Module ------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.workflows - :members: - :undoc-members: - :show-inheritance: - diff --git a/eggs.ini b/eggs.ini index 99b3a40c235..6ad69a4daa2 100644 --- a/eggs.ini +++ b/eggs.ini @@ -3,7 +3,7 @@ ; ; This file is version controlled and should not be edited by hand! ; For more information, see: -; http://wiki.g2.bx.psu.edu/Admin/Config/Eggs +; https://wiki.galaxyproject.org/Admin/Config/Eggs ; [general] diff --git a/job_conf.xml.sample_advanced b/job_conf.xml.sample_advanced index 9e0b589b627..da3b34c1dfb 100644 --- a/job_conf.xml.sample_advanced +++ b/job_conf.xml.sample_advanced @@ -110,7 +110,7 @@ + +
+ + + + + diff --git a/test/qunit/tests/hda-base.js b/test/qunit/tests/hda-base.js new file mode 100644 index 00000000000..dc0931d8c8d --- /dev/null +++ b/test/qunit/tests/hda-base.js @@ -0,0 +1,35 @@ +// This file isn't really testing anything useful yet, it is just testing +// (or demonstrating) qunit+backbone interactions. +define([ + "mvc/dataset/hda-model", + "mvc/dataset/hda-base", + "jquery", + "sinon-qunit", + "utils/localization" +], function( + hdaModel, + hdaBase, + $, + sinon +){ + /*globals equal test module expect deepEqual strictEqual */ + "use strict"; + + module( "HDA base backbone view tests" ); + + test( "Base HDA view default construction, initialize", function() { + var hda = new hdaModel.HistoryDatasetAssociation({ + id : '123' + }), + view = new hdaBase.HDABaseView({ model: hda }); + + strictEqual( view.model, hda ); + + equal( view.linkTarget, '_blank' ); + equal( view.selectable, false ); + equal( view.selected, false ); + equal( view.expanded, false ); + equal( view.draggable, false ); + equal( view.id(), 'hda-123' ); + }); +}); diff --git a/test/qunit/tests/metrics-logger.html b/test/qunit/tests/metrics-logger.html new file mode 100644 index 00000000000..00e97f6ea8c --- /dev/null +++ b/test/qunit/tests/metrics-logger.html @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/test/qunit/tests/metrics-logger.js b/test/qunit/tests/metrics-logger.js new file mode 100644 index 00000000000..7a2a8480c63 --- /dev/null +++ b/test/qunit/tests/metrics-logger.js @@ -0,0 +1,56 @@ +// This file isn't really testing anything useful yet, it is just testing +// (or demonstrating) qunit+backbone interactions. +define([ + "utils/metrics-logger", + "jquery", + "sinon-qunit" +], function( + metrics, + $, + sinon +){ + /*globals equal test module expect deepEqual strictEqual throws */ + "use strict"; + + module( "Metrics logger tests" ); + + test( "logger construction/initializiation defaults", function() { + var logger = new metrics.MetricsLogger({}); + equal( logger.consoleLogger, null ); + equal( logger.options.logLevel, metrics.MetricsLogger.INFO ); + equal( logger.options.consoleLevel, metrics.MetricsLogger.NONE ); + equal( logger.options.defaultNamespace, 'Galaxy' ); + equal( logger.options.clientPrefix, 'client.' ); + equal( logger.options.postSize, 1000 ); + equal( logger.options.maxCacheSize, 3000 ); + equal( logger.options.addTime, true ); + + equal( logger._postSize, 1000 ); + equal( logger.cache.constructor, metrics.LoggingCache ); + }); + + test( "_parseLevel", function() { + var logger = new metrics.MetricsLogger({}); + equal( logger._parseLevel( 'all' ), metrics.MetricsLogger.ALL ); + equal( logger._parseLevel( 'debug' ), metrics.MetricsLogger.DEBUG ); + equal( logger._parseLevel( 'info' ), metrics.MetricsLogger.INFO ); + equal( logger._parseLevel( 'warn' ), metrics.MetricsLogger.WARN ); + equal( logger._parseLevel( 'error' ), metrics.MetricsLogger.ERROR ); + equal( logger._parseLevel( 'metric' ), metrics.MetricsLogger.METRIC ); + equal( logger._parseLevel( 'none' ), metrics.MetricsLogger.NONE ); + equal( logger._parseLevel( 15 ), 15 ); + + throws( function(){ + logger._parseLevel( undefined ); + }, /Unknown log level/, 'Unknown log level throws error' ); + throws( function(){ + logger._parseLevel( 'nope' ); + }, /Unknown log level/, 'Unknown log level throws error' ); + }); + + test( "cache construction/initializiation defaults", function() { + var cache = new metrics.LoggingCache(); + equal( cache.maxSize, 5000 ); + equal( $.type( cache._cache ), 'array' ); + }); +}); diff --git a/test/qunit/tests/workflow_editor_tests.html b/test/qunit/tests/workflow_editor_tests.html new file mode 100644 index 00000000000..00e97f6ea8c --- /dev/null +++ b/test/qunit/tests/workflow_editor_tests.html @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/test/qunit/tests/workflow_editor_tests.js b/test/qunit/tests/workflow_editor_tests.js new file mode 100644 index 00000000000..e065c1125de --- /dev/null +++ b/test/qunit/tests/workflow_editor_tests.js @@ -0,0 +1,379 @@ +/* global define, QUnit, module, test, ok, equal, deepEqual, notEqual */ +/* global Workflow, CanvasManager, InputTerminal, Connector, add_node */ +define([ + "galaxy.workflow_editor.canvas", + "jquery", + "sinon-qunit" +], function( + workflowEditor, + $, + sinon +){ + "use strict"; + + // globals cosumed by workflow editor + window.show_form_for_tool = sinon.spy(); + window.workflow = null; + window.canvas_manager = null; + + // Stub used over stubbing issubtype for unit testing datatype comparisons. + var issubtypeStub = null; + + QUnit.moduleStart(function() { + if( issubtypeStub === null) { + issubtypeStub = sinon.stub( window, "issubtype" ); + } + }); + QUnit.moduleDone(function() { + if( issubtypeStub !== null) { + issubtypeStub.restore(); + issubtypeStub = null; + } + }); + + var with_canvas_container = function( f ) { + var canvas_container = $("