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 resource-form-macros
Date: 2 Aug 2006 17:18:41 -0000	[thread overview]
Message-ID: <20060802171841.23152.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2006-08-02 17:18:40

Modified files:
	luci/cluster   : resource-form-macros 

Log message:
	committing for stephen

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

--- conga/luci/cluster/resource-form-macros	2006/07/27 16:32:46	1.1
+++ conga/luci/cluster/resource-form-macros	2006/08/02 17:18:40	1.2
@@ -8,6 +8,7 @@
     Resources for <span tal:content="request/clustername" />
     </h2>
     <span tal:define="global rescInf python:here.getResourcesInfo(modelb, request)"/>
+    <span tal:define="msg python:here.appendModel(request, modelb)"/>
     <table id="systemsTable" class="systemsTable" border="0" cellspacing="0">
       <thead>
         <tr border="0" cellspacing="5" align="left">
@@ -15,6 +16,7 @@
           <th width="100">Type</th>
           <th width="75">Link</th>
           <th width="75">Configure</th>
+          <th width="75">Delete</th>
         </tr>
       </thead>
       <span tal:repeat="rs rescInf">
@@ -29,6 +31,10 @@
             <a href="" tal:attributes="HREF rs/cfgurl" />
             configure
           </td>
+          <td>
+            <a href="" tal:attributes="HREF rs/delurl" />
+            delete
+          </td>
         </tr>
       </span>
     </table>
@@ -36,9 +42,16 @@
   <div metal:define-macro="resourceslist-form">
    <h2>Resources List Form</h2>
   </div>
+  <div metal:define-macro="resourceremove-form">
+   <h2>Resources Remove Form</h2>
+   <span tal:define="global cluname request/clustername;
+                     global ragent python:here.getRicciAgentForCluster(request);"/>
+   <span tal:define="global edited request/edit|nothing" />
+   <span tal:define="global msg python:here.delResource(request, ragent)" />
+   <div tal:condition="msg" tal:content="msg">Something returned from delResource().</div>
+  </div>
   <div metal:define-macro="resourceadd-form">
       <script type="text/javascript" src="luci/cluster/resource_form_handlers.js" />  
-      <span tal:define="msg python:here.appendModel(request, modelb)"/>
       <h2>Add a Resource</h2>
       <strong>Select Resource Type:</strong><br/>
       <form name="filler">
@@ -92,45 +105,49 @@
     </table>
   </div>
 
+
   <div metal:define-macro="resourceprocess-form">
+   <span tal:define="global cluname request/clustername;
+                     global ragent python:here.getRicciAgentForCluster(request);"/>
    <span tal:define="global edited request/edit|nothing" />
-   <h2 tal:condition="not: edited">Resource Added Form</h2>
-   <h2 tal:condition="edited">Resource Edited Form</h2>
-   <span tal:define="global msg python:here.addResource(request)" />
-   <strong>Errors:</strong>
+   <h2 tal:condition="not: edited">Resource Added</h2>
+   <h2 tal:condition="edited">Resource Edited</h2>
+   <span tal:define="global msg python:here.addResource(request, ragent)" />
    <div tal:condition="msg" tal:content="msg">Something returned from addResource.</div>
-   <hr/>
-    These are the request vars <em tal:replace="structure request">template id</em>.
   </div>
 
   <div metal:define-macro="resourceconfig-form">
     <script type="text/javascript" src="luci/cluster/resource_form_handlers.js" />
-    <span tal:define="global res python:here.getResourceInfo(modelb, request)" />
-    <span tal:define="global type res/tag_name" />
-    <h2>Configure <span tal:content="res/name" /></h2>
-    <span tal:omit-tag="" tal:condition="python:type == 'ip'">
-     <div metal:use-macro="here/resource-form-macros/macros/ip_macro"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'fs'">
-      <div metal:use-macro="here/resource-form-macros/macros/fs_macro"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'gfs'">
-      <div metal:use-macro="here/resource-form-macros/macros/gfs_macro"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'nfsm'">
-      <div metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'nfsx'">
-      <div metal:use-macro="here/resource-form-macros/macros/nfsx_macro"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'nfsc'">
-      <div metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'smb'">
-      <div metal:use-macro="here/resource-form-macros/macros/smb_macro" />
-    </span>
-    <span tal:omit-tag="" tal:condition="python:type == 'src'">
-      <div metal:use-macro="here/resource-form-macros/macros/scr_macro" />
+    <span tal:define="msg python:here.appendModel(request, modelb)"/>
+    <span tal:define="global restoedit request/resourcename|nothing"/>
+    <span tal:condition="restoedit">
+      <span tal:define="global res python:here.getResourceInfo(modelb, request)" />
+      <span tal:define="global type res/tag_name" />
+      <h2>Configure <span tal:content="res/name" /></h2>
+      <span tal:omit-tag="" tal:condition="python:type == 'ip'">
+       <div metal:use-macro="here/resource-form-macros/macros/ip_macro"/>
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'fs'">
+        <div metal:use-macro="here/resource-form-macros/macros/fs_macro"/>
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'gfs'">
+        <div metal:use-macro="here/resource-form-macros/macros/gfs_macro"/>
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'nfsm'">
+        <div metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'nfsx'">
+        <div metal:use-macro="here/resource-form-macros/macros/nfsx_macro"/>
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'nfsc'">
+        <div metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'smb'">
+        <div metal:use-macro="here/resource-form-macros/macros/smb_macro" />
+      </span>
+      <span tal:omit-tag="" tal:condition="python:type == 'src'">
+        <div metal:use-macro="here/resource-form-macros/macros/scr_macro" />
+      </span>
     </span>
   </div>
 
@@ -143,6 +160,7 @@
         global ip2 python:address[1];
         global ip3 python:address[2];
         global ip4 python:address[3];
+	global monitor_link res/monitor_link;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
@@ -150,9 +168,10 @@
 
     <span tal:condition="python:ptype != '33'">
       <span tal:define="
+	    global monitor_link string:1;
             global cluname request/clustername;
             tmp_URL context/cluster/index_html/absolute_url;
-            global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+            global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname" />
     </span>
     <h2>IP Address Resource Configuration</h2>
     <form name="ip_form" id="ip_form" method="get" tal:attributes="action processURL">
@@ -167,12 +186,6 @@
       <table id="ipResourceTable" border="0" cellspacing="0" width="200" style="background-color: #dee7ec">
         <tr>
           <div>
-    	    <strong>Resource Name:</strong>
-	      <input type="text" id="resourceName" name="resourceName" tal:attributes="VALUE resName|nothing" />
-          </div>
-        </tr>
-        <tr>
-          <div>
     	    <strong>IP:</strong>
     	    <input size="3" name="ip1" type="text" maxlength="3" tal:attributes="VALUE ip1|nothing"/>.
             <input size="3" name="ip2" type="text" maxlength="3" tal:attributes="VALUE ip2|nothing"/>.
@@ -181,8 +194,12 @@
           </div>
           <div>
     	    <strong>Monitor Link</strong>
-	    <input type="checkbox" name="monitorLink" tal:condition="python:ptype != '33'">
-	    <input type="checkbox" name="monitorLink" checked tal:condition="python:ptype == '33'">
+	    <span tal:condition="python: monitor_link == '1'">
+	      <input type="checkbox" name="monitorLink" checked >
+	    </span>
+	    <span tal:condition="python: monitor_link == '0'">
+	      <input type="checkbox" name="monitorLink">
+	    </span>
           </div>
         </tr>
       </table>
@@ -212,7 +229,7 @@
         global fscheck string:0;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname" />
     </span>
     <h2>File System Resource Configuration</h2>
       <form name="fs_form" action="" method="get" tal:attributes="action processURL">
@@ -235,8 +252,15 @@
           <div>
 	    <strong>File System Type:</strong>
 	    <select id="fstype" name="fstype">
-    	    <option name="ext2" value="ext2">ext2</option>
-            <option name="ext3" value="ext3">ext3</option>
+	      <span tal:condition="python: fstype == 'ext2'">
+    	        <option name="ext2" value="ext2">ext2</option>
+                <option name="ext3" value="ext3" selected>ext3</option>
+	      </span>
+	      <span tal:condition="python: fstype != 'ext3'">
+    	        <option name="ext2" value="ext2" selected>ext2</option>
+                <option name="ext3" value="ext3">ext3</option>
+	      </span>
+	    </select>
           </div>
         </tr>
         <tr>
@@ -313,7 +337,7 @@
         global force_unmount string:0;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname" />
     </span>
     <h2>GFS Resource Configuration</h2>
     <form name="gfs_form" action="" method="post" tal:attributes="action processURL">
@@ -394,7 +418,7 @@
         global force_unmount string:0;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname" />
     </span>
   <h2>NFS Mount Resource Configuration</h2>
   <form name="nfsm_form" action="" method="post">
@@ -438,8 +462,14 @@
         </tr>
         <tr>
           <div>
-    	    <input type="radio" name="nfstype" value="nfs" checked>NFS
-	    <input type="radio" name="nfstype" value="nfs4">NFS4
+	    <span tal:condition="python: nfstype == 'nfs'">
+    	      <input type="radio" name="nfstype" value="nfs" checked>NFS
+	      <input type="radio" name="nfstype" value="nfs4">NFS4
+	    </span>
+	    <span tal:condition="python: nfstype != 'nfs4'">
+    	      <input type="radio" name="nfstype" value="nfs">NFS
+	      <input type="radio" name="nfstype" value="nfs4" checked>NFS4
+	    </span>
           </div>
         </tr>
         <tr>
@@ -478,7 +508,7 @@
       <span tal:define="
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname" />
     </span>
     <h2>NFS Client Resource Configuration</h2>
     <form name="nfsc_form" action="" method="post" tal:attributes="action processURL">
@@ -529,7 +559,7 @@
       <span tal:define="
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname" />
     </span>
     <h2>NFS Export Resource Configuration</h2>
     <form name="nfsx_form" action="" method="post" tal:attributes="action processURL">
@@ -567,7 +597,7 @@
       <span tal:define="
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname"/>
     </span>
     <h2>Script Resource Configuration</h2>
     <form name="scr_form" action="" method="post" tal:attributes="action processURL">
@@ -612,7 +642,7 @@
       <span tal:define="
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
-        global processURL string:?pagetype=35&clustername='+cluname+'&edit=0" />
+        global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname"/>
     </span>
     <h2>Samba Server Configuration</h2>
     <form name="smb_form" action="" method="post" tal:attributes="action processURL">



             reply	other threads:[~2006-08-02 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 17:18 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-19 17:50 [Cluster-devel] conga/luci/cluster resource-form-macros rmccabe
2006-10-02 22:42 rmccabe
2007-01-18  2:49 rmccabe
2007-09-18 21:45 rmccabe
2008-04-28  3:57 rmccabe
2008-04-28  3:58 rmccabe
2008-07-30 21:00 rmccabe
2008-07-30 21:14 rmccabe
2011-03-25 20:02 rmccabe

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=20060802171841.23152.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.