Hi,
When the url is not authenticated the json values are loaded into the table
normally. Like this:
*function drawCharts() {*
* var jsonData1 = $.ajax({*
* url: "http://***.***.***.***:9001/jolokia/*
<http://127.0.0.1:9001/jolokia/read/MineStar:type=UserJMXBeanExpose,name=Statistics/*>",*
* dataType:"json",*
* async: false*
* }).responseText;*
* var parsed1 = JSON.parse(jsonData1);*
* var arr1 = [];*
* for(var x in parsed1){*
* arr1.push(parsed1[x]);*
* }*
* var size= arr1[3].User;*
* var dataArray1 = [['UserName', 'Status']];*
* for (var i = 3; i < arr1.length; i++) {*
* for (var j = 0; j < size.length; j++){*
* dataArray1.push([arr1[i].User[j].userId, arr1[i].User[j].status]);*
* }*
* }*
* var data1 = new google.visualization.arrayToDataTable(dataArray1);*
* var chart1 = new
google.visualization.Table(document.getElementById('chart_div1'));*
* chart1.draw(data1, {width: 800, height: 200, showRowNumber: true,
allowHtml: true});*
* setTimeout(drawCharts, 5000); *
* }*
But as soon as the url is authenticated, i.e. when you hit the url alone a
popup will come asking for username and password, which when provided shows
the value in json format. Then the code fails. I am not getting any idea
how to tackle this situation.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.