diff --git a/app/src/templates/index.jadehtml b/app/src/templates/index.jadehtml index f18b66e..d16f849 100644 --- a/app/src/templates/index.jadehtml +++ b/app/src/templates/index.jadehtml @@ -131,6 +131,8 @@ html(lang="en") | R option(value="python") | Python + option(value="spark.python") + | Spark Python button.btn.btn-default#save span.glyphicon.glyphicon-save | Save diff --git a/app/src/util.js b/app/src/util.js index f8715b9..8a2ab74 100644 --- a/app/src/util.js +++ b/app/src/util.js @@ -10,6 +10,7 @@ phy: {type: 'tree', format: 'newick'}, nex: {type: 'tree', format: 'nexus'}, 'nested-json': {type: 'tree', format: 'nested.json'}, + 'collection-json': {type: 'collection', format: 'json'}, csv: {type: 'table', format: 'csv'}, tsv: {type: 'table', format: 'tsv'}, png: {type: 'image', format: 'png'}, @@ -23,6 +24,7 @@ webFormat: { table: 'rows', tree: 'nested', + collection: 'json', string: 'text', number: 'number', image: 'png.base64', diff --git a/app/src/views/AnalysisManagementView.js b/app/src/views/AnalysisManagementView.js index 12f495a..dc0a148 100644 --- a/app/src/views/AnalysisManagementView.js +++ b/app/src/views/AnalysisManagementView.js @@ -31,7 +31,9 @@ 'change #mode': function () { if (this.analysis) { this.analysis.get('meta').analysis.mode = $("#mode").val(); - this.editor.getSession().setMode("ace/mode/" + this.analysis.get('meta').analysis.mode); + var language = this.analysis.get('meta').analysis.mode.split('.'); + language = language[language.length - 1]; + this.editor.getSession().setMode("ace/mode/" + language); } }, diff --git a/app/src/views/DatasetManagementView.js b/app/src/views/DatasetManagementView.js index f146a4e..d8e8a28 100644 --- a/app/src/views/DatasetManagementView.js +++ b/app/src/views/DatasetManagementView.js @@ -5,6 +5,7 @@ flow.DatasetManagementView = Backbone.View.extend({ saveFormats: { table: ['csv', 'tsv', 'rows.json', 'objectlist.json', 'vtktable.serialized', 'jsonlines'], + collection: ['json'], tree: ['nested.json', 'nexus', 'newick', 'vtktree.serialized'], image: ['png'], r: ['serialized'], @@ -19,6 +20,7 @@ "table:objectlist.json": "objectlist-json", "table:jsonlines": "jsonlines", "table:vtktable.serialized": "vtk", + "collection:json": "collection-json", "tree:nested.json": "nested-json", "tree:nexus": "nex", "tree:newick": "phy", diff --git a/app/src/views/InputView.js b/app/src/views/InputView.js index 0f2edab..a75e947 100644 --- a/app/src/views/InputView.js +++ b/app/src/views/InputView.js @@ -8,6 +8,7 @@ table: {inputMode: "dataset"}, tree: {inputMode: "dataset"}, image: {inputMode: "dataset"}, + collection: {inputMode: "dataset"}, r: {inputMode: "dataset"}, string: {inputMode: "line"}, number: {inputMode: "line"}, diff --git a/app/src/views/InputsView.js b/app/src/views/InputsView.js index 938ca27..0a2ac45 100644 --- a/app/src/views/InputsView.js +++ b/app/src/views/InputsView.js @@ -110,7 +110,7 @@ dataset, id = input.get('id') || input.get('name'); - if (input.get('type') === 'table' || input.get('type') === 'tree' || input.get('type') === 'image' || input.get('type') === 'r') { + if (input.get('type') === 'table' || input.get('type') === 'tree' || input.get('type') === 'image' || input.get('type') === 'r' || input.get('type') === 'collection') { dataset = this.datasets.get(value); result[id] = _.extend(dataset.toJSON(), flow.girderItemInput(dataset.get('_id'))); } else if (input.get('type') === 'string') { diff --git a/app/src/views/VariableEditView.js b/app/src/views/VariableEditView.js index 8fa2917..f67ea15 100644 --- a/app/src/views/VariableEditView.js +++ b/app/src/views/VariableEditView.js @@ -21,6 +21,8 @@ 'number:number', 'image:png.base64', 'r:object', + 'collection:json', + 'collection:spark.rdd', 'geometry:vtkpolydata' ]}, description: {name: "Description", id: "description", type: "string", format: "text"}, @@ -67,6 +69,8 @@ columnNamesInput = values.columnNamesInput; if (columnNamesInput && columnNamesInput.data !== '') { model.domain = {format: 'column.names', input: columnNamesInput.data}; + } else { + model.domain = undefined; } this.model.set(model); this.$el.modal('hide');