[Cluster-devel] conga/luci/cluster form-macros index_html stat ...
rmccabe at sourceware.org
rmccabe at sourceware.org
Mon Aug 28 23:05:00 UTC 2006
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-08-28 23:04:59
Modified files:
luci/cluster : form-macros index_html
Removed files:
luci/cluster : status_check systest
Log message:
too long without a commit.. all style/UI stuff
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/status_check.diff?cvsroot=cluster&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/systest.diff?cvsroot=cluster&r1=1.1&r2=NONE
--- conga/luci/cluster/form-macros 2006/08/17 16:22:41 1.50
+++ conga/luci/cluster/form-macros 2006/08/28 23:04:59 1.51
@@ -26,106 +26,90 @@
</div>
<div metal:define-macro="clusters-form">
- <table>
- <tbody>
- <tr width="100%" style="border-bottom: blue 3px groove;"
- tal:repeat="clu clusystems">
-
- <td width="100%" style="border-bottom: #8cacbb 3px solid;"
- tal:define="ragent python:here.getRicciAgent(clu);
- global stat python:here.getClusterStatus(ragent);
- global cstatus python:here.getClustersInfo(stat,request);">
-
- <table width="800px">
- <tr style="padding:10px;margin:10px;border-width:0px;">
- <td tal:condition="python:cstatus['running'] == 'true'" style="padding:10px;margin:10px;border-width:0px;">
- <h1 style="border:0px;">Cluster Name: <a href="" tal:attributes="href cstatus/clucfg"><font color="green"><span tal:content="cstatus/clusteralias"/></font></a></h1>
- </td>
-
- <td tal:condition="python:cstatus['running'] != 'true'" style="padding:10px;margin:10px;border-width:0px;">
- <h1 style="border:0px;">Cluster Name: <a href="" tal:attributes="href cstatus/clucfg"><font color="red"><span tal:content="cstatus/clusteralias"/></font></a></h1>
- </td>
-
- <td style="padding:10px;margin:10px">
- <table>
- <tr><td>
- <h4 style="border:0px;">Status: <i><span tal:content="cstatus/status"/></i></h4>
- </td></tr>
-
- <tr><td style="padding:10px;margin:10px">
- <h4 style="border:0px;">Total Cluster Votes: <i><span tal:content="cstatus/votes"/></i></h4>
- </td></tr>
-
- <tr><td style="padding:10px;margin:10px">
- <h4 style="border:0px;">Minimum Required Quorum: <i><span tal:content="cstatus/minquorum"/></i></h4>
- </td></tr>
- </table>
- </td>
- </tr>
- <tr>
- <td style="margin:10px">
- <form method="post" onSubmit="return dropdown(this.gourl)">
- <select name="gourl" tal:condition="python:cstatus['running'] == 'true'">
- <option value="">This cluster is running...</option>
- <option value=""><font color="red">Stop this cluster</font></option>
- <option value="">Restart this cluster</option>
- </select>
- <select name="gourl" tal:condition="python:cstatus['running'] != 'true'">
- <option value="">This cluster is stopped...</option>
- <option value=""><font color="green">Start this cluster</font></option>
- <option value="">Restart this cluster</option>
- </select>
- <input type="submit" value="Go"/>
- </form>
- </td>
- </tr>
-
-
- <tr style="padding:10px;margin:10px">
- <td style="padding:10px;margin:10px">
- <h2 style="border:0px;">Nodes:</h2>
- <ul>
- <tal:block tal:repeat="nd cstatus/currentnodes">
- <li style="list-style-image: url(small_node_active.png);"
- tal:condition="python:nd['status'] == '0'">
- <a href="" tal:attributes="href nd/configurl"><font color="green"><span tal:content="nd/nodename"/></font></a>
- </li>
- <li style="list-style-image: url(small_node_inactive.png);" tal:condition="python:nd['status'] == '1'">
- <a href="" tal:attributes="href nd/configurl"><font color="red"><span tal:content="nd/nodename"/></font></a>
- </li>
- <li style="list-style-image: url(small_node_unknown.png);" tal:condition="python:nd['status'] == '2'">
- <a href="" tal:attributes="href nd/configurl"><font color="gray"><span tal:content="nd/nodename"/></font></a>
- </li>
- </tal:block>
- </ul>
- </td>
-
- <td style="width:30%;text-align:right">
- <h3>Services: </h3>
- <ul>
- <span tal:condition="python:len(cstatus['currentservices']) < 1">
- <li><i>No Services Defined</i></li>
- </span>
- <span tal:repeat="svc cstatus/currentservices">
- <span tal:condition="python:svc['srunning'] == 'true'">
- <li style="list-style-image:url(small_svc.png);">
- <a href="" tal:attributes="href svc/svcurl"><font color="green"><span tal:content="svc/name"/></font></a>
- </li>
- </span>
- <span tal:condition="python:svc['srunning'] != 'true'">
- <li style="list-style-image:url(small_svc.png);">
- <a href="" tal:attributes="href svc/svcurl"><font color="red"><span tal:content="svc/name"/></font></a>
- </li>
- </span>
- </span>
- </ul>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
+
+<div id="cluster_list">
+
+<div class="cluster" tal:repeat="clu clusystems">
+ <tal:block
+ tal:define="ragent python:here.getRicciAgent(clu);
+ global stat python:here.getClusterStatus(ragent);
+ global cstatus python:here.getClustersInfo(stat,request);
+ global cluster_status python: 'cluster ' + (cstatus['running'] == 'true' and 'running' or 'stopped');"
+ />
+
+ <table class="cluster" width="100%">
+ <tr class="cluster info_top">
+ <td class="cluster cluster_name">
+ <strong class="cluster cluster_name">Cluster Name</strong>:
+ <a href=""
+ tal:attributes="href cstatus/clucfg;
+ class python: 'cluster ' + cluster_status;"
+ tal:content="cstatus/clusteralias" />
+ </td>
+
+ <td class="cluster cluster_action">
+ <form method="post" onSubmit="return dropdown(this.gourl)">
+ <select name="gourl" id="cluster_action" class="cluster">
+ <option tal:condition="python: cstatus['running'] != 'true'" value="" class="cluster running">Start this cluster</option>
+ <option tal:condition="python:cstatus['running'] == 'true'" value="" class="cluster stopped">Stop this cluster</option>
+ <option value="" class="cluster">Restart this cluster</option>
+ </select>
+ <input class="cluster" type="submit" value="Go" />
+ </form>
+ </td>
+ </tr>
+
+ <tr class="cluster info_middle">
+ <td colspan="2" class="cluster cluster_quorum">
+ <ul class="cluster_quorum">
+ <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>
+ </ul>
+ </td>
+ </tr>
+
+ <tr class="cluster info_bottom">
+ <td class="cluster cluster_nodes">
+ <strong class="cluster">Nodes</strong>
+ <ul class="cluster">
+ <tal:block tal:repeat="nd cstatus/currentnodes">
+ <tal:block
+ tal:define="global nodeclass python: 'cluster ' + (nd['status'] == '0' and 'node_active' or (nd['status'] == '1' and 'node_inactive' or 'node_unknown'));" />
+ <li tal:attributes="class python: nodeclass">
+ <a tal:content="nd/nodename"
+ tal:attributes="
+ href nd/configurl;
+ class python: nodeclass;" />
+ </li>
+ </tal:block>
+ </ul>
+ </td>
+
+ <td class="cluster_services">
+ <strong class="cluster">Services</strong>
+ <ul class="cluster">
+ <tal:block tal:condition="python:len(cstatus['currentservices']) < 1">
+ <li>No Services Defined</li>
+ </tal:block>
+
+ <tal:block tal:repeat="svc cstatus/currentservices">
+ <tal:block
+ tal:define="global svcclass python: svc['srunning'] == 'true' and 'running' or 'stopped'" />
+
+ <li tal:attributes="class python: 'cluster cluster_service ' + svcclass">
+ <a tal:content="svc/name"
+ tal:attributes="href svc/svcurl;
+ class python: 'cluster cluster_service ' + svcclass" />
+ </li>
+ </tal:block>
+ </ul>
+ </td>
+ </tr>
</table>
+ <hr>
+</div>
+</div>
</div>
<div metal:define-macro="cluster-form">
@@ -145,7 +129,7 @@
<form name="adminform" action="" method="post">
<input name="pagetype" id="pagetype" type="hidden" value="6" />
- <h2>Add a Cluster</h2>
+ <h1>Add a cluster</h1>
<tal:block tal:condition="python: not sessionObj or not 'requestResults' in sessionObj or not 'nodeList' in sessionObj['requestResults']">
<input name="numStorage" type="hidden" value="3" />
@@ -670,247 +654,241 @@
Third row is fencing macro
</tal:comment>
- <div tal:define="
+ <tal:block tal:define="
global ricci_agent python:here.getRicciAgentForCluster(request);
global nodestatus python:here.getClusterStatus(ricci_agent);
- global nodeinfo python:here.getNodeInfo(modelb, nodestatus, request)">
+ 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'));"
+ />
- <div tal:condition="python:nodeinfo['nodestate'] == '0'">
- <div style="margin-left: .0em;">
- <img src="node_active.png"/>
- <div style="margin-left:100px">
- <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>
- </div>
- </div>
+ <table class="cluster node" width="100%">
+ <tr class="cluster node info_top">
+ <td class="cluster node node_name">
+ <img tal:attributes="
+ src python: status_class + '.png'" />
+ <strong class="cluster node">Node Name:</strong>
+ <span
+ tal:attributes="class python: 'cluster node ' + status_class"
+ tal:content="nodeinfo/nodename" />
+ </td>
- <div style="margin:15px; vertical-align:top">
- <form method="post" onSubmit="return dropdown(this.gourl)">
+ <td class="cluster node node_action"
+ tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'">
+ <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 tal:attributes="value nodeinfo/jl_url">
+ Have node <span tal:replace="python: nodeinfo['nodestate'] == '0' and 'leave' or 'join'" /> cluster
+ </option>
<option value="">----------</option>
- <option value="" tal:attributes="value nodeinfo/fence_url">Fence this node</option>
+ <option 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>
+ <option tal:attributes="value nodeinfo/delete_url">Delete this node</option>
</select>
<input type="submit" value="Go"/>
- </form>
- </div>
- </div>
+ </form>
+ </td>
+ </tr>
- <div tal:condition="python:nodeinfo['nodestate'] == '1'">
- <div style="margin-left: 0px;">
- <img src="node_inactive.png"/>
- <div style="margin-left: 100px;">
- <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>
- </div>
- </div>
+ <tr class="cluster node info_middle">
+ <td class="cluster node node_status" colspan="2">
+ <strong class="cluster node">Status:</strong>
+ <span tal:attributes="class python: 'cluster node ' + status_class"
+ tal:content="python: cluster_node_status_str" />
+ </td>
- <div 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>
- </div>
- </div>
+ </tr>
- <div tal:condition="python:nodeinfo['nodestate'] == '2'">
- <div>
- <img src="node_unknown.png"/>
- </div>
-
- <div>
- <h2 style="border:0px;">Node name: <span tal:replace="nodeinfo/nodename"/></h2>
- </div>
-
- <div style="margin:10px;padding:10px;">
- <h2 style="border:0px;">Status: <font color="gray">This node is not responding</font>
- </div>
- </div>
+ <tr class="cluster node info_bottom">
+ <td class="cluster node node_log" colspan="2">
+ <a class="cluster node"
+ tal:attributes="href nodeinfo/logurl" onClick="return popup_log(this, 'notes')">
+ Show recent log activity for this node
+ </a>
+ </td>
+ </tr>
+ </table>
- <div>
- <a href="" tal:attributes="href nodeinfo/logurl" onClick="return popup_log(this, 'notes')">Show recent log activity for this node</a>
- </div>
<hr/>
- <div>
- <table border="1px">
- <tr>
- <th>Cluster daemon</th>
- <th>Enabled at start-up</th>
- <th>Currently running</th>
- </tr>
- <tr tal:repeat="demon nodeinfo/d_states">
- <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>
- </table>
- </div>
- </div>
+ <h3>Cluster daemons running on this node</h3>
+ <form name="daemon_form">
+ <table class="systemsTable">
+ <thead>
+ <tr class="systemsTable">
+ <th class="systemsTable">Daemon</th>
+ <th class="systemsTable">Currently running</th>
+ <th class="systemsTable">Enabled at start-up</th>
+ </tr>
+ </thead>
+ <tfoot class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="3">
+ <div class="systemsTableEnd">
+ <input class="hbSubmit" type="button" value="Update node daemon properties" />
+ </div>
+ </td></tr>
+ </tfoot>
+ <tbody class="systemsTable">
+ <tr class="systemsTable" tal:repeat="demon nodeinfo/d_states">
+ <td class="systemsTable"><span tal:replace="demon/name"/></td>
+ <td class="systemsTable"><span tal:replace="python: demon['running'] and 'yes' or 'no'" /></td>
+ <td class="systemsTable">
+ <input type="checkbox"
+ tal:attributes="
+ name python: nodeinfo['nodename'] + ':' + demon['name'];
+ checked python: demon['enabled'] and 'checked'" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+
<hr/>
- <div style="padding:10px;margin:10px">
- <h2 style="border:0px;">Services on this Node:</h2>
- <span tal:condition="python:len(nodeinfo['currentservices']) == 0">
- <h3><i>No cluster services are currently running here</i></h3>
- </span>
- <span tal:condition="python:len(nodeinfo['currentservices']) > 0">
- <ul>
- <li style="list-style-image: url(small_svc.png);" tal:repeat="svc nodeinfo/currentservices">
- <a href="" tal:attributes="href svc/svcurl"><font color="green"><span tal:replace="svc/servicename"/></font></a>
- </li>
- </ul>
- </span>
- </div>
- <hr/>
- <div class=fdomblock>
- <h3>Failover Domain Membership: </h3>
- <span tal:condition="python:len(nodeinfo['fdoms']) == 0">
- <h4><i>This node has no failover domain membership</i></h4>
- </span>
- <span tal:condition="python:len(nodeinfo['fdoms']) > 0">
- <ul>
- <li style="list-style-image: url(small_fdom.png);" tal:repeat="fdom nodeinfo/fdoms">
- <a href="" tal:attributes="href fdom/fdomurl"><span tal:content="fdom/name"/></a>
- </li>
- </ul>
- </span>
- </div>
- <hr/>
- <h3>Fencing</h3>
- <div style="margin-left: 0%;">
- <h4>Main Fencing Method</h4>
- </div>
- <div style="margin-left: 50%;">
- <h4>Backup Fencing Method</h4>
- </div>
-</div>
-<div metal:define-macro="nodes-form">
- <table tal:define="
- global ricci_agent python:here.getRicciAgentForCluster(request);
- global status python:here.getClusterStatus(ricci_agent);
- global nds python:here.getNodesInfo(modelb,status,request)">
+ <div>
+ <h3>Services on this Node:</h3>
+ <ul class="cluster node">
+ <tal:block tal:condition="python:len(nodeinfo['currentservices']) == 0">
+ <li>No cluster services are currently running here</li>
+ </tal:block>
+ <li class="cluster node cluster_service" tal:repeat="svc nodeinfo/currentservices">
+ <a tal:attributes="href svc/svcurl">
+ <font color="green"><span tal:replace="svc/servicename"/></font>
+ </a>
+ </li>
+ </ul>
+ </div>
- <tr tal:repeat="nd nds" width="100%" style="border-bottom: blue 3px groove;">
- <td width="100%" style="border-bottom: #8cacbb 3px solid;">
- <table width="800px">
- <tr style="padding:10px;margin:10px;border-width:0px;">
- <td style="padding:10px;margin:10px;border-width:0px;">
- <span tal:condition="python:nd['status'] == '0'">
- <h1 style="border:0px;">Node Name: <a href="" tal:attributes="href nd/configurl">
- <font color="green"><span tal:content="nd/nodename"/></font></a>
- </h1>
- </span>
- <span tal:condition="python:nd['status'] == '1'">
- <h1 style="border:0px;">Node Name: <a href="" tal:attributes="href nd/configurl">
- <font color="red"><span tal:content="nd/nodename"/></font></a></h1>
- </span>
- <span tal:condition="python:nd['status'] == '2'">
- <h1 style="border:0px;">Node Name: <a href="" tal:attributes="href nd/configurl">
- <font color="gray"><span tal:content="nd/nodename"/></font></a>
- </h1>
- </span>
- </td>
- <span tal:condition="python:nd['status'] == '0'">
- <td style="margin:10px">
- <form method="post" onSubmit="return dropdown(this.gourl)">
- <select name="gourl">
- <option value="">Choose a Task...</option>
- <option value="" tal:attributes="value nd/jl_url">Have node leave cluster</option>
- <option value="">----------</option>
- <option value="" tal:attributes="value nd/fence_it_url">Fence this node</option>
- <option value="" tal:attributes="value nd/reboot_url">Reboot this node</option>
- <option value="">----------</option>
- <option value="" tal:attributes="value nd/delete_url">Delete</option>
- </select>
- <input type="submit" value="Go"/>
- </form>
- </td>
- </span>
- <span tal:condition="python:nd['status'] == '1'">
- <td style="margin:10px">
- <form method="post" onSubmit="return dropdown(this.gourl)">
- <select name="gourl">
- <option value="">Choose a Task...</option>
- <option value="" tal:attributes="value nd/jl_url">Have node join cluster</option>
- <option value="">----------</option>
- <option value="" tal:attributes="value nd/fence_it_url">Fence this node</option>
- <option value="" tal:attributes="value nd/reboot_url">Reboot this node</option>
- <option value="">----------</option>
- <option value="" tal:attributes="value nd/delete_url">Delete</option>
- </select>
- <input type="submit" value="Go"/>
- </form>
- </td>
- </span>
- <td style="width:30%; text-align:right;">
- <h3><a href="" tal:attributes="href nd/fenceurl">Manage Fencing for this Node</a></h3>
- </td>
- </tr>
-
- <tr style="padding:10px;margin:10px"><td style="padding:10px;margin:10px">
- <h2 style="border:0px;">Status: <i><span tal:content="nd/status_str"/></i></h2>
- </td></tr>
-
- <tr style="padding:10px;margin:10px">
- <td style="padding:10px;margin:10px">
- <h2 style="border:0px;">Services on this Node:</h2>
- <span tal:condition="python:len(nd['currentservices']) == 0">
- <h3><i>No cluster services are currently running here</i></h3>
- </span>
- <span tal:condition="python:len(nd['currentservices']) > 0">
- <ul>
- <li style="list-style-image: url(small_svc.png);" tal:repeat="svc nd/currentservices">
- <a href="" tal:attributes="href svc/svcurl"><font color="green"><span tal:replace="svc/servicename"/></font></a>
- </li>
- </ul>
- </span>
- </td>
- <td style="width:30%;text-align:right">
- <h3>Failover Domain Membership: </h3>
- <span tal:condition="python:len(nd['fdoms']) == 0">
- <h4><i>This node has no failover domain membership</i></h4>
- </span>
- <span tal:condition="python:len(nd['fdoms']) > 0">
- <ul>
- <li style="list-style-image: url(small_fdom.png);" tal:repeat="fdom nd/fdoms">
- <a href="" tal:attributes="href fdom/fdomurl"><span tal:content="fdom/name"/></a>
- </li>
- </ul>
- </span>
- </td>
- </tr>
- <tr><td><a href="" tal:attributes="href nd/logurl" onClick="return popup_log(this, 'notes')">Show recent log activity for this node</a></td></tr>
- </table>
+ <hr/>
+
+ <div class="fdomblock">
+ <h3>Failover Domain Membership</h3>
+ <ul class="cluster node">
+ <tal:block tal:condition="python:len(nodeinfo['fdoms']) == 0">
+ <li>This node has no failover domain membership</li>
+ </tal:block>
+ <li class="cluster node node_fdom" tal:repeat="fdom nodeinfo/fdoms">
+ <a class="cluster node" tal:attributes="href fdom/fdomurl">
+ <span tal:replace="fdom/name"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+
+ <hr/>
+
+ <h3>Fencing</h3>
+ <table class="cluster node" width="100%">
+ <tr class="cluster node info_top">
+ <td class="cluster node fence_main">
+ <strong class="cluster node">Main Fencing Method</strong>
+ </td>
+ <td class="cluster node fence_backup">
+ <strong class="cluster node">Backup Fencing Method</strong>
</td>
</tr>
</table>
- </div>
+</div>
+
+<div metal:define-macro="nodes-form">
+<div id="node_list" tal:define="
+ global ricci_agent python:here.getRicciAgentForCluster(request);
+ global status python:here.getClusterStatus(ricci_agent);
+ global nds python:here.getNodesInfo(modelb,status,request)">
+
+ <div tal:repeat="nd nds">
+ <tal:block
+ tal:define="global node_class python: 'cluster node ' + ((nd['status'] == '0' and 'node_active' or (nd['status'] == '1' and 'node_inactive' or 'node_unknown')))" />
+ <table class="cluster" width="100%">
+ <tr class="node info_top">
+ <td class="node node_name">
+ <strong>Node Name:</strong>
+ <a tal:content="nd/nodename"
+ tal:attributes="
+ href nd/configurl;
+ class python: node_class"
+ />
+ </td>
+
+ <td class="node node_action" tal:condition="python: nd['status'] == '0' or nd['status'] == '1'">
+ <form method="post" onSubmit="return dropdown(this.gourl)">
+ <select class="node" name="gourl">
+ <option value="">Choose a Task...</option>
+ <option tal:attributes="value nd/jl_url">
+ <span tal:condition="python: nd['status'] == '0'" tal:replace="string: Have node leave cluster" />
+ <span tal:condition="python: nd['status'] == '1'" tal:replace="string: Have node join cluster" />
+ </option>
+ <option value="">----------</option>
+ <option tal:attributes="value nd/fence_it_url">Fence this node</option>
+ <option tal:attributes="value nd/reboot_url">Reboot this node</option>
+ <option value="">----------</option>
+ <option tal:attributes="value nd/delete_url">Delete</option>
+ </select>
+ <input type="submit" value="Go"/>
+ </form>
+ </td>
+ </tr>
+
+ <tr class="node info_middle">
+ <td class="node_status" colspan="2">
+ <strong class="cluster node">Status:</strong>
+ <span tal:replace="nd/status_str"/>
+ </td>
+ </tr>
+
+ <tr class="node info_bottom">
+ <td class="node node_services">
+ <strong class="cluster node">Services on this Node:</strong>
+ <ul class="cluster node">
+ <li tal:condition="python:len(nd['currentservices']) == 0">
+ No cluster services are currently running here
+ </li>
+ <li class="cluster_service cluster node"
+ tal:repeat="svc nd/currentservices">
+ <a class="cluster running"
+ tal:content="svc/servicename"
+ tal:attributes="href svc/svcurl" />
+ </li>
+ </ul>
+ </td>
+
+ <td class="node node_fdom">
+ <strong class="cluster node">Failover Domain Membership:</strong>
+ <ul class="cluster node">
+ <li tal:condition="python: len(nd['fdoms']) == 0">
+ This node has no failover domain membership
+ </li>
+ <li class="node_fdom" tal:repeat="fdom nd/fdoms">
+ <a class="cluster node"
+ tal:content="fdom/name"
+ tal:attributes="href fdom/fdomurl" />
+ </li>
+ </ul>
+ </td>
+ </tr>
+
+ <tr class="node info_bottom">
+ <td class="node node_fencing">
+ <a class="cluster node"
+ tal:attributes="href nd/fenceurl">
+ Manage Fencing for this Node
+ </a>
+ </td>
+ <td class="node node_logs">
+ <a class="cluster node"
+ onClick="return popup_log(this, 'notes')"
+ tal:attributes="href nd/logurl">
+ Show recent log activity for this node
+ </a>
+ </td>
+ </tr>
+ </table>
+ <hr/>
+ </div>
+</div>
+</div>
<div metal:define-macro="nodelist-form">
<h2>Node List Form</h2>
@@ -925,10 +903,10 @@
</div>
<div metal:define-macro="nodelogs-form">
- <h2>Recent Log Activity for <span tal:content="request/nodename"/></h2>
+ <h2>Recent Log Activity for <span tal:replace="request/nodename"/></h2>
---------------------------------------------------------------------------------------
<br/>
- <span tal:content="python:here.getLogsForNode(request)"/>
+ <span tal:replace="python:here.getLogsForNode(request)"/>
</div>
<div metal:define-macro="nodeadd-form">
@@ -946,7 +924,7 @@
<input name="numStorage" type="hidden" value="1" />
<input name="pagetype" type="hidden" value="15" />
- <h2>Add a Node to a Cluster</h2>
+ <h2>Add a node to <span tal:replace="request/form/clusterName | request/clustername | string: the cluster" /></h2>
<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
<thead class="systemsTable">
@@ -1005,55 +983,62 @@
</div>
<div metal:define-macro="servicelist-form">
- <table tal:define="
+ <tal:block tal:omit-tag=""
+ tal:define="
global ricci_agent python:here.getRicciAgentForCluster(request);
global svcstatus python:here.getClusterStatus(ricci_agent);
global svcinf python:here.getServicesInfo(svcstatus,modelb,request);
- global svcs svcinf/services">
+ global svcs svcinf/services" />
- <tr width="100%" style="border-bottom: blue 3px groove;" tal:repeat="svc svcs">
- <td width="100%" style="border-bottom: #8cacbb 3px solid;">
- <table width="800px">
- <tr style="padding:10px;margin:10px;border-width:0px;">
- <td style="padding:10px;margin:10px;border-width:0px;">
- <h1 style="border:0px;">Service Name: <span tal:replace="svc/name"/></h1>
- </td>
-
- <td style="margin:10px">
- <form method="post" onSubmit="return dropdown(this.gourl)">
- <select name="gourl">
- <option value="">Choose a Task...</option>
- <option value="" tal:attributes="value svc/cfgurl">Configure</option>
- <option value="">----------</option>
- <option value="">Delete</option>
- </select>
- <input type="submit" value="Go"/>
- </form>
- </td>
-
- <td style="width:30%; text-align:right;"
- tal:define="autostart svc/autostart |nothing">
- <h2 tal:condition="autostart" style="border:0px;">Autostart is enabled for this service</h2>
- <h2 tal:condition="not: autostart" style="border:0px;">Autostart is not enabled for this service</h2>
- </td>
- </tr>
+ <tal:block tal:repeat="svc svcs">
+ <table class="cluster service" width="100%"
+ tal:define="
+ running svc/running | nothing;
+ autostart svc/autostart |nothing">
+
+ <tr class="cluster service info_top">
+ <td class="cluster service service_name">
+ <strong class="cluster service">Service Name:</strong> <span tal:replace="svc/name"/>
+ </td>
- <tr style="padding:10px;margin:10px" tal:define="running svc/running |nothing">
- <td tal:condition="running" style="padding:10px;margin:10px">
- <h2 style="border:0px;">Status: <i><font color="green">Running on <span tal:content="svc/nodename"/></font></i></h2>
- </td>
+ <td class="cluster service service_action">
+ <form method="post" onSubmit="return dropdown(this.gourl)">
+ <select name="gourl">
+ <option value="">Choose a Task...</option>
+ <option value="" tal:attributes="value svc/cfgurl">Configure</option>
+ <option value="">----------</option>
+ <option value="">Delete</option>
+ </select>
+ <input type="submit" value="Go"/>
+ </form>
+ </td>
+ </tr>
- <td tal:condition="not: running" style="padding:10px;margin:10px">
- <h2 style="border:0px;">Status: <i><font color="red">This service is stopped</font></i></h2>
- </td>
+ <tr class="cluster service info_middle">
+ <td class="cluster service service_nodename">
+ <div class="cluster service service_status">
+ <strong class="cluster service service_name">Status:</strong>
+ <tal:block tal:condition="running">
+ <span class="running">
+ Running on <tal:block tal:replace="svc/nodename"/>
+ </span>
+ </tal:block>
+ <tal:block tal:condition="not: running">
+ <span class="stopped" tal:content="string:This service is stopped"/>
+ </tal:block>
+ </div>
+ <p>Autostart is <span tal:condition="not: autostart" tal:replace="string: not" /> enabled for this service</p>
+ </td>
+ </tr>
- <td tal:condition="running" style="width:30%;text-align:right">
- <h2 style="border:0px;">Failover Domain Association: <span tal:replace="svc/faildom"/></h2>
- </td>
- </tr>
- </table>
- </tr>
- </table>
+ <tr class="cluster service info_bottom">
+ <td class="cluster service service_fdom" tal:condition="running" colspan="2">
+ <strong class="cluster service">Failover Domain Association:</strong> <span tal:replace="svc/faildom"/>
+ </td>
+ </tr>
+ </table>
+ <hr/>
+ </tal:block>
</div>
<div metal:define-macro="serviceadd-form">
@@ -1080,92 +1065,94 @@
</div>
<div metal:define-macro="serviceconfig-form">
- <tal:block tal:define="
- global ricci_agent python:here.getRicciAgentForCluster(request);
- global sstat python:here.getClusterStatus(ricci_agent);
- global sinfo python:here.getServiceInfo(sstat, modelb,request);
- global running sinfo/running | nothing;" />
- <table width="800px">
- <tr style="padding:10px;margin:10px;border-width:0px;">
- <td style="padding:10px;margin:10px;border-width:0px;">
- <h1 style="border:0px;">Service Name: <span tal:content="sinfo/name"/></h1>
- </td>
- <td style="margin:10px">
- <form method="post" onSubmit="return dropdown(this.gourl)">
- <select name="gourl"
- tal:define="global innermap sinfo/innermap;
- starturls innermap/links">
- <tal:block tal:condition="running">
- <option value=""><span tal:replace="innermap/current"/></option>
- <option value="" tal:attributes="value innermap/restarturl">Restart this service</option>
- <option value="">----------</option>
- <option value="" tal:attributes="value innermap/disableurl">Disable this service</option>
- <option value="">----------</option>
- <option tal:repeat="starturl innermap/links" value="" tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename"/></option>
- <option value="">----------</option>
- <option value="">Delete this service</option>
- </tal:block>
-
- <tal:block tal:condition="not: running">
- <option value=""><span tal:replace="innermap/current"/></option>
- <option value="">----------</option>
- <option value="" tal:attributes="value innermap/enableurl">Enable this service</option>
- <option value="">----------</option>
- </tal:block>
+ <tal:block tal:define="
+ global ricci_agent python:here.getRicciAgentForCluster(request);
+ global sstat python:here.getClusterStatus(ricci_agent);
+ global sinfo python:here.getServiceInfo(sstat, modelb,request);
+ global running sinfo/running | nothing;" />
+
+ <table class="cluster service" width="100%">
+ <tr class="cluster service info_top">
+ <td class="cluster service service_name">
+ <strong class="service_name">Service Name:</strong> <span tal:replace="sinfo/name"/>
+ </td>
+ <td class="cluster service service_action">
+ <form method="post" onSubmit="return dropdown(this.gourl)">
+ <select name="gourl"
+ tal:define="global innermap sinfo/innermap;
+ starturls innermap/links">
- <option value="" tal:repeat="starturl starturls" tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename"/></option>
- <option value="">----------</option>
- <option value="">Delete This service</option>
- </select>
- <input type="submit" value="Go"/>
- </form>
+ <option value="">Choose a Task...</option>
+ <tal:block tal:condition="running">
+ <option value="">----------</option>
+ <option value="" tal:attributes="value innermap/restarturl">Restart this service</option>
+ <option value="" tal:attributes="value innermap/disableurl">Disable this service</option>
+ <option value="">----------</option>
+ <option tal:repeat="starturl innermap/links" value="" tal:attributes="value starturl/url">Start this service on <span tal:replace="starturl/nodename"/></option>
+ <option value="">----------</option>
+ <option value="">Delete this service</option>
+ </tal:block>
+
+ <tal:block tal:condition="not: running">
+ <option value="">----------</option>
+ <option value="" tal:attributes="value innermap/enableurl">Enable this service</option>
+ <option value="">----------</option>
+ </tal:block>
+ </select>
+ <input type="submit" value="Go"/>
+ </form>
</td>
</tr>
- <tr style="padding:10px;margin:10px;border-width:0px;"><td style="width:30%;text-align:center">
- <h1 tal:condition="not: running" style="border:0px;">Service Status: <font color="red"><i>Stopped</i></font></h1>
- <h1 tal:condition="running" style="border:0px;">Service Status: <font color="green"><i>Running</i></font></h1>
- </td></tr>
- </table>
- <h2> Service Composition</h2>
- <ul>
- <span tal:omit-tag="" tal:define="global svc_rcs sinfo/resource_list"/>
- <li tal:repeat="res svc_rcs">
- <ul>
- <div tal:define="global type res/type;
- global ref res/ref_object | nothing"/>
- <span omit-tag="" tal:condition="ref">
- <span tal:omit-tag="" tal:define="global shared string:true"/>
- </span>
- <div class="" tal:attributes="class python:'rc_indent' + str(res['indent_ctr'])">
- <span tal:omit-tag="" tal:condition="python:type == 'IP Address: '">
- <li metal:use-macro="here/resource-form-macros/macros/ip_macro"/>
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'fs'">
- <li metal:use-macro="here/resource-form-macros/macros/fs_macro"/>
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'gfs'">
- <li metal:use-macro="here/resource-form-macros/macros/gfs_macro"/>
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'nfsm'">
- <li metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'nfsx'">
- <li metal:use-macro="here/resource-form-macros/macros/nfsx_macro"/>
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'nfsc'">
- <li metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'smb'">
- <li metal:use-macro="here/resource-form-macros/macros/smb_macro" />
- </span>
- <span tal:omit-tag="" tal:condition="python:type == 'Script: '">
- <li metal:use-macro="here/resource-form-macros/macros/scr_macro" />
- </span>
- </div>
- </ul>
- </li>
- </ul>
+ <tr class="cluster service info_middle">
+ <td class="cluster service service_status">
+ <strong>Service Status:</strong>
+ <span tal:content="python: running and 'Running' or 'Stopped'"
+ tal:attributes="class python: running and 'running' or 'stopped'" />
+ </td>
+ </tr>
+ </table>
+ <br/>
+ <h2>Service Composition</h2>
+ <ul tal:define="global svc_rcs sinfo/resource_list">
+ <li tal:repeat="res svc_rcs">
+ <ul tal:define="
+ global type res/type;
+ global ref res/ref_object | nothing">
+
+ <tal:block omit-tag="" tal:condition="ref">
+ <span tal:omit-tag="" tal:define="global shared string:true"/>
+ </tal:block>
+
+ <div class="" tal:attributes="class python:'rc_indent' + str(res['indent_ctr'])">
+ <span tal:omit-tag="" tal:condition="python:type == 'IP Address: '">
+ <li metal:use-macro="here/resource-form-macros/macros/ip_macro"/>
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'fs'">
+ <li metal:use-macro="here/resource-form-macros/macros/fs_macro"/>
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'gfs'">
+ <li metal:use-macro="here/resource-form-macros/macros/gfs_macro"/>
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'nfsm'">
+ <li metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'nfsx'">
+ <li metal:use-macro="here/resource-form-macros/macros/nfsx_macro"/>
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'nfsc'">
+ <li metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'smb'">
+ <li metal:use-macro="here/resource-form-macros/macros/smb_macro" />
+ </span>
+ <span tal:omit-tag="" tal:condition="python:type == 'Script: '">
+ <li metal:use-macro="here/resource-form-macros/macros/scr_macro" />
+ </span>
+ </div>
+ </ul>
+ </li>
+ </ul>
</div>
<div metal:define-macro="service-form">
--- conga/luci/cluster/index_html 2006/08/16 17:24:45 1.10
+++ conga/luci/cluster/index_html 2006/08/28 23:04:59 1.11
@@ -175,12 +175,12 @@
Page body text
</metal:bodytext>
<span tal:omit-tag="" tal:define="global cname request/clustername |nothing"/>
- <span tal:omit-tag="" tal:condition="not: cname">
- <h1>Choose a cluster to administer</h1>
- </span>
+ <span tal:omit-tag="" tal:condition="python: not cname and (not ('pagetype' in request) or request['pagetype'] != '6')">
+ <h1>Choose a cluster to administer</h1>
+ </span>
<span tal:omit-tag="" tal:condition="cname">
- <h1 tal:content="string:${cname}"></h1>
- </span>
+ <h1 tal:content="string:${cname}"></h1>
+ </span>
<metal:main-form-content use-macro="here/form-chooser/macros/main-form">
More information about the Cluster-devel
mailing list