Commit 5e23213f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

show warning when ctd is disabled

parent 3a44f0ec
......@@ -101,6 +101,19 @@ ChemicalPanel.prototype.init = function () {
return self.getOverlayDb().searchByEncodedQuery(query);
}
});
}).then(function () {
return self.getServerConnector().isDapiConnectionValid();
}).then(function (status) {
if (!status) {
var searchButton = $(".minerva-search-link", self.getElement());
$("<div class='minerva-search-link-warning' " +
"title='DAPI connection is not available. Searching in not all databases is available. Ask administrator to enable Data-API interface.'>" +
"<i class='fa fa-exclamation-triangle'></i></div>").insertAfter(searchButton);
}
var query = self.getServerConnector().getSessionData().getDrugQuery();
if (query !== undefined) {
return self.getOverlayDb().searchByEncodedQuery(query);
}
});
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment