[Midnightbsd-cvs] mports: magus/elements: add stuff for machine page.

ctriv at midnightbsd.org ctriv at midnightbsd.org
Wed Mar 19 23:46:47 EDT 2008


Log Message:
-----------
add stuff for machine page.

Modified Files:
--------------
    mports/Tools/magus/www/data/magus/elements:
        magus.css (r1.16 -> r1.17)
        magus.js (r1.5 -> r1.6)

-------------- next part --------------
Index: magus.js
===================================================================
RCS file: /home/cvs/mports/Tools/magus/www/data/magus/elements/magus.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -L Tools/magus/www/data/magus/elements/magus.js -L Tools/magus/www/data/magus/elements/magus.js -u -r1.5 -r1.6
--- Tools/magus/www/data/magus/elements/magus.js
+++ Tools/magus/www/data/magus/elements/magus.js
@@ -30,6 +30,37 @@
     }
 }
 
+function showEvents(machine, run) {
+	var td = document.getElementById("events-display");
+
+	if (run.length == 0) {
+		td.style.display = 'none';
+		return false;
+	}
+
+	td.innerHTML = '<p style="text-align: center"><img src="' + loader.src + '" /></p>';
+	td.style.display = 'table-cell';
+
+	var url = 'http://www.midnightbsd.org/magus/async/machine-events?machine=' + machine + '&run=' + run;
+	sendAsycQuery(url, process_showEvents);
+	return false;
+}
+
+function process_showEvents() {
+    // only if req shows "loaded"
+    if (req.readyState == 4) {
+        // only if "OK"
+        if (req.status == 200) {
+            var result = eval( "(" + req.responseText + ")" );
+            var td = document.getElementById("events-display");
+	    td.innerHTML = result.html;	    
+        } else {
+            alert("There was a problem retrieving the data:\n" + req.statusText);
+        }
+    }
+}
+
+
 
 function sendAsycQuery(url, callback) {
     // branch for native XMLHttpRequest object	
Index: magus.css
===================================================================
RCS file: /home/cvs/mports/Tools/magus/www/data/magus/elements/magus.css,v
retrieving revision 1.16
retrieving revision 1.17
diff -L Tools/magus/www/data/magus/elements/magus.css -L Tools/magus/www/data/magus/elements/magus.css -u -r1.16 -r1.17
--- Tools/magus/www/data/magus/elements/magus.css
+++ Tools/magus/www/data/magus/elements/magus.css
@@ -121,8 +121,7 @@
 	max-width: 75%;	
 }
 
-table.run-summary, table.result-list, table.port-results, table.event-list {
-	max-width: 100%;
+table.run-summary, table.result-list, table.port-results, table.event-list, table.machine-summary {
 	width: 100%;
 }
 


More information about the Midnightbsd-cvs mailing list