JSFiddle - React, Tailwind, and code Playground
by Yuriy Bablyukh
HTML
<script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js?_opt=true"></script>
<div id="container"></div>
JavaScript
visualize({
auth: {
name: "superuser",
password: "superuser"
}
}, function(v) {
var report = v.report({
resource: "/public/Samples/Reports/AllAccounts",
container: "#container",
success: function() {
console.log("rendered");
},
error: function(e) {
console.log(e);
}
});
checkVariables();
});
var checkVariables = function() {
checkIfUndefined("__jrsConfigs__");
checkIfUndefined(themeHref);
checkIfUndefined(_);
checkIfUndefined(jasper);
checkIfUndefined(jasperjs);
checkIfUndefined(easyXDM);
checkIfUndefined(xssUtil);
checkIfUndefined(makeString);
checkIfUndefined(Backbone);
checkIfUndefined(JSON3);
}
var checkIfUndefined = function(name) {
if (typeof name === 'undefined') {
console.log(name)
}
}