@@ -54,6 +54,7 @@ export function generateScroller(basicSelect: string, isCL: boolean): string {
5454 const basicSelect = ${ JSON . stringify ( basicSelect ) } ;
5555 const htmlTableId = 'resultset';
5656 const statusId = 'status';
57+ const jobId = 'jobId';
5758 const messageSpanId = 'messageSpan';
5859
5960 let myQueryId = '';
@@ -96,10 +97,15 @@ export function generateScroller(basicSelect: string, isCL: boolean): string {
9697 appendRows(data.rows);
9798 }
9899
100+ if (data.jobId) {
101+
102+ }
103+
99104 if (data.rows === undefined && totalRows === 0) {
100105 document.getElementById(messageSpanId).innerText = 'Statement executed with no result set returned. Rows affected: ' + data.update_count;
101106 } else {
102- document.getElementById(statusId).innerText = noMoreRows ? ('Loaded ' + totalRows + '. End of data') : ('Loaded ' + totalRows + '. More available.');
107+ document.getElementById(statusId).innerText = noMoreRows ? ('Loaded ' + totalRows + '. End of data.') : ('Loaded ' + totalRows + '. More available.');
108+ document.getElementById(jobId).innerText = data.jobId ? data.jobId : '';
103109 document.getElementById(messageSpanId).style.visibility = "hidden";
104110 }
105111 break;
@@ -135,10 +141,20 @@ export function generateScroller(basicSelect: string, isCL: boolean): string {
135141 // Initialize the footer
136142 var footer = document.getElementById(htmlTableId).getElementsByTagName('tfoot')[0];
137143 footer.innerHTML = '';
138- var newCell = footer.insertRow().insertCell();
139- newCell.colSpan = columns.length;
140- newCell.id = statusId;
141- newCell.appendChild(document.createTextNode(' '));
144+ const newRow = footer.insertRow();
145+
146+ const statusCell = newRow.insertCell();
147+ statusCell.id = statusId;
148+ statusCell.appendChild(document.createTextNode(' '));
149+
150+ const jobIdCell = newRow.insertCell();
151+ jobIdCell.id = jobId;
152+ jobIdCell.appendChild(document.createTextNode(' '));
153+
154+ if (columns.length > 2) {
155+ statusCell.colSpan = 2;
156+ jobIdCell.colSpan = columns.length - 2;
157+ }
142158 }
143159
144160 function appendRows(rows) {
0 commit comments