Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
ensembl-client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ensembl-web
ensembl-client
Commits
a2ec5172
Unverified
Commit
a2ec5172
authored
Sep 14, 2020
by
Andrey Azov
Committed by
GitHub
Sep 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix routes (#345)
parent
30ece0a2
Pipeline
#97821
passed with stages
in 5 minutes and 12 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
src/ensembl/src/content/app/App.tsx
src/ensembl/src/content/app/App.tsx
+1
-1
src/ensembl/src/header/launchbar/Launchbar.test.tsx
src/ensembl/src/header/launchbar/Launchbar.test.tsx
+2
-2
src/ensembl/src/header/launchbar/Launchbar.tsx
src/ensembl/src/header/launchbar/Launchbar.tsx
+1
-1
src/ensembl/src/shared/helpers/urlHelper.ts
src/ensembl/src/shared/helpers/urlHelper.ts
+5
-4
No files found.
src/ensembl/src/content/app/App.tsx
View file @
a2ec5172
...
...
@@ -71,7 +71,7 @@ const AppInner = (props: AppProps) => {
component
=
{
EntityViewer
}
/>
<
ErrorBoundary
fallbackComponent
=
{
NewTechError
}
>
<
Route
path
=
{
`
/browser/:genomeId?
`
}
component
=
{
Browser
}
/>
<
Route
path
=
{
`
/
genome-
browser/:genomeId?
`
}
component
=
{
Browser
}
/>
</
ErrorBoundary
>
</
Switch
>
</
Suspense
>
...
...
src/ensembl/src/header/launchbar/Launchbar.test.tsx
View file @
a2ec5172
...
...
@@ -32,7 +32,7 @@ describe('<Launchbar />', () => {
it
(
'
disables Genome Browser button when there are no committed species
'
,
()
=>
{
const
wrapper
=
mount
(<
Launchbar
{
...
defaultProps
}
/>);
const
genomeBrowserButton
=
wrapper
.
findWhere
(
(
wrapper
)
=>
wrapper
.
prop
(
'
app
'
)
===
'
browser
'
(
wrapper
)
=>
wrapper
.
prop
(
'
app
'
)
===
'
genome-
browser
'
);
expect
(
genomeBrowserButton
.
prop
(
'
enabled
'
)).
toBe
(
false
);
...
...
@@ -45,7 +45,7 @@ describe('<Launchbar />', () => {
};
const
wrapper
=
mount
(<
Launchbar
{
...
props
}
/>);
const
genomeBrowserButton
=
wrapper
.
findWhere
(
(
wrapper
)
=>
wrapper
.
prop
(
'
app
'
)
===
'
browser
'
(
wrapper
)
=>
wrapper
.
prop
(
'
app
'
)
===
'
genome-
browser
'
);
expect
(
genomeBrowserButton
.
prop
(
'
enabled
'
)).
toBe
(
true
);
...
...
src/ensembl/src/header/launchbar/Launchbar.tsx
View file @
a2ec5172
...
...
@@ -62,7 +62,7 @@ const Launchbar = (props: LaunchbarProps) => {
</
div
>
<
div
className
=
{
styles
.
category
}
>
<
LaunchbarButton
app
=
"browser"
app
=
"
genome-
browser"
description
=
"Genome browser"
icon
=
{
BrowserIcon
}
enabled
=
{
props
.
committedSpecies
.
length
>
0
}
...
...
src/ensembl/src/shared/helpers/urlHelper.ts
View file @
a2ec5172
...
...
@@ -16,8 +16,8 @@
import
queryString
from
'
query-string
'
;
export
const
speciesSelector
=
()
=>
'
/
app/
species-selector
'
;
export
const
customDownload
=
()
=>
'
/
app/
custom-download
'
;
export
const
speciesSelector
=
()
=>
'
/species-selector
'
;
export
const
customDownload
=
()
=>
'
/custom-download
'
;
type
BrowserUrlParams
=
{
genomeId
?:
string
|
null
;
...
...
@@ -32,8 +32,9 @@ type EntityViewerUrlParams = {
};
export
const
browser
=
(
params
?:
BrowserUrlParams
)
=>
{
const
browserRootPath
=
'
/genome-browser
'
;
if
(
params
)
{
const
path
=
`
/browser
/
${
params
.
genomeId
}
`
;
const
path
=
`
${
browserRootPath
}
/
${
params
.
genomeId
}
`
;
// NOTE: if a parameter passed to queryString is null, it will still get into query;
// so assign it to undefined in order to omit it from the query
const
query
=
queryString
.
stringify
(
...
...
@@ -47,7 +48,7 @@ export const browser = (params?: BrowserUrlParams) => {
);
return
query
?
`
${
path
}
?
${
query
}
`
:
path
;
}
else
{
return
`
/browser/
`
;
return
browserRootPath
;
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment