aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Ousterhout <kayousterhout@gmail.com>2014-11-06 00:03:03 -0800
committerKay Ousterhout <kayousterhout@gmail.com>2014-11-06 00:03:24 -0800
commit2c84178b8283269512b1c968b9995a7bdedd7aa5 (patch)
treeadebe9409e9782fa4ecedd9e8e08825f70966e69
parent70f6f36e03f97847cd2f3e4fe2902bb8459ca6a3 (diff)
downloadspark-2c84178b8283269512b1c968b9995a7bdedd7aa5.tar.gz
spark-2c84178b8283269512b1c968b9995a7bdedd7aa5.tar.bz2
spark-2c84178b8283269512b1c968b9995a7bdedd7aa5.zip
[SPARK-4255] Fix incorrect table striping
This commit stripes table rows after hiding some rows, to ensure that rows are correct striped to alternate white and grey even when rows are hidden by default. Author: Kay Ousterhout <kayousterhout@gmail.com> Closes #3117 from kayousterhout/striping and squashes the following commits: be6e10a [Kay Ousterhout] [SPARK-4255] Fix incorrect table striping (cherry picked from commit 5f27ae16d5b016fae4afeb0f2ad779fd3130b390) Signed-off-by: Kay Ousterhout <kayousterhout@gmail.com>
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/additional-metrics.js2
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/table.js5
2 files changed, 2 insertions, 5 deletions
diff --git a/core/src/main/resources/org/apache/spark/ui/static/additional-metrics.js b/core/src/main/resources/org/apache/spark/ui/static/additional-metrics.js
index c5936b5038..badd85ed48 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/additional-metrics.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/additional-metrics.js
@@ -39,6 +39,8 @@ $(function() {
var column = "table ." + $(this).attr("name");
$(column).hide();
});
+ // Stripe table rows after rows have been hidden to ensure correct striping.
+ stripeTables();
$("input:checkbox").click(function() {
var column = "table ." + $(this).attr("name");
diff --git a/core/src/main/resources/org/apache/spark/ui/static/table.js b/core/src/main/resources/org/apache/spark/ui/static/table.js
index 32187ba6e8..6bb03015ab 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/table.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/table.js
@@ -28,8 +28,3 @@ function stripeTables() {
});
});
}
-
-/* Stripe all tables after pages finish loading. */
-$(function() {
- stripeTables();
-});