Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CD-CODE Web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CD-CODE team
CD-CODE Web
Commits
620e67ae
Commit
620e67ae
authored
3 years ago
by
moon
Browse files
Options
Downloads
Patches
Plain Diff
Close
#35
: Gene name "null" issue
parent
38422d8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/src/components/DataTable.vue
+20
-20
20 additions, 20 deletions
web/src/components/DataTable.vue
web/src/components/LlpsTable.vue
+19
-20
19 additions, 20 deletions
web/src/components/LlpsTable.vue
with
39 additions
and
40 deletions
web/src/components/DataTable.vue
+
20
−
20
View file @
620e67ae
...
...
@@ -62,15 +62,33 @@
});
const
proteinColumns
=
[
{
title
:
'
Uniprot
'
,
data
:
'
uniprot_id
'
,
// visible: false,
// fnCreatedCell: (nTd, sData, oData) => {
// $(nTd).html(`
<
a
href
=
""
class
=
"
detail-link gene
"
><
i
class
=
"
glyphicon glyphicon-list-alt
"
><
/i> </
a
>
`);
// },
// render: function ( data, type, row, meta ) {
// return data + ' (' + row.uniprot_readable_id + ')';
// }
fnCreatedCell: (nTd, sData, oData) => {
let n = `
$
{
oData
.
uniprot_id
}
(
$
{
oData
.
uniprot_readable_id
})
`;
if(vm.keyword) {
n.replace(new RegExp(vm.keyword, 'gi'), `
<
mark
>
$
&<
/mark>`
)
;
}
$
(
nTd
).
html
(
`<a href="" class="detail-link">
${
n
}
</a>`
);
},
},
{
title
:
'
Gene Name
'
,
data
:
'
gene_name
'
,
fnCreatedCell
:
(
nTd
,
sData
,
oData
)
=>
{
let
n
=
`
${
oData
.
gene_name
}
`
;
let
n
=
`
${
oData
.
gene_name
?
oData
.
gene_name
:
'
N/A
'
}
`
;
if
(
vm
.
keyword
)
{
n
=
n
.
replace
(
new
RegExp
(
vm
.
keyword
,
'
gi
'
),
`<mark>$&</mark>`
);
}
$
(
nTd
).
html
(
`
<a href="" class="detail-link">
${
n
}
</a>
`
);
$
(
nTd
).
html
(
`
${
n
}
`
);
},
},
{
...
...
@@ -98,24 +116,6 @@
return
data
+
'
(
'
+
row
.
species_tax_id
+
'
)
'
;
}
},
{
title
:
'
Uniprot
'
,
data
:
'
uniprot_id
'
,
// visible: false,
// fnCreatedCell: (nTd, sData, oData) => {
// $(nTd).html(`
<
a
href
=
""
class
=
"
detail-link gene
"
><
i
class
=
"
glyphicon glyphicon-list-alt
"
><
/i> </
a
>
`);
// },
// render: function ( data, type, row, meta ) {
// return data + ' (' + row.uniprot_readable_id + ')';
// }
fnCreatedCell: (nTd, sData, oData) => {
let n = `
$
{
oData
.
uniprot_id
}
(
$
{
oData
.
uniprot_readable_id
})
`;
if(vm.keyword) {
n.replace(new RegExp(vm.keyword, 'gi'), `
<
mark
>
$
&<
/mark>`
)
;
}
$
(
nTd
).
html
(
`
${
n
}
`
);
},
},
// {
// title: 'Evidence Stars',
// className: "text-nowrap",
...
...
This diff is collapsed.
Click to expand it.
web/src/components/LlpsTable.vue
+
19
−
20
View file @
620e67ae
...
...
@@ -67,6 +67,7 @@
const
url
=
`/protein/
${
uniprot_id
}
`
// // eslint-disable-next-line
// console.log(url)
// this.$router.push(url)
window
.
open
(
url
)
},
forwardUniprot
(
uniprot_id
)
{
...
...
@@ -118,6 +119,14 @@
});
const
columns
=
vm
.
isExperimental
?
[
{
title
:
'
UniProt
'
,
data
:
'
uniprot_id
'
,
className
:
"
text-nowrap
"
,
fnCreatedCell
:
(
nTd
,
sData
,
oData
)
=>
{
$
(
nTd
).
html
(
`<a href="" class="protein-link">
${
sData
}
</a>`
);
},
},
{
title
:
'
Gene Name
'
,
data
:
'
gene_name
'
,
...
...
@@ -125,7 +134,7 @@
if
(
sData
)
{
$
(
nTd
).
html
(
`<a href="" class="protein-link">
${
sData
}
</a>`
);
}
else
{
$
(
nTd
).
html
(
`<a href="" class="protein-link">
${
oData
.
uniprot_id
}
</a>`
);
$
(
nTd
).
html
(
`<a href="" class="protein-link">
N/A
</a>`
);
}
},
},
...
...
@@ -205,15 +214,6 @@
return
''
;
}
},
{
title:
'
UniProt
'
,
data:
'
uniprot_id
'
,
className: "text-nowrap",
fnCreatedCell: (nTd, sData, oData) => {
$(nTd).html(`<a href="" class="uniprot-link tooltipped tooltipped-n tooltipped-multiline"
aria-label="Clicking this link opens UniProt page."> ${sData} <i class="glyphicon glyphicon-link"></i></a>`);
},
},
// {
// title:
'
Evidence
'
,
// data:
'
uniprot_id
'
,
...
...
@@ -253,6 +253,14 @@
}
] :
[
{
title:
'
UniProt
'
,
data:
'
uniprot_id
'
,
className: "text-nowrap",
fnCreatedCell: (nTd, sData, oData) => {
$(nTd).html(`<a href="" class="protein-link"> ${sData} </a>`);
},
},
{
title:
'
Gene
Name
'
,
data:
'
gene_name
'
,
...
...
@@ -260,7 +268,7 @@
if (sData) {
$(nTd).html(`<a href="" class="protein-link"> ${sData}</a>`);
} else {
$(nTd).html(`<a href="" class="protein-link">
${oData.uniprot_id}
</a>`);
$(nTd).html(`<a href="" class="protein-link">
N/A
</a>`);
}
},
},
...
...
@@ -336,15 +344,6 @@
return
''
;
}
},
{
title:
'
UniProt
'
,
data:
'
uniprot_id
'
,
className: "text-nowrap",
fnCreatedCell: (nTd, sData, oData) => {
$(nTd).html(`<a href="" class="uniprot-link tooltipped tooltipped-n tooltipped-multiline"
aria-label="Clicking this link opens UniProt page."> ${sData} <i class="glyphicon glyphicon-link"></i></a>`);
},
},
// {
// title:
'
Evidence
'
,
// data:
'
uniprot_id
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment