mirror of
https://github.com/apache/superset.git
synced 2024-09-19 20:19:37 -04:00
24 lines
442 B
JavaScript
24 lines
442 B
JavaScript
|
var $ = window.$ || require('jquery');
|
||
|
|
||
|
function markupWidget(slice) {
|
||
|
|
||
|
function refresh() {
|
||
|
$('#code').attr('rows', '15');
|
||
|
|
||
|
$.getJSON(slice.jsonEndpoint(), function (payload) {
|
||
|
slice.container.html(payload.data.html);
|
||
|
slice.done();
|
||
|
})
|
||
|
.fail(function (xhr) {
|
||
|
slice.error(xhr.responseText);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
render: refresh,
|
||
|
resize: refresh
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module.exports = markupWidget;
|