[Kimchi-devel] [PATCH] [Kimchi] Adjust UI to create Template according to the lastest API changes

Aline Manera alinefm at linux.vnet.ibm.com
Tue Apr 12 17:34:16 UTC 2016


Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.template_add_main.js | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ui/js/src/kimchi.template_add_main.js b/ui/js/src/kimchi.template_add_main.js
index 3146f49..fa5c847 100644
--- a/ui/js/src/kimchi.template_add_main.js
+++ b/ui/js/src/kimchi.template_add_main.js
@@ -313,7 +313,7 @@ kimchi.template_add_main = function() {
             return;
         }
         var data = {
-            "cdrom": isoFile
+            "source_media": isoFile
         };
         addTemplate(data);
     });
@@ -531,9 +531,7 @@ kimchi.template_add_main = function() {
         $('#vm-image-local-box-button').text(i18n['KCHAPI6008M']);
         $('#vm-image-local-box-button').prop('disabled', true);
         addTemplate({
-            disks: [{
-                base: $('input', '#vm-image-local-box').val()
-            }]
+            source_media: $('input', '#vm-image-local-box').val()
         }, function() {
             $('input', '#vm-image-local-box').prop('disabled', false);
             $('#vm-image-local-box-button').text(i18n['KCHAPI6005M']);
@@ -548,7 +546,7 @@ kimchi.template_add_main = function() {
             return;
         }
         var data = {
-            "cdrom": isoUrl
+            "source_media": isoUrl
         };
         addTemplate(data);
     });
@@ -579,7 +577,7 @@ kimchi.template_add_main = function() {
                 var data = {
                     "os_distro": isoInfo.os_distro,
                     "os_version": isoInfo.os_version,
-                    "cdrom": isoInfo.path
+                    "source_media": isoInfo.path
                 };
                 kimchi.createTemplate(data, function() {
                     successNum++;
-- 
2.5.5




More information about the Kimchi-devel mailing list