Create a dashboard (pie + column chart) based on a RunMyProcess report

347 views
Skip to first unread message

cton...@gmail.com

unread,
Sep 30, 2013, 2:15:16 AM9/30/13
to suppor...@runmyprocess.com
I'm working through the Training Module 2013 1.2.11 Create a dashboard

The tutorial does not work and I get the following error


<script>(function() {with (this[2]) {with (this[1]) {with (this[0]) {return function(event) {this.__gwtLastUnhandledEvent="load";
};}}}})</script>

Inside of this Java Script block I get the following errors

refused to set unsafe header "Date"
refused to set unsafe header "Host"
refused to set unsafe header "User Agent"


Also contained in the console output is the following code

<script>var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>

<script>if (!NREUMQ.f) { NREUMQ.f=function() {NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.src=(("http:"===document.location.protocol)?"http:":"https:") + "//" + "js-agent.newrelic.com/nr-100.js";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrfj","beacon-1.newrelic.com","52735d6944","336269","ZFMHZBNVXRcAAhdeDV0ZK18TWVIICBsGUzdBX0pCDEQcCAgXBhhIHFcVQA1dHE4=",0,78,new Date().getTime(),"","","","",""]);</script>

Gareth Thiveux

unread,
Sep 30, 2013, 5:28:09 AM9/30/13
to suppor...@runmyprocess.com
Hi Tony,

Have you attached the javascript files to your web interface as indicated below ?



Have you replaced the red parts of code by your own URLs/titles ?


Could you share the login you're using ?


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


2013/9/30 <cton...@gmail.com>

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/77a98ea1-3fbe-4a73-b667-075ae2ea413e%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.

cton...@gmail.com

unread,
Sep 30, 2013, 8:31:37 PM9/30/13
to suppor...@runmyprocess.com, cton...@gmail.com

Hi Gareth,

Yes I added the header and footers and I double checked and they are exactly the same as the ones you posted in this thread.

Cheers

Gareth Thiveux

unread,
Oct 1, 2013, 5:24:17 AM10/1/13
to suppor...@runmyprocess.com, cton...@gmail.com
Hi Tony,

Could you then share the login you're using to connect to your RunMyProcess account ?


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


2013/10/1 <cton...@gmail.com>
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

Gareth Thiveux

unread,
Oct 1, 2013, 10:45:46 AM10/1/13
to suppor...@runmyprocess.com, ctony123
Hi Tony,

The problem was coming from your Javascript widget.
There was a bit missing compared to the piece of code you've copied from the User Guide :

//Handle 0,1 or several records from report feed

function get_array(my_father, my_son) {
if (typeof(my_father) == "object") {
if (my_father[my_son] != undefined) {
if (my_father[my_son].length != undefined) {
var my_array = my_father[my_son];
} else {
var my_array = [my_father[my_son]];
}
} else {
var my_array = [];
}
} else {
var my_array = [];
}
return my_array;
}

//Display a PieChart

function drawPieChart(html_id, array_data, array_column, chart_title, chart_width, chart_height) {
// Create our data table.
var data = new google.visualization.DataTable();
for (i = 0; i < array_column.length; i++) {
data.addColumn(array_column[i].type, array_column[i].title);
}
var array_array_data = new Array();
for (i = 0; i < array_data.length; i++) {
array_array_data.push([array_data[i].label, array_data[i].value]);
}
data.addRows(array_array_data);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.PieChart(document.getElementById(html_id));
chart.draw(data, {
width : chart_width,
height : chart_height,
is3D : true,
title : chart_title
});
}

//Get report feed and then render the PieChart 1

function draw_Pie1() {
$.ajax({
type : "GET",
url : "json_report_feed_url",
data : {},
cache : false,
async : true,
dataType : "json",
error : function () {
alert('Error while loading credits.');
},
success : function (P_result) {
var array_column = [{
"type" : "string",
"title" : "Company"
}, {
"type" : "number",
"title" : "Nb RFP"
}
];
var my_entries = get_array(P_result.feed.entry.content.data, "result");
var array_data = new Array();
for (var i = 0; i < my_entries.length; i++) {
array_data.push({
"label" : my_entries[i].serie.value,
"value" : parseFloat(my_entries[i].value)
});
}
//alert(JSON.stringify(array_data));
var html_id = "chart_div1";
var chart_title = "Nb of RFP by Company";
var chart_width = 0;
var chart_height = 240;
drawPieChart(html_id, array_data, array_column, chart_title, chart_width, chart_height);
}
});
}


//init charts

draw_Pie1();


So just copy and paste the bit in red at the right place within your javascript code, and also remove the script tags (<script> and </script>) from the javascript, as you're already in a dedicated Javascript widget, you don't need to specify that you're writing some script.

Should be working fine after these changes, keep me posted !


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


2013/10/1 <cton...@gmail.com>
On Monday, September 30, 2013 4:15:16 PM UTC+10, cton...@gmail.com wrote:
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

cton...@gmail.com

unread,
Oct 1, 2013, 9:14:00 PM10/1/13
to suppor...@runmyprocess.com, cton...@gmail.com
Hi Garaeth,

Thank you that fixed it.

Cheers

Tony

On Monday, September 30, 2013 4:15:16 PM UTC+10, cton...@gmail.com wrote:

Reply all
Reply to author
Forward
0 new messages