Skip to content

Commit 1653f87

Browse files
committed
Read pipeline params from the URL in more places
1 parent c0d04a5 commit 1653f87

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

SequenceAnalysis/resources/web/SequenceAnalysis/panel/AlignmentImportPanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ Ext4.define('SequenceAnalysis.panel.AlignmentImportPanel', {
8686
helpPopup: 'Description for this run, such as detail about the source of the alignments (optional)',
8787
itemId: 'jobDescription',
8888
name: 'jobDescription',
89-
allowBlank: true
89+
allowBlank: true,
90+
value: LABKEY.ActionURL.getParameter('jobDescription')
9091
},{
9192
fieldLabel: 'Delete Intermediate Files',
9293
helpPopup: 'Check to delete the intermediate files created by this pipeline. In general these are not needed and it will save disk space. These files might be useful for debugging though.',

SequenceAnalysis/resources/web/SequenceAnalysis/panel/AnalysisSectionPanel.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ Ext4.define('SequenceAnalysis.panel.AnalysisSectionPanel', {
570570
return [];
571571
},
572572

573-
applySavedValues: function(values){
573+
applySavedValues: function(values, allowUrlOverride){
574574
if (this.stepType){
575575
var tools = values[this.stepType] ? values[this.stepType].split(';') : [];
576576
this.setActiveTools(tools);
@@ -585,6 +585,10 @@ Ext4.define('SequenceAnalysis.panel.AnalysisSectionPanel', {
585585
if (Ext4.isDefined(values[name])){
586586
p.setValue(values[name]);
587587
}
588+
589+
if (allowUrlOverride && LABKEY.ActionURL.getParameter(name)) {
590+
p.setValue(LABKEY.ActionURL.getParameter(name));
591+
}
588592
}, this);
589593
}
590594
},

SequenceAnalysis/resources/web/SequenceAnalysis/panel/BaseSequencePanel.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
269269
return;
270270
}
271271

272+
// If auto-loading, assume we want to read the URL
273+
thePanel.down('#readUrlParams').setValue(true);
274+
272275
var recIdx = store.find('name', LABKEY.ActionURL.getParameter('template'));
273276
if (recIdx > -1) {
274277
thePanel.down('labkey-combo').setValue(store.getAt(recIdx));
@@ -297,6 +300,12 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
297300
helpPopup: 'By default, the pipelines jobs and their outputs will be created in the workbook you selected. However, in certain cases, such as bulk submission of many jobs, it might be preferable to submit each job to the source folder/workbook for each input. Checking this box will enable this.',
298301
fieldLabel: 'Submit Jobs to Same Folder/Workbook as Readset',
299302
labelWidth: 200
303+
},{
304+
xtype: 'checkbox',
305+
itemId: 'readUrlParams',
306+
helpPopup: 'If true, any parameters provided on the URL with the same name as a parameter in the JSON will be read and override the template.',
307+
fieldLabel: 'Read Parameters From URL',
308+
labelWidth: 200
300309
}]
301310
}],
302311
buttons: [{
@@ -353,7 +362,8 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
353362
delete json.submitJobToReadsetContainer;
354363
}
355364

356-
win.sequencePanel.applySavedValues(json);
365+
var readUrlParams = win.down('#readUrlParams').getValue();
366+
win.sequencePanel.applySavedValues(json, readUrlParams);
357367

358368
var submitJobToReadsetContainer = win.sequencePanel.down('[name="submitJobToReadsetContainer"]');
359369
if (submitJobToReadsetContainer) {
@@ -386,7 +396,7 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
386396
}
387397
},
388398

389-
applySavedValues: function(values){
399+
applySavedValues: function(values, allowUrlOverride){
390400
//allows for subclasses to exclude this panel
391401
var alignPanel = this.down('sequenceanalysis-alignmentpanel');
392402
if (alignPanel) {
@@ -395,7 +405,7 @@ Ext4.define('SequenceAnalysis.panel.BaseSequencePanel', {
395405

396406
var sections = this.query('sequenceanalysis-analysissectionpanel');
397407
Ext4.Array.forEach(sections, function(s){
398-
s.applySavedValues(values);
408+
s.applySavedValues(values, allowUrlOverride);
399409
}, this);
400410

401411
// For top-level properties:

SequenceAnalysis/resources/web/SequenceAnalysis/panel/SequenceAnalysisPanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ Ext4.define('SequenceAnalysis.panel.SequenceAnalysisPanel', {
300300
height: 100,
301301
helpPopup: 'Description for this analysis (optional)',
302302
name: 'jobDescription',
303-
allowBlank:true
303+
allowBlank: true,
304+
value: LABKEY.ActionURL.getParameter('jobDescription')
304305
},{
305306
fieldLabel: 'Delete Intermediate Files',
306307
helpPopup: 'Check to delete the intermediate files created by this pipeline. In general these are not needed and it will save disk space. These files might be useful for debugging though.',

SequenceAnalysis/resources/web/SequenceAnalysis/panel/VariantProcessingPanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Ext4.define('SequenceAnalysis.panel.VariantProcessingPanel', {
6161
height: 100,
6262
helpPopup: 'Description for this analysis (optional)',
6363
name: 'jobDescription',
64-
allowBlank:true
64+
allowBlank: true,
65+
value: LABKEY.ActionURL.getParameter('jobDescription')
6566
},{
6667
xtype: 'sequenceanalysis-variantscattergatherpanel',
6768
width: 620,

singlecell/resources/web/singlecell/panel/SingleCellProcessingPanel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ Ext4.define('SingleCell.panel.SingleCellProcessingPanel', {
5858
height: 100,
5959
helpPopup: 'Description for this analysis (optional)',
6060
name: 'jobDescription',
61-
allowBlank:true
61+
allowBlank:true,
62+
value: LABKEY.ActionURL.getParameter('jobDescription')
6263
},{
6364
xtype: 'combo',
6465
name: 'submissionType',

0 commit comments

Comments
 (0)