mohan3d commented on a change in pull request #31191:
URL: https://github.com/apache/spark/pull/31191#discussion_r558934521



##########
File path: core/src/main/resources/org/apache/spark/ui/static/historypage.js
##########
@@ -165,17 +169,41 @@ $(document).ready(function() {
         var completedColumnName = 'completed';
         var durationColumnName = 'duration';
         var conf = {
+          "data": array,
           "columns": [
-            {name: 'version'},
-            {name: 'appId', type: "appid-numeric"},
-            {name: 'appName'},
-            {name: attemptIdColumnName},
-            {name: startedColumnName},
-            {name: completedColumnName},
-            {name: durationColumnName, type: "title-numeric"},
-            {name: 'user'},
-            {name: 'lastUpdated'},
-            {name: 'eventLog'},
+            {name: 'version', data: 'version' },
+            {
+              name: 'appId', 
+              type: "appid-numeric", 
+              data: 'id',
+              render:  (id, type, row) => `<span title="${id}"><a 
href="${row.attemptUrl}">${id}</a></span>`
+            },
+            {name: 'appName', data: 'name' },
+            {
+              name: attemptIdColumnName, 
+              data: 'attemptId',
+              render: (attemptId, type, row) => (attemptId ? `<a 
href="${row.attemptUrl}">${attemptId}</a>` : '')
+            },
+            {name: startedColumnName, data: 'startTime' },
+            {name: completedColumnName, data: 'endTime' },
+            {name: durationColumnName, type: "title-numeric", data: 'duration' 
},
+            {name: 'user', data: 'sparkUser' },
+            {name: 'lastUpdated', data: 'lastUpdated' },
+            {
+              name: 'eventLog', 
+              data: 'log', 
+              render: (log, type, row) => `<a href="${log}" class="btn 
btn-info btn-mini">Download</a>` 
+            },
+          ],
+          "aoColumnDefs": [

Review comment:
       @srowen 
   This part is the logic, not in the template anymore.
   
   Here what I am trying to do is to change the style of first 3 columns only 
if hasMultipleAttempts will be set to white background.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to