<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/15/2014 07:26 PM, Aline Manera
wrote:<br>
</div>
<blockquote cite="mid:52D6705F.6030109@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 01/15/2014 08:04 AM, Yu Xin Huo
wrote:<br>
</div>
<blockquote cite="mid:52D65D49.3080304@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">the vlan id need to be validated,
it must be numeric and within 1 <= vlan id <= 4094.<br>
</div>
</blockquote>
<br>
ACK. I will add it in V3.<br>
</blockquote>
<br>
Could you please also consider to include the following fix:<br>
<br>
$("#enableVlan").on("click", function() {<br>
$("#networkVlanID").prop("disabled", !this.checked);<br>
+ if (!this.checked) {<br>
+ $("#networkVlanID").val("");<br>
+ }<br>
<br>
to reset the text when the checkbox is unchecked.<br>
<br>
It looks that I should not touch UI code any more. <br>
<br>
<blockquote cite="mid:52D6705F.6030109@linux.vnet.ibm.com"
type="cite"> <br>
<blockquote cite="mid:52D65D49.3080304@linux.vnet.ibm.com"
type="cite">
<div class="moz-cite-prefix"> <br>
I dislike the UI design, please change it.<br>
</div>
</blockquote>
<br>
This specific patch is to fix bug instead of redesign.<br>
So please, send a patch to redesign this view.<br>
<br>
I also would like to suggest more improvements to this network
creation window.<br>
<br>
1. To select a network type I need to select the circle itself,
which is boring.<br>
In other views selecting the text select the item. You need to
do it here too.<br>
<br>
2. The additional input boxes for bridged network should only
appear when selecting this option.<br>
So in a first moment, we only show the 2 options.<br>
When selecting "Briged" option we display:<br>
<br>
Destination: | <iface> |<br>
* Enable VLAN<br>
<br>
When only when selecting "Enable VLAN" we display the vlan_id
input box.<br>
<br>
<blockquote cite="mid:52D65D49.3080304@linux.vnet.ibm.com"
type="cite">
<div class="moz-cite-prefix"> <br>
<img src="cid:part1.05070809.03030904@linux.vnet.ibm.com"
alt=""> <img
src="cid:part2.07020007.02020705@linux.vnet.ibm.com" alt=""><br>
<br>
On 1/15/2014 7:57 AM, Aline Manera wrote:<br>
</div>
<blockquote
cite="mid:1389743877-13103-2-git-send-email-alinefm@linux.vnet.ibm.com"
type="cite">
<pre wrap="">From: Aline Manera <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:alinefm@br.ibm.com"><alinefm@br.ibm.com></a>
Commit 2f54aaba added a checkbox to provide choice of enabling vlan tagging
while creating a bridged network, but it doesn't check the checkbox before
setting the vlan_id to send server request.
Because that when the user tries to create a bridged network without enabling
VLAN the following error is raised:
Invalid parameter: 'None is not of type u'integer''
Fix it by setting vlan_id only if the vlan checkbox is checked.
Signed-off-by: Aline Manera <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:alinefm@br.ibm.com"><alinefm@br.ibm.com></a>
---
ui/js/src/kimchi.network.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index 65479b2..eb64e03 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -136,12 +136,13 @@ kimchi.initNetworkCreation = function() {
var data = {
name : network.name,
connection: network.type,
- vlan_id: network.vlan_id,
};
if (network.type === kimchi.NETWORK_TYPE_BRIDGE) {
data.connection = "bridge";
data.interface = network.interface;
- data.vlan_id = network.vlan_id;
+ if ($("#enableVlan").prop("checked")) {
+ data.vlan_id = network.vlan_id;
+ }
}
kimchi.createNetwork(data, function(result) {
network.state = result.state === "active" ? "up" : "down";
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>