[Kimchi-devel] [PATCH] Bugfix: Multiple progress indicator during debug report generating
Wen Wang
wenwang at linux.vnet.ibm.com
Thu Jun 12 06:36:54 UTC 2014
From: Wen Wang <wenwang at 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
More information about the Kimchi-devel
mailing list