Commit c8368bd1 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'devel_12.2.x'

parents 3cf87817 31199bb0
......@@ -392,3 +392,36 @@ test_deploy_with_db_without_superadmin_rights:
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null --cookie cookie.txt http://localhost:8080/minerva/api/projects/)
test_postgres_9_3_compatibility:
image: maven:3.6.0-jdk-8
services:
- postgres:9.3
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
test_postgres_10_compatibility:
image: maven:3.6.0-jdk-8
services:
- postgres:10
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
test_postgres_11_compatibility:
image: maven:3.6.0-jdk-8
services:
- postgres:11
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
minerva (12.3.0~alpha.0) unstable; urgency=low
* Feature: annotators are more flexible - you can define set of input and
* Feature: annotators are more flexible - you can define set of input and
outputs used by annotator (#617)
* Small improvement: validation of the organism and disease id on map upload
added (#618)
* Small improvement: added current username next to logout button in admin
* Small improvement: added current username next to logout button in admin
panel (#660)
* Small improvement: New comment dialog does not contain content of previous
* Small improvement: New comment dialog does not contain content of previous
comment dialog (#680)
* Small improvement: Left logo is configurable (#731)
* Small improvement: Plugin API provides list of overview images (#702)
* Small improvement: Plugin API allows to show/hide overview images (#702)
* Small improvement: Plugin API allows to trigger search on the map (#702)
* Small improvement: Plugin API allows to clear search results on map (#702)
* Small improvement: edit/remove project button is disabled until project is
* Small improvement: edit/remove project button is disabled until project is
uploaded (#683)
* Small improvement: warning about capslock is visible on login page when
* Small improvement: warning about capslock is visible on login page when
necessary (#658)
* Small improvement: names of columns in data overlay are unified: no
* Small improvement: names of columns in data overlay are unified: no
whitespace, "_" used as separator (#596)
* Small improvement: list of references in drug panel contains PUBMED prefix
(#666)
* Small improvement: passwords to email account and ldap are not sent over
* Small improvement: passwords to email account and ldap are not sent over
API (#732)
* Small improvement: reactant/product/modifier specific colors are parsed
* Small improvement: reactant/product/modifier specific colors are parsed
properly from CellDesigner file (#597)
* Small improvement: Info tab contains information about disease and
organism when info is provided
* Small improvement: Info tab provides information about model annotations
and submap tabs provide information about submaps annotations if applicable
(#591)
* Bug fix: progress bar of gene genome mapping upload is refreshing properly
* Bug fix: progress bar of gene genome mapping upload is refreshing properly
(#728)
* Bug fix: when editing project Disease and Organism could not be removed
* Bug fix: when editing project Disease and Organism could not be removed
(#616)
* Bug fix: dashed line partially wasn't dashed in "Unknown Catalysis" and
"Unknown Inhibition" reactions (#664)
* Bug fix: "Unknown Catalysis" and "Unknown Inhibition" reaction end is
* Bug fix: dashed line partially wasn't dashed in "Unknown Catalysis" and
"Unknown Inhibition" reactions (#664)
* Bug fix: "Unknown Catalysis" and "Unknown Inhibition" reaction end is
slightly separated from target phenotype (#664)
minerva (12.2.0~beta.2) unstable; urgency=medium
* Bug fix: order of the overlays is defined explicitly also for general
overlays (#684)
* Bug fix: files are saved in proper folder (#694, #670)
* Bug fix: removing comments in a project asked for confirmation twice after
edit project dialog for specific project was opened; closed and opened
again (#697)
* Bug fix: clicking on compartment border inside pathway should return
compartment, not a pathway (#324)
* Bug fix: clicking outside of the element sometimes resulted with the
invalid element highlighted (#324)
* Bug fix: parent compartment/pathway use proper type name in left panel
(#324)
* Bug fix: editing/removing project requires Map Management privilege (#681)
* Bug fix: when removeAllListeners is called list of registered listeners is
cleaned (#687)
* Bug fix: when plugin is removed the html elements associated with it are
removed as well (#686)
* Bug fix: when creating new user default privileges are set properly (#692)
* Bug fix: import from SBML issue - reaction with product and modifier being
the same element caused exception (#703)
* Bug fix: plugin can be added after plugin has been removed in admin plugin
panel (#686)
* Bug fix: too many annotations (>=100) caused misaligning in the left panel
(#708)
* Bug fix: text was outside the popup window (#711)
* Bug fix: custom semantic zooming contains multiple overlays checkbox was
disabled (#715)
* Bug fix: export to svg contains viewBox info (#716)
* Bug fix: import from sbml with layout could crash when two elements
occupied the exact same position (#717)
* Bug fix: overlays added via API couldn't be visualized after refresh (#718)
* Bug fix: Safari sometimes cached server responses and used wrong data, for
example in admin panel configuration tab (#719)
* Bug fix: description of transcription site is centered (#720)
* Bug fix: selecting too few parameters in export doesn't throw reportable
error (#721)
* Bug fix: changes in selected checkbox in add project dialog block UI (#722)
* Bug fix: providing invalid overlay id in url could break minerva (#726)
* Bug fix: removing project that doesn't exist doesn't cause 500 error (#723)
* Bug fix: Editing project with images and submaps could cause a problem
(#725)
* Bug fix: opening map with invalid id shows proper error message (#724)
* Bug fix: Fixing an issue where search panel was not properly resized on
expansion (#682)
* Small improvement: highlighting table rows in admin panel uses better
contrast color (#706)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 20 Feb 2019 14:00:00 +0200
minerva (12.2.0~beta.1) unstable; urgency=medium
* Small improvement: list of publication can be filtered by submap (#614)
* Small improvement: report bug utility shows confirmation dialog on success
(#648)
* Small improvement: size of add overlay window adjusted to show more data
without scrollbars (#657)
* Small improvement: all popup dialogs in the app have dialog specific css
class names (#665)
* Bug fix: loading icon is not overlapping input in the search panel (#404)
* Bug fix: position of transcription sites in genes are computed properly
(#553)
* Bug fix: REQUEST AN ACCOUNT was enabled when associated email was invalid
(#626)
* Bug fix: layout exported to SBML can be properly visualized by COPASI
(#654)
* Bug fix: working with too many maps within the single session could crash
connection to server (#651)
* Bug fix: invalid pubmed id could crash listing/downloading publications
(#656)
* Bug fix: icons in safari sometimes disappear (#661)
* Bug fix: downloading reference genome for the second time resulted in an
error (#670)
* Bug fix: plugin validation in admin panel improved to catch more problems
(#672)
* Bug fix: drawing corrupted heterodimer association in CellDesigner could
crash map upload (#673)
* Bug fix: custom semantic zooming didn't work with pathways imported from
CellDesigner layers (#678)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 7 Feb 2019 14:00:00 +0200
minerva (12.2.0~beta.0) unstable; urgency=medium
minerva (12.2.0) stable; urgency=medium
* Feature: bug report utility
* Small improvement: JS plugin can create listener that is triggered on
search results focus change
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 23 Jan 2019 15:00:00 +0200
minerva (12.2.0~alpha.1) unstable; urgency=medium
* Bug fix: problems with SBML-CellDesigner translation fixed
* Bug fix: gitlab CI tests fixed
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 17 Jan 2019 15:00:00 +0200
minerva (12.2.0~alpha.0) unstable; urgency=medium
* Feature: url GET parameters support all kind of search and selected overlays
highlight
* Feature: user can create custom logging configuration in file
......@@ -144,6 +51,15 @@ minerva (12.2.0~alpha.0) unstable; urgency=medium
file formats
* Feature: current state of the browsed map is reflected in the url (position,
zoom, overlays, search queries, etc.)
* Small improvement: highlighting table rows in admin panel uses better
contrast color (#706)
* Small improvement: list of publication can be filtered by submap (#614)
* Small improvement: size of add overlay window adjusted to show more data
without scrollbars (#657)
* Small improvement: all popup dialogs in the application have dialog
specific css class names (#665)
* Small improvement: JS plugin can create listener that is triggered on
search results focus change
* Small improvement: export to SBML includes unit factors
* Small improvement: mesh identifiers are resolved to meshb.nlm.nih.gov urls
* Small improvement: genetics information allows to provide information about
......@@ -178,6 +94,47 @@ minerva (12.2.0~alpha.0) unstable; urgency=medium
* Small improvement: 'REQUEST AN ACCOUNT' link is available only the contact
email account is provided
* Small improvement: Plugin API allows to show/hide data overlays
* Bug fix: Icons were sometimes not properly loaded on Safari (#661)
* Bug fix: migration scripts are compatibile with postgres 9.3 version that
is default on Ubuntu 14 (#762)
* Bug fix: update/remove button is disabled when user has no privileges for
managing overlays (#742)
* Bug fix: when user cannot manage users information in overlays and users
tab in edit project dialog is provided instead of hiding tabs (#756)
* Bug fix: removing comments in a project asked for confirmation twice after
edit project dialog for specific project was opened; closed and opened
again (#697)
* Bug fix: editing/removing project requires Map Management privilege (#681)
* Bug fix: when removeAllListeners is called list of registered listeners is
cleaned (#687)
* Bug fix: when plugin is removed the html elements associated with it are
removed as well (#686)
* Bug fix: when creating new user default privileges are set properly (#692)
* Bug fix: plugin can be added after plugin has been removed in admin plugin
panel (#686)
* Bug fix: too many annotations (>=100) caused misaligning in the left panel
(#708)
* Bug fix: export to svg contains viewBox info (#716)
* Bug fix: overlays added via API couldn't be visualized after refresh (#718)
* Bug fix: Safari sometimes cached server responses and used wrong data, for
example in admin panel configuration tab (#719)
* Bug fix: description of transcription site is centered (#720)
* Bug fix: selecting too few parameters in export doesn't throw reportable
error (#721)
* Bug fix: providing invalid overlay id in url could break minerva (#726)
* Bug fix: removing project that doesn't exist doesn't cause 500 error (#723)
* Bug fix: opening map with invalid id shows proper error message (#724)
* Bug fix: Fixing an issue where search panel was not properly resized on
expansion (#682)
* Bug fix: loading icon is not overlapping input in the search panel (#404)
* Bug fix: position of transcription sites in genes are computed properly
(#553)
* Bug fix: REQUEST AN ACCOUNT was enabled when associated email was invalid
(#626)
* Bug fix: working with too many maps within the single session could crash
connection to server (#651)
* Bug fix: drawing corrupted heterodimer association in CellDesigner could
crash map upload (#673)
* Bug fix: export to CellDesigner align inhibition reaction properly
* Bug fix: export/import to/from SBML handles Heterodimer Association
reaction properly
......@@ -193,9 +150,9 @@ minerva (12.2.0~alpha.0) unstable; urgency=medium
* Bug fix: type of the data overlay can be defined in the file content
(useful when uploading genetic variants)
* Bug fix: CLEAR button clears comment checkbox if necessary
* Bug fix: minerva install problem on ubuntu 16 fixed
* Bug fix: minerva install problem on ubuntu 18 fixed
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 11 Jan 2019 12:00:00 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 25 Mar 2019 17:00:00 +0200
minerva (12.1.8) stable; urgency=medium
* Bug fix: add a project reset users custom overlays limit to default (#679)
......
......@@ -616,7 +616,7 @@ Plugin tabs
float: left;
}
.minerva-top-checkbox-div input {
.minerva-top-checkbox-div input[type=checkbox] {
margin-top: 12px;
display: inline;
float: left;
......
......@@ -788,10 +788,10 @@ AddProjectDialog.prototype.bindProjectUploadPreferences = function (user, type,
var value = user.getPreferences().getProjectUpload()[type];
element.prop('checked', value);
GuiConnector.showProcessing();
element.change(function () {
var data = new UserPreferences();
data.getProjectUpload()[type] = element.is(":checked");
GuiConnector.showProcessing();
return ServerConnector.updateUserPreferences({
user: user,
preferences: data
......
......@@ -641,7 +641,7 @@ EditProjectDialog.prototype.refreshOverlays = function () {
return self.setOverlays(overlays);
});
} else {
guiUtils.hideTab(self, $(".minerva-project-overlays-tab", self.getElement())[0]);
guiUtils.disableTab($(".minerva-project-overlays-tab", self.getElement())[0], "You have no privileges to manage users data");
}
});
};
......@@ -671,7 +671,7 @@ EditProjectDialog.prototype.refreshUsers = function () {
return self.setUsers(users);
});
} else {
guiUtils.hideTab(self, $(".minerva-project-users-tab", self.getElement())[0]);
guiUtils.disableTab($(".minerva-project-users-tab", self.getElement())[0], "You have no privileges to manage users data");
}
});
};
......@@ -774,9 +774,13 @@ EditProjectDialog.prototype.userToTableRow = function (user, columns) {
* @returns {Array}
*/
EditProjectDialog.prototype.overlayToTableRow = function (overlay, users) {
var self = this;
var row = [];
var id = overlay.getId();
var creatorSelect;
var loggedUser = null;
if (overlay.getCreator() === "") {
creatorSelect = "<select name='creator-" + id + "' value=''>";
} else {
......@@ -795,6 +799,10 @@ EditProjectDialog.prototype.overlayToTableRow = function (overlay, users) {
creatorSelect += "<option value='" + user.getLogin() + "' " + selected + ">" + user.getLogin() + "("
+ user.getName() + " " + user.getSurname() + ")</option>";
if (user.getLogin() === self.getServerConnector().getSessionData().getLogin()) {
loggedUser = user;
}
}
creatorSelect += "</select>";
......@@ -825,8 +833,15 @@ EditProjectDialog.prototype.overlayToTableRow = function (overlay, users) {
row[4] = defaultOverlayCheckbox;
row[5] = creatorSelect;
row[6] = downloadSourceButton;
row[7] = "<button name='saveOverlay' data='" + id + "'><i class=\"fa fa-save\" style=\"font-size:17px\"></i></button>";
row[8] = "<button name='removeOverlay' data='" + id + "'><i class='fa fa-trash-o' style='font-size:17px'></button>";
var disabled = " disabled ";
if (loggedUser.hasPrivilege(self.getConfiguration().getPrivilegeType(PrivilegeType.LAYOUT_MANAGEMENT), self.getProject().getId())) {
disabled = "";
}
row[7] = "<button name='saveOverlay' data='" + id + "'" + disabled + "><i class=\"fa fa-save\" style=\"font-size:17px\"></i></button>";
row[8] = "<button name='removeOverlay' data='" + id + "'" + disabled + "><i class='fa fa-trash-o' style='font-size:17px'></button>";
return row;
};
......@@ -1053,7 +1068,7 @@ EditProjectDialog.prototype.openAddOverlayDialog = function () {
});
return self._addOverlayDialog.init().then(function () {
return self._addOverlayDialog.open();
}).then(function(){
}).then(function () {
return self._addOverlayDialog;
});
};
......
......@@ -346,9 +346,9 @@ MapsAdminPanel.prototype.onAddClicked = function () {
return dialog.open();
});
} else {
dialog.clear();
dialog.open();
return Promise.resolve();
return dialog.clear().then(function () {
return dialog.open();
})
}
};
......@@ -480,12 +480,9 @@ MapsAdminPanel.prototype.showEditDialog = function (id) {
return ServerConnector.getProject(id).then(function (project) {
return self.getDialog(project);
}).then(function (dialog) {
dialog.open();
}).finally(function () {
GuiConnector.hideProcessing();
}).then(null, function (error) {
GuiConnector.hideProcessing();
return Promise.reject(error);
});
};
......@@ -500,11 +497,8 @@ MapsAdminPanel.prototype.showLogs = function (id, level) {
GuiConnector.showProcessing();
return self.getLogDialog(id, level).then(function (dialog) {
return dialog.open();
}).then(function () {
GuiConnector.hideProcessing();
}, function (error) {
}).finally(function () {
GuiConnector.hideProcessing();
return Promise.reject(error);
});
};
......
......@@ -1142,6 +1142,26 @@ GuiUtils.prototype.hideTab = function (abstractGuiElement, panel) {
}
};
/**
*
* @param {HTMLElement} element
* @param {string} message
*/
GuiUtils.prototype.disableTab = function (element, message) {
$(element).children().css("visibility", "hidden");
$("[class='minerva-help-button']", element).children().css("visibility", "visible");
var hideReasonDiv = document.createElement("div");
hideReasonDiv.className = "searchPanel";
var center = document.createElement("center");
var messageDiv = document.createElement("h4");
messageDiv.innerHTML = message;
center.appendChild(messageDiv);
hideReasonDiv.appendChild(center);
$(element).prepend(hideReasonDiv);
};
/**
*
* @param {AbstractGuiElement} abstractGuiElement
......
......@@ -108,7 +108,7 @@ PublicationListDialog.prototype._dataTableAjaxCall = function (data, callback) {
row[3] = article.journal;
row[4] = article.year;
} else {
row[0] = publicationList.data[i].publication.id;
row[0] = publicationList.data[i].publication.resource;
row[1] = "N/A";
row[2] = "N/A";
row[3] = "N/A";
......@@ -304,7 +304,7 @@ PublicationListDialog.prototype.publicationListToArray = function (publicationLi
row[3] = article.journal;
row[4] = article.year;
} else {
row[0] = entry.publication.id;
row[0] = entry.publication.resource;
row[1] = "N/A";
row[2] = "N/A";
row[3] = "N/A";
......
......@@ -36,6 +36,7 @@ PrivilegeType.MANAGE_PLUGINS = 'MANAGE_PLUGINS';
PrivilegeType.PROJECT_MANAGEMENT = 'PROJECT_MANAGEMENT';
PrivilegeType.ADD_MAP = 'ADD_MAP';
PrivilegeType.USER_MANAGEMENT = 'USER_MANAGEMENT';
PrivilegeType.LAYOUT_MANAGEMENT = 'LAYOUT_MANAGEMENT';
/**
*
......
......@@ -6,7 +6,8 @@ var EditProjectDialog = require('../../../../main/js/gui/admin/EditProjectDialog
var ServerConnector = require('../../ServerConnector-mock');
var logger = require('../../logger');
var assert = require('assert');
var chai = require('chai');
var assert = chai.assert;
var Promise = require('bluebird');
describe('EditProjectDialog', function () {
......@@ -130,4 +131,37 @@ describe('EditProjectDialog', function () {
});
});
describe('overlayToTableRow', function () {
it('as not admin', function () {
var dialog;
helper.loginAsAdmin();
return createDialog().then(function (result) {
dialog = result;
return ServerConnector.getUsers();
}).then(function (users) {
helper.loginWithoutAccess();
var overlay = helper.createOverlay();
var data = dialog.overlayToTableRow(overlay, users);
assert.ok(data[7].indexOf("disabled") >= 0)
}).then(function () {
return dialog.destroy();
});
});
it('as admin', function () {
var dialog;
helper.loginAsAdmin();
return createDialog().then(function (result) {
dialog = result;
return ServerConnector.getUsers();
}).then(function (users) {
var overlay = helper.createOverlay();
var data = dialog.overlayToTableRow(overlay, users);
assert.equal(data[7].indexOf("disabled"), -1)
}).then(function () {
return dialog.destroy();
});
});
});
});
......@@ -7,6 +7,7 @@ var ServerConnector = require('../../ServerConnector-mock');
var logger = require('../../logger');
var assert = require('assert');
var Promise = require('bluebird');
function createMapsAdminPanel() {
return new MapsAdminPanel({
......
......@@ -219,7 +219,7 @@ public class ApplySimpleLayoutModelCommand extends ApplyLayoutModelCommand {
minPoint.getY() + COMPARTMENT_BORDER, dimension.getWidth() - COMPARTMENT_BORDER * 2,
dimension.getHeight() - COMPARTMENT_BORDER * 2);
for (Element element : compartment.getElements()) {
if (!elements.contains(element) && element.getBorder()!=null) {
if (!elements.contains(element) && element.getBorder() != null && element.getX() != 0 && element.getY() != 0) {
border.add(element.getBorder());
}
}
......
......@@ -151,7 +151,7 @@ public interface Model {
* @param elements
* list of elements
*/
void addElements(List<? extends Element> elements);
void addElements(Collection<? extends Element> elements);
/**
* Sets new short description of the model.
......
......@@ -198,7 +198,7 @@ public class ModelFullIndexed implements Model {
}
@Override
public void addElements(List<? extends Element> elements) {
public void addElements(Collection<? extends Element> elements) {
for (Element element : elements) {
addElement(element);
}
......
......@@ -322,7 +322,7 @@ public abstract class Element implements BioEntity, Serializable, SbmlArgument {
* @see x
*/
public void setX(String string) {
this.x = Double.parseDouble(string);
setX(Double.parseDouble(string));
}
/**
......@@ -483,7 +483,7 @@ public abstract class Element implements BioEntity, Serializable, SbmlArgument {
* @return rectangle border
*/
public Rectangle2D getBorder() {
if (x == null || y == null || width == null || height == null) {
if (x == null || y == null || width == null || height == null || width == 0.0 || height == 0.0) {
return null;
}
return new Rectangle2D.Double(x, y, width, height);
......
......@@ -13,7 +13,6 @@ SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 1 (class 3079 OID 12355)
......
......@@ -139,7 +139,7 @@ public class ReactomeConnector extends CachableInterface implements DataSourceUp
/**
* Url used for accessing Reactome RestFULL API.
*/
private static final String REACTOME_URL = "http://reactome.org/ReactomeRESTfulAPI/RESTfulWS/";
public static final String REACTOME_URL = "http://reactomews.oicr.on.ca:8080/ReactomeRESTfulAPI/RESTfulWS/";
@Override
public List<ReactomePhysicalEntity> getEntitiesForName(String name) throws IOException {
......
......@@ -173,7 +173,7 @@ public class ReactomeConnectorTest extends ReactomeTestFunctions {
@Test(timeout = 15000)
public void testCachableInterfaceByParams() throws Exception {
String url = "http://reactome.org/ReactomeRESTfulAPI/RESTfulWS/listByQuery/DatabaseObjects";
String url = ReactomeConnector.REACTOME_URL + "listByQuery/DatabaseObjects";
String query = "identifier=2562550\n" + url;
String newRes = "hello";
try {
......
......@@ -53,7 +53,7 @@ public class ReactomeReferenceGeneProductParserTest extends ReactomeTestFunction
assertEquals((Integer) 2, res.getReferenceDatabase().getDbId());
assertEquals((Integer) 48895, res.getSpecies().getDbId());