Skip to content

Commit 43843a0

Browse files
authored
Misc small fixes to variant table (#150)
1 parent c72abda commit 43843a0

File tree

6 files changed

+13
-69
lines changed

6 files changed

+13
-69
lines changed

jbrowse/src/client/JBrowse/Search/StandaloneSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const nativePlugins = [ExtendedVariantPlugin, LogSession]
1717

1818
const StandaloneSearch = observer(({ sessionId, tableUrl, trackId, selectedRegion }: { sessionId: any, tableUrl: boolean, trackId?: string, selectedRegion?: string}) => {
1919
if (!sessionId){
20-
return(<p>No session Id provided. Please have you admin use the customize icon to set the session ID for this webpart.</p>)
20+
return(<p>No session Id provided. Please have your site admin use the customize icon to set the session ID for this webpart.</p>)
2121
}
2222

2323
const queryParam = new URLSearchParams(window.location.search)

jbrowse/src/client/JBrowse/VariantTable/VariantTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function VariantTable() {
2222
const refTheme = createTheme()
2323

2424
if (!sessionId){
25-
return(<p>No session Id provided. Please have you admin use the customize icon to set the session ID for this webpart.</p>)
25+
return(<p>No session Id provided.</p>)
2626
}
2727

2828
const trackId = queryParam.get('trackId')

jbrowse/src/client/JBrowse/VariantTable/components/VariantTableWidget.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ const VariantTableWidget = observer(props => {
2828
t => t.configuration.trackId === trackId,
2929
)
3030

31+
if (!track) {
32+
return (<p>Unknown track: {trackId}</p>)
33+
}
34+
3135
// Render function for the custom components that make up the header cells of the table
3236
function FilterRenderer<R, SR, T extends HTMLOrSVGElement>({
3337
isCellSelected,

jbrowse/src/client/JBrowse/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ function isVariant(gt) {
6868

6969

7070
export async function fetchSession(queryParam, sessionId, nativePlugins, refTheme, setState, isTable: boolean, activeTracks?:any, setBgColor?: any, successCallback?: any, trackId?: any) {
71+
if (!sessionId) {
72+
return null
73+
}
74+
7175
return Ajax.request({
7276
url: ActionURL.buildURL('jbrowse', 'getSession.api'),
7377
method: 'GET',

jbrowse/src/org/labkey/jbrowse/JBrowse2Processor.java

Lines changed: 0 additions & 60 deletions
This file was deleted.

jbrowse/test/src/org/labkey/test/tests/external/labModules/JBrowseTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,8 @@ private void testSampleFiltersFromUrl()
354354

355355
private void testNoSession()
356356
{
357-
try
358-
{
359-
beginAt("/home/jbrowse-jbrowse.view?");
360-
} catch (Exception e) {
361-
waitForElement(Locator.tagWithText("p", "Error - no session provided."));
362-
}
357+
beginAt("/home/jbrowse-jbrowse.view?");
358+
waitForElement(Locator.tagWithText("p", "Error - no session provided."));
363359
}
364360

365361
private Locator.XPathLocator getTrackLocator(String trackId, boolean waitFor)
@@ -657,7 +653,7 @@ private void testSearch(String sessionId) throws Exception
657653
PortalHelper portalHelper = new PortalHelper(this);
658654
portalHelper.addSideWebPart("JBrowse Search");
659655

660-
waitForElement(Locator.tagWithText("p", "No session Id provided. Please have you admin use the customize icon to set the session ID for this webpart."));
656+
waitForElement(Locator.tagWithText("p", "No session Id provided. Please have your site admin use the customize icon to set the session ID for this webpart."));
661657
portalHelper.clickWebpartMenuItem("JBrowse Search", false, "Customize");
662658
Window window = new Window.WindowFinder(getDriver()).withTitle("Customize Webpart").waitFor();
663659
Ext4FieldRef.waitForField(this, "Target JBrowse DB");

0 commit comments

Comments
 (0)