[Kimchi-devel] [PATCH] Bugfix: List inactive network interface while editing template

Wen Wang wenwang at linux.vnet.ibm.com
Thu Jun 12 06:59:19 UTC 2014


From: Wen Wang <wenwang at linux.vnet.ibm.com>

Disable the display of inactive network interface while editing template
---
 ui/js/src/kimchi.template_edit_main.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
index cffc685..c2258ff 100644
--- a/ui/js/src/kimchi.template_edit_main.js
+++ b/ui/js/src/kimchi.template_edit_main.js
@@ -87,7 +87,8 @@ kimchi.template_edit_main = function() {
                 var html = '';
                 var tmpl = $('#tmpl-network').html();
                 $.each(result, function(index, network) {
-                    html += kimchi.substitute(tmpl, network);
+                    if (result[index].state === 'active')
+                        html += kimchi.substitute(tmpl, network);
                 });
                 $('#template-edit-network-list').html(html).show();
                 if(template.networks && template.networks.length > 0) {
-- 
1.7.1




More information about the Kimchi-devel mailing list