[PATCH] [Wok] Bug fix #169: Display user log date in numeric format
by Aline Manera
Also rename Timezone to Zone to avoid waste of space in page.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/wok.utils.js | 2 +-
ui/js/wok.user-log.js | 1 +
ui/pages/i18n.json.tmpl | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/wok.utils.js b/ui/js/src/wok.utils.js
index dcec823..80bdb77 100644
--- a/ui/js/src/wok.utils.js
+++ b/ui/js/src/wok.utils.js
@@ -244,7 +244,7 @@ wok.datetimeLocaleConverter = function datetimeLocaleConverter(datetime_string,
wok.dateLocaleConverter = function dateLocaleConverter(date_string, locale){
var dte = new moment(date_string);
- var options = { year: 'numeric', month: 'long', day: 'numeric' };
+ var options = { year: 'numeric', month: 'numeric', day: 'numeric' };
return dte._d.toLocaleDateString(locale, options);
}
diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js
index bac5439..41bc765 100644
--- a/ui/js/wok.user-log.js
+++ b/ui/js/wok.user-log.js
@@ -103,6 +103,7 @@ wok.listUserLogConfig = function() {
}, {
"column-id": 'zone',
"converter": 'string',
+ "width": "6%",
"title": i18n['WOKSETT0013M']
}, {
"column-id": 'status',
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index 17ee40c..220f8e5 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -53,7 +53,7 @@
"WOKSETT0010M": "$_("No results found!")",
"WOKSETT0011M": "$_("Loading...")",
"WOKSETT0012M": "$_("Actions")",
- "WOKSETT0013M": "$_("Timezone")",
+ "WOKSETT0013M": "$_("Zone")",
"WOKSETT0014M": "$_("IP Address")",
"WOKSETT0015M": "$_("Status")",
--
2.7.4
8 years, 1 month
[PATCH][Kimchi 1/2] Issue #651: Windows guests - default mouse type causing problems
by Ramon Medeiros
Add <input type='tablet' bus='usb'/> for winxp guests.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
osinfo.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/osinfo.py b/osinfo.py
index 1527896..965f918 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -85,7 +85,8 @@ template_specs = {'x86': {'old': dict(disk_bus='ide',
custom_specs = {'fedora': {'22': {'x86': dict(video_model='qxl')}},
- 'windows': {'xp': {'x86': dict(nic_model='pcnet')}}}
+ 'windows': {'xp': {'x86': dict(nic_model='pcnet'),
+ 'x86': dict(tablet_bus="usb")}}}
modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Added UI validation for Virtualization Guest Edit Add Storage module
by rajgupta@linux.vnet.ibm.com
From: rajgupta <rajgupta(a)localhost.localdomain>
Added UI validation for Virtualization Guest Edit Add Storage module
Signed-off-by: rajgupta <rajgupta(a)localhost.localdomain>
---
ui/js/src/kimchi.guest_storage_add.main.js | 130 +++++++++++++++++++----------
ui/pages/i18n.json.tmpl | 3 +
2 files changed, 87 insertions(+), 46 deletions(-)
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js b/ui/js/src/kimchi.guest_storage_add.main.js
index 08e71db..9fa9175 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -272,12 +272,14 @@ kimchi.guest_storage_add_main = function() {
case 'path':
$('#new-disk-box div.pool').hide();
$('#new-disk-box div.directorypath').show();
+ $(directorypathTextbox).val("");
break;
default:
$('#new-disk-box div.pool').show();
$('#new-disk-box div.directorypath').hide();
}
+ $(capacityTextbox).val("").trigger('change');
});
sourceTextbox.on('change', function() {
@@ -285,11 +287,14 @@ kimchi.guest_storage_add_main = function() {
case 'path':
$('#existing-disk-box div.pool,div.volume').hide();
$('#existing-disk-box div.diskpath').show();
+ $(diskpathTextbox).val("").trigger('change');
+ $(submitButton).prop('disabled', true);
break;
default:
$('#existing-disk-box div.pool,div.volume').show();
$('#existing-disk-box div.diskpath').hide();
+ $(submitButton).prop('disabled', false);
}
});
}
@@ -322,6 +327,7 @@ kimchi.guest_storage_add_main = function() {
getStoragePools('existing');
if(kimchi.hostarch === s390xArch){
getStorageSource('pool');
+ $(diskpathTextbox).val("").trigger('change');
}
$(pathTextbox).val("");
$(newPoolTextbox).val("");
@@ -349,6 +355,7 @@ kimchi.guest_storage_add_main = function() {
$('#guest-storage-add-window .modal-body .template-pager').animate({
height: "400px"
}, 400);
+ $(capacityTextbox).val("").trigger('change');
}else{
$('#guest-storage-add-window .modal-body .template-pager').animate({
height: "300px"
@@ -449,48 +456,66 @@ kimchi.guest_storage_add_main = function() {
var bNewDisk = 'false';
var validateDisk = function(settings) {
+ bNewDisk = 'false';
// Determine whether it's existing disk or new disk
if($(capacityTextbox).is(":visible") === true ) {
bNewDisk = 'true';
}
- if (bNewDisk === 'true') {
- if (settings['newpool'] && settings['capacity'] && settings['format']){
- //Change settings['newpool'] to settings['pool']
- settings['pool']=settings['newpool'];
- var vmname = settings['vm'];
- vmname = vmname + new Date().getTime();
- //Unique vol name to be created
- settings['vol']=vmname + ".img";
- //This is all that is needed for attaching newly created volume to VM
- var addVolSettings = {
- vm: settings['vm'],
- type: settings['type'],
- vol: settings['vol'],
- pool: settings['pool']
- };
- var sizeInMB = parseInt(settings['capacity']) * 1024;
- settings['capacity'] = sizeInMB;
- //These need to be deleted so they don't get passed to backend
- delete settings['path'];
- delete settings['newpool'];
- //Create an empty storage volume and attach to VM if successful
- createVol(settings, addVolSettings);
- return true;
- } else {
- wok.message.error(i18n['KCHVMSTOR0002E'],'#alert-modal-container2');
- return false;
- }
- } else {
- if (settings['pool'] && settings['vol']){
- // Delete path property since it's not needed for disk
- delete settings['path'];
- return true;
- }
- else {
- wok.message.error(i18n['KCHVMSTOR0002E'],'#alert-modal-container2');
- return false;
+ if (kimchi.hostarch === s390xArch && ((sourceTextbox.val() === 'path' || sourcenewTextbox.val() === 'path'))) {
+ if (bNewDisk === 'true') {
+ if ((/^((https|http|ftp|ftps|tftp|\/).*)+$/.test(settings['dir_path'])) && settings['size'] && settings['format']){
+ return true;
+ }else{
+ wok.message.error(i18n['KCHVMSTOR0003E'],'#alert-modal-container2');
+ return false;
+ }
+ }else{
+ if (/^((https|http|ftp|ftps|tftp|\/).*)+$/.test(settings['path'])){
+ return true;
+ }else{
+ wok.message.error(i18n['KCHVMSTOR0004E'],'#alert-modal-container2');
+ return false;
+ }
}
- }
+ }else{
+ if (bNewDisk === 'true') {
+ if (settings['newpool'] && settings['capacity'] && settings['format']){
+ //Change settings['newpool'] to settings['pool']
+ settings['pool']=settings['newpool'];
+ var vmname = settings['vm'];
+ vmname = vmname + new Date().getTime();
+ //Unique vol name to be created
+ settings['vol']=vmname + ".img";
+ //This is all that is needed for attaching newly created volume to VM
+ var addVolSettings = {
+ vm: settings['vm'],
+ type: settings['type'],
+ vol: settings['vol'],
+ pool: settings['pool']
+ };
+ var sizeInMB = parseInt(settings['capacity']) * 1024;
+ settings['capacity'] = sizeInMB;
+ //These need to be deleted so they don't get passed to backend
+ delete settings['path'];
+ delete settings['newpool'];
+ //Create an empty storage volume and attach to VM if successful
+ createVol(settings, addVolSettings);
+ return true;
+ } else {
+ wok.message.error(i18n['KCHVMSTOR0005E'],'#alert-modal-container2');
+ return false;
+ }
+ } else {
+ if (settings['pool'] && settings['vol']){
+ // Delete path property since it's not needed for disk
+ delete settings['path'];
+ return true;
+ } else {
+ wok.message.error(i18n['KCHVMSTOR0002E'],'#alert-modal-container2');
+ return false;
+ }
+ }
+ }
};
validator = {cdrom: validateCDROM, disk: validateDisk};
@@ -505,7 +530,7 @@ kimchi.guest_storage_add_main = function() {
}
var formData = storageAddForm.serializeObject();
- if (kimchi.hostarch === s390xArch && ((sourceTextbox.val() === 'path') || sourcenewTextbox.val() === 'path')) {
+ if (kimchi.hostarch === s390xArch && ((sourceTextbox.val() === 'path' || sourcenewTextbox.val() === 'path'))) {
if ($('#new-disk').prop('checked')) {
var settings = {
vm: kimchi.selectedGuest,
@@ -541,7 +566,6 @@ kimchi.guest_storage_add_main = function() {
$(c).prop('disabled', true);
});
- if (kimchi.hostarch != s390xArch) {
// Validate form for cdrom and disk
validateSpecifiedForm = validator[settings['type']];
if (!validateSpecifiedForm(settings)) {
@@ -551,12 +575,11 @@ kimchi.guest_storage_add_main = function() {
});
return false;
}
- if(bNewDisk === 'false'){
+
+ if((bNewDisk === 'false' || ((kimchi.hostarch === s390xArch && ((sourceTextbox.val() === 'path' || sourcenewTextbox.val() === 'path')))))){
addStorage(settings);
}
- } else {
- addStorage(settings);
- }
+
$(submitButton).addClass('loading').text(i18n['KCHVMCD6003M']);
event.preventDefault();
};
@@ -569,8 +592,23 @@ kimchi.guest_storage_add_main = function() {
volTextbox.on('change propertychange', function (event) {
$(submitButton).prop('disabled', $(this).val() === '');
});
- capacityTextbox.on('change input propertychange', function(event) {
- $(submitButton).prop('disabled', $(this).val() === '');
- });
+
+ if(kimchi.hostarch === s390xArch){
+ $(capacityTextbox).add(directorypathTextbox).on('change input propertychange', function(event){
+ if(sourcenewTextbox.val() === 'path'){
+ $(submitButton).prop('disabled', $(capacityTextbox).val() === '' || $(directorypathTextbox).val() === '');
+ }else{
+ $(submitButton).prop('disabled', $(capacityTextbox).val() === '');
+ }
+ });
+
+ diskpathTextbox.on('change input propertychange', function(event) {
+ $(submitButton).prop('disabled', $(this).val() === '');
+ });
+ }else{
+ capacityTextbox.on('change input propertychange', function(event) {
+ $(submitButton).prop('disabled', $(this).val() === '');
+ });
+ }
};
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index 7beee19..ec9ef57 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -118,6 +118,9 @@
"KCHVMSTOR0001E": "$_("CDROM path needs to be a valid local/remote path and cannot be blank.")",
"KCHVMSTOR0002E": "$_("Disk pool or volume cannot be blank.")",
+ "KCHVMSTOR0003E": "$_("Disk size or Format or Directory path cannot be blank and Directory path needs to be a valid local/remote path.")",
+ "KCHVMSTOR0004E": "$_("Disk path needs to be a valid local/remote path and cannot be blank.")",
+ "KCHVMSTOR0005E": "$_("Storage pool or Disk size or Format cannot be blank.")",
"KCHPEERS0001M": "$_("Peers")"
}
--
2.1.0
8 years, 1 month
[PATCH] [Kimchi] Issue# 979 - Change boot order UI
by Socorro Stoppler
From: Socorro <socorro(a)linux.vnet.ibm.com>
This patch adds the UI portion for supporting changing the guest boot order
via edit guest panel. This was based off of what Samuel had prototyped.
Issue found in backend during test:
When updating the VM even with just changing the name, the bootorder gets reset to 'hd' only.
I tested this using the curl command and confirmed that indeed it does get reset to one entry only.
Issue written to address this: https://github.com/kimchi-project/kimchi/issues/1012
Signed-off-by: Socorro <socorro(a)linux.vnet.ibm.com>
---
ui/css/kimchi.css | 55 +++++++++++++++++++++++++++++
ui/css/src/modules/_edit-guests.scss | 54 +++++++++++++++++++++++++++++
ui/js/src/kimchi.guest_edit_main.js | 67 ++++++++++++++++++++++++++++++++++--
ui/pages/guest-edit.html.tmpl | 14 ++++++++
4 files changed, 188 insertions(+), 2 deletions(-)
diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css
index 6cf2cc9..1804226 100644
--- a/ui/css/kimchi.css
+++ b/ui/css/kimchi.css
@@ -1436,6 +1436,61 @@ body.wok-gallery {
overflow: visible;
}
+ul {
+ cursor: default;
+}
+
+.boot-order {
+ display: block;
+ width: 85%;
+ font-size: 14px;
+ line-height: 1.42857;
+ color: #444;
+ overflow: hidden;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+}
+
+.boot-order:focus,
+.boot-order.focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+
+.boot-order > li {
+ cursor: move;
+ /* fallback if grab cursor is unsupported */
+ cursor: grab;
+ cursor: -moz-grab;
+ cursor: -webkit-grab;
+ border-left: 0;
+ border-right: 0;
+}
+
+.boot-order > li:first-child {
+ border-top: 0;
+}
+
+.boot-order > li:last-child {
+ border-bottom: 0;
+}
+
+.boot-order > li.ui-sortable-helper {
+ cursor: grabbing;
+ cursor: -moz-grabbing;
+ cursor: -webkit-grabbing;
+ border: 1px solid #ccc !important;
+}
+
/* Add Template Modal Window */
.templates-modal .modal-dialog {
width: 1100px;
diff --git a/ui/css/src/modules/_edit-guests.scss b/ui/css/src/modules/_edit-guests.scss
index b7e6941..3c55139 100644
--- a/ui/css/src/modules/_edit-guests.scss
+++ b/ui/css/src/modules/_edit-guests.scss
@@ -385,3 +385,57 @@
#form-guest-storage-add .form-section .field {
overflow: visible;
}
+
+ul {
+ cursor: default;
+}
+
+.boot-order {
+ display: block;
+ width: 85%;
+ font-size: 14px;
+ line-height: 1.42857;
+ color: #444;
+ overflow: hidden;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+}
+
+.boot-order:focus,
+.boot-order.focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+
+.boot-order > li {
+ cursor: move; /* fallback if grab cursor is unsupported */
+ cursor: grab;
+ cursor: -moz-grab;
+ cursor: -webkit-grab;
+ border-left: 0;
+ border-right: 0;
+}
+
+.boot-order > li:first-child {
+ border-top: 0;
+}
+
+.boot-order > li:last-child {
+ border-bottom: 0;
+}
+
+.boot-order > li.ui-sortable-helper {
+ cursor: grabbing;
+ cursor: -moz-grabbing;
+ cursor: -webkit-grabbing;
+ border: 1px solid #ccc !important;
+}
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index dcaafb8..4487dc5 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -21,6 +21,7 @@ kimchi.guest_edit_main = function() {
var guestEditForm = $('#form-guest-edit-general');
var saveButton = $('#guest-edit-button-save');
clearTimeout(kimchi.vmTimeout);
+ var bootOrderOptions = [];
$('#modalWindow').on('hidden.bs.modal', function() {
kimchi.setListVMAutoTimeout();
@@ -40,10 +41,11 @@ kimchi.guest_edit_main = function() {
var submitForm = function(event) {
- // tap map, "general": 0, "storage": 1, "interface": 2, "permission": 3, "password": 4
+ // tap map, "general": 0, "storage": 1, "interface": 2, "permission": 3, "pci": 4, "snapshot": 5, "bootOrder": 6
var submit_map = {
0: generalSubmit,
- 3: permissionSubmit
+ 3: permissionSubmit,
+ 6: bootOrderSubmit
};
var currentTab = $('#guest-edit-window li.active a[data-toggle="tab"]').data('id');
var toSubmit = parseInt($('#'+currentTab).index());
@@ -729,6 +731,42 @@ kimchi.guest_edit_main = function() {
}
};
+ var setupBootOrder = function(guest) {
+ var guestBootOrder = guest['bootorder'];
+ $("#myList").empty();
+ $.each(guestBootOrder, function(index, value) {
+ var itemNode = $.parseHTML("<li class='list-group-item' " + "data-value=" + value + ">" + value + "</li>");
+ $("#myList").append(itemNode);
+ });
+
+ $('.boot-order').sortable({
+ items: 'li',
+ cursor: 'move',
+ opacity: 0.6,
+ containment: "parent",
+ start: function(event, ui) {
+ $(this).addClass('focus');
+ },
+ stop: function(event, ui) {
+ $(this).removeClass('focus');
+ },
+ change: function(event, ui) {
+ // callback once started changing order
+ },
+ update: function(event, ui) {
+ // callback once finished order
+ $(saveButton).prop('disabled', false);
+ bootOrderOptions = [];
+ $("#myList li").each(function() {
+ bootOrderOptions.push($(this).text())
+ });
+ bootOrderOptions.forEach(function(entry) {
+ console.log(entry);
+ });
+ }
+ });
+ };
+
var initContent = function(guest) {
guest['vcpus'] = guest.cpu_info['vcpus'];
guest['max-processor'] = guest.cpu_info['maxvcpus'];
@@ -791,6 +829,7 @@ kimchi.guest_edit_main = function() {
setupPermission();
setupPCIDevice();
setupSnapshot();
+ setupBootOrder(guest);
wok.topic('kimchi/vmCDROMAttached').subscribe(onAttached);
wok.topic('kimchi/vmCDROMReplaced').subscribe(onReplaced);
@@ -956,4 +995,28 @@ kimchi.guest_edit_main = function() {
}
}
};
+
+ var bootOrderSubmit = function(event) {
+ //Format the strings to go in the array before passing in to the API
+ //"hd", "network", "cdrom"
+ var formattedBootOrderOptions = [];
+ for (var i=0; i<bootOrderOptions.length; i++) {
+ var str = bootOrderOptions[i].trim();
+ str = str.toLowerCase();
+ if (str === "hdd") {
+ str = "hd";
+ } else if (str === "cd-rom") {
+ str = "cdrom";
+ }
+ formattedBootOrderOptions.push(str);
+ }
+ var data = {
+ bootorder: formattedBootOrderOptions
+ };
+ kimchi.updateVM(kimchi.selectedGuest, data, function() {
+ wok.window.close();
+ }, function(err) {
+ wok.message.error(err.responseJSON.reason,'#alert-modal-container');
+ });
+ };
};
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index a9a468e..fd05293 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -37,6 +37,7 @@
<li role="presentation"><a href="#form-guest-edit-permission" aria-controls="form-guest-edit-permission" role="tab" data-id="form-guest-edit-permission" data-toggle="tab">Permission</a></li>
<li role="presentation"><a href="#form-guest-edit-pci" aria-controls="form-guest-edit-pci" role="form-guest-edit-pci" data-id="form-guest-edit-pci" data-toggle="tab">Pci</a></li>
<li role="presentation"><a href="#form-guest-edit-snapshot" aria-controls="form-guest-edit-snapshot" role="tab" data-id="form-guest-edit-snapshot" data-toggle="tab">Snapshot</a></li>
+ <li role="presentation"><a href="#form-guest-edit-boot-order" aria-controls="form-guest-edit-boot-order" role="tab" data-id="form-guest-edit-boot-order" data-toggle="tab">Boot Order</a></li>
</ul>
<div class="tab-content" id="guest-edit-tabs">
<form role="tabpanel" class="tab-pane active" id="form-guest-edit-general">
@@ -182,6 +183,19 @@
<div class="task"></div>
<div class="body"></div>
</form>
+ <form role="tabpanel" class="tab-pane" id="form-guest-edit-boot-order">
+ <div class="form-group">
+ <div id="bootOrder">
+ <ul id="myList" class="list-group boot-order">
+ <li class="list-group-item" data-value="CD-ROM">CD-ROM</li>
+ <li class="list-group-item" data-value="HDD">HDD</li>
+ <li class="list-group-item" data-value="Network">Network</li>
+ </ul>
+ <p class="help-block">
+ <i class="fa fa-info-circle"></i> $_("Change the boot order by dragging the items on the list.")</p>
+ </div>
+ </div>
+ </form>
</div>
</div>
<div class="modal-footer">
--
2.7.4
8 years, 1 month
[PATCH V2] [Kimchi 0/2] Issue #733: Handle relative paths/URLs
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
V2:
- Changed config name from relative_path to server_root
V1:
This patch-set adds support to new Wok support to handle relative paths.
It depends on patch-ser [Wok 0/4] Add support to relative paths/URLs.
Paulo Vital (2):
Issue #733: Fix UI to handle relative paths.
Issue #733: CSS updates to handle relative path support.
ui/css/kimchi.css | 95 ++++++++++++++++++++------------------
ui/css/src/modules/_guests.scss | 14 +++---
ui/css/src/modules/_iso-list.scss | 14 +++---
ui/css/src/modules/_network.scss | 2 +-
ui/css/src/modules/_storage.scss | 18 ++++----
ui/css/src/modules/_templates.scss | 28 +++++------
ui/js/src/kimchi.api.js | 19 ++++++--
7 files changed, 103 insertions(+), 87 deletions(-)
--
2.7.4
8 years, 1 month
[PATCH V2] [Wok 0/4] Add support to relative paths/URLs.
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
V2:
- Changed config name from relative_path to server_root
V1:
This patch-set adds support on Wok to handle the use of relative paths in
configuration and command line, by setting the backend to use the new path
in URL's.
It was necessary update a few SCSS, JS and HTML files to handle, as well,
generate new CSS files and update test cases.
This is part of solution to Kimchi issue [1] and Wok issue [2]:
[1] https://github.com/kimchi-project/kimchi/issues/733
[2] https://github.com/kimchi-project/wok/issues/25
Paulo Vital (4):
Add support to relative paths.
Fix UI to handle relative paths.
CSS updates to handle relative path support.
Update tests with relative path support
src/nginx/wok.conf.in | 6 +-
src/wok.conf.in | 5 +
src/wok/config.py.in | 1 +
src/wok/model/config.py | 1 +
src/wok/proxy.py | 8 +-
src/wok/reqlogger.py | 2 +-
src/wok/server.py | 2 +-
src/wok/utils.py | 11 +-
src/wokd.in | 3 +
tests/test_api.py | 3 +-
tests/test_server_root.py | 71 ++++
tests/utils.py | 4 +-
ui/css/bootstrap.custom.css | 651 +++++++++++++++++++++++----------
ui/css/datatables.bootstrap.css | 10 +-
ui/css/settings.css | 12 +-
ui/css/src/modules/_wok-variables.scss | 6 +-
ui/css/wok.css | 91 +++--
ui/pages/tabs/settings.html.tmpl | 7 +-
18 files changed, 651 insertions(+), 243 deletions(-)
create mode 100644 tests/test_server_root.py
--
2.7.4
8 years, 1 month
[PATCH] [Wok 0/4] Add support to relative paths/URLs.
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
This patch-set adds support on Wok to handle the use of relative paths in
configuration and command line, by setting the backend to use the new path
in URL's.
It was necessary update a few SCSS, JS and HTML files to handle, as well,
generate new CSS files and update test cases.
This is part of solution to Kimchi issue [1] and Wok issue [2]:
[1] https://github.com/kimchi-project/kimchi/issues/733
[2] https://github.com/kimchi-project/wok/issues/25
Paulo Vital (4):
Add support to relative paths.
Fix UI to handle relative paths.
CSS updates to handle relative path support.
Update tests with relative path support
src/nginx/wok.conf.in | 6 +-
src/wok.conf.in | 5 +
src/wok/config.py.in | 1 +
src/wok/model/config.py | 1 +
src/wok/proxy.py | 8 +-
src/wok/reqlogger.py | 2 +-
src/wok/server.py | 2 +-
src/wok/utils.py | 11 +-
src/wokd.in | 3 +
tests/test_api.py | 3 +-
tests/test_relative_path.py | 71 ++++
tests/utils.py | 4 +-
ui/css/bootstrap.custom.css | 651 +++++++++++++++++++++++----------
ui/css/datatables.bootstrap.css | 10 +-
ui/css/settings.css | 12 +-
ui/css/src/modules/_wok-variables.scss | 6 +-
ui/css/wok.css | 91 +++--
ui/pages/tabs/settings.html.tmpl | 7 +-
18 files changed, 651 insertions(+), 243 deletions(-)
create mode 100644 tests/test_relative_path.py
--
2.7.4
8 years, 1 month
[PATCH][Kimchi] Issue #1006: Invalid subnet value when editing a network raise an error
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
model/networks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/model/networks.py b/model/networks.py
index b9d363a..be4eec2 100644
--- a/model/networks.py
+++ b/model/networks.py
@@ -146,7 +146,7 @@ class NetworksModel(object):
try:
ip = ipaddr.IPNetwork(netaddr)
except ValueError:
- raise InvalidParameter("KCHNET0003E", {'subent': netaddr,
+ raise InvalidParameter("KCHNET0003E", {'subnet': netaddr,
'network': params['name']})
if ip.ip == ip.network:
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] fix for issue #1049
by sureshab@linux.vnet.ibm.com
From: Suresh Babu Angadi <sureshab(a)in.ibm.com>
when running on s390x, create template should add
default console - 'virtio'.
fix for the patch:
[Kimchi-devel] [PATCH v3] [Kimchi 1/2] added 'console' parameter to templates api for s390x
since 'console' is not read from template.conf file, it
should be added directly to defaults dictionary, which is
used for template creation
Signed-off-by: Suresh Babu Angadi <sureshab(a)in.ibm.com>
---
osinfo.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/osinfo.py b/osinfo.py
index ff490b2..1527896 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -172,10 +172,6 @@ def _get_tmpl_defaults():
tmpl_defaults['processor']['maxvcpus'] = 1
tmpl_defaults['graphics'] = {'type': 'vnc', 'listen': '127.0.0.1'}
- # for s390x architecture, set default console as sclp
- if host_arch in ['s390x', 's390']:
- tmpl_defaults['console'] = 'virtio'
-
default_config = ConfigObj(tmpl_defaults)
# Load template configuration file
@@ -201,6 +197,10 @@ def _get_tmpl_defaults():
defaults['memory']['current'] = int(defaults['memory']['current'])
defaults['memory']['maxmemory'] = int(defaults['memory']['maxmemory'])
+ # for s390x architecture, set default console as virtio
+ if is_on_s390x:
+ defaults['console'] = 'virtio'
+
# Parse storage section to get disks values
storage_section = default_config.pop('storage')
defaults['disks'] = []
--
1.8.3.1
8 years, 1 month