|
|
@ -55,10 +55,6 @@ function handleSuccess (query, xhr, clickedButton) { |
|
|
|
clickedButton.prop('disabled', false) |
|
|
|
clickedButton.prop('disabled', false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function dropDomain (url) { |
|
|
|
|
|
|
|
return new URL(url).pathname |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Show 'Try it out' UI for a module/action.
|
|
|
|
// Show 'Try it out' UI for a module/action.
|
|
|
|
$('button[data-selector*="btn-try-api"]').click(event => { |
|
|
|
$('button[data-selector*="btn-try-api"]').click(event => { |
|
|
|
const clickedButton = $(event.target) |
|
|
|
const clickedButton = $(event.target) |
|
|
@ -128,7 +124,7 @@ $('button[data-try-api-ui-button-type="execute"]').click(event => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
$.ajax({ |
|
|
|
url: dropDomain(composeRequestUrl(query)), |
|
|
|
url: composeRequestUrl(query), |
|
|
|
success: (_data, _status, xhr) => { |
|
|
|
success: (_data, _status, xhr) => { |
|
|
|
handleSuccess(query, xhr, clickedButton) |
|
|
|
handleSuccess(query, xhr, clickedButton) |
|
|
|
}, |
|
|
|
}, |
|
|
|