Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
update populateselect
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinxin90 committed Dec 6, 2017
1 parent 8463230 commit 2161abf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/static/js/populateSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,16 @@ function populateSelectInSideBar() {
populateBioEntity("#select-output");
populateBioEntity("#select-input1");
populateBioEntity("#select-output1");
populateInput("#customize1");
$("#select-max-api").material_select();
$("#customize2").material_select();
$("#customize3").material_select();
}

/**
* Automatically add available bio-entities as input of endpoint
*/
function poplulateInput(dropdown_id) {
function populateInput(dropdown_id) {
getMetaData('bioentity_input').done(function(jsonResponse) {
var parsedJson = $.parseJSON(jsonResponse);
addOptionFromMetaData(parsedJson['input'], 'input', dropdown_id);
Expand All @@ -120,11 +123,10 @@ function poplulateEndpointFromInput(dropdown_id, _input) {
/**
* Automatically add available bio-entities as input of endpoint
*/
function poplulateOutputFromEndpoint(dropdown_id, _endpoint) {
function populateOutputFromEndpoint(dropdown_id, _endpoint) {
getOutputBasedOnEndpoint(_endpoint).done(function(jsonResponse) {
var parsedJson = $.parseJSON(jsonResponse);
addOptionFromMetaData(parsedJson['output'], 'output', dropdown_id);
$(dropdown_id).material_select();
});
}

0 comments on commit 2161abf

Please sign in to comment.