From mboxrd@z Thu Jan 1 00:00:00 1970 From: jparsons@sourceware.org Date: 13 Aug 2006 16:15:28 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ... Message-ID: <20060813161528.28848.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: jparsons at sourceware.org 2006-08-13 17:15:28 Modified files: luci/site/luci/Extensions: cluster_adapters.py conga_constants.py ricci_bridge.py Log message: logging link Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.47&r2=1.48 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.15&r2=1.16 --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/08/13 15:02:14 1.47 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/08/13 16:15:28 1.48 @@ -1534,7 +1534,8 @@ dlist.append("rgmanager") states = rb.getDaemonStates(dlist) infohash['d_states'] = states - + + infohash['logurl'] = baseurl + "?pagetype=" + NODE_LOGS + "&nodename=" + nodename + "&clustername=" + clustername return infohash #get list of faildoms for node @@ -1611,6 +1612,20 @@ return resultlist +def getLogsForNode(self, request): + nodename = request['nodename'] + clustername = request['clustername'] + nodename_resolved = resolve_nodename(clustername, nodename) + #rb = ricci_bridge(nodename_resolved) + #return rb.getNodeLogs() + + str_buf = "" + file = open("./conga_constants.py", 'r') + lines = file.readlines() + for line in lines: + str_buf = str_buf + line + "
" + return str_buf + def isClusterBusy(self, req): items = None map = {} --- conga/luci/site/luci/Extensions/conga_constants.py 2006/08/13 14:02:46 1.9 +++ conga/luci/site/luci/Extensions/conga_constants.py 2006/08/13 16:15:28 1.10 @@ -12,6 +12,7 @@ NODE_CONFIG="14" NODE_ADD="15" NODE_PROCESS="16" +NODE_LOGS="17" SERVICES="20" SERVICE_ADD="21" SERVICE_LIST="22" --- conga/luci/site/luci/Extensions/ricci_bridge.py 2006/08/12 17:59:40 1.15 +++ conga/luci/site/luci/Extensions/ricci_bridge.py 2006/08/13 16:15:28 1.16 @@ -580,6 +580,11 @@ return (batch_number, result) + def getNodeLogs(self): + QUERY_STR = '