Skip to contentSkip to conversation

conga/luci/cluster form-macros resource-form-m ...

Cluster-devel [email protected] 1 participant 1 message Aug 10, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: shuennek at sourceware.org 2006-08-10 23:06:20

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

Log message:

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

luci/cluster/form-macros +54 -34
@@ -832,25 +832,22 @@
 </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">
+  <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>
@@ -881,22 +878,45 @@
 			<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>
+  </table>
   <h2> Service Composition</h2>
-  <span tal:define="global svc_rcs sinfo/resource_list"/>
-  <span tal:repeat="svc_rc svc_rcs">
-   <h4> Name: <span tal:content="svc_rc/resource_name"/></h4>
-   <h4> Type: <span tal:content="svc_rc/type"/></h4>
-   <span tal:define="ref svc_rc/ref_object | nothing">
-     <span tal:condition="ref">
-      <h4>This is a shared resource</h4>
-     </span>
-     <span tal:condition="not: ref">
-      <h4>This is a resource private to this service</h4>
-     </span>
-   </span>
-   <h4>Indent level:  <span tal:content="svc_rc/indent_ctr"/></h4>
-  </span>
+  <ul>
+  <span tal:omit-tag="" tal:define="global svc_rcs sinfo/resource_list"/>
+    <li tal:repeat="res svc_rcs">
+      <ul>
+      <div tal:define="global type res/type;
+		       global ref res/ref_object | nothing"/>
+        <span omit-tag="" tal:condition="ref">
+          <span tal:omit-tag="" tal:define="global shared string:true"/>
+        </span>
+	<strong tal:content="res/indent_str"/>
+        <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'">
+          <li metal:use-macro="here/resource-form-macros/macros/fs_macro"/>
+        </span>
+        <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'">
+          <li metal:use-macro="here/resource-form-macros/macros/nfsm_macro"/>
+        </span>
+        <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'">
+          <li metal:use-macro="here/resource-form-macros/macros/nfsc_macro"/>
+        </span>
+        <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: '">
+          <li metal:use-macro="here/resource-form-macros/macros/scr_macro" />
+        </span>
+      </ul>
+    </li>
+  </ul>
 </div>
 
 <div metal:define-macro="service-form">
luci/cluster/resource-form-macros +51 -37

294 lines not on this page · raw message

luci/cluster/resource_form_handlers.js +3 -3
@@ -5,12 +5,12 @@
   if (!container_element) {
     alert('Can\'t find element with id = ' + container_id);
     return (-1)
-      }
+  }
   child_element = document.getElementById(element_id);
   if (!child_element) {
     alert('Can\'t find element with id = ' + element_id);
     return (-1)
-      }
+  }
   for(child in child_element.children){
     alert(child);
   }
@@ -21,7 +21,7 @@
   if (!invisible_div) {
     alert('No invisible div');
     return (-1)
-      } 
+  } 
   
   invisible_div.appendChild(temp);
 }