conga/luci cluster/form-macros site/luci/Exten ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-12-06 21:16:35
Modified files:
luci/cluster : form-macros
luci/site/luci/Extensions: ClusterNode.py cluster_adapters.py
Log message:
Related: #218040
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.122&r2=1.123
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterNode.py.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.173&r2=1.174
luci/cluster/form-macros +17 -9
@@ -77,7 +77,7 @@ <tal:block tal:condition="python: ricci_agent"> <tal:block tal:define=" - global stat python: here.getClusterStatus(ricci_agent); + global stat python: here.getClusterStatus(request, ricci_agent); global cstatus python: here.getClustersInfo(stat, request); global cluster_status python: 'cluster ' + (('running' in cstatus and cstatus['running'] == 'true') and 'running' or 'stopped');" />
@@ -122,14 +122,22 @@ </td> </tr> + <tr class="cluster"> + <td tal:condition="exists: cstatus/error" class="cluster"> + <span class="errmsgs"> + An error occurred while attempting to get status information for this cluster. The information shown may be out of date. + </span> + </td> + </tr> + <tr class="cluster info_middle"> <td colspan="2" class="cluster cluster_quorum"> <ul class="cluster_quorum" tal:condition="exists: cstatus/status"> - <li><strong class="cluster">Status</strong>: <span tal:replace="cstatus/status"/></li> - <li><strong class="cluster">Total Cluster Votes</strong>: <span tal:replace="cstatus/votes"/></li> - <li><strong class="cluster">Minimum Required Quorum</strong>: <span tal:replace="cstatus/minquorum"/></li> + <li><strong class="cluster">Status</strong>: <span tal:replace="cstatus/status | string:[unknown]"/></li> + <li><strong class="cluster">Total Cluster Votes</strong>: <span tal:replace="cstatus/votes | string:[unknown]"/></li> + <li><strong class="cluster">Minimum Required Quorum</strong>: <span tal:replace="cstatus/minquorum | string:[unknown]"/></li> </ul> </td> </tr>
@@ -2288,7 +2296,7 @@ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" /> <tal:block tal:define=" - global nodestatus python: here.getClusterStatus(ricci_agent); + global nodestatus python: here.getClusterStatus(request, ricci_agent); global nodeinfo python: here.getNodeInfo(modelb, nodestatus, request); global status_class python: 'node_' + (nodeinfo['nodestate'] == '0' and 'active' or (nodeinfo['nodestate'] == '1' and 'inactive' or 'unknown')); global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'));
@@ -2531,7 +2539,7 @@ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" /> <tal:block tal:define=" - global status python: here.getClusterStatus(ricci_agent); + global status python: here.getClusterStatus(request, ricci_agent); global nds python: here.getNodesInfo(modelb, status, request)" /> <div tal:repeat="nd nds">
@@ -2752,7 +2760,7 @@ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" /> <tal:block tal:define=" - global svcstatus python: here.getClusterStatus(ricci_agent); + global svcstatus python: here.getClusterStatus(request, ricci_agent); global svcinf python: here.getServicesInfo(svcstatus,modelb,request); global svcs svcinf/services" />
@@ -3027,7 +3035,7 @@ <tal:block tal:define=" global global_resources python: here.getResourcesInfo(modelb, request); - global sstat python: here.getClusterStatus(ricci_agent); + global sstat python: here.getClusterStatus(request, ricci_agent); global sinfo python: here.getServiceInfo(sstat, modelb, request); global running sinfo/running | nothing;" />
@@ -3217,7 +3225,7 @@ global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" /> <tal:block tal:define=" - global sta python: here.getClusterStatus(ricci_agent); + global sta python: here.getClusterStatus(request, ricci_agent); global fdominfo python: here.getFdomsInfo(modelb, request, sta);" /> <div class="cluster fdom" tal:repeat="fdom fdominfo">
luci/site/luci/Extensions/ClusterNode.py +7 -0
@@ -96,3 +96,10 @@ except KeyError, e: return "" + def getVotes(self): + try: + return self.getAttribute('votes') + except KeyError, e: + return "1" + except: + return None
luci/site/luci/Extensions/cluster_adapters.py +177 -56
371 lines not on this page · raw message