From mboxrd@z Thu Jan 1 00:00:00 1970 From: kupcevic@sourceware.org Date: 30 Oct 2006 23:00:51 -0000 Subject: [Cluster-devel] conga/luci/logs index_html log_provider Message-ID: <20061030230051.31732.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: kupcevic at sourceware.org 2006-10-30 23:00:51 Modified files: luci/logs : index_html Added files: luci/logs : log_provider Log message: luci log viewer: bz212632 - display progress bar while retrieving logging info Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/logs/log_provider.diff?cvsroot=cluster&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/logs/index_html.diff?cvsroot=cluster&r1=1.2&r2=1.3 /cvs/cluster/conga/luci/logs/log_provider,v --> standard output revision 1.1 --- conga/luci/logs/log_provider +++ - 2006-10-30 23:00:51.365274000 +0000 @@ -0,0 +1 @@ +

--- conga/luci/logs/index_html	2006/10/25 16:03:40	1.2
+++ conga/luci/logs/index_html	2006/10/30 23:00:50	1.3
@@ -44,18 +44,61 @@
     
   
 
-  
 
-  
+
+var xmlHttp_object = false;
+
+function initiate_async_get(url, funct) {
+  xmlHttp_object = false;
+
+  /*@cc_on @*/
+  /*@if (@_jscript_version >= 5)
+  try {
+    xmlHttp_object = new ActiveXObject("Msxml2.XMLHTTP");
+  } catch (e) {
+    try {
+      xmlHttp_object = new ActiveXObject("Microsoft.XMLHTTP");
+    } catch (e2) {
+      xmlHttp_object = false;
+    }
+  }
+  @end @*/
+
+  if (!xmlHttp_object && typeof XMLHttpRequest != 'undefined') {
+    xmlHttp_object = new XMLHttpRequest();
+  }
+
+  if (xmlHttp_object) {
+    xmlHttp_object.open("GET", url, true);
+    xmlHttp_object.onreadystatechange = funct;
+    xmlHttp_object.send(null);
+  } else {
+    alert("Unable to initiate async GET");
+  }
+}
+
+function replace_loginfo_callback() {
+  if (xmlHttp_object.readyState == 4) {
+    if (xmlHttp_object.status == 200) {
+        var response = xmlHttp_object.responseText;
+        document.getElementById('log_entries').innerHTML = response;
+    } else {
+        alert("Error retrieving data from server");
+    }
+  }
+}
+function replace_loginfo(url) {
+  initiate_async_get(url, replace_loginfo_callback);
+}
+
+
+  
     
@@ -69,16 +112,26 @@
-
- - Log information for is being retrieved... - - -
-

Recent log information for

-
+
+		
+  
+ + + + + + + +
+ +
+
Retrieving log info
+
+
+ +