
Enabled rename feature in host tab. Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com> --- ui/js/src/kimchi.host.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui/js/src/kimchi.host.js b/ui/js/src/kimchi.host.js index 4c94fc1..ec656d5 100644 --- a/ui/js/src/kimchi.host.js +++ b/ui/js/src/kimchi.host.js @@ -304,6 +304,13 @@ kimchi.host_main = function() { label: i18n['KCHDR6008M'], disabled: true, onClick: function(event) { + var report = reportGrid.getSelected(); + if(!report) { + return; + } + + kimchi.selectedReport = report['name']; + kimchi.window.open('report-rename.html'); } }, { id: reportGridID + '-remove-button', @@ -352,6 +359,8 @@ kimchi.host_main = function() { } }], onRowSelected: function(row) { + $('#' + reportGridID + '-rename-button') + .prop('disabled', false); $('#' + reportGridID + '-remove-button') .prop('disabled', false); $('#' + reportGridID + '-download-button') @@ -475,6 +484,8 @@ kimchi.host_main = function() { listDebugReports(); kimchi.topic('kimchi/debugReportAdded') .subscribe(listDebugReports); + kimchi.topic('kimchi/debugReportRenamed') + .subscribe(listDebugReports); } }); }; @@ -788,5 +799,6 @@ kimchi.host_main = function() { reportGrid && reportGrid.destroy(); kimchi.topic('kimchi/debugReportAdded').unsubscribe(listDebugReports); + kimchi.topic('kimchi/debugReportRenamed').unsubscribe(listDebugReports); }); }; -- 1.8.1.4