[Kimchi-devel] [PATCH v2] Display guest IP address for each network interface
Socorro Stoppler
socorro at linux.vnet.ibm.com
Tue Nov 17 17:13:50 UTC 2015
Display guest IP address for each network interface configured
This was based off of Samuel's branch.
Signed-off-by: Socorro Stoppler <socorro at linux.vnet.ibm.com>
---
src/wok/plugins/ginger | 2 +-
src/wok/plugins/kimchi/ui/js/src/kimchi.guest_edit_main.js | 9 ++++++++-
src/wok/plugins/kimchi/ui/pages/guest-edit.html.tmpl | 4 ++++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/wok/plugins/ginger b/src/wok/plugins/ginger
index 76cbf86..84f36db 160000
--- a/src/wok/plugins/ginger
+++ b/src/wok/plugins/ginger
@@ -1 +1 @@
-Subproject commit 76cbf8698674142daa41a105ce50bb213471104e
+Subproject commit 84f36dbbfe63869fa97cd68e9abdeaffdf1846d9
diff --git a/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_edit_main.js b/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_edit_main.js
index 44dd1fd..9005d9b 100644
--- a/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_edit_main.js
+++ b/src/wok/plugins/kimchi/ui/js/src/kimchi.guest_edit_main.js
@@ -145,6 +145,7 @@ kimchi.guest_edit_main = function() {
addItem({
id: -1,
mac: "",
+ ips: "",
network: "",
type: "network",
viewMode: "hide",
@@ -162,6 +163,11 @@ kimchi.guest_edit_main = function() {
if (data.id == -1) {
data.id = $('#form-guest-edit-interface > .body').children().size()
}
+ if (data.ips == "" || data.ips == null){
+ data.ips = i18n["KCHNET6001M"];
+ }else{
+ data.ips = data.ips;
+ }
var itemNode = $.parseHTML(wok.substitute($('#interface-tmpl').html(),data));
$(".body", "#form-guest-edit-interface").append(itemNode);
$("select", itemNode).append(networkOptions);
@@ -188,7 +194,8 @@ kimchi.guest_edit_main = function() {
var interface = {
network: $("select", item).val(),
type: "network",
- mac: $(":text", item).val()
+ mac: $(":text", item).val(),
+ ips: $(".ipText", item).val()
};
var postUpdate = function(mac){
$("#label-network-" + data.id, item).text(interface.network);
diff --git a/src/wok/plugins/kimchi/ui/pages/guest-edit.html.tmpl b/src/wok/plugins/kimchi/ui/pages/guest-edit.html.tmpl
index 098f409..868dd4d 100644
--- a/src/wok/plugins/kimchi/ui/pages/guest-edit.html.tmpl
+++ b/src/wok/plugins/kimchi/ui/pages/guest-edit.html.tmpl
@@ -78,6 +78,7 @@
<span class="cell">$_("Network")</span>
<span class="cell">$_("Type")</span>
<span class="cell">$_("MAC Address")</span>
+ <span class="cell">$_("IP Address")</span>
</div>
<div class="body"></div>
</form>
@@ -203,6 +204,9 @@
<input class="{editMode}" type="text"
id="edit-mac-{id}" name="{mac}" value="{mac}" />
</span>
+ <span class="cell">
+ <span class=ipText>{ips}</span>
+ </span>
<span class="action-area {editMode}">
<button class="save"></button><button class="cancel"></button>
</span>
--
1.9.1
More information about the Kimchi-devel
mailing list