All of lore.kernel.org
 help / color / mirror / Atom feed
From: shuennek@sourceware.org <shuennek@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster resource-form-macros resour ...
Date: 10 Aug 2006 19:46:10 -0000	[thread overview]
Message-ID: <20060810194610.32560.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	shuennek at sourceware.org	2006-08-10 19:46:09

Modified files:
	luci/cluster   : resource-form-macros resource_form_handlers.js 

Log message:
	Finally got committs working, two updates weren't there in resource form stuff.

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

--- conga/luci/cluster/resource-form-macros	2006/08/02 17:18:40	1.2
+++ conga/luci/cluster/resource-form-macros	2006/08/10 19:46:09	1.3
@@ -145,7 +145,7 @@
       <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'">
+      <span tal:omit-tag="" tal:condition="python:type == 'script'">
         <div metal:use-macro="here/resource-form-macros/macros/scr_macro" />
       </span>
     </span>
@@ -160,7 +160,7 @@
         global ip2 python:address[1];
         global ip3 python:address[2];
         global ip4 python:address[3];
-	global monitor_link res/monitor_link;
+	global monitor_link res/attrs/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'"/>
@@ -204,20 +204,20 @@
         </tr>
       </table>
     </form>
-    <input type="button" value="Submit" onClick="validate(ip_form);" />
+    <input name="submitButton" type="button" value="Submit" onClick="validate(ip_form);" />
   </div>
   <div id="FS" metal:define-macro="fs_macro">
     <span tal:condition="python:ptype == '33'">
       <span tal:define="
         global resName res/name;
-        global mountPoint res/mountpoint;
-        global device res/device;
-        global fstype res/fstype;
-        global opt res/options;
-        global fsid res/fsid;
-        global force_unmount res/force_unmount;
-        global reboot_fail res/self_fence;
-        global fscheck res/force_fsck;
+        global mountPoint res/attrs/mountpoint;
+        global device res/attrs/device;
+        global fstype res/attrs/fstype;
+        global opt res/attrs/options;
+        global fsid res/attrs/fsid;
+        global force_unmount res/attrs/force_unmount;
+        global reboot_fail res/attrs/self_fence;
+        global fscheck res/attrs/force_fsck;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
@@ -226,6 +226,7 @@
       <span tal:define="
         global force_unmount string:0;
         global reboot_fail string:0;
+	global fstype string:0;
         global fscheck string:0;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
@@ -252,11 +253,11 @@
           <div>
 	    <strong>File System Type:</strong>
 	    <select id="fstype" name="fstype">
-	      <span tal:condition="python: fstype == 'ext2'">
+	      <span tal:condition="python: ptype != '33' or fstype == 'ext2'">
     	        <option name="ext2" value="ext2">ext2</option>
                 <option name="ext3" value="ext3" selected>ext3</option>
 	      </span>
-	      <span tal:condition="python: fstype != 'ext3'">
+	      <span tal:condition="python: ptype == '33' and fstype != 'ext3'">
     	        <option name="ext2" value="ext2" selected>ext2</option>
                 <option name="ext3" value="ext3">ext3</option>
 	      </span>
@@ -322,12 +323,12 @@
     <span tal:condition="python:ptype == '33'">
       <span tal:define="
         global resName res/name;
-        global mountPoint res/mountpoint;
-        global device res/device;
-        global fstype res/fstype;
-        global opt res/options;
-        global fsid res/fsid;
-        global force_unmount res/force_unmount;
+        global mountPoint res/attrs/mountpoint;
+        global device res/attrs/device;
+        global fstype res/attrs/fstype;
+        global opt res/attrs/options;
+        global fsid res/attrs/fsid;
+        global force_unmount res/attrs/force_unmount;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
@@ -403,12 +404,12 @@
     <span tal:condition="python:ptype == '33'">
       <span tal:define="
         global resName res/name;
-        global mountpoint res/mountpoint;
-        global opt res/options;
-        global expath res/export;
-        global nfstype res/fstype;
-        global hostname res/host;
-        global force_unmount res/force_unmount;
+        global mountpoint res/attrs/mountpoint;
+        global opt res/attrs/options;
+        global expath res/attrs/export;
+        global nfstype res/attrs/fstype;
+        global hostname res/attrs/host;
+        global force_unmount res/attrs/force_unmount;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
@@ -462,11 +463,11 @@
         </tr>
         <tr>
           <div>
-	    <span tal:condition="python: nfstype == 'nfs'">
+	    <span tal:condition="python: ptype != '33' or 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'">
+	    <span tal:condition="python: ptype == '33' and nfstype != 'nfs4'">
     	      <input type="radio" name="nfstype" value="nfs">NFS
 	      <input type="radio" name="nfstype" value="nfs4" checked>NFS4
 	    </span>
@@ -497,9 +498,9 @@
     <span tal:condition="python:ptype == '33'">
       <span tal:define="
         global resName res/name;
-        global target res/target;
-        global opt res/options;
-        global expath res/readOnly|nothing;
+        global target res/attrs/target;
+        global opt res/attrs/options;
+        global expath res/attrs/readOnly|nothing;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
@@ -588,7 +589,7 @@
     <span tal:condition="python:ptype == '33'">
       <span tal:define="
         global resName res/name;
-        global filename res/file;
+        global filename res/attrs/file;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
@@ -633,7 +634,7 @@
     <span tal:condition="python:ptype == '33'">
       <span tal:define="
         global resName res/name;
-        global workgroup res/workgroup;
+        global workgroup res/attrs/workgroup;
         global cluname request/clustername;
         tmp_URL context/cluster/index_html/absolute_url;
         global processURL python:tmp_URL+'?pagetype=35&clustername='+cluname+'&edit=1'"/>
--- conga/luci/cluster/resource_form_handlers.js	2006/07/27 16:32:46	1.1
+++ conga/luci/cluster/resource_form_handlers.js	2006/08/10 19:46:09	1.2
@@ -35,14 +35,15 @@
  *down within actual cluster code.*/
 
 function validate(form){
-  if(form.resourceName.value.length == 0){
-    alert("Please enter a name for this resource. \n");
-    return;
+  if(form.type.value != 'ip'){
+    if(form.resourceName.value.length == 0){
+      alert("Please enter a name for this resource. \n");
+      return;
+    }
   }
-  name = form.getAttribute("name");
   /*Get the type of form from the first
    *part of the name string*/
-  type = name.split("_")[0];
+  type = form.type.value;
   /*use eval to access proper resource
    *valer function as defined below*/
   eval("val"+(type.toUpperCase())+"(form);");



             reply	other threads:[~2006-08-10 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 19:46 shuennek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-22 19:21 [Cluster-devel] conga/luci/cluster resource-form-macros resour rmccabe
2007-01-17 20:50 rmccabe
2007-01-22 17:06 rmccabe
2007-03-07 18:02 rmccabe
2007-03-07 18:03 rmccabe
2007-03-07 18:04 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=20060810194610.32560.qmail@sourceware.org \
    --to=shuennek@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.