Skip to contentSkip to conversation

conga/luci cluster/form-macros site/luci/Exten ...

Cluster-devel [email protected] 1 participant 1 message Oct 25, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at 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

luci/cluster/form-macros +1 -1
@@ -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

- renamed from luci/logs/Makefile +19 -0
@@ -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

- renamed from luci/logs/index_html +84 -0

84 lines not on this page · raw message

luci/site/luci/Extensions/cluster_adapters.py +2 -2
@@ -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
luci/site/luci/Extensions/ricci_bridge.py +2 -4
@@ -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):