diff options
author | zsxwing <zsxwing@gmail.com> | 2015-05-13 10:01:26 -0700 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2015-05-13 10:01:26 -0700 |
commit | bec938f777a2e18757c7d04504d86a5342e2b49e (patch) | |
tree | dce2eb2e1b252d9f6f1fa4f202703e5a7dfcc4dc /core/src/main/resources/org/apache | |
parent | 0da254fb2903c01e059fa7d0dc81df5740312b35 (diff) | |
download | spark-bec938f777a2e18757c7d04504d86a5342e2b49e.tar.gz spark-bec938f777a2e18757c7d04504d86a5342e2b49e.tar.bz2 spark-bec938f777a2e18757c7d04504d86a5342e2b49e.zip |
[SPARK-7589] [STREAMING] [WEBUI] Make "Input Rate" in the Streaming page consistent with other pages
This PR makes "Input Rate" in the Streaming page consistent with Job and Stage pages.
![screen shot 2015-05-12 at 5 03 35 pm](https://cloud.githubusercontent.com/assets/1000778/7601444/f943f8ac-f8ca-11e4-8280-a715d814f434.png)
![screen shot 2015-05-12 at 5 07 25 pm](https://cloud.githubusercontent.com/assets/1000778/7601445/f9571c0c-f8ca-11e4-9b12-9317cb55c002.png)
Author: zsxwing <zsxwing@gmail.com>
Closes #6102 from zsxwing/SPARK-7589 and squashes the following commits:
2745225 [zsxwing] Make "Input Rate" in the Streaming page consistent with other pages
Diffstat (limited to 'core/src/main/resources/org/apache')
-rw-r--r-- | core/src/main/resources/org/apache/spark/ui/static/streaming-page.css | 4 | ||||
-rw-r--r-- | core/src/main/resources/org/apache/spark/ui/static/streaming-page.js | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/core/src/main/resources/org/apache/spark/ui/static/streaming-page.css b/core/src/main/resources/org/apache/spark/ui/static/streaming-page.css index 5da9d631ad..19abe889ad 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/streaming-page.css +++ b/core/src/main/resources/org/apache/spark/ui/static/streaming-page.css @@ -56,3 +56,7 @@ .histogram { width: auto; } + +span.expand-input-rate { + cursor: pointer; +} diff --git a/core/src/main/resources/org/apache/spark/ui/static/streaming-page.js b/core/src/main/resources/org/apache/spark/ui/static/streaming-page.js index a4e03b156f..22b186873e 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/streaming-page.js +++ b/core/src/main/resources/org/apache/spark/ui/static/streaming-page.js @@ -266,9 +266,19 @@ $(function() { } } - if (getParameterFromURL("show-streams-detail") == "true") { - // Show the details for all InputDStream - $('#inputs-table').toggle('collapsed'); - $('#triangle').html('▼'); + var status = getParameterFromURL("show-streams-detail") == "true"; + + $("span.expand-input-rate").click(function() { + status = !status; + $("#inputs-table").toggle('collapsed'); + // Toggle the class of the arrow between open and closed + $(this).find('.expand-input-rate-arrow').toggleClass('arrow-open').toggleClass('arrow-closed'); + window.history.pushState('', document.title, window.location.pathname + '?show-streams-detail=' + status); + }); + + if (status) { + $("#inputs-table").toggle('collapsed'); + // Toggle the class of the arrow between open and closed + $(this).find('.expand-input-rate-arrow').toggleClass('arrow-open').toggleClass('arrow-closed'); } }); |