From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster form-macros
Date: 2 Aug 2006 17:27:18 -0000 [thread overview]
Message-ID: <20060802172718.27974.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-08-02 17:27:18
Modified files:
luci/cluster : form-macros
Log message:
i hate to commit this, because it's bound to cause rejects for somebody, but i had to reformat the file in order to be able to read and work with it
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.15&r2=1.16
--- conga/luci/cluster/form-macros 2006/08/01 15:43:19 1.15
+++ conga/luci/cluster/form-macros 2006/08/02 17:27:18 1.16
@@ -1,91 +1,126 @@
<html>
- <head>
- <title tal:content="template/title">The title</title>
- </head>
- <body>
-
- <div metal:define-macro="entry-form">
- <h2>Entry Form</h2>
- </div>
- <div metal:define-macro="busywaitpage">
- <table>
- <tr>
- <td>
- <h2>Please be patient - this cluster's configuration is being modified.</h2>
- </td>
- </tr>
- <tr>
- <td>
- <img src="100wait.gif"/>
- </td>
- </tr>
- <tr>
- <td>
- <h2><span tal:content="isBusy/flag_desc"/></h2>
- </td>
- </tr>
- </table>
-
- </div>
-
- <div metal:define-macro="clusters-form">
- <table>
- <tbody>
- <span tal:repeat="clu clusystems">
- <span tal:define="ragent python:here.getRicciAgent(clu)">
- <span tal:define="global stat python:here.getClusterStatus(ragent)"/>
- <span tal:define="global cstatus python:here.getClustersInfo(stat,request)"/>
- </span>
- <tr 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;">
- <span tal:condition="python:cstatus['running'] == 'true'">
- <td 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>
- </span>
- <span tal:condition="python:cstatus['running'] == 'false'">
- <td 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>
- </span>
- <td STYLE="margin:10px"><form METHOD=POST onSubmit="return dropdown(this.gourl)">
- <SELECT NAME="gourl">
- <span 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>
- </span>
- <span tal:condition="python:cstatus['running'] == 'false'">
- <OPTION VALUE="">This cluster is stopped...</OPTION>
- <OPTION VALUE=""><font color="green">Start this cluster</font></OPTION>
- <OPTION VALUE="">Restart this cluster</OPTION>
- </span>
- </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;">Status: <i><span tal:content="cstatus/status"/></i></h2></td>
- <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">
- <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>
-
- </span>
- </tbody>
- </table>
- </div>
-
- <div metal:define-macro="cluster-form">
- <h2>Cluster Form</h2>
- </div>
+<head>
+ <title tal:content="template/title">The title</title>
+</head>
+
+<body>
+
+<div metal:define-macro="entry-form">
+ <h2>Entry Form</h2>
+</div>
+
+<div metal:define-macro="busywaitpage">
+ <table>
+ <tr><td>
+ <h2>Please be patient - this cluster's configuration is being modified.</h2>
+ </td></tr>
+ <tr><td>
+ <img src="100wait.gif"/>
+ </td></tr>
+ <tr><td>
+ <h2><span tal:content="isBusy/desc" /></h2>
+ </td></tr>
+
+ <tr><td>
+ <h2><span tal:replace="isBusy/desc"/></h2>
+ </td></tr>
+ </table>
+</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="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;">Status: <i><span tal:content="cstatus/status"/></i></h2>
+ </td>
+
+ <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>
+ <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>Currently Hosting: </h3>
+ <ul>
+ <li tal:repeat="svc cstatus/currentservices">
+ <a href="" tal:attributes="href svc/svcurl"><span tal:content="svc/name"/></a>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<div metal:define-macro="cluster-form">
+ <h2>Cluster Form</h2>
+</div>
- <div metal:define-macro="clusteradd-form" style="margin-left: 1em">
+
+<div metal:define-macro="clusteradd-form" style="margin-left: 1em">
<script type="text/javascript" src="/luci/homebase/homebase_common.js">
</script>
<script type="text/javascript" src="/luci/homebase/validate_cluster_add.js">
@@ -231,323 +266,428 @@
<input type="button" class="hbSubmit" name="Submit" value="Submit" onClick="validateForm(document.adminform);" />
</div>
</form>
- </div>
- <div metal:define-macro="clusterconfig-form">
- <!-- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/> -->
- <span tal:define="global clusterinfo python:here.getClusterInfo(modelb, request)"/>
- <form name="basecluster" action="" method="get" tal:attributes="action clusterinfo/basecluster_url">
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
- <thead class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="1">
- <div class="systemsTableTop">
- <strong>General Properties</strong>
- </div>
- </td></tr>
- </thead>
- <tbody class="systemsTable">
- <tr class="systemsTable">
- <td class="systemsTable">Cluster Name</td>
- <td class="systemsTable">
- <input type="text" name="cluname" value="" tal:attributes="value clusterinfo/clustername"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable">Configuration Version</td>
- <td class="systemsTable">
- <input type="text" name="cfgver" size="5" value="" tal:attributes="value clusterinfo/config_version"/>
- </td>
- </tr>
- </tbody>
- <tfoot class="systemsTable">
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">
- <div class="systemsTableEnd">
- <input type="submit" value="Apply"/>
- </div>
- </td>
- </tr>
- </tfoot>
- </table>
- </form>
- <hr/>
- <form name="fencedaemon" action="" method="get" tal:attributes="action clusterinfo/fencedaemon_url">
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
- <thead class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="1">
- <div class="systemsTableTop">
- <strong>Fence Daemon Properties</strong>
- </div>
- </td></tr>
- </thead>
- <tbody class="systemsTable">
- <tr class="systemsTable">
- <td class="systemsTable">Post Fail Delay</td>
- <td class="systemsTable">
- <input type="text" name="post_fail_delay" value="" tal:attributes="value clusterinfo/pfd"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable">Post Join Delay</td>
- <td class="systemsTable">
- <input type="text" name="post_join_delay" value="" tal:attributes="value clusterinfo/pjd"/>
- </td>
- </tr>
- </tbody>
- <tfoot class="systemsTable">
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">
- <div class="systemsTableEnd">
- <input type="submit" value="Apply"/>
- </div>
- </td></tr>
- </tfoot>
- </table>
- </form>
- <hr/>
- <form name="multicast" action="" method="get" tal:attributes="action clusterinfo/multicast_url">
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
- <thead class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="1">
- <div class="systemsTableTop">
- <strong>Multicast Configuration</strong>
- </div>
- </td></tr>
- </thead>
- <tbody class="systemsTable">
- <tr class="systemsTable">
- <td class="systemsTable"><input type="radio" name="mcast" value="False" checked="" tal:attributes="checked python:clusterinfo['is_mcast'] == 'False'"/><b> Let cluster choose the multicast address</b>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable"><input type="radio" name="mcast" value="True"/> <b> I prefer to choose the multicast address</b>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2"><input type="text" name="mcast_address" value="" tal:attributes="value clusterinfo/mcast_addr"/>
- </td>
- </tr>
- </tbody>
- <tfoot class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="2">
- <div class="systemsTableEnd">
- <input type="submit" value="Apply"/>
- </div>
- </td></tr>
- </tfoot>
- </table>
- </form>
- <hr/>
- <form name="quorum_partition" action="" method="get" tal:attributes="action clusterinfo/quorumd_url">
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
- <thead class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="1">
- <div class="systemsTableTop">
- <strong>Quorum Partition Configuration</strong>
- </div>
- </td></tr>
- </thead>
- <tbody class="systemsTable">
- <tr class="systemsTable">
- <td class="systemsTable"><input type="radio" name="quorumd" value="False" checked="" tal:attributes="checked python:clusterinfo['is_quorumd'] == 'False'"/><b> Do not use a Quorum Partition</b>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable"><input type="radio" name="quorumd" value="True"/> <b> I prefer to use a Quorum Partition</b>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">Interval: <input type="text" name="interval" value="" tal:attributes="value clusterinfo/interval"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">Votes: <input type="text" name="votes" value="" tal:attributes="value clusterinfo/votes"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">TKO: <input type="text" name="tko" value="" tal:attributes="value clusterinfo/tko"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">Minimum Score: <input type="text" name="min_score" value="" tal:attributes="value clusterinfo/min_score"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">Device: <input type="text" name="device" value="" tal:attributes="value clusterinfo/device"/>
- </td>
- </tr>
- <tr class="systemsTable">
- <td class="systemsTable" colspan="2">Label: <input type="text" name="label" value="" tal:attributes="value clusterinfo/label"/>
- </td>
- </tr>
- </tbody>
- </table>
- <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
- <thead class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="1">
- <div class="systemsTableTop">
- <strong>Heuristics</strong>
- </div>
- </td></tr>
- <tr class="systemsTable">
- <th class="systemsTable">
- <div class="systemsTableTop">
- Name
- </div>
- </th>
- <th class="systemsTable">
- <div class="systemsTableTop">
- Path to Program
- </div>
- </th>
- <th class="systemsTable">
- <div class="systemsTableTop">
- Interval
- </div>
- </th>
- <th class="systemsTable">
- <div class="systemsTableTop">
- Score
- </div>
- </th>
- </tr>
- </thead>
-
- <tbody class="systemsTable">
- <span tal:define="global heuristics clusterinfo/hlist"/>
- <span tal:repeat="heuristic heuristics">
- <tr class="systemsTable">
- <td class="systemsTable"><input type="text" name="hname" value="" tal:attributes="value heuristic/hname"/>
- </td>
- <td class="systemsTable"><input type="text" name="hinterval" value="" tal:attributes="value heuristic/hinterval"/>
- </td>
- <td class="systemsTable" colspan="2"><input type="text" name="hprog" value="" tal:attributes="value heuristic/hprog"/>
- </td>
- <td class="systemsTable"><input type="text" name="hscore" value="" tal:attributes="value heuristic/hscore"/>
- </td>
- </tr>
- </span>
- </tbody>
- <tfoot class="systemsTable">
- <tr class="systemsTable"><td class="systemsTable" colspan="2">
- <div class="systemsTableEnd">
- <input type="submit" value="Apply"/>
- </div>
- </td></tr>
- </tfoot>
- </table>
- </form>
- </div>
- <div metal:define-macro="clusterprocess-form">
- <span tal:define="global r_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="res python:here.processClusterProps(r_agent, request)"/>
- </div>
- <div metal:define-macro="node-form">
- <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>
- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="global status python:here.getClusterStatus(ricci_agent)"/>
- <span tal:define="global nds python:here.getNodesInfo(modelb,status,request)"/>
- <span tal:repeat="nd nds">
- <tr 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;"><h1 STYLE="border:0px;">Node Name: <span tal:content="nd/nodename"/></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 nd/configurl">Configure</OPTION>
- <OPTION VALUE="">Have node leave cluster</OPTION>
- <OPTION VALUE="">Stop all cluster services</OPTION>
- <OPTION VALUE="">----------</OPTION>
- <OPTION VALUE="">Fence this node</OPTION>
- <OPTION VALUE="">Reboot this node</OPTION>
- <OPTION VALUE="">----------</OPTION>
- <OPTION VALUE="">Delete</OPTION>
- </SELECT>
- <INPUT TYPE=SUBMIT VALUE="Go"/>
- </FORM>
- </td>
- <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"/></i></h2></td></tr>
- <tr STYLE="padding:10px;margin:10px"><td STYLE="padding:10px;margin:10px"><h2 STYLE="border:0px;">Currently Hosting:</h2> <ul><span tal:repeat="svc nd/currentservices"><li><a href="" tal:attributes="href svc/svcurl"><span tal:content="svc/servicename"/></a></li></span></ul></td>
- <td STYLE="width:30%;text-align:right"><h3>Failover Domain Membership: </h3><ul><span tal:repeat="fdom nd/fdoms"><li><a href="" tal:attributes="href fdom/fdomurl"><span tal:content="fdom/name"/></a></li></span></ul></td>
- </tr>
- </table>
- </tr>
-
- </span>
- </table>
- </div>
- <div metal:define-macro="nodelist-form">
- <h2>Node List Form</h2>
- </div>
- <div metal:define-macro="nodegrid-form">
- <h2>Node Grid Form</h2>
- </div>
- <div metal:define-macro="nodeconfig-form">
- <h2>Node Configuration Form</h2>
- </div>
+</div>
+
+<div metal:define-macro="clusterconfig-form">
+ <tal:comment tal:replace="nothing">
+ <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
+ </tal:comment>
+
+ <form name="basecluster" action="" method="get"
+ tal:attributes="action clusterinfo/basecluster_url"
+ tal:define="global clusterinfo python:here.getClusterInfo(modelb, request)">
+
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>General Properties</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">Cluster Name</td>
+ <td class="systemsTable">
+ <input type="text" name="cluname" value="" tal:attributes="value clusterinfo/clustername"/>
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">Configuration Version</td>
+ <td class="systemsTable">
+ <input type="text" name="cfgver" size="5" value="" tal:attributes="value clusterinfo/config_version"/>
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="submit" value="Apply"/>
+ </div>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+
+ </form>
+ <hr/>
+
+ <form name="fencedaemon" action="" method="get" tal:attributes="action clusterinfo/fencedaemon_url">
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Fence Daemon Properties</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">Post Fail Delay</td>
+ <td class="systemsTable">
+ <input type="text" name="post_fail_delay" value="" tal:attributes="value clusterinfo/pfd"/>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable">Post Join Delay</td>
+ <td class="systemsTable">
+ <input type="text" name="post_join_delay" value="" tal:attributes="value clusterinfo/pjd"/>
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="submit" value="Apply"/>
+ </div>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+
+ </form>
+ <hr/>
+
+ <form name="multicast" action="" method="get" tal:attributes="action clusterinfo/multicast_url">
+
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Multicast Configuration</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable">
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <input type="radio" name="mcast" value="False" checked="" tal:attributes="checked python:clusterinfo['is_mcast'] == 'False'"/><strong>Let cluster choose the multicast address</strong>
+ </td>
+ </tr>
+ <tr class="systemsTable">
+ <td class="systemsTable">
+ <input type="radio" name="mcast" value="True"/><strong>I prefer to choose the multicast address</strong>
+ </td>
+ </tr>
+
+ <tr class="systemsTable">
+ <td class="systemsTable" colspan="2">
+ <input type="text" name="mcast_address" value="" tal:attributes="value clusterinfo/mcast_addr"/>
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="submit" value="Apply"/>
+ </div>
+ </td></tr>
+ </tfoot>
+ </table>
+
+ </form>
+ <hr/>
+
+ <form name="quorum_partition" action="" method="get" tal:attributes="action clusterinfo/quorumd_url">
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Quorum Partition Configuration</strong>
+ </div>
+ </td></tr>
+ </thead>
+
+ <tbody class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable">
+ <input type="radio" name="quorumd" value="False" checked="" tal:attributes="checked python:clusterinfo['is_quorumd'] == 'False'"/>
+ <strong>Do not use a Quorum Partition</strong>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable">
+ <input type="radio" name="quorumd" value="True"/>
+ <strong>I prefer to use a Quorum Partition</strong>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ Interval: <input type="text" name="interval" value="" tal:attributes="value clusterinfo/interval"/>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ Votes: <input type="text" name="votes" value="" tal:attributes="value clusterinfo/votes"/>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ TKO: <input type="text" name="tko" value="" tal:attributes="value clusterinfo/tko"/>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ Minimum Score: <input type="text" name="min_score" value="" tal:attributes="value clusterinfo/min_score"/>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ Device: <input type="text" name="device" value="" tal:attributes="value clusterinfo/device"/>
+ </td></tr>
+
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ Label: <input type="text" name="label" value="" tal:attributes="value clusterinfo/label"/>
+ </td></tr>
+ </tbody>
+ </table>
+
+ <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
+ <thead class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="1">
+ <div class="systemsTableTop">
+ <strong>Heuristics</strong>
+ </div>
+ </td></tr>
+
+ <tr class="systemsTable">
+ <th class="systemsTable">
+ <div class="systemsTableTop">Name</div>
+ </th>
+ <th class="systemsTable">
+ <div class="systemsTableTop">Path to Program</div>
+ </th>
+ <th class="systemsTable">
+ <div class="systemsTableTop">Interval</div>
+ </th>
+ <th class="systemsTable">
+ <div class="systemsTableTop">Score</div>
+ </th>
+ </tr>
+ </thead>
+
+ <tbody class="systemsTable"
+ tal:define="global heuristics clusterinfo/hlist">
+
+ <tr class="systemsTable" tal:repeat="heuristic heuristics">
+ <td class="systemsTable">
+ <input type="text" name="hname" value="" tal:attributes="value heuristic/hname"/>
+ </td>
+ <td class="systemsTable">
+ <input type="text" name="hinterval" value="" tal:attributes="value heuristic/hinterval"/>
+ </td>
+ <td class="systemsTable" colspan="2">
+ <input type="text" name="hprog" value="" tal:attributes="value heuristic/hprog"/>
+ </td>
+ <td class="systemsTable">
+ <input type="text" name="hscore" value="" tal:attributes="value heuristic/hscore"/>
+ </td>
+ </tr>
+ </tbody>
+
+ <tfoot class="systemsTable">
+ <tr class="systemsTable"><td class="systemsTable" colspan="2">
+ <div class="systemsTableEnd">
+ <input type="submit" value="Apply"/>
+ </div>
+ </td></tr>
+ </tfoot>
+ </table>
+ </form>
+</div>
+
+<div metal:define-macro="clusterprocess-form">
+ <span tal:define="global r_agent python:here.getRicciAgentForCluster(request)"/>
+ <span tal:define="res python:here.processClusterProps(r_agent, request)"/>
+</div>
+
+<div metal:define-macro="node-form">
+ <tal:comment tal:replace="nothing">
+ First table row is status icon, name, and dropdown
+ Second row is daemon macro and failoverdom membership
+ Third row is fencing macro
+ Fourth row is logging
+ </tal:comment>
+
+ <table tal:define="
+ global ricci_agent python:here.getRicciAgentForCluster(request);
+ global nodestatus python:here.getClusterStatus(ricci_agent);
+ global nodeinfo python:here.getNodeInfo(modelb, nodestatus, request)">
+
+ <tr tal:condition="python:nodeinfo['nodestate'] == '0'">
+ <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>
+
+ <tr tal:condition="python:nodeinfo['nodestate'] == '1'">
+ <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>
+
+ <tr tal:condition="python:nodeinfo['nodestate'] == '2'">
+ <td>
+ <img src="node_unknown.png"/>
+ </td>
+
+ <td>
+ <h2 style="border:0px;">Node name: <span tal:replace="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>
+
+ <tr><td>
+ <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>
+ </td></tr>
+ </table>
+</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)">
+
+ <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;">
+ <h1 style="border:0px;">Node Name: <span tal:content="nd/nodename"/></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 nd/configurl">Configure</option>
+ <option value="">Have node leave cluster</option>
+ <option value="">Stop all cluster services</option>
+ <option value="">----------</option>
+ <option value="">Fence this node</option>
+ <option value="">Reboot this node</option>
+ <option value="">----------</option>
+ <option value="">Delete</option>
+ </select>
+ <input type="submit" value="Go"/>
+ </form>
+ </td>
+ <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"/></i></h2>
+ </td></tr>
+
+ <tr style="padding:10px;margin:10px">
+ <td style="padding:10px;margin:10px">
+ <h2 style="border:0px;">Currently Hosting:</h2>
+ <ul>
+ <li tal:repeat="svc nd/currentservices">
+ <a href="" tal:attributes="href svc/svcurl"><span tal:replace="svc/servicename"/></a>
+ </li>
+ </ul>
+ </td>
+ <td style="width:30%;text-align:right">
+ <h3>Failover Domain Membership: </h3>
+ <ul>
+ <li tal:repeat="fdom nd/fdoms">
+ <a href="" tal:attributes="href fdom/fdomurl"><span tal:content="fdom/name"/></a>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+<div metal:define-macro="nodelist-form">
+ <h2>Node List Form</h2>
+ </div>
+
+<div metal:define-macro="nodegrid-form">
+ <h2>Node Grid Form</h2>
+</div>
+
+<div metal:define-macro="nodeconfig-form">
+ <h2>Node Configuration Form</h2>
+</div>
- <div metal:define-macro="nodeadd-form">
+<div metal:define-macro="nodeadd-form">
<script type="text/javascript" src="/luci/homebase/homebase_common.js">
</script>
@@ -609,197 +749,224 @@
<input type="button" class="hbSubmit" name="Submit" value="Submit" onClick="validateForm(document.adminform);" />
</div>
</form>
- </div>
+</div>
+
+<div metal:define-macro="nodeprocess-form">
+ <h2>Node Process Form</h2>
+</div>
+
+<div metal:define-macro="services-form">
+ <h2>Services Form</h2>
+</div>
+
+<div metal:define-macro="servicelist-form">
+ <table 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">
+
+ <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>
+
+ <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 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>
+
+ <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>
+</div>
+
+<div metal:define-macro="serviceadd-form">
+ <h2>Service Add Form</h2>
+</div>
+
+<div metal:define-macro="servicestart">
+ <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
+ <span tal:define="result python:here.serviceStart(ricci_agent, request)"/>
+ <!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
+</div>
+
+
+<div metal:define-macro="servicerestart">
+ <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
+ <span tal:define="result python:here.serviceRestart(ricci_agent, request)"/>
+ <!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
+</div>
+
+<div metal:define-macro="servicestop">
+ <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
+ <span tal:define="result python:here.serviceStop(ricci_agent,request)"/>
+ <!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
+</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>
+
+ <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>
+ </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>
+</div>
+
+<div metal:define-macro="service-form">
+ <h2>Service Form</h2>
+</div>
+
+<div metal:define-macro="serviceprocess-form">
+ <h2>Service Process Form</h2>
+</div>
+
+<div metal:define-macro="resources-form">
+ <h2>Resources Form</h2>
+</div>
+
+<div metal:define-macro="resourcelist-form">
+ <h2>Resource List Form</h2>
+</div>
+
+<div metal:define-macro="resourceadd-form">
+ <h2>Resource Add Form</h2>
+</div>
+
+<div metal:define-macro="resourceconfig-form">
+ <h2>Resource Configuration Form</h2>
+</div>
+
+<div metal:define-macro="resource-form">
+ <h2>Resource Form</h2>
+</div>
+
+<div metal:define-macro="resourceprocess-form">
+ <h2>Resource Process Form</h2>
+</div>
+
+<div metal:define-macro="fdoms-form">
+ <h2>Failover Domains Form</h2>
+</div>
+
+<div metal:define-macro="fdomlist-form">
+ <h2>Failover Domains List Form</h2>
+</div>
+
+<div metal:define-macro="fdomadd-form">
+ <h2>Failover Domain Add Form</h2>
+</div>
+
+<div metal:define-macro="fdomconfig-form">
+ <h2>Failover Domain Configuration Form</h2>
+</div>
+
+<div metal:define-macro="fdom-form">
+ <h2>Failover Domain Form</h2>
+</div>
+
+<div metal:define-macro="fdomprocess-form">
+ <h2>Failover Domain Process Form</h2>
+</div>
+
+<div metal:define-macro="fencedevs-form">
+ <h2>Fence Devices Form</h2>
+</div>
+
+<div metal:define-macro="fencedevlist-form">
+ <h2>Fence Device List Form</h2>
+</div>
+
+<div metal:define-macro="fencedevadd-form">
+ <h2>Fence Device Add Form</h2>
+</div>
+
+<div metal:define-macro="fencedevconfig-form">
+ <h2>Fence Device Configuration Form</h2>
+</div>
+
+<div metal:define-macro="fencedev-form">
+ <h2>Fence Device Form</h2>
+</div>
+
+<div metal:define-macro="fencedevprocess-form">
+ <h2>Fence Device Process Form</h2>
+</div>
+
- <div metal:define-macro="nodeprocess-form">
- <h2>Node Process Form</h2>
- </div>
- <div metal:define-macro="services-form">
- <h2>Services Form</h2>
- </div>
- <div metal:define-macro="servicelist-form">
- <table>
- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="global svcstatus python:here.getClusterStatus(ricci_agent)"/>
- <span tal:define="global svcinf python:here.getServicesInfo(svcstatus,modelb,request)"/>
- <span tal:define="global svcs svcinf/services"/>
- <span tal:repeat="svc svcs">
- <tr 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;"><h1 STYLE="border:0px;">Service Name: <span tal:content="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>
- <span tal:define="autostart svc/autostart |nothing">
- <span tal:condition="autostart">
- <td STYLE="width:30%; text-align:right;"><h2 STYLE="border:0px;">Autostart is enabled for this service</h2></td>
- </span>
- <span tal:condition="not: autostart">
- <td STYLE="width:30%; text-align:right;"><h2 STYLE="border:0px;">Autostart is enabled for this service</h2></td>
- </span>
- </span>
- </tr>
- <span tal:define="running svc/running |nothing">
- <span tal:condition="running">
- <tr STYLE="padding:10px;margin:10px">
- <td 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 STYLE="width:30%;text-align:right"><h2 STYLE="border:0px;">Failover Domain Association: <span tal:content="svc/faildom"/></h2></td>
- </tr>
- </span>
- <span tal:condition="not: running">
- <tr STYLE="padding:10px;margin:10px">
- <td STYLE="padding:10px;margin:10px"><h2 STYLE="border:0px;">Status: <i><font color="red">This service is stopped</font></i></h2></td>
-
- <td STYLE="width:30%;text-align:center"><h2 STYLE="border:0px;">Failover Domain Association: <span tal:content="svc/faildom"/></h2></td>
- </tr>
- </span>
- </span>
-
- </table>
- </tr>
-
- </span>
- </table>
-
- </div>
- <div metal:define-macro="serviceadd-form">
- <h2>Service Add Form</h2>
- </div>
- <div metal:define-macro="servicestart">
- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="result python:here.serviceStart(ricci_agent, request)"/>
- <!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
- </div>
- <div metal:define-macro="servicerestart">
- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="result python:here.serviceRestart(ricci_agent, request)"/>
- <!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
- </div>
- <div metal:define-macro="servicestop">
- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="result python:here.serviceStop(ricci_agent,request)"/>
- <!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
- </div>
- <div metal:define-macro="serviceconfig-form">
- <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/>
- <span tal:define="global sstat python:here.getClusterStatus(ricci_agent)"/>
- <span tal:define="global sinfo python:here.getServiceInfo(sstat, modelb,request)">
- <span tal:define="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">
- <span tal:define="global innermap sinfo/innermap"/>
- <span tal:condition="running">
- <OPTION VALUE=""><span tal:content="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>
- <span tal:repeat="starturl innermap/links">
- <OPTION VALUE="" tal:attributes="VALUE starturl/url">Start this service on <span tal:content="starturl/nodename"/></OPTION>
- </span>
- <OPTION VALUE="">----------</OPTION>
- <OPTION VALUE="">Delete this service</OPTION>
- </span>
- <span tal:condition="not: running">
- <OPTION VALUE=""><span tal:content="innermap/current"/></OPTION>
- <OPTION VALUE="">----------</OPTION>
- <OPTION VALUE="" tal:attributes="VALUE innermap/enableurl">Enable this service</OPTION>
- <OPTION VALUE="">----------</OPTION>
- <span tal:define="starturls innermap/links">
- <span tal:repeat="starturl starturls">
- <OPTION VALUE="" tal:attributes="VALUE starturl/url">Start this service on <span tal:content="starturl/nodename"/></OPTION>
- </span>
- </span>
- <OPTION VALUE="">----------</OPTION>
- <OPTION VALUE="">Delete This service</OPTION>
- </span>
- </SELECT>
- <INPUT TYPE=SUBMIT VALUE="Go"/>
- </FORM>
- </td>
- </tr>
-
- <tr STYLE="padding:10px;margin:10px;border-width:0px;">
- <span tal:condition="running">
- <td STYLE="width:30%;text-align:center"><h1 STYLE="border:0px;">Service Status: <font color="green"><i>Running</i></font></h1></td>
- </span>
- <span tal:condition="not: running">
- <td STYLE="width:30%;text-align:center"><h1 STYLE="border:0px;">Service Status: <font color="red"><i>Stopped</i></font></h1></td>
- </span>
- </tr>
- </table>
- </span>
- </div>
- <div metal:define-macro="service-form">
- <h2>Service Form</h2>
- </div>
- <div metal:define-macro="serviceprocess-form">
- <h2>Service Process Form</h2>
- </div>
- <div metal:define-macro="resources-form">
- <h2>Resources Form</h2>
- </div>
- <div metal:define-macro="resourcelist-form">
- <h2>Resource List Form</h2>
- </div>
- <div metal:define-macro="resourceadd-form">
- <h2>Resource Add Form</h2>
- </div>
- <div metal:define-macro="resourceconfig-form">
- <h2>Resource Configuration Form</h2>
- </div>
- <div metal:define-macro="resource-form">
- <h2>Resource Form</h2>
- </div>
- <div metal:define-macro="resourceprocess-form">
- <h2>Resource Process Form</h2>
- </div>
- <div metal:define-macro="fdoms-form">
- <h2>Failover Domains Form</h2>
- </div>
- <div metal:define-macro="fdomlist-form">
- <h2>Failover Domains List Form</h2>
- </div>
- <div metal:define-macro="fdomadd-form">
- <h2>Failover Domain Add Form</h2>
- </div>
- <div metal:define-macro="fdomconfig-form">
- <h2>Failover Domain Configuration Form</h2>
- </div>
- <div metal:define-macro="fdom-form">
- <h2>Failover Domain Form</h2>
- </div>
- <div metal:define-macro="fdomprocess-form">
- <h2>Failover Domain Process Form</h2>
- </div>
- <div metal:define-macro="fencedevs-form">
- <h2>Fence Devices Form</h2>
- </div>
- <div metal:define-macro="fencedevlist-form">
- <h2>Fence Device List Form</h2>
- </div>
- <div metal:define-macro="fencedevadd-form">
- <h2>Fence Device Add Form</h2>
- </div>
- <div metal:define-macro="fencedevconfig-form">
- <h2>Fence Device Configuration Form</h2>
- </div>
- <div metal:define-macro="fencedev-form">
- <h2>Fence Device Form</h2>
- </div>
- <div metal:define-macro="fencedevprocess-form">
- <h2>Fence Device Process Form</h2>
- </div>
- </body>
+</body>
</html>
next reply other threads:[~2006-08-02 17:27 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 17:27 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-11-19 18:23 [Cluster-devel] conga/luci/cluster form-macros rmccabe
2007-08-09 20:26 rmccabe
2007-07-26 20:31 rmccabe
2007-06-12 15:33 rmccabe
2007-02-28 21:54 rmccabe
2007-02-28 21:42 rmccabe
2007-02-14 15:06 rmccabe
2007-02-14 15:04 rmccabe
2007-02-09 20:33 rmccabe
2007-02-09 20:32 rmccabe
2007-02-02 1:03 rmccabe
2007-01-30 21:39 jparsons
2007-01-30 21:06 jparsons
2007-01-26 16:53 rmccabe
2007-01-24 20:05 rmccabe
2007-01-22 21:18 rmccabe
2007-01-16 17:38 rmccabe
2007-01-16 17:37 rmccabe
2007-01-15 18:57 rmccabe
2007-01-15 18:57 rmccabe
2007-01-15 17:17 rmccabe
2007-01-09 22:20 rmccabe
2007-01-07 17:36 rmccabe
2006-12-22 17:18 kupcevic
2006-12-20 22:07 jparsons
2006-12-20 20:24 jparsons
2006-12-18 22:15 jparsons
2006-12-13 23:55 rmccabe
2006-12-13 23:54 rmccabe
2006-12-04 22:59 rmccabe
2006-11-30 22:31 jparsons
2006-11-30 22:31 jparsons
2006-11-30 22:21 jparsons
2006-11-30 22:19 jparsons
2006-11-30 21:28 jparsons
2006-11-30 21:24 jparsons
2006-11-30 20:47 jparsons
2006-11-30 20:45 jparsons
2006-11-30 20:10 jparsons
2006-11-29 22:24 jparsons
2006-11-28 19:39 jparsons
2006-11-20 20:21 jparsons
2006-11-20 20:13 jparsons
2006-11-07 1:31 jparsons
2006-11-03 21:11 jparsons
2006-11-03 21:09 jparsons
2006-11-03 21:07 jparsons
2006-10-31 13:23 rmccabe
2006-10-16 20:34 jparsons
2006-10-16 18:58 rmccabe
2006-10-13 21:01 jparsons
2006-10-11 20:57 jparsons
2006-10-11 16:25 jparsons
2006-10-04 17:45 jparsons
2006-09-28 20:20 rmccabe
2006-09-25 15:59 rmccabe
2006-09-25 15:46 jparsons
2006-09-22 20:58 jparsons
2006-09-22 20:30 jparsons
2006-09-22 20:08 jparsons
2006-08-30 23:40 rmccabe
2006-08-30 22:57 rmccabe
2006-08-16 23:40 jparsons
2006-08-16 21:48 jparsons
2006-08-14 14:53 jparsons
2006-08-13 19:18 jparsons
2006-08-13 19:14 jparsons
2006-08-13 19:04 jparsons
2006-08-13 18:46 jparsons
2006-08-13 18:42 jparsons
2006-08-13 18:35 jparsons
2006-08-13 14:54 jparsons
2006-08-13 14:50 jparsons
2006-08-13 14:38 jparsons
2006-08-13 13:49 jparsons
2006-08-12 17:52 jparsons
2006-08-11 14:23 jparsons
2006-08-11 14:07 jparsons
2006-08-11 0:23 jparsons
2006-08-10 23:51 jparsons
2006-08-10 23:48 jparsons
2006-08-10 23:44 jparsons
2006-08-10 23:40 jparsons
2006-08-10 15:49 jparsons
2006-08-10 14:16 jparsons
2006-08-09 21:38 jparsons
2006-08-01 15:43 jparsons
2006-07-28 19:49 jparsons
2006-07-25 20:17 jparsons
2006-07-25 17:40 jparsons
2006-07-24 20:10 jparsons
2006-07-21 17:16 jparsons
2006-07-14 16:09 jparsons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060802172718.27974.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.