aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/resources/org/apache/spark/ui/static/streaming-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/resources/org/apache/spark/ui/static/streaming-page.js')
-rw-r--r--core/src/main/resources/org/apache/spark/ui/static/streaming-page.js20
1 files changed, 4 insertions, 16 deletions
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 22b186873e..0fac658d57 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
@@ -252,28 +252,16 @@ function drawHistogram(id, values, minY, maxY, unitY, batchInterval) {
}
$(function() {
- function getParameterFromURL(param)
- {
- var parameters = window.location.search.substring(1); // Remove "?"
- var keyValues = parameters.split('&');
- for (var i = 0; i < keyValues.length; i++)
- {
- var paramKeyValue = keyValues[i].split('=');
- if (paramKeyValue[0] == param)
- {
- return paramKeyValue[1];
- }
- }
- }
-
- var status = getParameterFromURL("show-streams-detail") == "true";
+ var status = window.localStorage && window.localStorage.getItem("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 (window.localStorage) {
+ window.localStorage.setItem("show-streams-detail", "" + status);
+ }
});
if (status) {