All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster form-macros index_html
Date: 7 Nov 2006 20:28:37 -0000	[thread overview]
Message-ID: <20061107202837.30658.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-11-07 20:28:36

Modified files:
	luci/cluster   : form-macros index_html 

Log message:
	fixes for model builder disappearing

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.99&r2=1.100
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&r1=1.25&r2=1.26

--- conga/luci/cluster/form-macros	2006/11/07 01:31:41	1.99
+++ conga/luci/cluster/form-macros	2006/11/07 20:28:36	1.100
@@ -61,18 +61,17 @@
 
 <div id="cluster_list">
 <div class="cluster" tal:repeat="clu clusystems">
-
 	<tal:block tal:define="
-		global ragent python: here.getRicciAgent(clu[0])" />
+		global ricci_agent python: here.getRicciAgent(clu[0])" />
 
-	<div tal:condition="python: not ragent">
+	<div tal:condition="python: not ricci_agent">
 		<strong class="errmsgs">An error occurred when trying to contact any of the nodes in the <span tal:replace="python: clu[0]"/> cluster.</strong>
 		<hr/>
 	</div>
 
-	<tal:block tal:condition="python: ragent">
+	<tal:block tal:condition="python: ricci_agent">
 		<tal:block tal:define="
-			global stat python: here.getClusterStatus(ragent);
+			global stat python: here.getClusterStatus(ricci_agent);
 			global cstatus python: here.getClustersInfo(stat, request);
 			global cluster_status python: 'cluster ' + (('running' in cstatus and cstatus['running'] == 'true') and 'running' or 'stopped');"
 	 	/>
@@ -352,7 +351,13 @@
 		set_page_title('Luci ??? cluster ??? Configure cluster properties');
 	</script>
 
-	<span tal:define="global ricci_agent python: here.getRicciAgentForCluster(request)" />
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:condition="not: exists: modelb">
+		<tal:block tal:define="global modelb python: None" />
+	</tal:block>
+
 	<tal:block
 		tal:define="global clusterinfo python: here.getClusterInfo(modelb, request)" />
 
@@ -361,25 +366,25 @@
 	<ul class="configTab">
 		<li class="configTab">
 			<a tal:attributes="
-				href python: request['URL'] + '?pagetype=' + request['pagetype'] + '&clustername=' + request['clustername'] + '&tab=1';
+				href clusterinfo/basecluster_url | nothing;
 				class python: 'configTab' + (configTabNum == 1 and ' configTabActive' or '');
 			">General</a>
 		</li>
 		<li class="configTab">
 			<a tal:attributes="
-				href python: request['URL'] + '?pagetype=' + request['pagetype'] + '&clustername=' + request['clustername'] + '&tab=2';
+				href clusterinfo/fencedaemon_url | nothing;
 				class python: 'configTab' + (configTabNum == 2 and ' configTabActive' or '');
 			">Fence</a>
 		</li>
 		<li class="configTab">
 			<a tal:attributes="
-				href python: request['URL'] + '?pagetype=' + request['pagetype'] + '&clustername=' + request['clustername'] + '&tab=3';
+				href clusterinfo/multicast_url | nothing;
 				class python: 'configTab' + (configTabNum == 3 and ' configTabActive' or '');
 			">Multicast</a>
 		</li>
 		<li class="configTab">
 			<a tal:attributes="
-				href python: request['URL'] + '?pagetype=' + request['pagetype'] + '&clustername=' + request['clustername'] + '&tab=4';
+				href clusterinfo/quorumd_url | nothing;
 				class python: 'configTab' + (configTabNum == 4 and ' configTabActive' or '');
 			">Quorum Partition</a>
 		</li>
@@ -399,7 +404,9 @@
 			<input type="hidden" name="pagetype"
 				tal:attributes="value request/pagetype | request/form/pagetype"
 			/>
-		<input type="hidden" name="configtype" value="general" />
+			<input type="hidden" name="configtype" value="general" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
 
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable">
@@ -705,11 +712,16 @@
 	</div>
 
 	<div id="configTabContent" tal:condition="python: configTabNum == 2">
-		<form name="fencedaemon" method="post">
+		<form name="fencedaemon" method="post" action="">
 			<input type="hidden" name="configtype" value="fence" />
 			<input type="hidden" name="pagetype"
 				tal:attributes="value request/pagetype | request/form/pagetype"
 			/>
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
+
 		<script type="text/javascript"
 			src="/luci/homebase/homebase_common.js">
 		</script>
@@ -770,6 +782,10 @@
 			<input type="hidden" name="pagetype"
 				tal:attributes="value request/pagetype | request/form/pagetype"
 			/>
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable">
 				<tr class="systemsTable"><td class="systemsTable" colspan="1">
@@ -836,6 +852,10 @@
 				tal:attributes="value request/pagetype | request/form/pagetype"
 			/>
 			<input type="hidden" name="configtype" value="qdisk" />
+			<input type="hidden" name="cluster_version"
+				tal:attributes="value os_version | nothing" />
+			<input type="hidden" name="clustername"
+				tal:attributes="value request/clustername | clusterinfo/clustername | nothing" />
 		<div class="configTabContent">
 		<table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
 			<thead class="systemsTable">
@@ -1048,8 +1068,11 @@
 </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)"/>
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block
+		tal:define="res python: here.processClusterProps(ricci_agent, request)" />
 </div>
 
 <div metal:define-macro="fence-option-list">
@@ -1678,7 +1701,9 @@
 	</tal:comment>
 
 	<tal:block tal:define="
-		global ricci_agent python: here.getRicciAgentForCluster(request);
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
 		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'));
@@ -1870,10 +1895,13 @@
 		set_page_title('Luci ??? cluster ??? nodes');
 	</script>
 
-<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 id="node_list">
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		global status python: here.getClusterStatus(ricci_agent);
+		global nds python: here.getNodesInfo(modelb, status, request)" />
 
 	<div tal:repeat="nd nds">
 		<tal:block
@@ -2086,12 +2114,13 @@
 		set_page_title('Luci ??? cluster ??? services');
 	</script>
 
-	<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" />
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		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">
 		<table class="cluster service" width="100%"
@@ -2240,7 +2269,9 @@
 	</script>
 
 	<tal:block tal:define="
-		global ricci_agent python: here.getRicciAgentForCluster(request);
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
 		result python: here.serviceStart(ricci_agent, request)" />
 
 	<!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
@@ -2253,7 +2284,9 @@
 	</script>
 
 	<tal:block tal:define="
-		global ricci_agent python: here.getRicciAgentForCluster(request);
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
 		result python: here.serviceRestart(ricci_agent, request)" />
 
 	<!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
@@ -2264,15 +2297,17 @@
 		set_page_title('Luci ??? cluster ??? services ??? Stop a service');
 	</script>
 
+	<tal:block tal:define="
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
 	<span tal:define="
-		global ricci_agent python: here.getRicciAgentForCluster(request);
 		result python: here.serviceStop(ricci_agent, request)" />
 
 	<!-- <span metal:use-macro="here/form-macros/macros/serviceconfig-form"/> -->
 </div>
 
 <div metal:define-macro="serviceconfig-type-macro" tal:omit-tag="">
-	<span tal:omit-tag="" tal:condition="python: type == 'IP Address: '">
+	<span tal:omit-tag="" tal:condition="python: type == 'ip'">
 		<tal:block metal:use-macro="here/resource-form-macros/macros/ip_macro" />
 	</span>
 	<span tal:omit-tag="" tal:condition="python: type == 'fs'">
@@ -2293,7 +2328,7 @@
 	<span tal:omit-tag="" tal:condition="python: type == 'smb'">
 		<tal:block 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'">
 		<tal:block metal:use-macro="here/resource-form-macros/macros/scr_macro" />
 	</span>
 </div>
@@ -2307,7 +2342,9 @@
 	</script>
 
 	<tal:block tal:define="
-		global ricci_agent python: here.getRicciAgentForCluster(request);
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
 		global global_resources python: here.getResourcesInfo(modelb, request);
 		global sstat python: here.getClusterStatus(ricci_agent);
 		global sinfo python: here.getServiceInfo(sstat, modelb, request);
@@ -2475,8 +2512,10 @@
 	</script>
 
 	<tal:block tal:define="
-		global ragent python: here.getRicciAgentForCluster(request);
-		global sta python: here.getClusterStatus(ragent);
+		global ricci_agent ri_agent | python: here.getRicciAgentForCluster(request)" />
+
+	<tal:block tal:define="
+		global sta python: here.getClusterStatus(ricci_agent);
 		global fdominfo python: here.getFdomsInfo(modelb, request, sta);" />
 
 	<div class="cluster fdom" tal:repeat="fdom fdominfo">
--- conga/luci/cluster/index_html	2006/11/03 19:13:57	1.25
+++ conga/luci/cluster/index_html	2006/11/07 20:28:36	1.26
@@ -9,11 +9,6 @@
                       xml:lang language">
 
    <head metal:use-macro="here/header/macros/html_header">
-
-
-
-
-
      <metal:fillbase fill-slot="base">
       <metal:baseslot define-slot="base">
         <base href="" tal:attributes="href here/renderBase" />
@@ -29,47 +24,54 @@
       </metal:cache>
 
       <metal:headslot define-slot="head_slot" />
-		<tal:block tal:define="global sinfo nothing" />
-    <div tal:define="global hascluster request/clustername |nothing; global busywaiting python:None;"/>
-    <span tal:condition="not: hascluster">
-    <meta googaa="ooo"/>
-    </span>
-
-    <span tal:condition="hascluster">
-      <span tal:define="ri_agent python:here.getRicciAgentForCluster(request)">
-
-        <span tal:define="resmap python:here.getClusterOS(ri_agent);
-                          global isVirtualized resmap/isVirtualized | nothing;
-                          global os_version resmap/os | nothing"/>
-      </span>
-      <span tal:define="global isBusy python:here.isClusterBusy(request)"/>
-      <span tal:define="global firsttime request/busyfirst |nothing"/>
-      <span tal:condition="firsttime">
-       <span tal:define="global busywaiting python:True"/>
-        <meta http-equiv="refresh" content="" tal:attributes="content isBusy/refreshurl"/>
-      </span>
-      <span tal:define="global busy isBusy/busy |nothing"/>
-       <span tal:condition="busy">
-        <span tal:define="global busywaiting python:True"/>
-        <meta http-equiv="refresh" content="" tal:attributes="content isBusy/refreshurl"/> 
-       </span>
-    </span>
-
-      <tal:comment replace="nothing"> A slot where you can insert elements in the header from a template </tal:comment>
+	    <tal:block tal:define="
+			global sinfo nothing;
+			global hascluster request/clustername |nothing;
+			global isBusy python: False;
+			global firsttime nothing;
+			global ri_agent nothing;
+			global busywaiting python:None" />
+
+		<tal:block tal:condition="not: hascluster">
+		    <meta googaa="ooo"/>
+		</tal:block>
+
+		<tal:block tal:condition="hascluster">
+			<tal:block tal:define="
+				global ri_agent python:here.getRicciAgentForCluster(request);
+				resmap python:here.getClusterOS(ri_agent);
+				global isVirtualized resmap/isVirtualized | nothing;
+				global os_version resmap/os | nothing;
+				global isBusy python:here.isClusterBusy(request);
+				global firsttime request/busyfirst |nothing" />
+
+			<tal:block tal:condition="firsttime">
+				<tal:block tal:define="global busywaiting python:True" />
+				<meta http-equiv="refresh"
+					tal:attributes="content isBusy/refreshurl | string:." />
+			</tal:block>
+
+			<tal:block tal:define="global busy isBusy/busy |nothing"/>
+
+			<tal:block tal:condition="busy">
+				<tal:block tal:define="global busywaiting python:True" />
+				<meta http-equiv="refresh"
+					tal:attributes="content isBusy/refreshurl | string:." />
+			</tal:block>
+		</tal:block>
     </metal:headslot>
 
-
-
     <metal:cssslot fill-slot="css_slot">
-      <tal:comment replace="nothing"> A slot where you can insert CSS in the header from a template </tal:comment>
-
-  <style type="text/css"><!-- @import url(./clusterportlet.css); --></style>
-  <style type="text/css"><!-- @import url(/luci/homebase/luci_homebase.css); --></style>
-      <metal:cssslot define-slot="css_slot" />
+		<style type="text/css">
+			<!-- @import url(./clusterportlet.css); -->
+		</style>
+		<style type="text/css">
+			<!-- @import url(/luci/homebase/luci_homebase.css); -->
+		</style>
+		<metal:cssslot define-slot="css_slot" />
     </metal:cssslot>
 
     <metal:javascriptslot fill-slot="javascript_head_slot">
-      <tal:comment replace="nothing"> A slot where you can insert javascript in the header from a template </tal:comment>
 		<script type="text/javascript" src="/luci/conga.js"></script>
       <SCRIPT TYPE="text/javascript">
       <!--
@@ -121,7 +123,6 @@
        </SCRIPT>
       <metal:javascriptslot define-slot="javascript_head_slot" />
     </metal:javascriptslot>
-
   </head>
 
   <body tal:attributes="class here/getSectionFromURL;
@@ -158,13 +159,12 @@
       alternative in the plone_tableless skin layer that you can use if you
       prefer layouts that don't use tables.
       </tal:comment>
-    <!-- <div tal:define="global hascluster request/clustername |nothing"/>  -->
 
     <tal:block tal:condition="hascluster">
-	    <tal:block tal:define="global ricci_agent python: here.getRicciAgentForCluster(request)" />
-		<tal:block tal:condition="python: ricci_agent"
-			tal:define="
-				global modelb python:here.getmodelbuilder(ricci_agent,isVirtualized)" />
+		<tal:block tal:condition="python: ri_agent">
+			<tal:block tal:define="
+				global modelb python:here.getmodelbuilder(ri_agent, isVirtualized)" />
+		</tal:block>
     </tal:block>
 
       <table id="portal-columns">
@@ -214,8 +214,8 @@
              <metal:main-form-content use-macro="here/form-chooser/macros/main-form">
              </metal:main-form-content>
 
-	<tal:block tal:condition="python: request.SESSION.has_key('checkRet')"
-		tal:define="ret python: request.SESSION.get('checkRet')">
+	<tal:block tal:condition="python: request.SESSION.has_key('checkRet')">
+		<tal:block tal:define="ret python: request.SESSION.get('checkRet')">
 		<div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))">
 			<div class="hbclosebox">
 				<a href="javascript:hide_element('retmsgsdiv');"><img src="../homebase/x.png"></a>
@@ -238,6 +238,7 @@
 				</tal:block>
 			</ul>
 		</div>
+		</tal:block>
 	</tal:block>
                   </div>
 



             reply	other threads:[~2006-11-07 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-07 20:28 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-06-12 15:21 [Cluster-devel] conga/luci/cluster form-macros index_html rmccabe
2006-11-27 19:56 rmccabe
2006-10-04 16:10 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=20061107202837.30658.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.