Skip to content

Commit 4816383

Browse files
authored
Allow user to insert tool steps to either beginning or end of tool chain (#147)
* Allow user to insert tool steps to either beginning or end of tool chain * Allow additional values to be saved in singlecell templates
1 parent 8bc4c3f commit 4816383

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

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

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,27 @@ Ext4.define('SequenceAnalysis.panel.AnalysisSectionPanel', {
128128

129129
items.push({
130130
xtype: 'ldk-linkbutton',
131-
text: 'Add',
131+
text: 'Add to Start',
132+
linkCls: 'labkey-text-link',
133+
step: step,
134+
handler: function(btn){
135+
var win = btn.up('window');
136+
var owner = win.ownerPanel;
137+
var target = owner.down('#toolConfgPanel');
138+
139+
//check if exists
140+
if (!owner.allowDuplicateSteps && target.down('[stepName=' + btn.step.name + ']')) {
141+
Ext4.Msg.alert('Already Added', 'This step has already been added and cannot be used twice.');
142+
}
143+
else {
144+
target.insert(0, owner.getAbbreviatedConfigForItem(btn.step));
145+
}
146+
}
147+
});
148+
149+
items.push({
150+
xtype: 'ldk-linkbutton',
151+
text: 'Add to End',
132152
linkCls: 'labkey-text-link',
133153
step: step,
134154
handler: function(btn){
@@ -144,7 +164,7 @@ Ext4.define('SequenceAnalysis.panel.AnalysisSectionPanel', {
144164
target.add(owner.getAbbreviatedConfigForItem(btn.step));
145165
}
146166
}
147-
})
167+
});
148168
}, this);
149169

150170
if (items.length){
@@ -161,7 +181,7 @@ Ext4.define('SequenceAnalysis.panel.AnalysisSectionPanel', {
161181
},
162182
layout: {
163183
type: 'table',
164-
columns: 3
184+
columns: 4
165185
},
166186
items: items
167187
}];

SequenceAnalysis/test/src/org/labkey/test/tests/external/labModules/SequenceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ private void analysisPanelTest() throws Exception
535535
new Window.WindowFinder(getDriver()).withTitle("Tool Details").waitFor();
536536
waitAndClick(Ext4Helper.Locators.window("Tool Details").append(Ext4Helper.Locators.ext4Button("Done")));
537537

538-
List<Ext4CmpRef> btns = _ext4Helper.componentQuery("window ldk-linkbutton[text='Add']", Ext4CmpRef.class);
538+
List<Ext4CmpRef> btns = _ext4Helper.componentQuery("window ldk-linkbutton[text='Add to End']", Ext4CmpRef.class);
539539
for (Ext4CmpRef btn : btns)
540540
{
541541
waitAndClick(Locator.id(btn.getId()).append(Locator.tag("a")));
@@ -783,7 +783,7 @@ private void alignmentImportPanelTest(boolean sequencePipelineEnabled) throws Ex
783783
waitForElement(win);
784784

785785
//NOTE: team city is getting JS errors I cant repro locally. adding sleep() to see if waiting helps
786-
List<Ext4CmpRef> btns = _ext4Helper.componentQuery("window ldk-linkbutton[text='Add']", Ext4CmpRef.class);
786+
List<Ext4CmpRef> btns = _ext4Helper.componentQuery("window ldk-linkbutton[text='Add to End']", Ext4CmpRef.class);
787787
for (Ext4CmpRef btn : btns)
788788
{
789789
// Note: BQSR includes a genome selector field, which will log a warning to the server is a genome isnt configured ahead of time.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,5 +328,15 @@ Ext4.define('SingleCell.panel.SingleCellProcessingPanel', {
328328

329329
errors = Ext4.unique(errors);
330330
return errors;
331+
},
332+
333+
applySavedValues: function(values){
334+
this.callOverridden(arguments);
335+
336+
Ext4.Array.forEach(['submissionType', 'useOutputFileContainer'], function(val) {
337+
if (values[val]) {
338+
this.down('[name="' + val + '"]').setValue(values[val]);
339+
}
340+
}, this);
331341
}
332342
});

0 commit comments

Comments
 (0)