[PATCH v3 0/4] Fix: Report Overwritten when Provided Name Existing
by Hongliang Wang
When user provides an existing debug report name, then the server will generate
a new debug report and overwrite the old one.
Fixed it in this patch to detect the existing name and ask the user to choose
another name.
v2 -> v3:
3a) Reduced code redundant
(Wen Wang's comment)
v1 -> v2:
2a) Recovered Generate Button behavior
(Wen Wang's comment)
2b) Leveraged get_list() function to check name existence
(Aline's comment)
Hongliang Wang (4):
Add ResourceAlreadyExists Exception (HTTP 409)
Add Name Existence Check for Debug Report when Create
Add License Statement in kimchi.report_add_main.js
Implement UI Part to Properly Handle Report Name Existence
src/kimchi/control/base.py | 4 +-
src/kimchi/exception.py | 4 ++
src/kimchi/i18n.py | 1 +
src/kimchi/model/debugreports.py | 5 +-
ui/js/src/kimchi.report_add_main.js | 97 +++++++++++++++++++++++--------------
5 files changed, 73 insertions(+), 38 deletions(-)
--
1.8.1.4
10 years, 6 months
[PATCHv2 0/3] Add out of box ISO storage pool
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
As libvirt has dynamic permission configuration,
we do not need watch the iso added to storage pool any more,
we just need to make sure storage pool can be accessed and
libvirt will change its own/grp to the right one.
so after found this feature,
notification is deleted and create iso pool is retained.
Royce Lv (3):
Dedicated ISO pool: create an out of box ISO pool
Store qemu user name in class attribute
Add doc and test case for dedicate iso pool
docs/README.md | 5 +++++
src/kimchi/kvmusertests.py | 22 ++++++++++++----------
src/kimchi/model/model.py | 25 ++++++++++++++-----------
tests/test_model.py | 3 +++
4 files changed, 34 insertions(+), 21 deletions(-)
--
1.8.3.2
10 years, 6 months
[PATCH V2] Bugfix: List inactive network interface while editing template
by Wen Wang
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
V1 -> V2:
Added "Signed-off-by:" label
Disable the display of inactive network interface while editing template
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
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
10 years, 6 months
[PATCH v3 0/8] Debug Report Rename Feature
by Hongliang Wang
Enable debug report rename feature in this patch set.
Please apply the following patch set first:
* [PATCH v2 0/4] Fix: Report Overwritten when Provided Name Existing
v2 -> v3:
3a) Added check for name existence when renaming a report
(Yu Xin's comment)
v1 -> v2:
2a) Retrieved the Right Generated Time for Debug Report
(Wen Wang's comment)
2b) Sorted debug reports by Generated Time Descendingly
(Wen Wang's comment)
2c) Enabled Form Fields after Request Processed
(Yuxin's comment)
Hongliang Wang (8):
Debug Report Rename: Update API.json
Debug Report Rename: Update API.md
Debug Report Rename: Implement Back-end
Debug Report: Use Generated Time instead of Most Changed Time
Debug Report: Sort Reports by Generated Time Descendingly
Debug Report Rename UI: Add API in kimchi.api.js
Debug Report Rename UI: Add Rename Page
Debug Report Rename UI: Enable Rename in Host Tab
docs/API.md | 3 ++
src/kimchi/API.json | 11 +++++++
src/kimchi/control/debugreports.py | 8 ++++-
src/kimchi/model/debugreports.py | 18 +++++++++++-
ui/css/theme-default/report-rename.css | 22 ++++++++++++++
ui/js/src/kimchi.api.js | 12 ++++++++
ui/js/src/kimchi.host.js | 35 +++++++++++++++-------
ui/js/src/kimchi.report_rename_main.js | 41 ++++++++++++++++++++++++++
ui/pages/report-rename.html.tmpl | 53 ++++++++++++++++++++++++++++++++++
9 files changed, 190 insertions(+), 13 deletions(-)
create mode 100644 ui/css/theme-default/report-rename.css
create mode 100644 ui/js/src/kimchi.report_rename_main.js
create mode 100644 ui/pages/report-rename.html.tmpl
--
1.8.1.4
10 years, 6 months
[PATCH v2 0/4] Fix: Report Overwritten when Provided Name Existing
by Hongliang Wang
When user provides an existing debug report name, then the server will generate
a new debug report and overwrite the old one.
Fixed it in this patch to detect the existing name and ask the user to choose
another name.
v1 -> v2:
2a) Recovered Generate Button behavior
(Wen Wang's comment)
2b) Leveraged get_list() function to check name existence
(Aline's comment)
Hongliang Wang (4):
Add ResourceAlreadyExists Exception (HTTP 409)
Add Name Existence Check for Debug Report when Create
Add License Statement in kimchi.report_add_main.js
Implement UI Part to Properly Handle Report Name Existence
src/kimchi/control/base.py | 4 +-
src/kimchi/exception.py | 4 ++
src/kimchi/i18n.py | 1 +
src/kimchi/model/debugreports.py | 5 +-
ui/js/src/kimchi.report_add_main.js | 97 +++++++++++++++++++++++--------------
5 files changed, 73 insertions(+), 38 deletions(-)
--
1.8.1.4
10 years, 6 months
[PATCH V8 0/9] Issue #342: load i18n.html of the plugin
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V8 -> V9:
plugins/sample/po/POTFILES is added to .gitignore
plugins/sample/po/kimchi.pot is named as plugins/sample/po/sample.pot
and is added to the source tree
plugins/sample/sample.conf is added to .gitignore
logout when in the plugin tab
V7 -> V8:
improve the commit message.
improve the test case skip conditional expression, remove parenthesis
V5 -> V6:
skip test, when disable plugin.
V4 -> V5:
let autoconf generate sample.conf
V3 -> V4:
rebase
V2 -> V3:
change "enable-plugins" to "enable-sample"
remove nls
improve the Portuguese translation.
V1 -> V2:
The improvement concept here is to directly generate JSON on the server
and assign it to the i18n variable, rather than inserting nodes into the DOM.
Plugins would use a plugin1.i18n= structure to keep plugin strings from
colliding with each other, or with the kimchi variables.
ShaoHe Feng (8):
Update root.py to make Cheetah render the JSON template.
Update the i18n tmpl to produce JSON
Add JS API for fetching i18n JSON
Issue #342: load i18n.html of the plugin
add an optional to toggle the sample plugin
generate the translation files for plugins/sample
skip plugins test, when sample plugin is not enabled
add some sample plugin generated files to .gitignore
Zhou Zheng Sheng (1):
Add Minimal UI Page for the Sample Plugin
.gitignore | 2 +
configure.ac | 19 ++++
plugins/sample/Makefile.am | 11 +-
plugins/sample/__init__.py | 3 +-
plugins/sample/config.status | 1 +
plugins/sample/po/LINGUAS | 1 +
plugins/sample/po/Makefile.in.in | 1 +
plugins/sample/po/Makevars | 41 ++++++++
plugins/sample/po/POTFILES.in | 2 +
plugins/sample/po/en_US.po | 21 ++++
plugins/sample/po/gen-pot | 9 ++
plugins/sample/po/pt_BR.po | 24 +++++
plugins/sample/po/sample.pot | 21 ++++
plugins/sample/po/zh_CN.po | 24 +++++
plugins/sample/sample.conf | 7 --
plugins/sample/sample.conf.in | 24 +++++
plugins/sample/ui/Makefile.am | 2 +-
plugins/sample/ui/config/tab-ext.xml | 8 +-
plugins/sample/ui/js/Makefile.am | 21 ++++
plugins/sample/ui/js/util.js | 33 ++++++
plugins/sample/ui/pages/Makefile.am | 21 ++++
plugins/sample/ui/pages/i18n.json.tmpl | 9 ++
plugins/sample/ui/pages/tab.html.tmpl | 30 ++++++
src/kimchi/root.py | 5 +
src/kimchi/template.py | 34 ++++---
tests/test_plugin.py | 4 +
ui/js/src/kimchi.api.js | 18 +++-
ui/js/src/kimchi.main.js | 24 ++++-
ui/pages/i18n.html.tmpl | 179 ---------------------------------
ui/pages/i18n.json.tmpl | 166 ++++++++++++++++++++++++++++++
30 files changed, 550 insertions(+), 215 deletions(-)
create mode 120000 plugins/sample/config.status
create mode 120000 plugins/sample/po/LINGUAS
create mode 120000 plugins/sample/po/Makefile.in.in
create mode 100644 plugins/sample/po/Makevars
create mode 100644 plugins/sample/po/POTFILES.in
create mode 100644 plugins/sample/po/en_US.po
create mode 100755 plugins/sample/po/gen-pot
create mode 100644 plugins/sample/po/pt_BR.po
create mode 100644 plugins/sample/po/sample.pot
create mode 100644 plugins/sample/po/zh_CN.po
delete mode 100644 plugins/sample/sample.conf
create mode 100644 plugins/sample/sample.conf.in
create mode 100644 plugins/sample/ui/js/Makefile.am
create mode 100644 plugins/sample/ui/js/util.js
create mode 100644 plugins/sample/ui/pages/Makefile.am
create mode 100644 plugins/sample/ui/pages/i18n.json.tmpl
create mode 100644 plugins/sample/ui/pages/tab.html.tmpl
delete mode 100644 ui/pages/i18n.html.tmpl
create mode 100644 ui/pages/i18n.json.tmpl
--
1.9.3
10 years, 6 months
[PATCH 4/4] Implement UI Part to Properly Handle Report Name Existence
by Hongliang Wang
If user provides an existing report name, then tell the error and show
generate report window to allow the user to enter a new name.
Signed-off-by: Hongliang Wang <hlwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.report_add_main.js | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 28c3e66..bc011ba 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -20,6 +20,14 @@ kimchi.report_add_main = function() {
var addReportForm = $('#form-report-add');
var submitButton = $('#button-report-add');
var nameTextbox = $('input[name="name"]', addReportForm);
+ kimchi._reportName && nameTextbox.val(kimchi._reportName).select();
+
+ var disableToolbarButtons = function() {
+ $('#' + reportGridID + '-generate-button').prop('disabled',true);
+ $('#' + reportGridID + '-remove-button').prop('disabled',true);
+ $('#' + reportGridID + '-download-button').prop('disabled',true);
+ $('#' + reportGridID + '-rename-button').prop('disabled',true);
+ };
var submitForm = function(event) {
if(submitButton.prop('disabled')) {
return false;
@@ -32,15 +40,8 @@ kimchi.report_add_main = function() {
}
var formData = addReportForm.serializeObject();
kimchi.window.close();
- $('#' + reportGridID + '-generate-button').prop('disabled',true);
- $('#' + reportGridID + '-remove-button').prop('disabled',true);
- $('#' + reportGridID + '-download-button').prop('disabled',true);
- $('#' + reportGridID + '-rename-button').prop('disabled',true);
- $('.grid-body table tr', '#' + reportGridID).click(function() {
- $('#' + reportGridID + '-remove-button').prop('disabled',true);
- $('#' + reportGridID + '-download-button').prop('disabled',true);
- $('#' + reportGridID + '-rename-button').prop('disabled',true);
- });
+ disableToolbarButtons();
+ $('.grid-body table tr', '#' + reportGridID).on('click', disableToolbarButtons);
var textboxValue = $('#report-name-textbox').val();
if (textboxValue != "") {
$('.grid-body-view table', '#' + reportGridID).prepend(
@@ -68,10 +69,13 @@ kimchi.report_add_main = function() {
}
kimchi.createReport(formData, function(result) {
$('.grid-body-view table tr:first-child', '#' + reportGridID).remove();
- $('#' + reportGridID + '-generate-button').prop('disabled',false);
+ $('.grid-body table tr', '#' + reportGridID)
+ .off('click', disableToolbarButtons);
kimchi.topic('kimchi/debugReportAdded').publish({
result: result
});
+ kimchi._reportName = null;
+ delete kimchi._reportName;
}, function(result) {
// Error message from Async Task status
if (result['message']) {
@@ -83,6 +87,10 @@ kimchi.report_add_main = function() {
}
result && kimchi.message.error(errText)
$('.grid-body-view table tr:first-child', '#' + reportGridID).remove();
+ $('.grid-body table tr', '#' + reportGridID)
+ .off('click', disableToolbarButtons);
+ kimchi._reportName = reportName;
+ $('#' + reportGridID + '-generate-button').click();
});
event.preventDefault();
--
1.8.1.4
10 years, 6 months
[PATCH 0/4] Fix: Report Overwritten when Provided Name Existing
by Hongliang Wang
When user provides an existing debug report name, then the server will generate
a new debug report and overwrite the old one.
Fixed it in this patch to detect the existing name and ask the user to choose
another name.
Depends on following patch:
* [PATCH] Bugfix: Multiple progress indicator during debug report generating
Hongliang Wang (4):
Add ResourceAlreadyExists Exception (HTTP 409)
Add Name Existence Check for Debug Report when Create/Rename
Add License Statement in kimchi.report_add_main.js
Implement UI Part to Properly Handle Report Name Existence
src/kimchi/control/base.py | 3 +++
src/kimchi/exception.py | 4 ++++
src/kimchi/i18n.py | 1 +
src/kimchi/model/debugreports.py | 12 +++++++++-
ui/js/src/kimchi.report_add_main.js | 45 ++++++++++++++++++++++++++++---------
5 files changed, 54 insertions(+), 11 deletions(-)
--
1.8.1.4
10 years, 6 months
[PATCH V2] Bugfix: Multiple progress indicator during debug report generating
by Wen Wang
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
V1 -> V2:
Added "Signed-off-by" label
Progress indicators appear in multiple grids including "Software
Updates" and "Repositories" during debug report's generating. This patch
removes all indicators but one that in "Debug Reports" grid.
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.report_add_main.js | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 45b7e57..ad2bb39 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -15,7 +15,6 @@ kimchi.report_add_main = function() {
}
var formData = addReportForm.serializeObject();
kimchi.window.close();
- var reportGrid = null;
$('#' + reportGridID + '-generate-button').prop('disabled',true);
$('#' + reportGridID + '-remove-button').prop('disabled',true);
$('#' + reportGridID + '-download-button').prop('disabled',true);
@@ -27,7 +26,7 @@ kimchi.report_add_main = function() {
});
var textboxValue = $('#report-name-textbox').val();
if (textboxValue != "") {
- $('.grid-body-view table', reportGrid).prepend(
+ $('.grid-body-view table', '#' + reportGridID).prepend(
'<tr>' +
'<td>' +
'<div class="cell-text-wrapper">' + textboxValue + '</div>' +
@@ -39,7 +38,7 @@ kimchi.report_add_main = function() {
);
}
else {
- $('.grid-body-view table', reportGrid).prepend(
+ $('.grid-body-view table', '#' + reportGridID).prepend(
'<tr>' +
'<td>' +
'<div class="cell-text-wrapper">' + i18n['KCHDR6012M'] + '</div>' +
@@ -51,7 +50,7 @@ kimchi.report_add_main = function() {
);
}
kimchi.createReport(formData, function(result) {
- $('.grid-body-view table tr:first-child', reportGrid).remove();
+ $('.grid-body-view table tr:first-child', '#' + reportGridID).remove();
$('#' + reportGridID + '-generate-button').prop('disabled',false);
kimchi.topic('kimchi/debugReportAdded').publish({
result: result
@@ -66,7 +65,7 @@ kimchi.report_add_main = function() {
var errText = result['responseJSON']['reason'];
}
result && kimchi.message.error(errText)
- $('.grid-body-view table tr:first-child', reportGrid).remove();
+ $('.grid-body-view table tr:first-child', '#' + reportGridID).remove();
});
event.preventDefault();
--
1.7.1
10 years, 6 months
[PATCH] Bugfix: Multiple progress indicator during debug report generating
by Wen Wang
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
Progress indicators appear in multiple grids including "Software
Updates" and "Repositories" during debug report's generating. This patch
removes all indicators but one that in "Debug Reports" grid.
---
ui/js/src/kimchi.report_add_main.js | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 45b7e57..ad2bb39 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -15,7 +15,6 @@ kimchi.report_add_main = function() {
}
var formData = addReportForm.serializeObject();
kimchi.window.close();
- var reportGrid = null;
$('#' + reportGridID + '-generate-button').prop('disabled',true);
$('#' + reportGridID + '-remove-button').prop('disabled',true);
$('#' + reportGridID + '-download-button').prop('disabled',true);
@@ -27,7 +26,7 @@ kimchi.report_add_main = function() {
});
var textboxValue = $('#report-name-textbox').val();
if (textboxValue != "") {
- $('.grid-body-view table', reportGrid).prepend(
+ $('.grid-body-view table', '#' + reportGridID).prepend(
'<tr>' +
'<td>' +
'<div class="cell-text-wrapper">' + textboxValue + '</div>' +
@@ -39,7 +38,7 @@ kimchi.report_add_main = function() {
);
}
else {
- $('.grid-body-view table', reportGrid).prepend(
+ $('.grid-body-view table', '#' + reportGridID).prepend(
'<tr>' +
'<td>' +
'<div class="cell-text-wrapper">' + i18n['KCHDR6012M'] + '</div>' +
@@ -51,7 +50,7 @@ kimchi.report_add_main = function() {
);
}
kimchi.createReport(formData, function(result) {
- $('.grid-body-view table tr:first-child', reportGrid).remove();
+ $('.grid-body-view table tr:first-child', '#' + reportGridID).remove();
$('#' + reportGridID + '-generate-button').prop('disabled',false);
kimchi.topic('kimchi/debugReportAdded').publish({
result: result
@@ -66,7 +65,7 @@ kimchi.report_add_main = function() {
var errText = result['responseJSON']['reason'];
}
result && kimchi.message.error(errText)
- $('.grid-body-view table tr:first-child', reportGrid).remove();
+ $('.grid-body-view table tr:first-child', '#' + reportGridID).remove();
});
event.preventDefault();
--
1.7.1
10 years, 6 months