Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<script type="text/javascript" src="js/jquery.flot.js"> </script>
<script type="text/javascript" src="js/process_rrd.js"> </script>

<link rel="stylesheet" href="include/plain.css">

<!-- ICanHazJS template -->

Expand Down
4 changes: 2 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ $(document).ready(function() {
pane_switchto('login_pane');
return false;
});
$.get("templates.xml", function(response) {
/*$.get("templates.xml", function(response) {
$('script',response).each(function () {
ich.addTemplate(this.getAttribute("id"),$(this).text());
});
})
})*/
});
16 changes: 8 additions & 8 deletions js/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ Monitor.prototype = {
var me=this;
this.addGraph({
jq: $('#graphmainspan .graph')[0],
getdata: (function() me.getData(function(r) {
return (hostfilter.test(r) && /host.*cpu_avg/.test(r));}))});
getdata: (function() { me.getData(function(r) {
return (hostfilter.test(r) && /host.*cpu_avg/.test(r));})})});
this.addGraph({
jq: $('#graphmainspan .graph')[1],
getdata: (function() me.getData(function(r) {
return (hostfilter.test(r) && /host.*:memory/.test(r));}))});
getdata: (function() { me.getData(function(r) {
return (hostfilter.test(r) && /host.*:memory/.test(r));})})});
this.addGraph({
jq: $('#graphmainspan .graph')[2],
getdata: (function() me.getData(function(r) {
return (hostfilter.test(r) && /host.*pif_aggr.*x/.test(r));}))});
getdata: (function() { me.getData(function(r) {
return (hostfilter.test(r) && /host.*pif_aggr.*x/.test(r));})})});
this.addGraph({
jq: $('#graphmainspan .graph')[3],
getdata: (function() me.getData(function(r) {
return (hostfilter.test(r) && /host.*xapi/.test(r));}))});
getdata: (function() { me.getData(function(r) {
return (hostfilter.test(r) && /host.*xapi/.test(r));})})});

},

Expand Down
3 changes: 2 additions & 1 deletion js/vnc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var rfb;

function vnc(xapi,con,content) {

if(xapi.xo.console[con].protocol!="rfb") {
if(xapi.xo.console[con].protocol != "rfb") {
console.log("Can't connect to non-rfb console!");
return;
}
Expand Down Expand Up @@ -59,6 +59,7 @@ function vnc(xapi,con,content) {
var location = getLocation(xapi.xo.console[con].location);
var hostname = location.hostname;
var path = location.pathname + location.search + "&session_id=" + xapi.session;
console.log(hostname);
var port = 80;
/* if (location.protocol == "https:")
port = 443;*/
Expand Down
5 changes: 2 additions & 3 deletions js/xenapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Xenapi.prototype = {
return;
}

var error = function(xhr,text,error) { if(text) {alert("text: "+text);} if(error) {alert("error: "+error);} };
var error = function(xhr,text,error) { if(text) {console.log("text: "+text);} if(error) {console.log("error: "+error);} };
var successfn = function(parent,host) {return (function(data) {
var t=processrrd(parent,host,eval("("+data+")"));
parent.lastupdatetime[host]=t;
Expand All @@ -324,8 +324,7 @@ Xenapi.prototype = {
if (typeof netscape != "undefined") {
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserRead");
}

var url = "http://"+this.xo.host[host].address+"/rrd_updates";
var url = "http://"+this.master_address+"/rrd_updates";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit isn't correct - we contact each of the hosts for the rrds, not just the master

var success = successfn(parent,host);

$.ajax({
Expand Down
2 changes: 2 additions & 0 deletions js/xenuse.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

test_machines = {}

/*
xenuserpc = new $.rpc(
"http://snoosnoo2.uk.xensource.com:8000/RPC2",
"xml",
function() {},
null);
*/

function find_my_xenservers(user) {
var test_machines_x = xenuserpc.tm_get_list();
Expand Down