js.ontology-manager.js Maven / Gradle / Ivy
(function($, molgenis) {
"use strict";
var restApi = new molgenis.RestClient();
molgenis.searchAvailableIndices = function() {
$.ajax({
type : 'GET',
url : molgenis.getContextUrl() + '/ontology',
contentType : 'application/json',
success : function(data){
var ontologies = data.results;
if(ontologies && ontologies.length > 0){
var table = $('#ontology-table');
$.each(ontologies, function(inex, ontology){
var ontologyUri = ontology.ontologyIRI;
var ontologyName = ontology.ontologyName;
var status = "Indexed";
var eachRow = $(' ');
$(' ').append(ontologyName).appendTo(eachRow);
$(' ').append('' + ontologyUri + '').appendTo(eachRow);
$(' ').append(status).appendTo(eachRow);
var removeIcon = $('').click(function(){
$('input[name="ontologyUri"]').val(ontologyUri);
$('#ontologymanager-form').attr({
'action' : molgenis.getContextUrl() + '/remove',
'method' : 'POST'
}).submit();
});
$(' ').append(removeIcon).appendTo(eachRow);
eachRow.appendTo(table);
});
}
}
});
};
molgenis.searchAvailableIndices();
}($, window.top.molgenis = window.top.molgenis || {}));
© 2015 - 2025 Weber Informatics LLC | Privacy Policy