[Kimchi-devel] [PATCH] Fix debug report UI: Error handling and line selection
Rodrigo Trujillo
rodrigo.trujillo at linux.vnet.ibm.com
Fri Feb 28 14:18:54 UTC 2014
If a user tries to delete a report and some error occurs, no message is
showed in the UI. Also, after delete the report, all lines become
unselected but remove and download buttons are enabled. So user is able
to click on remove button again, but will not know which report is going
to be deleted. This patch disables the buttons, so user have to select
the report again to perform the operations, avoiding mistakes.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
---
ui/js/src/kimchi.host.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/js/src/kimchi.host.js b/ui/js/src/kimchi.host.js
index 6e7f333..7974054 100644
--- a/ui/js/src/kimchi.host.js
+++ b/ui/js/src/kimchi.host.js
@@ -66,8 +66,13 @@ kimchi.host_main = function() {
kimchi.deleteReport({
name: report['name']
}, function(result) {
+ $('#' + reportGridID + '-remove-button')
+ .prop('disabled', true);
+ $('#' + reportGridID + '-download-button')
+ .prop('disabled', true);
listDebugReports();
}, function(error) {
+ kimchi.message.error(error.responseJSON.reason);
});
});
}
--
1.8.5.3
More information about the Kimchi-devel
mailing list