Skip to content

Commit 6ae6bf7

Browse files
committed
GridBar: Remove setAliquotView
1 parent a11903d commit 6ae6bf7

1 file changed

Lines changed: 0 additions & 74 deletions

File tree

src/org/labkey/test/components/ui/grids/GridBar.java

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -295,80 +295,6 @@ public AliquotViewOptions getCurrentAliquotView()
295295
return null;
296296
}
297297

298-
/**
299-
* Set the aliquot view.
300-
*
301-
* @param view A {@link AliquotViewOptions} enum value.
302-
*/
303-
public void setAliquotView(AliquotViewOptions view)
304-
{
305-
306-
// Do nothing if currently on the requested menu item.
307-
if (getCurrentAliquotView().equals(view))
308-
return;
309-
310-
// Need to identify where we are. The menu text is contextual to the page.
311-
String url = Objects.requireNonNull(getDriver().getCurrentUrl()).toLowerCase();
312-
boolean onSourcesPage = url.contains("#/sources/");
313-
boolean onSamplePage = url.contains("#/samples/");
314-
315-
String currentButtonText = currentAliquotViewText();
316-
final String menuChoice;
317-
318-
switch (view)
319-
{
320-
case ALL:
321-
if(onSourcesPage)
322-
{
323-
if(url.endsWith("assays"))
324-
{
325-
menuChoice = "Derived Samples or Aliquots";
326-
}
327-
else if(url.endsWith("jobs"))
328-
{
329-
menuChoice = "Samples or Aliquots";
330-
}
331-
else
332-
{
333-
// This is the 'Samples' page for a source.
334-
menuChoice = "Samples and Aliquots";
335-
}
336-
}
337-
else if (onSamplePage)
338-
{
339-
menuChoice = "Sample or Aliquots";
340-
}
341-
else
342-
{
343-
menuChoice = "Samples and Aliquots";
344-
}
345-
break;
346-
case SAMPLES:
347-
if(onSourcesPage && url.endsWith("assays"))
348-
{
349-
menuChoice = "Derived Samples Only";
350-
}
351-
else if(onSamplePage)
352-
{
353-
menuChoice = "Sample Only";
354-
}
355-
else
356-
{
357-
menuChoice = "Samples Only";
358-
}
359-
break;
360-
case ALIQUOTS:
361-
menuChoice = "Aliquots Only";
362-
break;
363-
default:
364-
menuChoice = "";
365-
}
366-
367-
// Ideally should call _queryGrid.doAndWaitForUpdate(... but that causes the grid to go stale and is tricky to
368-
// get a recover the reference to it.
369-
doMenuAction(currentButtonText, Arrays.asList(menuChoice));
370-
}
371-
372298
public GridBar searchFor(String searchStr)
373299
{
374300

0 commit comments

Comments
 (0)