mirror of
https://github.com/apache/superset.git
synced 2024-09-19 20:19:37 -04:00
a8fd23dfa4
`.jsx` linting is now in-scope for the `npm run lint` command, and I linted the base files and some of the viz, there's still quite a bit of work there, but that's a first pass on it.
23 lines
462 B
JavaScript
23 lines
462 B
JavaScript
const $ = require('jquery');
|
|
|
|
require('./markup.css');
|
|
|
|
function markupWidget(slice) {
|
|
function refresh() {
|
|
$('#code').attr('rows', '15');
|
|
$.getJSON(slice.jsonEndpoint(), function (payload) {
|
|
slice.container.html(payload.data.html);
|
|
slice.done(payload);
|
|
})
|
|
.fail(function (xhr) {
|
|
slice.error(xhr.responseText, xhr);
|
|
});
|
|
}
|
|
return {
|
|
render: refresh,
|
|
resize: refresh,
|
|
};
|
|
}
|
|
|
|
module.exports = markupWidget;
|