4 <div id="brapi_home_markerprofile_detail_div">
6 <h4>MarkerProfile Details</h4>
7 <input name="brapi_home_markerprofiledbid" id="brapi_home_markerprofiledbid" class="form-control" type="text" placeholder="MarkerProfileDbId e.g. 1622" value="1622"/>
8 <button class="btn btn-primary" name="brapi_home_markerprofiledbid_submit" id="brapi_home_markerprofiledbid_submit">Get Details</button>
10 <div id="brapi_markerprofile_detail_div">
12 <div id="brapi_markerprofile_detail_result_div">
19 jQuery(document).ready(function() {
20 jQuery("#brapi_home_markerprofiledbid_submit").click(function() {
23 'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/markerprofiles/'+jQuery('#brapi_home_markerprofiledbid').val(),
25 'success': function(response) {
26 console.log(response);
27 var html = '<table class="table table-bordered"><thead><tr><th>GermplasmDbId</th><th>UniqueDisplayName</th><th>ExtractDbId</th><th>MarkerProfileDbId</th><th>AnalysisMethod</th></tr><tbody><tr><td>'+response.result.germplasmDbId+'</td><td>'+response.result.uniqueDisplayName+'</td><td>'+response.result.extractDbId+'</td><td>'+response.result.markerprofileDbId+'</td><td>'+response.result.analysisMethod+'</td></tr></tbody></table>';
28 jQuery('#brapi_markerprofile_detail_div').empty().html(html);
31 for (var i=0; i<response.result.data.length; i++) {
32 for (var j in response.result.data[i]) {
33 data.push({'marker':j, 'allele':response.result.data[i][j]});
36 brapi_create_paginated_table(data, response.metadata.pagination, 'brapi_markerprofile_detail_result_div', jQuery('#brapi_home_url_select').val()+'/brapi/v1/markerprofiles/'+jQuery('#brapi_home_markerprofiledbid').val(), undefined);
39 error: function(response) {
40 alert('An error occurred');