Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
ad226f55
Commit
ad226f55
authored
Jun 28, 2019
by
Piotr Gawron
Browse files
Merge branch '835-add-gene-mapping' into 'devel_13.1.x'
Resolve "MINERVANET - Error Report 77" See merge request
minerva/core!826
parents
b2b9808d
82830773
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
ad226f55
minerva
(
13.1.1
)
stable
;
urgency
=
medium
*
Bug
fix
:
adding
gene
mapping
before
the
genome
caused
an
error
(#
835
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Fri
,
28
Jun
2019
17
:
00
:
00
+
0200
minerva
(
13.1.0
)
stable
;
urgency
=
medium
*
Feature
:
annotators
are
more
flexible
-
you
can
define
set
of
input
and
outputs
used
by
annotator
(#
617
)
...
...
frontend-js/src/main/js/gui/admin/EditGenomeDialog.js
View file @
ad226f55
...
...
@@ -175,7 +175,8 @@ EditGenomeDialog.prototype.createGeneMappingTabContent = function () {
var
result
=
Functions
.
createElement
({
type
:
"
div
"
,
style
:
"
margin-top:10px;
"
style
:
"
margin-top:10px;
"
,
className
:
"
minerva-gene-mapping-tab
"
});
var
geneMappingTable
=
Functions
.
createElement
({
...
...
@@ -513,6 +514,10 @@ EditGenomeDialog.prototype.refresh = function () {
//it should be simplified, but I couldn't make it work
dataTable
.
clear
().
rows
.
add
(
data
).
page
(
page
).
draw
(
false
).
page
(
page
).
draw
(
false
);
if
(
self
.
isNew
())
{
guiUtils
.
disableTab
(
$
(
"
.minerva-gene-mapping-tab
"
,
self
.
getElement
())[
0
],
"
First add a genome to be able to add mapping
"
);
}
return
self
.
_fillOrganismSelect
(
genome
);
});
};
...
...
rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java
View file @
ad226f55
...
...
@@ -491,7 +491,7 @@ public abstract class BaseRestImpl {
return
result
;
}
protected
Integer
parseInteger
(
Object
value
)
throws
QueryException
{
protected
Integer
parseInteger
(
Object
value
,
String
fieldName
)
throws
QueryException
{
if
(
value
instanceof
Integer
)
{
return
(
Integer
)
value
;
}
else
if
(
value
instanceof
Double
)
{
...
...
@@ -506,12 +506,16 @@ public abstract class BaseRestImpl {
try
{
return
Integer
.
parseInt
((
String
)
value
);
}
catch
(
NumberFormatException
e
)
{
throw
new
QueryException
(
"Invalid
integer
value: "
+
value
);
throw
new
QueryException
(
"Invalid
"
+
fieldName
+
"
value: "
+
value
);
}
}
}
else
{
throw
new
QueryException
(
"Invalid
integer
value: "
+
value
);
throw
new
QueryException
(
"Invalid
"
+
fieldName
+
"
value: "
+
value
);
}
}
protected
Integer
parseInteger
(
Object
value
)
throws
QueryException
{
return
parseInteger
(
value
,
"integer"
);
}
}
rest-api/src/main/java/lcsb/mapviewer/api/genomics/ReferenceGenomeRestImpl.java
View file @
ad226f55
...
...
@@ -256,8 +256,9 @@ public class ReferenceGenomeRestImpl extends BaseRestImpl {
if
(!
getUserService
().
userHasPrivilege
(
token
,
PrivilegeType
.
MANAGE_GENOMES
))
{
throw
new
SecurityException
(
"Access denied"
);
}
int
id
=
Integer
.
parseInt
(
genomeId
);
int
id
=
parseInt
eger
(
genomeId
,
"genomeId"
);
try
{
ReferenceGenome
genome
=
referenceGenomeService
.
getReferenceGenomeById
(
id
,
token
);
String
name
=
getFirstValue
(
formData
.
get
(
"name"
));
...
...
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