conga/luci/cluster form-macros resource-form-m ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-08-29 23:23:00
Modified files:
luci/cluster : form-macros resource-form-macros
Log message:
more ui work
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.51&r2=1.52
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&r1=1.4&r2=1.5
luci/cluster/form-macros +141 -140
@@ -1,9 +1,9 @@ -<html> - -<head> +<html> + +<head> <title tal:content="template/title">The title</title> -</head> - +</head> + <body> <div metal:define-macro="entry-form">
@@ -21,19 +21,16 @@ <tr><td> <h2><span tal:content="isBusy/desc" /></h2> </td></tr> - </table> </div> <div metal:define-macro="clusters-form"> - <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); + 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');" />
@@ -51,7 +48,7 @@ <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 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" />
@@ -86,10 +83,10 @@ </ul> </td> - <td class="cluster_services"> - <strong class="cluster">Services</strong> - <ul class="cluster"> - <tal:block tal:condition="python:len(cstatus['currentservices']) < 1"> + <td class="cluster service cluster_services"> + <strong class="cluster service">Services</strong> + <ul class="cluster service"> + <tal:block tal:condition="python: len(cstatus['currentservices']) < 1"> <li>No Services Defined</li> </tal:block>
@@ -124,7 +121,7 @@ </script> <tal:block tal:omit-tag="" - tal:define="global sessionObj python:request.SESSION.get('checkRet')" /> + tal:define="global sessionObj python: request.SESSION.get('checkRet')" /> <form name="adminform" action="" method="post"> <input name="pagetype" id="pagetype" type="hidden" value="6" />
@@ -267,11 +264,11 @@ <div metal:define-macro="clusterconfig-form"> <tal:comment tal:replace="nothing"> - <span tal:define="global ricci_agent python:here.getRicciAgentForCluster(request)"/> + <span tal:define="global ricci_agent python: here.getRicciAgentForCluster(request)"/> </tal:comment> <tal:block - tal:define="global clusterinfo python:here.getClusterInfo(modelb, request)" /> + tal:define="global clusterinfo python: here.getClusterInfo(modelb, request)" /> <span tal:omit-tag="" tal:define="global configTabNum python: 'tab' in request and int(request['tab']) or 1" />
@@ -307,7 +304,7 @@ <script type="text/javascript" src="/luci/cluster/validate_config_general.js"></script> <form name="basecluster" action="" method="post"> <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> - <thead class="systemsTable"> + <thead class="systemsTable"> <tr class="systemsTable"><td class="systemsTable" colspan="1"> <div class="systemsTableTop"> <strong>General Properties</strong>
@@ -348,7 +345,7 @@ <script type="text/javascript" src="/luci/homebase/homebase_common.js"></script> <script type="text/javascript" src="/luci/cluster/validate_config_fence.js"></script> <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> - <thead class="systemsTable"> + <thead class="systemsTable"> <tr class="systemsTable"><td class="systemsTable" colspan="1"> <div class="systemsTableTop"> <strong>Fence Daemon Properties</strong>
@@ -390,7 +387,7 @@ <form name="multicast" action="" method="post"> <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> - <thead class="systemsTable"> + <thead class="systemsTable"> <tr class="systemsTable"><td class="systemsTable" colspan="1"> <div class="systemsTableTop"> <strong>Multicast Configuration</strong>
@@ -403,7 +400,7 @@ <td class="systemsTable"> <input type="radio" name="mcast" value="False" onClick="disable_mcast('mcast_address');" - tal:attributes="checked python:clusterinfo['is_mcast'] != 'True'" + tal:attributes="checked python: clusterinfo['is_mcast'] != 'True'" /> Let cluster choose the multicast address </td>
@@ -413,8 +410,8 @@ <td class="systemsTable"> <input type="radio" name="mcast" value="True" onClick="enable_mcast('mcast_address');" - tal:attributes="checked python:clusterinfo['is_mcast'] == 'True'" - + tal:attributes="checked python: clusterinfo['is_mcast'] == 'True'" + /> Specify the multicast address manually </td>
@@ -451,7 +448,7 @@ /> <div class="configTabContent"> <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> - <thead class="systemsTable"> + <thead class="systemsTable"> <tr class="systemsTable"><td class="systemsTable" colspan="1"> <div class="systemsTableTop"> <strong>Quorum Partition Configuration</strong>
@@ -463,14 +460,14 @@ <tr class="systemsTable" id="st_row"><td class="systemsTable" id="st_col"> <input type="radio" name="quorumd" value="False" onClick="disableChildrenInput('quorumdisk');" - tal:attributes="checked python:clusterinfo['is_quorumd'] != 'True'"/> + tal:attributes="checked python: clusterinfo['is_quorumd'] != 'True'"/> Do not use a Quorum Partition </td></tr> <tr class="systemsTable"><td class="systemsTable"> <input type="radio" name="quorumd" value="True" onClick="enableChildrenInput('quorumdisk');" - tal:attributes="checked python:clusterinfo['is_quorumd'] == 'True'"/> + tal:attributes="checked python: clusterinfo['is_quorumd'] == 'True'"/> Use a Quorum Partition </td></tr> </tbody>
@@ -534,7 +531,7 @@ <div class="configTabContent"> <table name="qdiskheur" class="systemsTable"> - <thead class="systemsTable"> + <thead class="systemsTable"> <tr class="systemsTable"><td class="systemsTable" colspan="1"> <div class="systemsTableTop"> <strong>Heuristics</strong>
@@ -635,7 +632,7 @@ onClick="validate_form(this.form);" > </div> - <script tal:condition="python:clusterinfo['is_quorumd'] != 'True'"> + <script tal:condition="python: clusterinfo['is_quorumd'] != 'True'"> disableChildrenInput('quorumdisk'); </script> </form>
@@ -643,8 +640,8 @@ </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)"/> + <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">
@@ -655,9 +652,9 @@ </tal:comment> <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 ricci_agent python: here.getRicciAgentForCluster(request); + global nodestatus python: here.getClusterStatus(ricci_agent); + global nodeinfo python: here.getNodeInfo(modelb, nodestatus, request); global status_class python: 'node_' + (nodeinfo['nodestate'] == '0' and 'active' or (nodeinfo['nodestate'] == '1' and 'inactive' or 'unknown')); global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'));" />
@@ -701,9 +698,10 @@ </tr> - <tr class="cluster node info_bottom"> + <tr class="cluster node info_bottom" + tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'"> <td class="cluster node node_log" colspan="2"> - <a class="cluster node" + <a class="cluster node" tal:attributes="href nodeinfo/logurl" onClick="return popup_log(this, 'notes')"> Show recent log activity for this node </a>
@@ -711,7 +709,10 @@ </tr> </table> - <hr/> + <hr/> + + <tal:block + tal:condition="python: nodeinfo['nodestate'] == '0' or nodeinfo['nodestate'] == '1'"> <h3>Cluster daemons running on this node</h3> <form name="daemon_form">
@@ -744,29 +745,28 @@ </tbody> </table> </form> - - <hr/> + <hr/> + </tal:block> <div> - <h3>Services on this Node:</h3> + <h3>Services on this Node</h3> <ul class="cluster node"> - <tal:block tal:condition="python:len(nodeinfo['currentservices']) == 0"> + <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> + <a class="running" tal:attributes="href svc/svcurl" + tal:content="svc/servicename" /> </li> </ul> </div> <hr/> - <div class="fdomblock"> + <div class="fdomblock"> <h3>Failover Domain Membership</h3> <ul class="cluster node"> - <tal:block tal:condition="python:len(nodeinfo['fdoms']) == 0"> + <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">
@@ -794,9 +794,9 @@ <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)"> + 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
@@ -842,7 +842,7 @@ <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"> + <li tal:condition="python: len(nd['currentservices']) == 0"> No cluster services are currently running here </li> <li class="cluster_service cluster node"
@@ -904,9 +904,8 @@ <div metal:define-macro="nodelogs-form"> <h2>Recent Log Activity for <span tal:replace="request/nodename"/></h2> - --------------------------------------------------------------------------------------- - <br/> - <span tal:replace="python:here.getLogsForNode(request)"/> + <hr/> + <span tal:replace="python: here.getLogsForNode(request)"/> </div> <div metal:define-macro="nodeadd-form">
@@ -974,7 +973,8 @@ </div> <div metal:define-macro="nodeprocess-form"> - <span tal:define="result python:here.nodeTaskProcess(modelb, request)"/> + <tal:block + tal:define="result python: here.nodeTaskProcess(modelb, request)"/> <h2>Node Process Form</h2> </div>
@@ -985,9 +985,9 @@ <div metal:define-macro="servicelist-form"> <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 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" /> <tal:block tal:repeat="svc svcs">
@@ -1015,7 +1015,7 @@ </tr> <tr class="cluster service info_middle"> - <td class="cluster service service_nodename"> + <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">
@@ -1046,29 +1046,29 @@ </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 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 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 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 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%">
@@ -1115,7 +1115,7 @@ <br/> <h2>Service Composition</h2> <ul tal:define="global svc_rcs sinfo/resource_list"> - <li tal:repeat="res svc_rcs"> + <li tal:repeat="res svc_rcs"> <ul tal:define=" global type res/type; global ref res/ref_object | nothing">
@@ -1124,29 +1124,29 @@ <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: '"> + <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'"> + <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'"> + <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'"> + <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'"> + <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'"> + <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'"> + <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: '"> + <span tal:omit-tag="" tal:condition="python: type == 'Script: '"> <li metal:use-macro="here/resource-form-macros/macros/scr_macro" /> </span> </div>
@@ -1192,68 +1192,69 @@ </div> <div metal:define-macro="fdomlist-form"> - <span tal:define="ragent python:here.getRicciAgentForCluster(request); - global sta python:here.getClusterStatus(ragent); - global fdominfo python:here.getFdomsInfo(modelb, request, sta);"> - <span tal:repeat="fdom fdominfo"> - <div class="fdomname"> - <img src="fDom.png"/><h2>Failover Domain Name: <font color="blue"><a href="" tal:attributes="href fdom/cfgurl"><span tal:content="fdom/name"/></a></font></h2> - </div> - <div class="fdomordered"> - <span tal:condition="python:fdom['ordered'] == True"> - <h4>This Failover Domain is <i>Ordered</i></h4> - </span> - <span tal:condition="python:fdom['ordered'] == False"> - <h4>This Failover Domain is <i>Unordered</i></h4> - </span> - </div> - <div class="fdomrestricted"> - <span tal:condition="python:fdom['restricted'] == True"> - <h4>This Failover Domain is <i>Restricted</i></h4> - </span> - <span tal:condition="python:fdom['restricted'] == False"> - <h4>This Failover Domain is <i>Unrestricted</i></h4> - </span> - </div> - <div class="fdommembers"> - <h3>Members of this Failover Domain</h3> - <ul> - <span tal:repeat="node fdom/nodeslist"> - <li style="list-style-image: url(small_node_active.png);" tal:condition="python:node['status'] == '0'"> - <a href="" tal:attributes="href node/nodecfgurl"><font color="green"><span tal:content="node/nodename"/></font></a> - </li> - <li style="list-style-image: url(small_node_inactive.png);" tal:condition="python:node['status'] == '1'"> - <a href="" tal:attributes="href node/nodecfgurl"><font color="red"><span tal:content="node/nodename"/></font></a> - </li> - <li style="list-style-image: url(small_node_unknown.png);" tal:condition="python:node['status'] == '2'"> - <a href="" tal:attributes="href node/nodecfgurl"><font color="gray"><span tal:content="node/nodename"/></font></a> - </li> - </span> - </ul> - </div> - <div class="fdomservice"> - <h2>Services employing this Failover Domain: </h2> - <ul> - <span tal:condition="python:len(fdom['svclist']) < 1"> - <li><i>No Services Defined</i></li> - </span> - <span tal:repeat="svc fdom/svclist"> - <span tal:condition="python:svc['status'] == '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> Running On Node <span tal:content="svc/location"/> - </li> - </span> - <span tal:condition="python:svc['status'] != 'true'"> - <li style="list-style-image:url(small_svc_stopped.png);"> - <a href="" tal:attributes="href svc/svcurl"><font color="red"><span tal:content="svc/name"/></font></a> Not Running - </li> - </span> - </span> - </ul> - </div> - </span> - <hr/> - </span> + <tal:block + tal:define=" + global ragent python: here.getRicciAgentForCluster(request); + global sta python: here.getClusterStatus(ragent); + global fdominfo python: here.getFdomsInfo(modelb, request, sta);" /> + + <div class="cluster fdom" tal:repeat="fdom fdominfo"> + <div class="cluster fdom fdomname"> + <img src="fDom.png"/> + <strong class="cluster fdom">Failover Domain Name<strong>: + <a class="cluster fdom_link" + tal:attributes="href fdom/cfgurl" + tal:content="fdom/name" /> + </div> + + <div class="fdomordered"> + <h4>This Failover Domain is + <strong> + <span tal:replace="python: fdom['ordered'] == True and 'Ordered' or 'Unordered'" /> + </strong> + </div> + + <div class="fdomrestricted"> + <h4>This Failover Domain is <span tal:replace="python: fdom['restricted'] == True and 'Restricted' or 'Unrestricted'"/></h4> + </div> + + <div class="fdommembers"> + <h3>Members of this Failover Domain</h3> + <ul class="cluster node"> + <tal:block tal:repeat="node fdom/nodeslist"> + <tal:block + tal:define="global nodeclass python: 'cluster ' + (node['status'] == '0' and 'node_active' or (node['status'] == '1' and 'node_inactive' or 'node_unknown'));" /> + <li tal:attributes="class python: nodeclass"> + <a tal:content="node/nodename" + tal:attributes=" + href node/configurl; + class python: nodeclass;" /> + </li> + </tal:block> + </ul> + </div> + + <div class="fdomservice"> + <h2>Services employing this Failover Domain: </h2> + <ul> + <tal:block tal:condition="python: len(fdom['svclist']) < 1"> + <li>No Services Defined</li> + </tal:block> + <tal:block tal:repeat="svc fdom/svclist"> + <tal:block + tal:define="global svcclass python: svc['status'] == 'true' and 'running' or 'stopped'" /> + + <li tal:attributes="class python: 'cluster cluster_service ' + svcclass"> + <a tal:content="python: svc['name'] + ' ' + (svcclass == 'running' and ('Running on node ' + svc['location']) or 'Not running')" + tal:attributes="href svc/svcurl; + class python: 'cluster cluster_service ' + svcclass" /> + </li> + </tal:block> + </ul> + <hr/> + </div> + + </div> </div> <div metal:define-macro="fdomadd-form">
luci/cluster/resource-form-macros +904 -687
1,596 lines not on this page · raw message