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

[Cluster-devel] conga/luci/cluster form-macros



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons sourceware org	2006-07-14 16:09:40

Modified files:
	luci/cluster   : form-macros 

Log message:
	node config support

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- conga/luci/cluster/form-macros	2006/07/05 20:40:29	1.3
+++ conga/luci/cluster/form-macros	2006/07/14 16:09:39	1.4
@@ -54,7 +54,10 @@
                                             <td STYLE="padding:10px;margin:10px"><h2 STYLE="border:0px;">Total Cluster Votes:  <i><span tal:content="cstatus/votes"/></i></h2></td>
                                             <td STYLE="padding:10px;margin:10px"><h2 STYLE="border:0px;">Minimum Required Quorum:  <i><span tal:content="cstatus/minquorum"/></i></h2></td>
        </tr>
-       <tr STYLE="padding:10px;margin:10px"><td STYLE="padding:10px;margin:10px"><h2 STYLE="border:0px;">Nodes:</h2>  <ul><span tal:repeat="nd cstatus/currentnodes"><li><a href="" tal:attributes="href nd/configurl"><span tal:content="nd/nodename"/></a></li></span></ul></td>
+       <tr STYLE="padding:10px;margin:10px"><td STYLE="padding:10px;margin:10px"><h2 STYLE="border:0px;">Nodes:</h2>  <ul>
+          <span tal:repeat="nd cstatus/currentnodes">
+           <span tal:condition="python:nd['status'] == '0'"><li STYLE="list-style-image: url(small_node_active.png);"><a href="" tal:attributes="href nd/configurl"><font color="green"><span tal:content="nd/nodename"/></font></a></li></span>           <span tal:condition="python:nd['status'] == '1'"><li STYLE="list-style-image: url(small_node_inactive.png);"><a href="" tal:attributes="href nd/configurl"><font color="red"><span tal:content="nd/nodename"/></font></a></li></span>           <span tal:condition="python:nd['status'] == '2'"><li STYLE="list-style-image: url(small_node_unknown.png);"><a href="" tal:attributes="href nd/configurl"><font color="gray"><span tal:content="nd/nodename"/></font></a></li></span>          </span>
+           </ul></td>
            <td STYLE="width:30%;text-align:right"><h3>Currently Hosting: </h3><ul><span tal:repeat="svc cstatus/currentservices"><li><a href="" tal:attributes="href svc/svcurl"><span tal:content="svc/name"/></a></li></span></ul></td>
        </tr>
         
@@ -143,7 +146,63 @@
    <h2>Cluster Configuration Form</h2>
   </div>
   <div metal:define-macro="node-form">
-   <h2>Node Form</h2>
+     <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
+     <span tal:define="global nodestatus python:here.getClusterStatus(ricci_agent)"/>
+       <span tal:define="global nodeinfo python:here.getNodeInfo(modelb, nodestatus, request)"/>
+    <!-- First table row is status icon, name, and dropdown -->
+    <table>
+     <span tal:condition="python:nodeinfo['nodestate'] == '0'">
+      <tr>
+        <td><img src="node_active.png"/></td><td STYLE="horizontal-align:left;"><table><tr><td><h2 STYLE="border:0px;">Node name: <span tal:content="nodeinfo/nodename"/></h2></td></tr>
+        <tr STYLE="horizontal-align:left;"><td><h2 STYLE="border:0px;">Status: <font color="green">Cluster member</font></td></tr></table></td>
+          <td STYLE="margin:15px; vertical-align:top"><form METHOD=POST onSubmit="return dropdown(this.gourl)">
+           <SELECT NAME="gourl">
+            <OPTION VALUE="">Choose a Task...</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/jl_url">Have node leave cluster</OPTION>
+            <OPTION VALUE="">----------</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/fence_url">Fence this node</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/reboot_url">Reboot this node</OPTION>
+            <OPTION VALUE="">----------</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/delete_url">Delete this node</OPTION>
+          </SELECT>
+          <INPUT TYPE=SUBMIT VALUE="Go"/>
+          </FORM>
+         </td>
+      </tr>
+                                                                                
+     </span>
+     <span tal:condition="python:nodeinfo['nodestate'] == '1'">
+      <tr><td><img src="node_inactive.png"/></td><td><table><tr><td><h2 STYLE="border:0px;">Node name: <span tal:content="nodeinfo/nodename"/></h2></td></tr>
+          <tr><td STYLE="margin:10px;padding:10px;"><h2 STYLE="border:0px;">Status: <font color="red">Currently not a cluster participant</font></td></tr></table></td>
+          <td STYLE="margin:15px;vertical-align:top;"><form METHOD=POST onSubmit="return dropdown(this.gourl)">
+           <SELECT NAME="gourl">
+            <OPTION VALUE="">Choose a Task...</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/jl_url">Have node join cluster</OPTION>
+            <OPTION VALUE="">----------</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/fence_url">Fence this node</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/reboot_url">Reboot this node</OPTION>
+            <OPTION VALUE="">----------</OPTION>
+            <OPTION VALUE="" tal:attributes="VALUE nodeinfo/delete_url">Delete this node</OPTION>
+          </SELECT>
+          <INPUT TYPE=SUBMIT VALUE="Go"/>
+          </FORM>
+         </td>
+      </tr>
+                                                                                
+     </span>
+     <span tal:condition="python:nodeinfo['nodestate'] == '2'">
+      <tr><td><img src="node_unknown.png"/></td><td><h2 STYLE="border:0px;">Node name: <span tal:content="nodeinfo/nodename"/></h2></td><td STYLE="margin:10px;padding:10px;"><h2 STYLE="border:0px;">Status: <font color="gray">This node is not responding</font></td></tr>
+     </span>
+      </table>
+      <table>
+      <tr><td><table border="1px"><tr><th>Cluster daemon</th><th>Enabled at start-up</th><th>Currently running</th></tr>
+                      <span tal:repeat="demon nodeinfo/d_states">
+                       <tr><td><span tal:content="demon/name"/></td><td><span tal:content="demon/enabled"/><a href="" STYLE="text-align:right;">(Change)</a></td><td><span tal:content="demon/running"/></td></tr>
+                      </span>
+               </table>
+    <!-- second row is daemon macro and failoverdom membership -->
+    <!-- third row is fencing macro -->
+    <!-- fourth row is logging -->
   </div>
   <div metal:define-macro="nodes-form">
     <table>


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