[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci cluster/form-macros site/luci/Exten ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-10-25 01:11:09

Modified files:
	luci/cluster   : form-macros 
	luci/site/luci/Extensions: cluster_adapters.py ricci_bridge.py 
Added files:
	luci/logs      : Makefile index_html 

Log message:
	frontend support for log display fixes.
	
	the added index_html file (which is responsible for most of the diff)
	is a stripped down version of the one we display everywhere else, so
	there's really nothing new there.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.90&r2=1.91
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/logs/Makefile.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/logs/index_html.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.128&r2=1.129
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.33&r2=1.34

--- conga/luci/cluster/form-macros	2006/10/16 20:34:37	1.90
+++ conga/luci/cluster/form-macros	2006/10/25 01:11:08	1.91
@@ -1716,7 +1716,7 @@
 <div metal:define-macro="nodelogs-form">
 	<h2>Recent Log Activity for <span tal:replace="request/nodename"/></h2>
 	<hr/>
-	<span tal:replace="python: here.getLogsForNode(request)"/>
+	<span tal:replace="structure python: here.getLogsForNode(request)"/>
 </div>
 
 <div metal:define-macro="nodeadd-form">
/cvs/cluster/conga/luci/logs/Makefile,v  -->  standard output
revision 1.1
--- conga/luci/logs/Makefile
+++ -	2006-10-25 01:11:13.257613000 +0000
@@ -0,0 +1,19 @@
+LUCI_HOST=luci
+LUCI_USER=admin
+LUCI_PASS=changeme
+LUCI_FTP=$(LUCI_HOST):8021
+LUCI_HTTP=http://$(LUCI_HOST):8080/luci
+
+all:
+	@true
+
+# import page local page templates to the Luci server
+import:
+	@if test "$(FILES)"; then \
+		../load_site.py -u $(LUCI_USER):$(LUCI_PASS) $(LUCI_HTTP)/logs/ $(FILES) ; \
+	else \
+		find . -follow -maxdepth 1 -type f -not -name "Makefile*" -not -name ".*" -print0 | xargs -0 ../load_site.py -u $(LUCI_USER):$(LUCI_PASS) $(LUCI_HTTP)/logs/ ; \
+	fi
+
+export:
+	@wget -q -r -nH --cut-dirs=2 "ftp://$(LUCI_USER):$(LUCI_PASS)@$(LUCI_FTP)/luci/logs/*"
/cvs/cluster/conga/luci/logs/index_html,v  -->  standard output
revision 1.1
--- conga/luci/logs/index_html
+++ -	2006-10-25 01:11:13.340974000 +0000
@@ -0,0 +1,84 @@
+<metal:page define-macro="master"><metal:doctype define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";></metal:doctype>
+<metal:block define-slot="top_slot" />
+<metal:block use-macro="here/global_defines/macros/defines" />
+
+<html xmlns="http://www.w3.org/1999/xhtml";
+      xml:lang="en"
+      lang="en"
+      tal:attributes="lang language;
+                      xml:lang language">
+
+  <head metal:use-macro="here/header/macros/html_header">
+
+    <metal:fillbase fill-slot="base">
+      <metal:baseslot define-slot="base">
+        <base href="" tal:attributes="href here/renderBase" />
+      </metal:baseslot>
+    </metal:fillbase>
+
+    <metal:headslot fill-slot="head_slot"
+                    tal:define="lang language;
+                                charset site_properties/default_charset|string:utf-8">
+
+      <metal:cache use-macro="here/global_cache_settings/macros/cacheheaders">
+        Get the global cache headers located in global_cache_settings.
+      </metal:cache>
+
+      <metal:headslot define-slot="head_slot" />
+      <tal:comment replace="nothing"> A slot where you can insert elements in the header from a template </tal:comment>
+    </metal:headslot>
+    
+    <metal:styleslot fill-slot="style_slot">
+      <tal:comment replace="nothing"> A slot where you can insert CSS in the header from a template </tal:comment>
+      <metal:styleslot define-slot="style_slot" />
+    </metal:styleslot>
+
+    <metal:cssslot fill-slot="css_slot">
+      <tal:comment replace="nothing"> This is deprecated, please use style_slot instead. </tal:comment>
+      <metal:cssslot define-slot="css_slot" />
+    </metal:cssslot>
+
+    <metal:javascriptslot fill-slot="javascript_head_slot">
+      <tal:comment replace="nothing"> A slot where you can insert javascript in the header from a template </tal:comment>
+      <metal:javascriptslot define-slot="javascript_head_slot" />
+    </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;
+                        dir python:test(isRTL, 'rtl', 'ltr')">
+    <div id="visual-portal-wrapper">
+
+      <div id="portal-top" i18n:domain="plone">
+
+        <div id="portal-header">
+             <a metal:use-macro="here/global_logo/macros/portal_logo">
+               The portal logo, linked to the portal root
+             </a>
+      </div></div></div>
+
+      <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">
+          <span tal:replace="structure python: here.getLogsForNode(request)" />
+      </div>
+</body>
+</html>
+</metal:page>
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/25 00:43:48	1.128
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/10/25 01:11:08	1.129
@@ -2398,7 +2398,7 @@
     states = getDaemonStates(rc, dlist)
     infohash['d_states'] = states
 
-  infohash['logurl'] = baseurl + "?pagetype=" + NODE_LOGS + "&nodename=" + nodename + "&clustername=" + clustername
+  infohash['logurl'] = '/luci/logs/?nodename=' + nodename + '&clustername=' + clustername
   return infohash
   #get list of faildoms for node
 
@@ -2434,7 +2434,7 @@
       map['status'] = NODE_INACTIVE
       map['status_str'] = NODE_INACTIVE_STR
 
-    map['logurl'] = baseurl + "?pagetype=" + NODE_LOGS + "&nodename=" + name + "&clustername=" + clustername
+    map['logurl'] = '/luci/logs?nodename=' + name + '&clustername=' + clustername
     #set up URLs for dropdown menu...
     if map['status'] == NODE_ACTIVE:
       map['jl_url'] = baseurl + "?pagetype=" + NODE_PROCESS + "&task=" + NODE_LEAVE_CLUSTER + "&nodename=" + name + "&clustername=" + clustername
--- conga/luci/site/luci/Extensions/ricci_bridge.py	2006/10/25 00:43:48	1.33
+++ conga/luci/site/luci/Extensions/ricci_bridge.py	2006/10/25 01:11:08	1.34
@@ -326,10 +326,8 @@
 		if log_domain:
 			entry += log_domain
 		if log_pid:
-			entry += '[' + log_pid + ']' + ': '
-		else
-			entry += ': '
-		entry += log_msg + '<br/>'
+			entry += '[' + log_pid + ']'
+		entry += ': ' + log_msg + '<br/>'
 	return entry
 
 def nodeReboot(rc):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]