All of lore.kernel.org
 help / color / mirror / Atom feed
From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/logs index_html log_provider
Date: 30 Oct 2006 23:00:51 -0000	[thread overview]
Message-ID: <20061030230051.31732.qmail@sourceware.org> (raw)

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 @@
+<pre tal:content="structure python: here.getLogsForNode(request)"></pre>
--- 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 @@
     </metal:javascriptslot>
   </head>
 
-  <script type="text/javascript">
-	function delWaitBox() {
-		var waitbox = document.getElementById('waitbox');
-		if (!waitbox)
-			return (-1);
-		waitbox.parentNode.removeChild(waitbox);
-		return (0);
-	}
-  </script>
 
-  <body onLoad="javascript:delWaitBox()"
-		tal:attributes="class here/getSectionFromURL;
+
+<script language="javascript" type="text/javascript">
+
+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);
+}
+</script>
+
+  <body tal:define="nodename     request/nodename;
+                    log_url      context/logs/log_provider/absolute_url;
+                    log_url_full python:log_url + '?nodename=' + nodename"
+        tal:attributes="onload python:'replace_loginfo(\'' + log_url_full + '\')';
+                        class here/getSectionFromURL;
                         dir python:test(isRTL, 'rtl', 'ltr')">
     <div id="visual-portal-wrapper">
 
@@ -69,16 +112,26 @@
 
       <div class="visualClear"><!-- --></div>
 
-	  <div id="waitbox">
-		<span>
-			Log information for <span tal:replace="request/nodename | string: host"/> is being retrieved...
-		</span>
-	    <img src="/luci/storage/100wait.gif">
-	  </div>
-
       <div id="log_data">
 		<h2>Recent log information for <span tal:replace="request/nodename | string: host"/></h2>
-          <pre tal:content="structure python: here.getLogsForNode(request)" />
+
+		
+  <div id="log_entries">   
+   <table style="width: 100%;">
+    <tr>
+     <td align="center">
+      <img src="../storage/100wait.gif" style="padding-top: 1cm;"/>
+     </td>
+    </tr>
+    <tr>
+     <td align="center">
+      <div style="padding-bottom: 4cm;">Retrieving log info</div>
+     </td>
+    </tr>
+   </table>
+  </div>
+
+
       </div>
 </body>
 </html>



                 reply	other threads:[~2006-10-30 23:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061030230051.31732.qmail@sourceware.org \
    --to=kupcevic@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.