You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ho...@apache.org on 2026/09/01 11:13:24 UTC
(spark) branch branch-4.3 updated: [CORE][MINOR] Minor tidying in the history page listing
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch branch-4.3
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.3 by this push:
new dafd3cc18dce [CORE][MINOR] Minor tidying in the history page listing
dafd3cc18dce is described below
commit dafd3cc18dcee0742011decb6defa4db3bbb1f48
Author: Holden Karau <ho...@snowflake.com>
AuthorDate: Tue Sep 1 00:51:09 2026 -0700
[CORE][MINOR] Minor tidying in the history page listing
Small internal adjustments to how a few listing columns and
URLs are assembled. No behavior change intended.
Co-authored-by: Holden Karau <ho...@pigscanfly.ca>
(cherry picked from commit 2c668af7f19e44d9e9c13bb877fbbc008cf25aeb)
---
.../org/apache/spark/ui/static/historypage.js | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage.js b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
index 2fed1e1633cb..8632476b08f6 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/historypage.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
@@ -148,15 +148,18 @@ $(document).ready(function() {
attempt["startTime"] = formatTimeMillis(attempt["startTimeEpoch"]);
attempt["endTime"] = formatTimeMillis(attempt["endTimeEpoch"]);
attempt["lastUpdated"] = formatTimeMillis(attempt["lastUpdatedEpoch"]);
- attempt["log"] = uiRoot + "/api/v1/applications/" + id + "/" +
- (attempt.hasOwnProperty("attemptId") ? attempt["attemptId"] + "/" : "") + "logs";
+ // Ids are log-derived; encode/escape them like the name/user/logSource columns below.
+ attempt["log"] = uiRoot + "/api/v1/applications/" + encodeURIComponent(id) + "/" +
+ (attempt.hasOwnProperty("attemptId") ?
+ encodeURIComponent(attempt["attemptId"]) + "/" : "") + "logs";
attempt["durationMillisec"] = attempt["duration"];
attempt["duration"] = formatDuration(attempt["duration"]);
attempt["id"] = id;
attempt["name"] = escapeHtml(name);
attempt["version"] = version;
- attempt["attemptUrl"] = uiRoot + "/history/" + id + "/" +
- (attempt.hasOwnProperty("attemptId") ? attempt["attemptId"] + "/" : "") + "jobs/";
+ attempt["attemptUrl"] = uiRoot + "/history/" + encodeURIComponent(id) + "/" +
+ (attempt.hasOwnProperty("attemptId") ?
+ encodeURIComponent(attempt["attemptId"]) + "/" : "") + "jobs/";
array.push(attempt);
}
/* eslint-enable no-prototype-builtins */
@@ -177,12 +180,13 @@ $(document).ready(function() {
var conf = {
"data": array,
"columns": [
- {name: 'version', data: 'version' },
+ {name: 'version', data: 'version', render: (version) => escapeHtml(version) },
{
name: 'appId',
type: "appid-numeric",
data: 'id',
- render: (id, type, row) => `<span title="${id}"><a href="${row.attemptUrl}">${id}</a></span>`
+ render: (id, type, row) =>
+ `<span title="${escapeHtml(id)}"><a href="${row.attemptUrl}">${escapeHtml(id)}</a></span>`
},
{
name: 'appName',
@@ -204,7 +208,8 @@ $(document).ready(function() {
{
name: attemptIdColumnName,
data: 'attemptId',
- render: (attemptId, type, row) => (attemptId ? `<a href="${row.attemptUrl}">${attemptId}</a>` : '')
+ render: (attemptId, type, row) =>
+ (attemptId ? `<a href="${row.attemptUrl}">${escapeHtml(attemptId)}</a>` : '')
},
{name: startedColumnName, data: 'startTime' },
{name: completedColumnName, data: 'endTime' },
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org