4 <div id="brapi_home_germplasm_detail_div">
6 <h4>Germplasm Details</h4>
7 <input name="brapi_home_germplasmdbid" id="brapi_home_germplasmdbid" class="form-control" type="text" placeholder="GermplasmDbId e.g. 38896" value="38896"/>
8 <button class="btn btn-primary" name="brapi_home_germplasmdbid_submit" id="brapi_home_germplasmdbid_submit">Get Details</button>
10 <div id="brapi_germplasm_detail_result_div">
12 <div id="brapi_germplasm_detail_pedigree_result_div">
14 <div id="brapi_germplasm_detail_markerprofiles_result_div">
21 jQuery(document).ready(function() {
22 jQuery("#brapi_home_germplasmdbid_submit").click(function() {
24 'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/germplasm/'+jQuery('#brapi_home_germplasmdbid').val(),
26 'success': function(response) {
27 console.log(response);
28 brapi_create_table(response.result, 'brapi_germplasm_detail_result_div', { "germplasmName": ["germplasmDbId", "stock"] });
31 error: function(response) {
32 alert('An error occurred');
37 'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/germplasm/'+jQuery('#brapi_home_germplasmdbid').val()+'/pedigree',
39 'success': function(response) {
40 console.log(response);
41 brapi_create_table(response.result, 'brapi_germplasm_detail_pedigree_result_div', undefined);
44 error: function(response) {
45 alert('An error occurred');
50 'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/germplasm/'+jQuery('#brapi_home_germplasmdbid').val()+'/markerprofiles',
52 'success': function(response) {
53 console.log(response);
55 for (var i=0; i<response.result.markerProfiles.length; i++) {
56 data.push({'markerProfileDbId':response.result.markerProfiles[i]});
58 brapi_create_paginated_table(data, response.metadata.pagination, 'brapi_germplasm_detail_markerprofiles_result_div', jQuery('#brapi_home_url_select').val()+'/brapi/v1/germplasm/'+jQuery('#brapi_home_germplasmdbid').val()+'/markerprofiles', undefined);
61 error: function(response) {
62 alert('An error occurred');