[Kimchi-devel] [PATCH V6] Add nfs server and target UI in create storage pool

Yu Xin Huo huoyuxin at linux.vnet.ibm.com
Wed Jan 15 10:11:35 UTC 2014


diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl
index e8dac43..714da3c 100644
--- a/ui/pages/storagepool-add.html.tmpl
+++ b/ui/pages/storagepool-add.html.tmpl
@@ -27,7 +27,7 @@
  <!DOCTYPE html>
  <html>
  <body>
-    <div class="window" style="width: 600px; height: 700px;">
+    <div class="window storage-window">
          <header>
              <h1 class="title">$_("Define a New Storage Pool")</h1>
              <div class="close">X</div>
@@ -40,18 +40,17 @@
                          <p class="text-help">
                              $_("The name used to identify the storage pools, and it should not be empty.")
                          </p>
-                        <input id="poolId" required="required" type="text" class="text" style="width: 300px"
-                            name="name">
+                        <input id="poolId" required="required" type="text" class="text storage-base-input-width" name="name">
                      </div>
                  </section>
                  <section class="form-section">
                      <h2>2. $_("Storage Pool Type")</h2>
                      <div class="storage-type-wrapper-controls">
-                        <div class="btn dropdown popable">
-                            <input id="poolType" name="type" type="hidden" value="dir"/>
-                            <span class="text" id="pool-type-label"></span><span class="arrow"></span>
-                            <div class="popover" style="width: 100%">
-                                <ul class="select-list" id="storagePool-list" data-target="poolType" data-label="pool-type-label">
+                        <div id="poolTypeId">
+                            <input id="poolTypeInputId" name="type" type="hidden" value="dir"/>
+                            <span id="pool-type-label"></span><span class="arrow"></span>
+                            <div>
+                                <ul id="storagePool-list">
                                  </ul>
                              </div>
                          </div>
@@ -65,30 +64,38 @@
                                  $_("The path of the Storage Pool. Each Storage Pool must have a unique path.")</p>
                              <p class="text-help">
                                  $_("Kimchi will try to create the directory when it does not already exist in your system.")</p>
-                            <input id="pathId" type="text" class="text" required="required" style="width: 300px">
+                            <input id="pathId" type="text" class="text storage-base-input-width">
                          </div>
                          <div class="clear"></div>
                      </section>
                  </div>
                  <div class="nfs-section tmpl-html">
                      <section class="form-section">
-                        <h2>3. $_("NFS server IP")</h2>
-                        <div class="field">
+                        <h2>3. $_("NFS Server IP")</h2>
+                        <div class="field storage-field">
                              <p class="text-help">
-                                $_("NFS server IP or hostname. It should not be empty.")</p>
-                            <input id="nfsserverId" required="required" type="text" class="text"
-                                style="width: 300px">
+                                $_("NFS server IP or hostname. It can be input or chosen from history.")</p>
+                            <div id="serverComboboxId" class="storage-add-input-width">
+                                <input id="nfsserverId"/>
+                                <div>
+                                    <ul id="nfs-server-used">
+                                    </ul>
+                                </div>
+                            </div>
                          </div>
                      </section>
                      <section class="form-section">
                          <h2>4. $_("NFS Path")</h2>
-                        <div class="field">
-                            <p class="text-help">$_("The nfs exported path on nfs server")</p>
-                            <input id="nfspathId" required="required" type="text" class="text"
-                                style="width: 300px">
-                            <input type="hidden" id="localpathId" class="text" value="none">
-                        </div>
-                        <div class="clear"></div>
+                        <div class="field storage-field">
+                            <p class="text-help">$_("The nfs exported path on nfs server.")</p>
+                            <div id="targetFilterSelectId" class="storage-add-input-width">
+	                            <input id="nfspathId" class="input" disabled/>
+		                        <div>
+		                            <ul id="nfs-server-target">
+		                            </ul>
+		                        </div>
+		                    </div>
+	                    </div>
                      </section>
                  </div>
                  <div class="logical-section tmpl-html">
@@ -103,15 +110,15 @@
                          <div class="field">
                              <p class="text-help">
                                  $_("iSCSI server IP or hostname. It should not be empty.")</p>
-                            <input id="iscsiserverId" placeholder="$_("Server")" type="text" class="text" style="width: 300px">
-                            <input id="iscsiportId" placeholder="$_("Port")" type="text" class="text" style="width:40px" maxlength='4'>
+                            <input id="iscsiserverId" placeholder="$_("Server")" type="text" class="text storage-base-input-width">
+                            <input id="iscsiportId" placeholder="$_("Port")" type="text" class="text storage-port-width" maxlength="4">
                          </div>
                      </section>
                      <section class="form-section">
                          <h2>4. $_("Target")</h2>
                          <div class="field">
                              <p class="text-help">$_("The iSCSI target on iSCSI server")</p>
-                            <input id="iscsiTargetId" type="text" class="text" style="width: 300px">
+                            <input id="iscsiTargetId" type="text" class="text storage-base-input-width>

lack of an " at the end of class="text storage-base-input-width
>                           </div>
>                       </section>
>                       <section class="form-section">
> @@ -123,8 +130,8 @@
>                       <section class="authenticationfield form-section tmpl-html">
>                           <h2>5. $_("iSCSI Authentication")</h2>
>                           <div class="field">
> -                            <input id="usernameId" placeholder="$_("User Name")" type="text" class="text" style="width: 150px">
> -                            <input id="passwordId" placeholder="$_("Password")" type="text" class="text" style="width: 150px">
> +                            <input id="usernameId" placeholder="$_("User Name")" type="text" class="text storage-auth-width">
> +                            <input id="passwordId" placeholder="$_("Password")" type="text" class="text storage-auth-width">
>                           </div>
>                       </section>
>                   </div>




More information about the Kimchi-devel mailing list