[PATCH V4 0/2] Add ISCSI storage pool UI support

v3-v4 send para when auth is enable v2-v3 Modify this patchset according to backend changes Include create storage pool UI and translation files. zhoumeina (2): Add UI support of iscsi Add the ISCSI translation po files po/en_US.po | 52 +++++++++++++++++---- po/kimchi.pot | 47 +++++++++++++++--- po/pt_BR.po | 48 +++++++++++++++--- po/zh_CN.po | 48 +++++++++++++++--- ui/css/theme-default/form.css | 5 ++ ui/js/src/kimchi.storagepool_add_main.js | 77 +++++++++++++++++++++++++---- ui/js/src/kimchi.utils.js | 5 ++ ui/pages/i18n.html.tmpl | 7 ++- ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++---- 9 files changed, 281 insertions(+), 56 deletions(-) mode change 100644 => 100755 po/kimchi.pot

This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page. Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/css/theme-default/form.css | 5 ++ ui/js/src/kimchi.storagepool_add_main.js | 77 +++++++++++++++++++++++++---- ui/js/src/kimchi.utils.js | 5 ++ ui/pages/i18n.html.tmpl | 7 ++- ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++---- 5 files changed, 119 insertions(+), 23 deletions(-) diff --git a/ui/css/theme-default/form.css b/ui/css/theme-default/form.css index c24b277..28e30a5 100644 --- a/ui/css/theme-default/form.css +++ b/ui/css/theme-default/form.css @@ -45,3 +45,8 @@ line-height: 30px; padding: 0 5px; } + + +.form-section input.invalid-field[type="text"] { + border-color: #FF4444; +} \ No newline at end of file diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index a154933..a2e1f15 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "iSCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,16 +60,34 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); + $('#authId').click(function() { + if ($(this).prop("checked")) { + $('.authenticationfield').removeClass('tmpl-html'); + } else { + $('.authenticationfield').addClass('tmpl-html'); + } + }); + $('#iscsiportId').keyup(function(event) { + $(this).toggleClass("invalid-field",!/^[0-9]+$/.test($(this).val())); + }); }); }; @@ -85,6 +106,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +130,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +}; - if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +}; - if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -144,6 +185,7 @@ kimchi.validateLogicalForm = function () { kimchi.addPool = function(event) { if (kimchi.validateForm()) { var formData = $('#form-pool-add').serializeObject(); + delete formData.authname; var poolType = $("#poolType").val(); if (poolType === 'dir') { formData.path = $('#pathId').val(); @@ -158,11 +200,24 @@ kimchi.addPool = function(event) { } delete formData.devices; formData.source = source; - } else { + } else if (poolType === 'netfs'){ var source = {}; source.path = $('#nfspathId').val(); source.host = $('#nfsserverId').val(); formData.source = source; + } else { + var source = {}; + source.target = $('#iscsiTargetId').val(); + source.host = $('#iscsiserverId').val(); + source.port = $('#iscsiportId').val(); + if ($('#authId').prop("checked")) { + source.auth = []; + source.auth.push({ + "username" : $('#usernameId').val(), + "password" : $('#passwordId').val() + }); + } + formData.source = source; } if (poolType === 'logical') { var settings = { diff --git a/ui/js/src/kimchi.utils.js b/ui/js/src/kimchi.utils.js index 8af6a11..a23bf51 100644 --- a/ui/js/src/kimchi.utils.js +++ b/ui/js/src/kimchi.utils.js @@ -163,3 +163,8 @@ kimchi.changetoProperUnit = function(numOrg, digits, base) { kimchi.formatMeasurement = format; })(); + +kimchi.isUnsignedNumeric = function(number) { + var reg = /^d+(.d+)?$/ + return reg.test(number); +} diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 5a2dd45..fa77a8b 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: 600px;"> + <div class="window" style="width: 600px; height: 700px;"> <header> <h1 class="title">$_("Define a New Storage Pool")</h1> <div class="close">X</div> @@ -40,7 +40,7 @@ <p class="text-help"> $_("The name used to identify the storage pools, and it should not be empty.") </p> - <input id="poolId" type="text" class="text" style="width: 300px" + <input id="poolId" required="required" type="text" class="text" style="width: 300px" name="name"> </div> </section> @@ -65,7 +65,7 @@ $_("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" style="width: 300px"> + <input id="pathId" type="text" class="text" required="required" style="width: 300px"> </div> <div class="clear"></div> </section> @@ -76,7 +76,7 @@ <div class="field"> <p class="text-help"> $_("NFS server IP or hostname. It should not be empty.")</p> - <input id="nfsserverId" type="text" class="text" + <input id="nfsserverId" required="required" type="text" class="text" style="width: 300px"> </div> </section> @@ -84,10 +84,9 @@ <h2>4. $_("NFS Path")</h2> <div class="field"> <p class="text-help">$_("The nfs exported path on nfs server")</p> - <input id="nfspathId" type="text" class="text" + <input id="nfspathId" required="required" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -98,6 +97,37 @@ <div class="host-partition"></div> </section> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("iSCSI Server")</h2> + <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'> + </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"> + </div> + </section> + <section class="form-section"> + <div class="field"> + <input type="checkbox" id="authId" name="authname"> + <label>$_("Add iSCSI Authentication...")</label> + </div> + </section> + <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"> + </div> + </section> + </div> </form> </div> <footer> @@ -113,8 +143,8 @@ </script> <script id="partitionTmpl" type="html/text"> <div> - <input type="checkbox" value="{path}" name="devices"> - <label>{path}</label> + <input type="checkbox" value="{path}" name="source.devices"> + <label>{path}</label> </div> </script> </body> -- 1.7.1

The UI looks good. But there are tabs in ui/pages/storagepool-add.html.tmpl. Please, use 4 spaces for indentation. And just a minor comment below. On 01/03/2014 07:29 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/css/theme-default/form.css | 5 ++ ui/js/src/kimchi.storagepool_add_main.js | 77 +++++++++++++++++++++++++---- ui/js/src/kimchi.utils.js | 5 ++ ui/pages/i18n.html.tmpl | 7 ++- ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++---- 5 files changed, 119 insertions(+), 23 deletions(-)
diff --git a/ui/css/theme-default/form.css b/ui/css/theme-default/form.css index c24b277..28e30a5 100644 --- a/ui/css/theme-default/form.css +++ b/ui/css/theme-default/form.css @@ -45,3 +45,8 @@ line-height: 30px; padding: 0 5px; } + + +.form-section input.invalid-field[type="text"] { + border-color: #FF4444; +} \ No newline at end of file diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index a154933..a2e1f15 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "iSCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,16 +60,34 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); + $('#authId').click(function() { + if ($(this).prop("checked")) { + $('.authenticationfield').removeClass('tmpl-html'); + } else { + $('.authenticationfield').addClass('tmpl-html'); + } + }); + $('#iscsiportId').keyup(function(event) { + $(this).toggleClass("invalid-field",!/^[0-9]+$/.test($(this).val())); + }); }); };
@@ -85,6 +106,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +130,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -144,6 +185,7 @@ kimchi.validateLogicalForm = function () { kimchi.addPool = function(event) { if (kimchi.validateForm()) { var formData = $('#form-pool-add').serializeObject(); + delete formData.authname; var poolType = $("#poolType").val(); if (poolType === 'dir') { formData.path = $('#pathId').val(); @@ -158,11 +200,24 @@ kimchi.addPool = function(event) { } delete formData.devices; formData.source = source; - } else { + } else if (poolType === 'netfs'){ var source = {}; source.path = $('#nfspathId').val(); source.host = $('#nfsserverId').val(); formData.source = source; + } else { + var source = {}; + source.target = $('#iscsiTargetId').val(); + source.host = $('#iscsiserverId').val(); + source.port = $('#iscsiportId').val(); + if ($('#authId').prop("checked")) { + source.auth = []; + source.auth.push({ + "username" : $('#usernameId').val(), + "password" : $('#passwordId').val() + }); + } + formData.source = source; } if (poolType === 'logical') { var settings = { diff --git a/ui/js/src/kimchi.utils.js b/ui/js/src/kimchi.utils.js index 8af6a11..a23bf51 100644 --- a/ui/js/src/kimchi.utils.js +++ b/ui/js/src/kimchi.utils.js @@ -163,3 +163,8 @@ kimchi.changetoProperUnit = function(numOrg, digits, base) {
kimchi.formatMeasurement = format; })(); + +kimchi.isUnsignedNumeric = function(number) { + var reg = /^d+(.d+)?$/ + return reg.test(number); +} diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 5a2dd45..fa77a8b 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: 600px;"> + <div class="window" style="width: 600px; height: 700px;"> <header> <h1 class="title">$_("Define a New Storage Pool")</h1> <div class="close">X</div> @@ -40,7 +40,7 @@ <p class="text-help"> $_("The name used to identify the storage pools, and it should not be empty.") </p> - <input id="poolId" type="text" class="text" style="width: 300px" + <input id="poolId" required="required" type="text" class="text" style="width: 300px" name="name"> </div> </section> @@ -65,7 +65,7 @@ $_("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" style="width: 300px"> + <input id="pathId" type="text" class="text" required="required" style="width: 300px"> </div> <div class="clear"></div> </section> @@ -76,7 +76,7 @@ <div class="field"> <p class="text-help"> $_("NFS server IP or hostname. It should not be empty.")</p> - <input id="nfsserverId" type="text" class="text" + <input id="nfsserverId" required="required" type="text" class="text" style="width: 300px"> </div> </section> @@ -84,10 +84,9 @@ <h2>4. $_("NFS Path")</h2> <div class="field"> <p class="text-help">$_("The nfs exported path on nfs server")</p> - <input id="nfspathId" type="text" class="text" + <input id="nfspathId" required="required" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -98,6 +97,37 @@ <div class="host-partition"></div> </section> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("iSCSI Server")</h2> + <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'> + </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"> + </div> + </section> + <section class="form-section"> + <div class="field"> + <input type="checkbox" id="authId" name="authname"> + <label>$_("Add iSCSI Authentication...")</label>
I'd suggest to remove ... "Add iSCSI Authentication"
+ </div> + </section> + <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"> + </div> + </section> + </div> </form> </div> <footer> @@ -113,8 +143,8 @@ </script> <script id="partitionTmpl" type="html/text"> <div> - <input type="checkbox" value="{path}" name="devices"> - <label>{path}</label> + <input type="checkbox" value="{path}" name="source.devices"> + <label>{path}</label> </div> </script> </body>

On 01/07/2014 12:12 AM, Aline Manera wrote:
The UI looks good.
But there are tabs in ui/pages/storagepool-add.html.tmpl. Please, use 4 spaces for indentation.
And just a minor comment below.
On 01/03/2014 07:29 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/css/theme-default/form.css | 5 ++ ui/js/src/kimchi.storagepool_add_main.js | 77 +++++++++++++++++++++++++---- ui/js/src/kimchi.utils.js | 5 ++ ui/pages/i18n.html.tmpl | 7 ++- ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++---- 5 files changed, 119 insertions(+), 23 deletions(-)
diff --git a/ui/css/theme-default/form.css b/ui/css/theme-default/form.css index c24b277..28e30a5 100644 --- a/ui/css/theme-default/form.css +++ b/ui/css/theme-default/form.css @@ -45,3 +45,8 @@ line-height: 30px; padding: 0 5px; } + + +.form-section input.invalid-field[type="text"] { + border-color: #FF4444; +} \ No newline at end of file diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index a154933..a2e1f15 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "iSCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,16 +60,34 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); + $('#authId').click(function() { + if ($(this).prop("checked")) { + $('.authenticationfield').removeClass('tmpl-html'); + } else { + $('.authenticationfield').addClass('tmpl-html'); + } + }); + $('#iscsiportId').keyup(function(event) { + $(this).toggleClass("invalid-field",!/^[0-9]+$/.test($(this).val())); + }); }); };
@@ -85,6 +106,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +130,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -144,6 +185,7 @@ kimchi.validateLogicalForm = function () { kimchi.addPool = function(event) { if (kimchi.validateForm()) { var formData = $('#form-pool-add').serializeObject(); + delete formData.authname; var poolType = $("#poolType").val(); if (poolType === 'dir') { formData.path = $('#pathId').val(); @@ -158,11 +200,24 @@ kimchi.addPool = function(event) { } delete formData.devices; formData.source = source; - } else { + } else if (poolType === 'netfs'){ var source = {}; source.path = $('#nfspathId').val(); source.host = $('#nfsserverId').val(); formData.source = source; + } else { + var source = {}; + source.target = $('#iscsiTargetId').val(); + source.host = $('#iscsiserverId').val(); + source.port = $('#iscsiportId').val(); + if ($('#authId').prop("checked")) { + source.auth = []; + source.auth.push({ + "username" : $('#usernameId').val(), + "password" : $('#passwordId').val() + }); + } + formData.source = source; } if (poolType === 'logical') { var settings = { diff --git a/ui/js/src/kimchi.utils.js b/ui/js/src/kimchi.utils.js index 8af6a11..a23bf51 100644 --- a/ui/js/src/kimchi.utils.js +++ b/ui/js/src/kimchi.utils.js @@ -163,3 +163,8 @@ kimchi.changetoProperUnit = function(numOrg, digits, base) {
kimchi.formatMeasurement = format; })(); + +kimchi.isUnsignedNumeric = function(number) { + var reg = /^d+(.d+)?$/ + return reg.test(number); +} diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 5a2dd45..fa77a8b 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: 600px;"> + <div class="window" style="width: 600px; height: 700px;"> <header> <h1 class="title">$_("Define a New Storage Pool")</h1> <div class="close">X</div> @@ -40,7 +40,7 @@ <p class="text-help"> $_("The name used to identify the storage pools, and it should not be empty.") </p> - <input id="poolId" type="text" class="text" style="width: 300px" + <input id="poolId" required="required" type="text" class="text" style="width: 300px" name="name"> </div> </section> @@ -65,7 +65,7 @@ $_("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" style="width: 300px"> + <input id="pathId" type="text" class="text" required="required" style="width: 300px"> </div> <div class="clear"></div> </section> @@ -76,7 +76,7 @@ <div class="field"> <p class="text-help"> $_("NFS server IP or hostname. It should not be empty.")</p> - <input id="nfsserverId" type="text" class="text" + <input id="nfsserverId" required="required" type="text" class="text" style="width: 300px"> </div> </section> @@ -84,10 +84,9 @@ <h2>4. $_("NFS Path")</h2> <div class="field"> <p class="text-help">$_("The nfs exported path on nfs server")</p> - <input id="nfspathId" type="text" class="text" + <input id="nfspathId" required="required" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -98,6 +97,37 @@ <div class="host-partition"></div> </section> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("iSCSI Server")</h2> + <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'> + </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"> + </div> + </section> + <section class="form-section"> + <div class="field"> + <input type="checkbox" id="authId" name="authname"> + <label>$_("Add iSCSI Authentication...")</label>
I'd suggest to remove ...
"Add iSCSI Authentication"
but if I remove this message , how can the user know what does the "..." mean?
+ </div> + </section> + <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"> + </div> + </section> + </div> </form> </div> <footer> @@ -113,8 +143,8 @@ </script> <script id="partitionTmpl" type="html/text"> <div> - <input type="checkbox" value="{path}" name="devices"> - <label>{path}</label> + <input type="checkbox" value="{path}" name="source.devices"> + <label>{path}</label> </div> </script> </body>

on 2014/01/03 17:29, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/css/theme-default/form.css | 5 ++ ui/js/src/kimchi.storagepool_add_main.js | 77 +++++++++++++++++++++++++---- ui/js/src/kimchi.utils.js | 5 ++ ui/pages/i18n.html.tmpl | 7 ++- ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++---- 5 files changed, 119 insertions(+), 23 deletions(-)
diff --git a/ui/css/theme-default/form.css b/ui/css/theme-default/form.css index c24b277..28e30a5 100644 --- a/ui/css/theme-default/form.css +++ b/ui/css/theme-default/form.css @@ -45,3 +45,8 @@ line-height: 30px; padding: 0 5px; } + + +.form-section input.invalid-field[type="text"] { + border-color: #FF4444; +} \ No newline at end of file diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index a154933..a2e1f15 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "iSCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,16 +60,34 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); + $('#authId').click(function() { + if ($(this).prop("checked")) { + $('.authenticationfield').removeClass('tmpl-html'); + } else { + $('.authenticationfield').addClass('tmpl-html'); + } + }); + $('#iscsiportId').keyup(function(event) { + $(this).toggleClass("invalid-field",!/^[0-9]+$/.test($(this).val())); + }); }); };
@@ -85,6 +106,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +130,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -144,6 +185,7 @@ kimchi.validateLogicalForm = function () { kimchi.addPool = function(event) { if (kimchi.validateForm()) { var formData = $('#form-pool-add').serializeObject(); + delete formData.authname; var poolType = $("#poolType").val(); if (poolType === 'dir') { formData.path = $('#pathId').val(); @@ -158,11 +200,24 @@ kimchi.addPool = function(event) { } delete formData.devices; formData.source = source; - } else { + } else if (poolType === 'netfs'){ var source = {}; source.path = $('#nfspathId').val(); source.host = $('#nfsserverId').val(); formData.source = source; + } else { + var source = {}; + source.target = $('#iscsiTargetId').val(); + source.host = $('#iscsiserverId').val(); + source.port = $('#iscsiportId').val();
Hello, as we discussed, if "$('#iscsiportId').val()" is empty, we should not assign it to source.port. Maybe you could add a "if" to check if port is empty and only add a "port" attribute to "source" when port is non-empty. Another small problem is the back-end actually expects source.port a integer. So in all the port assignment logic can be expressed by the following pseudo-code. if $('#nfsserverId').val() is not empty source.port = parseInt($('#iscsiportId').val())
+ if ($('#authId').prop("checked")) { + source.auth = []; + source.auth.push({ + "username" : $('#usernameId').val(), + "password" : $('#passwordId').val() + });
The back-end expects the auth is a dict, but here it is an array. I change it to a dict and test the following. if ($('#authId').prop("checked")) { source.auth = {}; source.auth.username = $('#usernameId').val(); source.auth.password = $('#passwordId').val(); }
+ } + formData.source = source; } if (poolType === 'logical') { var settings = { diff --git a/ui/js/src/kimchi.utils.js b/ui/js/src/kimchi.utils.js index 8af6a11..a23bf51 100644 --- a/ui/js/src/kimchi.utils.js +++ b/ui/js/src/kimchi.utils.js @@ -163,3 +163,8 @@ kimchi.changetoProperUnit = function(numOrg, digits, base) {
kimchi.formatMeasurement = format; })(); + +kimchi.isUnsignedNumeric = function(number) { + var reg = /^d+(.d+)?$/ + return reg.test(number); +} diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 5a2dd45..fa77a8b 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: 600px;"> + <div class="window" style="width: 600px; height: 700px;"> <header> <h1 class="title">$_("Define a New Storage Pool")</h1> <div class="close">X</div> @@ -40,7 +40,7 @@ <p class="text-help"> $_("The name used to identify the storage pools, and it should not be empty.") </p> - <input id="poolId" type="text" class="text" style="width: 300px" + <input id="poolId" required="required" type="text" class="text" style="width: 300px" name="name"> </div> </section> @@ -65,7 +65,7 @@ $_("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" style="width: 300px"> + <input id="pathId" type="text" class="text" required="required" style="width: 300px"> </div> <div class="clear"></div> </section> @@ -76,7 +76,7 @@ <div class="field"> <p class="text-help"> $_("NFS server IP or hostname. It should not be empty.")</p> - <input id="nfsserverId" type="text" class="text" + <input id="nfsserverId" required="required" type="text" class="text" style="width: 300px"> </div> </section> @@ -84,10 +84,9 @@ <h2>4. $_("NFS Path")</h2> <div class="field"> <p class="text-help">$_("The nfs exported path on nfs server")</p> - <input id="nfspathId" type="text" class="text" + <input id="nfspathId" required="required" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -98,6 +97,37 @@ <div class="host-partition"></div> </section> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("iSCSI Server")</h2> + <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'> + </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"> + </div> + </section> + <section class="form-section"> + <div class="field"> + <input type="checkbox" id="authId" name="authname"> + <label>$_("Add iSCSI Authentication...")</label> + </div> + </section> + <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"> + </div> + </section> + </div> </form> </div> <footer> @@ -113,8 +143,8 @@ </script> <script id="partitionTmpl" type="html/text"> <div> - <input type="checkbox" value="{path}" name="devices"> - <label>{path}</label> + <input type="checkbox" value="{path}" name="source.devices"> + <label>{path}</label> </div> </script> </body>
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

On 01/07/2014 11:51 AM, Zhou Zheng Sheng wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/css/theme-default/form.css | 5 ++ ui/js/src/kimchi.storagepool_add_main.js | 77 +++++++++++++++++++++++++---- ui/js/src/kimchi.utils.js | 5 ++ ui/pages/i18n.html.tmpl | 7 ++- ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++---- 5 files changed, 119 insertions(+), 23 deletions(-)
diff --git a/ui/css/theme-default/form.css b/ui/css/theme-default/form.css index c24b277..28e30a5 100644 --- a/ui/css/theme-default/form.css +++ b/ui/css/theme-default/form.css @@ -45,3 +45,8 @@ line-height: 30px; padding: 0 5px; } + + +.form-section input.invalid-field[type="text"] { + border-color: #FF4444; +} \ No newline at end of file diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index a154933..a2e1f15 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "iSCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,16 +60,34 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); + $('#authId').click(function() { + if ($(this).prop("checked")) { + $('.authenticationfield').removeClass('tmpl-html'); + } else { + $('.authenticationfield').addClass('tmpl-html'); + } + }); + $('#iscsiportId').keyup(function(event) { + $(this).toggleClass("invalid-field",!/^[0-9]+$/.test($(this).val())); + }); }); };
@@ -85,6 +106,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +130,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -144,6 +185,7 @@ kimchi.validateLogicalForm = function () { kimchi.addPool = function(event) { if (kimchi.validateForm()) { var formData = $('#form-pool-add').serializeObject(); + delete formData.authname; var poolType = $("#poolType").val(); if (poolType === 'dir') { formData.path = $('#pathId').val(); @@ -158,11 +200,24 @@ kimchi.addPool = function(event) { } delete formData.devices; formData.source = source; - } else { + } else if (poolType === 'netfs'){ var source = {}; source.path = $('#nfspathId').val(); source.host = $('#nfsserverId').val(); formData.source = source; + } else { + var source = {}; + source.target = $('#iscsiTargetId').val(); + source.host = $('#iscsiserverId').val(); + source.port = $('#iscsiportId').val(); Hello, as we discussed, if "$('#iscsiportId').val()" is empty, we should not assign it to source.port. Maybe you could add a "if" to check if
on 2014/01/03 17:29, zhoumeina wrote: port is empty and only add a "port" attribute to "source" when port is non-empty.
Another small problem is the back-end actually expects source.port a integer. So in all the port assignment logic can be expressed by the following pseudo-code.
if $('#nfsserverId').val() is not empty source.port = parseInt($('#iscsiportId').val()) ok
+ if ($('#authId').prop("checked")) { + source.auth = []; + source.auth.push({ + "username" : $('#usernameId').val(), + "password" : $('#passwordId').val() + }); The back-end expects the auth is a dict, but here it is an array. I change it to a dict and test the following.
if ($('#authId').prop("checked")) { source.auth = {}; source.auth.username = $('#usernameId').val(); source.auth.password = $('#passwordId').val(); } object not array, right? ok , change it next version.
+ } + formData.source = source; } if (poolType === 'logical') { var settings = { diff --git a/ui/js/src/kimchi.utils.js b/ui/js/src/kimchi.utils.js index 8af6a11..a23bf51 100644 --- a/ui/js/src/kimchi.utils.js +++ b/ui/js/src/kimchi.utils.js @@ -163,3 +163,8 @@ kimchi.changetoProperUnit = function(numOrg, digits, base) {
kimchi.formatMeasurement = format; })(); + +kimchi.isUnsignedNumeric = function(number) { + var reg = /^d+(.d+)?$/ + return reg.test(number); +} diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 5a2dd45..fa77a8b 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: 600px;"> + <div class="window" style="width: 600px; height: 700px;"> <header> <h1 class="title">$_("Define a New Storage Pool")</h1> <div class="close">X</div> @@ -40,7 +40,7 @@ <p class="text-help"> $_("The name used to identify the storage pools, and it should not be empty.") </p> - <input id="poolId" type="text" class="text" style="width: 300px" + <input id="poolId" required="required" type="text" class="text" style="width: 300px" name="name"> </div> </section> @@ -65,7 +65,7 @@ $_("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" style="width: 300px"> + <input id="pathId" type="text" class="text" required="required" style="width: 300px"> </div> <div class="clear"></div> </section> @@ -76,7 +76,7 @@ <div class="field"> <p class="text-help"> $_("NFS server IP or hostname. It should not be empty.")</p> - <input id="nfsserverId" type="text" class="text" + <input id="nfsserverId" required="required" type="text" class="text" style="width: 300px"> </div> </section> @@ -84,10 +84,9 @@ <h2>4. $_("NFS Path")</h2> <div class="field"> <p class="text-help">$_("The nfs exported path on nfs server")</p> - <input id="nfspathId" type="text" class="text" + <input id="nfspathId" required="required" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -98,6 +97,37 @@ <div class="host-partition"></div> </section> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("iSCSI Server")</h2> + <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'> + </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"> + </div> + </section> + <section class="form-section"> + <div class="field"> + <input type="checkbox" id="authId" name="authname"> + <label>$_("Add iSCSI Authentication...")</label> + </div> + </section> + <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"> + </div> + </section> + </div> </form> </div> <footer> @@ -113,8 +143,8 @@ </script> <script id="partitionTmpl" type="html/text"> <div> - <input type="checkbox" value="{path}" name="devices"> - <label>{path}</label> + <input type="checkbox" value="{path}" name="source.devices"> + <label>{path}</label> </div> </script> </body>

Add the Chinese and English translation po files of iscsi pool. Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- po/en_US.po | 52 +++++++++++++++++++++++++++++++++++++++++++--------- po/kimchi.pot | 47 +++++++++++++++++++++++++++++++++++++++-------- po/pt_BR.po | 48 ++++++++++++++++++++++++++++++++++++++++-------- po/zh_CN.po | 48 ++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 162 insertions(+), 33 deletions(-) mode change 100644 => 100755 po/kimchi.pot diff --git a/po/en_US.po b/po/en_US.po index f2810db..30f0c79 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -6,14 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-07-11 17:32-0400\n" "Last-Translator: Crístian Viana <vianac@linux.vnet.ibm.com>\n" "Language-Team: English\n" -"Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -335,9 +335,6 @@ msgstr "The storage pool name can not be blank." msgid "The storage pool path can not be blank." msgstr "The storage pool path can not be blank." -msgid "NFS server can not be blank." -msgstr "NFS server can not be blank." - msgid "NFS server mount path can not be blank." msgstr "NFS server mount path can not be blank." @@ -351,9 +348,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "This is not a real linux path." -msgid "This is not a valid NFS server." -msgstr "This is not a valid NFS server." - msgid "Invalid nfs mount path." msgstr "Invalid nfs mount path." @@ -407,6 +401,15 @@ msgstr "" "It will format your disk and you will loose any data in there, are you sure " "to continue? " +msgid "The iscsi target can not be blank." +msgstr "The iscsi target can not be blank." + +msgid "Server name can not be blank." +msgstr "Server name can not be blank." + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "This is not a valid Server Name or IP. please, modify it." + msgid "Log out" msgstr "Log out" @@ -414,7 +417,7 @@ msgid "Log In" msgstr "Log In" msgid "User Name" -msgstr "Name" +msgstr "User Name" msgid "Password" msgstr "Password" @@ -456,6 +459,13 @@ msgid "" msgstr "" "The path of the Storage Pool. Each Storage Pool must have a unique path." +msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." + msgid "NFS server IP" msgstr "NFS server IP" @@ -471,6 +481,30 @@ msgstr "The nfs exported path on nfs server" msgid "Device Path" msgstr "Device Path" +msgid "iSCSI Server" +msgstr "iSCSI Server" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "iSCSI server IP or hostname. It should not be empty." + +msgid "Server" +msgstr "Server" + +msgid "Port" +msgstr "Port" + +msgid "Target" +msgstr "Target" + +msgid "The iSCSI target on iSCSI server" +msgstr "The iSCSI target on iSCSI server" + +msgid "Add iSCSI Authentication..." +msgstr "Add iSCSI Authentication..." + +msgid "iSCSI Authentication" +msgstr "iSCSI Authentication" + msgid "CPU" msgstr "CPU" diff --git a/po/kimchi.pot b/po/kimchi.pot old mode 100644 new mode 100755 index 762f4e4..8457262 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -8,11 +8,10 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -326,9 +325,6 @@ msgstr "" msgid "The storage pool path can not be blank." msgstr "" -msgid "NFS server can not be blank." -msgstr "" - msgid "NFS server mount path can not be blank." msgstr "" @@ -340,9 +336,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "" -msgid "This is not a valid NFS server." -msgstr "" - msgid "Invalid nfs mount path." msgstr "" @@ -392,6 +385,15 @@ msgid "" "to continue? " msgstr "" +msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr "" @@ -436,6 +438,11 @@ msgid "" "The path of the Storage Pool. Each Storage Pool must have a unique path." msgstr "" +msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" + msgid "NFS server IP" msgstr "" @@ -451,6 +458,30 @@ msgstr "" msgid "Device Path" msgstr "" +msgid "iSCSI Server" +msgstr "" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The iSCSI target on iSCSI server" +msgstr "" + +msgid "Add iSCSI Authentication..." +msgstr "" + +msgid "iSCSI Authentication" +msgstr "" + msgid "CPU" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 7d59503..2d6bb23 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: Alexandre Hirata <hirata@linux.vnet.ibm.com>\n" "Language-Team: Aline Manera <alinefm@br.ibm.com>\n" -"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: Brazil\n" "X-Poedit-Language: Portuguese\n" @@ -352,9 +352,6 @@ msgstr "O nome do storage pool não pode ser em branco." msgid "The storage pool path can not be blank." msgstr "O caminho do storage pool não pde ser em branco." -msgid "NFS server can not be blank." -msgstr "Servidor de NFS não pode ficar em branco." - msgid "NFS server mount path can not be blank." msgstr "Caminho de montagem do servidor de NFS não pode ficar em branco." @@ -368,9 +365,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "Esse não é um caminho real no linux." -msgid "This is not a valid NFS server." -msgstr "Isso não é um servidor de NFS válido." - msgid "Invalid nfs mount path." msgstr "Caminho de montagem NFS inválido." @@ -424,6 +418,15 @@ msgstr "" "Isso formatará seu disco e você perderá toda informação, você tem certeza " "que quer continuar?" +msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr "Sair" @@ -472,6 +475,11 @@ msgid "" msgstr "" "O caminho do Storage Pool. Cada Storage Pool deve ter um único caminho." +msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" + msgid "NFS server IP" msgstr "Endereço IP do servidor NFS" @@ -487,6 +495,30 @@ msgstr "O caminho exportado no servidor NFS" msgid "Device Path" msgstr "Caminho do dispositivo" +msgid "iSCSI Server" +msgstr "" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The iSCSI target on iSCSI server" +msgstr "" + +msgid "Add iSCSI Authentication..." +msgstr "" + +msgid "iSCSI Authentication" +msgstr "" + msgid "CPU" msgstr "CPU" diff --git a/po/zh_CN.po b/po/zh_CN.po index de759ef..eb11f4e 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" "Language-Team: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" -"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: CHINA\n" "X-Poedit-Language: Chinese\n" @@ -342,9 +342,6 @@ msgstr "存储池的名字不能为空" msgid "The storage pool path can not be blank." msgstr "存储池的路径不能为空" -msgid "NFS server can not be blank." -msgstr "NFS服务器不能为空" - msgid "NFS server mount path can not be blank." msgstr "NFS服务器挂载路径不能为空" @@ -356,9 +353,6 @@ msgstr "无效的存储池名字,它应该只包括字母,数字,下划线 msgid "This is not a real linux path." msgstr "这不是一个符合要求的LINUX路径" -msgid "This is not a valid NFS server." -msgstr "这不是一个有效的NFS服务器" - msgid "Invalid nfs mount path." msgstr "无效的nfs挂载路径" @@ -408,6 +402,15 @@ msgid "" "to continue? " msgstr "你的磁盘将会格式化,磁盘上的数据会丢失,你确定要继续吗?" +msgid "The iscsi target can not be blank." +msgstr "ISCSI对象的路径不能为空" + +msgid "Server name can not be blank." +msgstr "服务器不能为空" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "这不是一个有效的服务器名或IP,请修改" + msgid "Log out" msgstr "登出" @@ -454,6 +457,11 @@ msgid "" "The path of the Storage Pool. Each Storage Pool must have a unique path." msgstr "存储池的路径.每个存储池的路径是唯一的。" +msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "如果目录不存在,KIMCHI会自动在系统中创建一个新的目录" + msgid "NFS server IP" msgstr "NFS服务器IP" @@ -469,6 +477,30 @@ msgstr "nfs服务器上导出的路径" msgid "Device Path" msgstr "设备路径" +msgid "iSCSI Server" +msgstr "iSCSI服务器" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "iSCSI服务器IP或者主机名, 不能为空。" + +msgid "Server" +msgstr "服务器" + +msgid "Port" +msgstr "端口" + +msgid "Target" +msgstr "对象" + +msgid "The iSCSI target on iSCSI server" +msgstr "iSCSI服务器对象" + +msgid "Add iSCSI Authentication..." +msgstr "添加ISCSI认证" + +msgid "iSCSI Authentication" +msgstr "iSCSI认证" + msgid "CPU" msgstr "处理器" -- 1.7.1

于 2014年01月03日 17:29, zhoumeina 写道:
Add the Chinese and English translation po files of iscsi pool. Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- po/en_US.po | 52 +++++++++++++++++++++++++++++++++++++++++++--------- po/kimchi.pot | 47 +++++++++++++++++++++++++++++++++++++++-------- po/pt_BR.po | 48 ++++++++++++++++++++++++++++++++++++++++-------- po/zh_CN.po | 48 ++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 162 insertions(+), 33 deletions(-) mode change 100644 => 100755 po/kimchi.pot
diff --git a/po/en_US.po b/po/en_US.po index f2810db..30f0c79 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -6,14 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-07-11 17:32-0400\n" "Last-Translator: Crístian Viana <vianac@linux.vnet.ibm.com>\n" "Language-Team: English\n" -"Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -335,9 +335,6 @@ msgstr "The storage pool name can not be blank." msgid "The storage pool path can not be blank." msgstr "The storage pool path can not be blank."
-msgid "NFS server can not be blank." -msgstr "NFS server can not be blank." - msgid "NFS server mount path can not be blank." msgstr "NFS server mount path can not be blank."
@@ -351,9 +348,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "This is not a real linux path."
-msgid "This is not a valid NFS server." -msgstr "This is not a valid NFS server." - msgid "Invalid nfs mount path." msgstr "Invalid nfs mount path."
@@ -407,6 +401,15 @@ msgstr "" "It will format your disk and you will loose any data in there, are you sure " "to continue? "
+msgid "The iscsi target can not be blank." +msgstr "The iscsi target can not be blank." + +msgid "Server name can not be blank." +msgstr "Server name can not be blank." + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "This is not a valid Server Name or IP. please, modify it." + msgid "Log out" msgstr "Log out"
@@ -414,7 +417,7 @@ msgid "Log In" msgstr "Log In"
msgid "User Name" -msgstr "Name" +msgstr "User Name"
msgid "Password" msgstr "Password" @@ -456,6 +459,13 @@ msgid "" msgstr "" "The path of the Storage Pool. Each Storage Pool must have a unique path."
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." + msgid "NFS server IP" msgstr "NFS server IP"
@@ -471,6 +481,30 @@ msgstr "The nfs exported path on nfs server" msgid "Device Path" msgstr "Device Path"
+msgid "iSCSI Server" +msgstr "iSCSI Server" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "iSCSI server IP or hostname. It should not be empty." + +msgid "Server" +msgstr "Server" + +msgid "Port" +msgstr "Port" + +msgid "Target" +msgstr "Target" + +msgid "The iSCSI target on iSCSI server" +msgstr "The iSCSI target on iSCSI server" + +msgid "Add iSCSI Authentication..." +msgstr "Add iSCSI Authentication..." + +msgid "iSCSI Authentication" +msgstr "iSCSI Authentication" + msgid "CPU" msgstr "CPU"
diff --git a/po/kimchi.pot b/po/kimchi.pot old mode 100644 new mode 100755 index 762f4e4..8457262 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -8,11 +8,10 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -326,9 +325,6 @@ msgstr "" msgid "The storage pool path can not be blank." msgstr ""
-msgid "NFS server can not be blank." -msgstr "" - msgid "NFS server mount path can not be blank." msgstr ""
@@ -340,9 +336,6 @@ msgstr "" msgid "This is not a real linux path." msgstr ""
-msgid "This is not a valid NFS server." -msgstr "" - msgid "Invalid nfs mount path." msgstr ""
@@ -392,6 +385,15 @@ msgid "" "to continue? " msgstr ""
+msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr ""
@@ -436,6 +438,11 @@ msgid "" "The path of the Storage Pool. Each Storage Pool must have a unique path." msgstr ""
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" + msgid "NFS server IP" msgstr ""
@@ -451,6 +458,30 @@ msgstr "" msgid "Device Path" msgstr ""
+msgid "iSCSI Server" +msgstr "" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The iSCSI target on iSCSI server" +msgstr "" + +msgid "Add iSCSI Authentication..." +msgstr "" + +msgid "iSCSI Authentication" +msgstr "" + msgid "CPU" msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po index 7d59503..2d6bb23 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: Alexandre Hirata <hirata@linux.vnet.ibm.com>\n" "Language-Team: Aline Manera <alinefm@br.ibm.com>\n" -"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: Brazil\n" "X-Poedit-Language: Portuguese\n" @@ -352,9 +352,6 @@ msgstr "O nome do storage pool não pode ser em branco." msgid "The storage pool path can not be blank." msgstr "O caminho do storage pool não pde ser em branco."
-msgid "NFS server can not be blank." -msgstr "Servidor de NFS não pode ficar em branco." - msgid "NFS server mount path can not be blank." msgstr "Caminho de montagem do servidor de NFS não pode ficar em branco."
@@ -368,9 +365,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "Esse não é um caminho real no linux."
-msgid "This is not a valid NFS server." -msgstr "Isso não é um servidor de NFS válido." - msgid "Invalid nfs mount path." msgstr "Caminho de montagem NFS inválido."
@@ -424,6 +418,15 @@ msgstr "" "Isso formatará seu disco e você perderá toda informação, você tem certeza " "que quer continuar?"
+msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr "Sair"
@@ -472,6 +475,11 @@ msgid "" msgstr "" "O caminho do Storage Pool. Cada Storage Pool deve ter um único caminho."
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" + msgid "NFS server IP" msgstr "Endereço IP do servidor NFS"
@@ -487,6 +495,30 @@ msgstr "O caminho exportado no servidor NFS" msgid "Device Path" msgstr "Caminho do dispositivo"
+msgid "iSCSI Server" +msgstr "" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The iSCSI target on iSCSI server" +msgstr "" + +msgid "Add iSCSI Authentication..." +msgstr "" + +msgid "iSCSI Authentication" +msgstr "" + msgid "CPU" msgstr "CPU"
diff --git a/po/zh_CN.po b/po/zh_CN.po index de759ef..eb11f4e 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" "Language-Team: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" -"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: CHINA\n" "X-Poedit-Language: Chinese\n" @@ -342,9 +342,6 @@ msgstr "存储池的名字不能为空" msgid "The storage pool path can not be blank." msgstr "存储池的路径不能为空"
-msgid "NFS server can not be blank." -msgstr "NFS服务器不能为空" - msgid "NFS server mount path can not be blank." msgstr "NFS服务器挂载路径不能为空"
@@ -356,9 +353,6 @@ msgstr "无效的存储池名字,它应该只包括字母,数字,下划线 msgid "This is not a real linux path." msgstr "这不是一个符合要求的LINUX路径"
-msgid "This is not a valid NFS server." -msgstr "这不是一个有效的NFS服务器" - msgid "Invalid nfs mount path." msgstr "无效的nfs挂载路径"
@@ -408,6 +402,15 @@ msgid "" "to continue? " msgstr "你的磁盘将会格式化,磁盘上的数据会丢失,你确定要继续吗?"
+msgid "The iscsi target can not be blank." +msgstr "ISCSI对象的路径不能为空" + +msgid "Server name can not be blank." +msgstr "服务器不能为空" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "这不是一个有效的服务器名或IP,请修改" + msgid "Log out" msgstr "登出"
@@ -454,6 +457,11 @@ msgid "" "The path of the Storage Pool. Each Storage Pool must have a unique path." msgstr "存储池的路径.每个存储池的路径是唯一的。"
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "如果目录不存在,KIMCHI会自动在系统中创建一个新的目录" + msgid "NFS server IP" msgstr "NFS服务器IP"
@@ -469,6 +477,30 @@ msgstr "nfs服务器上导出的路径" msgid "Device Path" msgstr "设备路径"
+msgid "iSCSI Server" +msgstr "iSCSI服务器" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "iSCSI服务器IP或者主机名, 不能为空。" + +msgid "Server" +msgstr "服务器" + +msgid "Port" +msgstr "端口" + +msgid "Target" +msgstr "对象" + +msgid "The iSCSI target on iSCSI server" +msgstr "iSCSI服务器对象"
I think the translation is not accurate. "iSCSI target" is a SAN terminology. We can leave it be and use this English terminology directly in Chinese translation. If you really want to translate it to Chinese, I suggest 'iSCSI目标'. Would you edit all the translation for 'iSCSI target'?
+ +msgid "Add iSCSI Authentication..." +msgstr "添加ISCSI认证" + +msgid "iSCSI Authentication" +msgstr "iSCSI认证" + msgid "CPU" msgstr "处理器"
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

On 01/07/2014 10:53 AM, Zhou Zheng Sheng wrote:
Add the Chinese and English translation po files of iscsi pool. Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- po/en_US.po | 52 +++++++++++++++++++++++++++++++++++++++++++--------- po/kimchi.pot | 47 +++++++++++++++++++++++++++++++++++++++-------- po/pt_BR.po | 48 ++++++++++++++++++++++++++++++++++++++++-------- po/zh_CN.po | 48 ++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 162 insertions(+), 33 deletions(-) mode change 100644 => 100755 po/kimchi.pot
diff --git a/po/en_US.po b/po/en_US.po index f2810db..30f0c79 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -6,14 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-07-11 17:32-0400\n" "Last-Translator: Crístian Viana <vianac@linux.vnet.ibm.com>\n" "Language-Team: English\n" -"Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -335,9 +335,6 @@ msgstr "The storage pool name can not be blank." msgid "The storage pool path can not be blank." msgstr "The storage pool path can not be blank."
-msgid "NFS server can not be blank." -msgstr "NFS server can not be blank." - msgid "NFS server mount path can not be blank." msgstr "NFS server mount path can not be blank."
@@ -351,9 +348,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "This is not a real linux path."
-msgid "This is not a valid NFS server." -msgstr "This is not a valid NFS server." - msgid "Invalid nfs mount path." msgstr "Invalid nfs mount path."
@@ -407,6 +401,15 @@ msgstr "" "It will format your disk and you will loose any data in there, are you sure " "to continue? "
+msgid "The iscsi target can not be blank." +msgstr "The iscsi target can not be blank." + +msgid "Server name can not be blank." +msgstr "Server name can not be blank." + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "This is not a valid Server Name or IP. please, modify it." + msgid "Log out" msgstr "Log out"
@@ -414,7 +417,7 @@ msgid "Log In" msgstr "Log In"
msgid "User Name" -msgstr "Name" +msgstr "User Name"
msgid "Password" msgstr "Password" @@ -456,6 +459,13 @@ msgid "" msgstr "" "The path of the Storage Pool. Each Storage Pool must have a unique path."
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." + msgid "NFS server IP" msgstr "NFS server IP"
@@ -471,6 +481,30 @@ msgstr "The nfs exported path on nfs server" msgid "Device Path" msgstr "Device Path"
+msgid "iSCSI Server" +msgstr "iSCSI Server" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "iSCSI server IP or hostname. It should not be empty." + +msgid "Server" +msgstr "Server" + +msgid "Port" +msgstr "Port" + +msgid "Target" +msgstr "Target" + +msgid "The iSCSI target on iSCSI server" +msgstr "The iSCSI target on iSCSI server" + +msgid "Add iSCSI Authentication..." +msgstr "Add iSCSI Authentication..." + +msgid "iSCSI Authentication" +msgstr "iSCSI Authentication" + msgid "CPU" msgstr "CPU"
diff --git a/po/kimchi.pot b/po/kimchi.pot old mode 100644 new mode 100755 index 762f4e4..8457262 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -8,11 +8,10 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -326,9 +325,6 @@ msgstr "" msgid "The storage pool path can not be blank." msgstr ""
-msgid "NFS server can not be blank." -msgstr "" - msgid "NFS server mount path can not be blank." msgstr ""
@@ -340,9 +336,6 @@ msgstr "" msgid "This is not a real linux path." msgstr ""
-msgid "This is not a valid NFS server." -msgstr "" - msgid "Invalid nfs mount path." msgstr ""
@@ -392,6 +385,15 @@ msgid "" "to continue? " msgstr ""
+msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr ""
@@ -436,6 +438,11 @@ msgid "" "The path of the Storage Pool. Each Storage Pool must have a unique path." msgstr ""
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" + msgid "NFS server IP" msgstr ""
@@ -451,6 +458,30 @@ msgstr "" msgid "Device Path" msgstr ""
+msgid "iSCSI Server" +msgstr "" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The iSCSI target on iSCSI server" +msgstr "" + +msgid "Add iSCSI Authentication..." +msgstr "" + +msgid "iSCSI Authentication" +msgstr "" + msgid "CPU" msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po index 7d59503..2d6bb23 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: Alexandre Hirata <hirata@linux.vnet.ibm.com>\n" "Language-Team: Aline Manera <alinefm@br.ibm.com>\n" -"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: Brazil\n" "X-Poedit-Language: Portuguese\n" @@ -352,9 +352,6 @@ msgstr "O nome do storage pool não pode ser em branco." msgid "The storage pool path can not be blank." msgstr "O caminho do storage pool não pde ser em branco."
-msgid "NFS server can not be blank." -msgstr "Servidor de NFS não pode ficar em branco." - msgid "NFS server mount path can not be blank." msgstr "Caminho de montagem do servidor de NFS não pode ficar em branco."
@@ -368,9 +365,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "Esse não é um caminho real no linux."
-msgid "This is not a valid NFS server." -msgstr "Isso não é um servidor de NFS válido." - msgid "Invalid nfs mount path." msgstr "Caminho de montagem NFS inválido."
@@ -424,6 +418,15 @@ msgstr "" "Isso formatará seu disco e você perderá toda informação, você tem certeza " "que quer continuar?"
+msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr "Sair"
@@ -472,6 +475,11 @@ msgid "" msgstr "" "O caminho do Storage Pool. Cada Storage Pool deve ter um único caminho."
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "" + msgid "NFS server IP" msgstr "Endereço IP do servidor NFS"
@@ -487,6 +495,30 @@ msgstr "O caminho exportado no servidor NFS" msgid "Device Path" msgstr "Caminho do dispositivo"
+msgid "iSCSI Server" +msgstr "" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The iSCSI target on iSCSI server" +msgstr "" + +msgid "Add iSCSI Authentication..." +msgstr "" + +msgid "iSCSI Authentication" +msgstr "" + msgid "CPU" msgstr "CPU"
diff --git a/po/zh_CN.po b/po/zh_CN.po index de759ef..eb11f4e 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2014-01-03 16:16+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" "Language-Team: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" -"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: CHINA\n" "X-Poedit-Language: Chinese\n" @@ -342,9 +342,6 @@ msgstr "存储池的名字不能为空" msgid "The storage pool path can not be blank." msgstr "存储池的路径不能为空"
-msgid "NFS server can not be blank." -msgstr "NFS服务器不能为空" - msgid "NFS server mount path can not be blank." msgstr "NFS服务器挂载路径不能为空"
@@ -356,9 +353,6 @@ msgstr "无效的存储池名字,它应该只包括字母,数字,下划线 msgid "This is not a real linux path." msgstr "这不是一个符合要求的LINUX路径"
-msgid "This is not a valid NFS server." -msgstr "这不是一个有效的NFS服务器" - msgid "Invalid nfs mount path." msgstr "无效的nfs挂载路径"
@@ -408,6 +402,15 @@ msgid "" "to continue? " msgstr "你的磁盘将会格式化,磁盘上的数据会丢失,你确定要继续吗?"
+msgid "The iscsi target can not be blank." +msgstr "ISCSI对象的路径不能为空" + +msgid "Server name can not be blank." +msgstr "服务器不能为空" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "这不是一个有效的服务器名或IP,请修改" + msgid "Log out" msgstr "登出"
@@ -454,6 +457,11 @@ msgid "" "The path of the Storage Pool. Each Storage Pool must have a unique path." msgstr "存储池的路径.每个存储池的路径是唯一的。"
+msgid "" +"Kimchi will try to create the directory when it does not already exist in " +"your system." +msgstr "如果目录不存在,KIMCHI会自动在系统中创建一个新的目录" + msgid "NFS server IP" msgstr "NFS服务器IP"
@@ -469,6 +477,30 @@ msgstr "nfs服务器上导出的路径" msgid "Device Path" msgstr "设备路径"
+msgid "iSCSI Server" +msgstr "iSCSI服务器" + +msgid "iSCSI server IP or hostname. It should not be empty." +msgstr "iSCSI服务器IP或者主机名, 不能为空。" + +msgid "Server" +msgstr "服务器" + +msgid "Port" +msgstr "端口" + +msgid "Target" +msgstr "对象" + +msgid "The iSCSI target on iSCSI server" +msgstr "iSCSI服务器对象" I think the translation is not accurate. "iSCSI target" is a SAN terminology. We can leave it be and use this English terminology
于 2014年01月03日 17:29, zhoumeina 写道: directly in Chinese translation. If you really want to translate it to Chinese, I suggest 'iSCSI目标'. Would you edit all the translation for 'iSCSI target'? sure, I will change it to "iSCSI目标"
+ +msgid "Add iSCSI Authentication..." +msgstr "添加ISCSI认证" + +msgid "iSCSI Authentication" +msgstr "iSCSI认证" + msgid "CPU" msgstr "处理器"
participants (3)
-
Aline Manera
-
Zhou Zheng Sheng
-
zhoumeina