Jasper Server "visualize.js" Problem with IP address

0

Hi All,

I have implemented the Jasper Sever Dashboard using visualize.js, its working in local with floowing URLS

But it is not working with the IP address instead of hostname. And one more thing is currently we are using Jasper Server & our application in same domain, so I dont want to hard code the IP adress in JSP. If it is hard coded, again I have to take care when we are moving patch from one server to other.

Current/Working Implementation: (jasperserver war file name : kpi-server(5.6 version))

<head>

 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
<!-- Provide the URL to visualize.js -->
 
<script type="text/javascript">
visualize({
auth: {
organization:"organizations",
name : "superuser",
password: "superuser"
}
},
function(v){
var report = v.report({
resource: "/public/Samples/Reports/AccountList",
container: "#container"
});
});
</script>
 
</head>
<body>
<!-- Provide a container for the report -->
<div id="container"></div>
</body>

Expected Implementation: (jasperserver war file name : kpi-server(5.6 version))

<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
<!-- Provide the URL to visualize.js -->
<script src="/kpi-server/client/visualize.js?logLevel=debug"></script> <!--   Since both are in same domain -->
 
<script type="text/javascript">
visualize({
auth: {
organization:"organizations",
name : "superuser",
password: "superuser"
}
},
function(v){
var report = v.report({
resource: "/public/Samples/Reports/AccountList",
container: "#container"
});
});
</script>
 
</head>
<body>
<!-- Provide a container for the report -->
<div id="container"></div>

 

</body>

 

Note:

      I have seen easyXDM documentation also, since visualize.js intergation done with easyXDM. It is working with IP address in same domain & different domain also.

Kindly suggest me, if I have done wrong.

Regards,

VV Nagesh Bodapati.

 

 

nageshit2011's picture
Joined: Jul 22 2013 - 3:04am
Last seen: 4 years 7 months ago

The question is more about HTML and Hyperlink referencing. You may prefer changing the question tags to suit the same.

mikchester - 4 years 8 months ago

1 Answer:

0

You need URI in this case (instead of URL). Try changing the script source to:

<script src="kpi-server/client/visualize.js?logLevel=debug"></script> 
mikchester's picture
Joined: Mar 11 2015 - 3:04am
Last seen: 4 years 8 months ago
Feedback