No, I couldn't get the authentication issue solved.
Beyond that I've noticed that the simpledashboard doesn't update the locations
or the device issues for that matter.
I'm almost 100% sure we're abandoning zenoss as it doesn't meet our
requirements.
But I'll post the final changes I made to the dashboard to make it a little
easier on the eyes.
replace your code with this in simpleDashboard.js
Code:
//################################################################
//
// Copyright (c) 2006 Zenoss, Inc. All rights reserved.
//
//################################################################
//var url="data.json";
// IE detection in 20 bytes!
var isie//@cc_on=1;
function updateTimestamp(){
$("dashTime").innerHTML = "<b>Refreshing...</b>";
callLater(1,updateTimestampNow);
}
function updateTimestampNow(){
var d = new Date();
var h = "Last Updated: ";
h += toISOTimestamp(d)
$("dashTime").innerHTML = h;
}
statusUpdate = function(id, data) {
/* draw clear then draw the rows of the tbody */
//log("drawTableBody "+id);
var tbody = null;
if (isie) {
tbody = $(id);
clearTableBody(tbody);
} else {
tbody = TBODY({'id':id});
}
for (var r=0; r<data.length;r++) {
var tr = tbody.insertRow(tbody.rows.length);
var odd = (r%2)?"odd":"even";
setElementClass(tr, "tablevalues " + odd);
var row = data[r];
for (var j=0; j<row.length; j++) {
var td = tr.insertCell(tr.cells.length);
if (row[j].cssclass) {
setElementClass(td, row[j].cssclass);
td.innerHTML = row[j].data;
} else if (typeof(row[j]) == "string") {
td.innerHTML = row[j]
}
}
}
if (!isie) swapDOM(id, tbody);
}
clearTableBody = function(tbody) {
/* remove all rows from table */
while (tbody.rows.length > 0) {
tbody.deleteRow(0);
}
}
var cancelWithTimeout = function (deferred, timeout) {
var canceller = callLater(timeout, function () {
// cancel the deferred after timeout seconds
deferred.cancel();
//log("cancel load data")
});
return deferred.addCallback(function (res) {
// if the deferred fires successfully, cancel the timeout
canceller.cancel();
return res;
});
};
updateDashboard = function(data) {
//log("got data");
for (var id in data) {
statusUpdate(id, data[id]);
}
updateTimestamp();
}
updateError = function(err) {
logError(err);
$("dashTime").innerHTML = "<b class='errortitle'>Lost Connection to
Zenoss</b>";
}
refreshData = function() {
log("Loading dashboard data...");
var defr = cancelWithTimeout(
loadJSONDoc(dashurl, dashparams), timeout); // timeout set on Dashboard
defr.addCallback(updateDashboard);
defr.addErrback(updateError);
callLater(refresh, refreshData, dashurl); // refresh set on Dashboard
}
addLoadEvent(refreshData)
and add/replace this code in zenoss.css
Code:
#topPane{
background: #fff;
height: 55px;
width:100%;
padding-left:0px;
padding-right:10px;
border: 0px solid red;
margin: 0px;
color: white;
border-bottom: 1px solid black;
background: transparent url('img/metalbg.gif') top left repeat-x;
}
#centerPane{
background: #E0E0E0;
height: 350px;
border-bottom: 1px;
font-size: 7pt;
padding-left: 15px;
padding-right: 15px;
padding-top: 10px;
padding-bottom: 10px;
}
------------------------
Sean Dalton
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=9867#9867
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users