You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2016/07/21 16:27:09 UTC
[1/8] storm git commit: STORM-1890: ensure static UI resources are
re-requested with different Storm package builds
Repository: storm
Updated Branches:
refs/heads/master 90eeeee61 -> e5be9863c
STORM-1890: ensure static UI resources are re-requested with different Storm package builds
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/a76eadbd
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/a76eadbd
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/a76eadbd
Branch: refs/heads/master
Commit: a76eadbdc01b8b484b40b4c8ef74753d2d68ca56
Parents: 7d724e8
Author: Alessandro Bellina <ab...@yahoo-inc.com>
Authored: Tue Jun 14 07:39:45 2016 -0500
Committer: Alessandro Bellina <ab...@yahoo-inc.com>
Committed: Fri Jul 1 13:22:10 2016 -0500
----------------------------------------------------------------------
storm-core/src/ui/public/component.html | 30 ++++++++++----------
.../src/ui/public/deep_search_result.html | 10 +++----
storm-core/src/ui/public/index.html | 18 ++++++------
storm-core/src/ui/public/js/script.js | 12 ++++++++
storm-core/src/ui/public/js/visualization.js | 4 +--
storm-core/src/ui/public/logviewer_search.html | 6 ++--
storm-core/src/ui/public/search_result.html | 6 ++--
storm-core/src/ui/public/topology.html | 10 +++----
storm-dist/binary/pom.xml | 10 +++++++
storm-dist/binary/src/main/assembly/binary.xml | 25 +++++++++++++++-
10 files changed, 88 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/component.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/component.html b/storm-core/src/ui/public/component.html
index 6d5465f..005ac5d 100644
--- a/storm-core/src/ui/public/component.html
+++ b/storm-core/src/ui/public/component.html
@@ -22,7 +22,7 @@
<link href="/css/bootstrap-3.3.1.min.css" rel="stylesheet" type="text/css">
<link href="/css/jquery.dataTables.1.10.4.min.css" rel="stylesheet" type="text/css">
<link href="/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css">
-<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css?_ts=${packageTimestamp}" rel="stylesheet" type="text/css">
<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.1.10.4.min.js" type="text/javascript"></script>
<script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script>
@@ -32,7 +32,7 @@
<script src="/js/jquery.blockUI.min.js" type="text/javascript"></script>
<script src="/js/moment.min.js" type="text/javascript"></script>
<script src="/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
-<script src="/js/script.js" type="text/javascript"></script>
+<script src="/js/script.js?_ts=${packageTimestamp}" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
@@ -83,7 +83,7 @@ function jsError(other) {
try {
other();
} catch (err) {
- $.get("/templates/json-error-template.html", function(template) {
+ getStatic("/templates/json-error-template.html", function(template) {
$("#json-response-error").append(Mustache.render($(template).filter("#json-error-template").html(),{error: "JS Error", errorMessage: err}));
});
}
@@ -156,7 +156,7 @@ $(document).ready(function() {
$.ajaxSetup({
"error":function(jqXHR,textStatus,response) {
var errorJson = jQuery.parseJSON(jqXHR.responseText);
- $.get("/templates/json-error-template.html", function(template) {
+ getStatic("/templates/json-error-template.html", function(template) {
$("#json-response-error").append(Mustache.render($(template).filter("#json-error-template").html(),errorJson));
});
}
@@ -187,7 +187,7 @@ $(document).ready(function() {
$.getJSON(url,function(response,status,jqXHR) {
var uiUser = $("#ui-user");
- $.get("/templates/user-template.html", function(template) {
+ getStatic("/templates/user-template.html", function(template) {
uiUser.append(Mustache.render($(template).filter("#user-template").html(),response));
$('#ui-user [data-toggle="tooltip"]').tooltip()
});
@@ -202,7 +202,7 @@ $(document).ready(function() {
var profilerControl = $("#profiler-control");
var executorStats = $("#component-executor-stats");
var componentErrors = $("#component-errors");
- $.get("/templates/component-page-template.html", function(template) {
+ getStatic("/templates/component-page-template.html", function(template) {
response["profilerActive"] = $.map(response["profilerActive"], function(active_map) {
var date = new Date();
var millis = date.getTime() + parseInt(active_map["timestamp"]);
@@ -341,9 +341,9 @@ function start_profiling() {
var passed = {}
Object.keys(workerActionSelected).forEach(function (id) {
var url = "/api/v1/topology/"+topologyId+"/profiling/start/" + id + "/" + timeout;
- $.get(url, function(response,status,jqXHR) {
+ getStatic(url, function(response,status,jqXHR) {
jsError(function() {
- $.get("/templates/component-page-template.html", function(template) {
+ getStatic("/templates/component-page-template.html", function(template) {
var host_port_split = id.split(":");
var host = host_port_split[0];
var port = host_port_split[1];
@@ -382,7 +382,7 @@ function stop_profiling(id) {
$("#stop_" + id).prop('disabled', true);
setTimeout(function(){ $("#stop_" + id).prop('disabled', false); }, 5000);
- $.get(url, function(response,status,jqXHR) {
+ getStatic(url, function(response,status,jqXHR) {
alert("Submitted request to stop profiling...");
})
.fail(function(response) {
@@ -398,7 +398,7 @@ function dump_profile(id) {
$("#dump_profile_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_profile_" + id).prop('disabled', false); }, 5000);
- $.get(url, function(response,status,jqXHR) {
+ getStatic(url, function(response,status,jqXHR) {
alert("Submitted request to dump profile snapshot...");
})
.fail(function(response) {
@@ -418,7 +418,7 @@ function dump_jstacks() {
$("#dump_jstack_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_jstack_" + id).prop('disabled', false); }, 5000);
- $.get(url)
+ getStatic(url)
.fail(function(response) {
failed[id] = response;
});
@@ -443,7 +443,7 @@ function dump_jstack(id) {
$("#dump_jstack_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_jstack_" + id).prop('disabled', false); }, 5000);
- $.get(url, function(response,status,jqXHR) {
+ getStatic(url, function(response,status,jqXHR) {
alert("Submitted request for jstack dump...");
})
.fail(function(response) {
@@ -461,7 +461,7 @@ function restart_worker_jvms() {
$("#restart_worker_jvm_" + id).prop('disabled', true);
setTimeout(function(){ $("#restart_worker_jvm_" + id).prop('disabled', false); }, 5000);
- $.get(url)
+ getStatic(url)
.fail(function(response) {
failed[id] = response;
});
@@ -489,7 +489,7 @@ function dump_heaps() {
$("#dump_heap_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_heap_" + id).prop('disabled', false); }, 5000);
- $.get(url)
+ getStatic(url)
.fail(function(response) {
failed[id] = response;
});
@@ -514,7 +514,7 @@ function dump_heap(id) {
$("#dump_heap_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_heap_" + id).prop('disabled', false); }, 5000);
- $.get(url, function(response,status,jqXHR) {
+ getStatic(url, function(response,status,jqXHR) {
alert("Submitted request for jmap dump...");
})
.fail(function(response) {
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/deep_search_result.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/deep_search_result.html b/storm-core/src/ui/public/deep_search_result.html
index 406a101..5b4f47b 100644
--- a/storm-core/src/ui/public/deep_search_result.html
+++ b/storm-core/src/ui/public/deep_search_result.html
@@ -21,7 +21,7 @@
<link href="/css/bootstrap-3.3.1.min.css" rel="stylesheet" type="text/css">
<link href="/css/jquery.dataTables.1.10.4.min.css" rel="stylesheet" type="text/css">
<link href="/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css">
-<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css?_ts=${packageTimestamp}" rel="stylesheet" type="text/css">
<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.1.10.4.min.js" type="text/javascript"></script>
<script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script>
@@ -31,7 +31,7 @@
<script src="/js/jquery.blockUI.min.js" type="text/javascript"></script>
<script src="/js/url.min.js" type="text/javascript"></script>
<script src="/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
-<script src="/js/script.js" type="text/javascript"></script>
+<script src="/js/script.js?_ts=${packageTimestamp}" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
@@ -56,12 +56,12 @@ $(document).ready(function() {
var port = $.url("?port") || "*";
var search_archived = $.url("?search-archived");
- $.get("/templates/deep-search-result-page-template.html", function(template) {
+ getStatic("/templates/deep-search-result-page-template.html", function(template) {
var checked;
if (search_archived) {
checked = "checked";
}
- $.get("/api/v1/history/summary", function (response, status, jqXHR) {
+ getStatic("/api/v1/history/summary", function (response, status, jqXHR) {
var findIds = function findIds(query, cb) {
var found = [];
var re = new RegExp(query, 'i');
@@ -104,7 +104,7 @@ $(document).ready(function() {
var result = $("#result");
if(search) {
- $.get("/api/v1/supervisor/summary", function(response, status, jqXHR) {
+ getStatic("/api/v1/supervisor/summary", function(response, status, jqXHR) {
for(var i in response.supervisors) {
response.supervisors[i].elemId = elem_id_for_host(response.supervisors[i].host);
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/index.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/index.html b/storm-core/src/ui/public/index.html
index eae423c..52900a5 100644
--- a/storm-core/src/ui/public/index.html
+++ b/storm-core/src/ui/public/index.html
@@ -23,7 +23,7 @@
<link href="/css/jquery.dataTables.1.10.4.min.css" rel="stylesheet" type="text/css">
<link href="/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css">
<link href="/css/jsonFormatter.min.css" rel="stylesheet" type="text/css">
-<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css?_ts=${packageTimestamp}" rel="stylesheet" type="text/css">
<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.1.10.4.min.js" type="text/javascript"></script>
<script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script>
@@ -32,7 +32,7 @@
<script src="/js/jquery.blockUI.min.js" type="text/javascript"></script>
<script src="/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
<script src="/js/jsonFormatter.min.js" type="text/javascript"></script>
-<script src="/js/script.js" type="text/javascript"></script>
+<script src="/js/script.js?_ts=${packageTimestamp}" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
@@ -96,7 +96,7 @@ $(document).ready(function() {
$.ajaxSetup({
"error":function(jqXHR,textStatus,response) {
var errorJson = jQuery.parseJSON(jqXHR.responseText);
- $.get("/templates/json-error-template.html", function(template) {
+ getStatic("/templates/json-error-template.html", function(template) {
$("#json-response-error").append(Mustache.render($(template).filter("#json-error-template").html(),errorJson));
});
}
@@ -109,18 +109,18 @@ $(document).ready(function() {
var config = $("#nimbus-configuration");
$.getJSON("/api/v1/cluster/summary",function(response,status,jqXHR) {
- $.get("/templates/user-template.html", function(template) {
+ getStatic("/templates/user-template.html", function(template) {
uiUser.append(Mustache.render($(template).filter("#user-template").html(),response));
$('#ui-user [data-toggle="tooltip"]').tooltip()
});
- $.get("/templates/index-page-template.html", function(template) {
+ getStatic("/templates/index-page-template.html", function(template) {
clusterSummary.append(Mustache.render($(template).filter("#cluster-summary-template").html(),response));
$('#cluster-summary [data-toggle="tooltip"]').tooltip();
});
});
$.getJSON("/api/v1/nimbus/summary",function(response,status,jqXHR) {
- $.get("/templates/index-page-template.html", function(template) {
+ getStatic("/templates/index-page-template.html", function(template) {
nimbusSummary.append(Mustache.render($(template).filter("#nimbus-summary-template").html(),response));
//host, port, isLeader, version, uptime
dtAutoPage("#nimbus-summary-table", {
@@ -133,7 +133,7 @@ $(document).ready(function() {
});
});
$.getJSON("/api/v1/topology/summary",function(response,status,jqXHR) {
- $.get("/templates/index-page-template.html", function(template) {
+ getStatic("/templates/index-page-template.html", function(template) {
topologySummary.append(Mustache.render($(template).filter("#topology-summary-template").html(),response));
//name, owner, status, uptime, num workers, num executors, num tasks, replication count, assigned total mem, assigned total cpu, scheduler info
dtAutoPage("#topology-summary-table", {
@@ -146,7 +146,7 @@ $(document).ready(function() {
});
});
$.getJSON("/api/v1/supervisor/summary",function(response,status,jqXHR) {
- $.get("/templates/index-page-template.html", function(template) {
+ getStatic("/templates/index-page-template.html", function(template) {
supervisorSummary.append(Mustache.render($(template).filter("#supervisor-summary-template").html(),response));
//id, host, uptime, slots, used slots
dtAutoPage("#supervisor-summary-table", {
@@ -160,7 +160,7 @@ $(document).ready(function() {
});
$.getJSON("/api/v1/cluster/configuration",function(response,status,jqXHR) {
var formattedResponse = formatConfigData(response);
- $.get("/templates/index-page-template.html", function(template) {
+ getStatic("/templates/index-page-template.html", function(template) {
config.append(Mustache.render($(template).filter("#configuration-template").html(),formattedResponse));
$('#nimbus-configuration-table td').jsonFormatter()
//key, value
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/js/script.js
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/js/script.js b/storm-core/src/ui/public/js/script.js
index a880205..6d641e1 100644
--- a/storm-core/src/ui/public/js/script.js
+++ b/storm-core/src/ui/public/js/script.js
@@ -257,3 +257,15 @@ $.blockUI.defaults.css = {
opacity: .5,
color: '#fff',margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center"
};
+
+// add a url query param to static (templates normally) ajax requests
+// for cache busting
+function getStatic(url, cb) {
+ return $.ajax({
+ url: url,
+ data: {
+ '_ts': '${packageTimestamp}'
+ },
+ success: cb
+ });
+};
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/js/visualization.js
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/js/visualization.js b/storm-core/src/ui/public/js/visualization.js
index 9aab087..4daadc2 100644
--- a/storm-core/src/ui/public/js/visualization.js
+++ b/storm-core/src/ui/public/js/visualization.js
@@ -379,7 +379,7 @@ function jsError(other) {
try {
other();
} catch (err) {
- $.get("/templates/json-error-template.html", function(template) {
+ getStatic("/templates/json-error-template.html", function(template) {
$("#json-response-error").append(Mustache.render($(template).filter("#json-error-template").html(),{error: "JS Error", errorMessage: err}));
});
}
@@ -388,7 +388,7 @@ function jsError(other) {
var should_update;
function show_visualization(sys) {
$.getJSON("/api/v1/topology/"+$.url("?id")+"/visualization-init",function(response,status,jqXHR) {
- $.get("/templates/topology-page-template.html", function(template) {
+ getStatic("/templates/topology-page-template.html", function(template) {
jsError(function() {
var topologyVisualization = $("#visualization-container");
topologyVisualization.append(
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/logviewer_search.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/logviewer_search.html b/storm-core/src/ui/public/logviewer_search.html
index f981499..3a1682e 100644
--- a/storm-core/src/ui/public/logviewer_search.html
+++ b/storm-core/src/ui/public/logviewer_search.html
@@ -21,7 +21,7 @@
<link href="/css/bootstrap-3.3.1.min.css" rel="stylesheet" type="text/css">
<link href="/css/jquery.dataTables.1.10.4.min.css" rel="stylesheet" type="text/css">
<link href="/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css">
-<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css?_ts=${packageTimestamp}" rel="stylesheet" type="text/css">
<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.1.10.4.min.js" type="text/javascript"></script>
<script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script>
@@ -30,7 +30,7 @@
<script src="/js/jquery.blockUI.min.js" type="text/javascript"></script>
<script src="/js/url.min.js" type="text/javascript"></script>
<script src="/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
-<script src="/js/script.js" type="text/javascript"></script>
+<script src="/js/script.js?_ts=${packageTimestamp}" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
@@ -51,7 +51,7 @@ $(document).ready(function() {
file = decodeURIComponent(file);
search = decodeURIComponent(search);
- $.get("/templates/logviewer-search-page-template.html", function(template) {
+ getStatic("/templates/logviewer-search-page-template.html", function(template) {
$("#search-form").append(Mustache.render($(template).filter("#search-single-file").html(),{file: file, search: search, isDaemon: isDaemon}));
var result = $("#result");
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/search_result.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/search_result.html b/storm-core/src/ui/public/search_result.html
index ec44aa9..ee0efd8 100644
--- a/storm-core/src/ui/public/search_result.html
+++ b/storm-core/src/ui/public/search_result.html
@@ -21,7 +21,7 @@
<link href="/css/bootstrap-3.3.1.min.css" rel="stylesheet" type="text/css">
<link href="/css/jquery.dataTables.1.10.4.min.css" rel="stylesheet" type="text/css">
<link href="/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css">
-<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css?_ts=${packageTimestamp}" rel="stylesheet" type="text/css">
<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.1.10.4.min.js" type="text/javascript"></script>
<script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script>
@@ -30,7 +30,7 @@
<script src="/js/jquery.blockUI.min.js" type="text/javascript"></script>
<script src="/js/url.min.js" type="text/javascript"></script>
<script src="/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
-<script src="/js/script.js" type="text/javascript"></script>
+<script src="/js/script.js?_ts=${packageTimestamp}" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
@@ -49,7 +49,7 @@ $(document).ready(function() {
var count = $.url("?count") || 2;
var searchArchived = $.url("?searchArchived") || "";
- $.get("/templates/search-result-page-template.html", function(template) {
+ getStatic("/templates/search-result-page-template.html", function(template) {
$("#search-form").append(Mustache.render($(template).filter("#search-form-template").html(),{id: id, search: search, count: count, searchArchived: searchArchived}));
var result = $("#result");
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-core/src/ui/public/topology.html
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/topology.html b/storm-core/src/ui/public/topology.html
index 7d3527c..92518f6 100644
--- a/storm-core/src/ui/public/topology.html
+++ b/storm-core/src/ui/public/topology.html
@@ -24,7 +24,7 @@
<link href="/css/jquery.dataTables.1.10.4.min.css" rel="stylesheet" type="text/css">
<link href="/css/dataTables.bootstrap.css" rel="stylesheet" type="text/css">
<link href="/css/jsonFormatter.min.css" rel="stylesheet" type="text/css">
-<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css?_ts=${packageTimestamp}" rel="stylesheet" type="text/css">
<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.1.10.4.min.js" type="text/javascript"></script>
<script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script>
@@ -33,7 +33,7 @@
<script src="/js/bootstrap-3.3.1.min.js" type="text/javascript"></script>
<script src="/js/jquery.blockUI.min.js" type="text/javascript"></script>
<script src="/js/jsonFormatter.min.js" type="text/javascript"></script>
-<script src="/js/script.js" type="text/javascript"></script>
+<script src="/js/script.js?_ts=${packageTimestamp}" type="text/javascript"></script>
<script src="/js/visualization.js" type="text/javascript"></script>
<script src="/js/arbor.js" type="text/javascript"></script>
<script src="/js/arbor-graphics.js" type="text/javascript"></script>
@@ -231,7 +231,7 @@ function renderLogLevelForm (template, responseData){
};
if (!responseData) {
var topologyId = $.url("?id");
- $.get ('/api/v1/topology/' + topologyId + '/logconfig', renderImpl);
+ getStatic ('/api/v1/topology/' + topologyId + '/logconfig', renderImpl);
} else {
renderImpl (responseData);
}
@@ -265,7 +265,7 @@ $(document).ready(function() {
$.ajaxSetup({
"error":function(jqXHR,textStatus,response) {
var errorJson = jQuery.parseJSON(jqXHR.responseText);
- $.get("/templates/json-error-template.html", function(template) {
+ getStatic("/templates/json-error-template.html", function(template) {
$("#json-response-error").append(Mustache.render($(template).filter("#json-error-template").html(),errorJson));
});
}
@@ -273,7 +273,7 @@ $(document).ready(function() {
$.getJSON(url,function(response,status,jqXHR) {
var uiUser = $("#ui-user");
- $.get("/templates/user-template.html", function(template) {
+ getStatic("/templates/user-template.html", function(template) {
uiUser.append(Mustache.render($(template).filter("#user-template").html(),response));
$('#ui-user [data-toggle="tooltip"]').tooltip();
});
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-dist/binary/pom.xml
----------------------------------------------------------------------
diff --git a/storm-dist/binary/pom.xml b/storm-dist/binary/pom.xml
index dd88a87..f7d0c23 100644
--- a/storm-dist/binary/pom.xml
+++ b/storm-dist/binary/pom.xml
@@ -30,6 +30,16 @@
<name>Storm Binary Distribution</name>
<description>Storm binary distribution</description>
+ <!--
+ Used for cache busting in the Storm UI HTML and script.js files
+ See src/main/assembly/pom.xml for the fileSet rules with
+ <filtered>true</filtered>
+ -->
+ <properties>
+ <packageTimestamp>${maven.build.timestamp}</packageTimestamp>
+ <maven.build.timestamp.format>YYYYMMddHHmm</maven.build.timestamp.format>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.apache.storm</groupId>
http://git-wip-us.apache.org/repos/asf/storm/blob/a76eadbd/storm-dist/binary/src/main/assembly/binary.xml
----------------------------------------------------------------------
diff --git a/storm-dist/binary/src/main/assembly/binary.xml b/storm-dist/binary/src/main/assembly/binary.xml
index a8c6d41..04e432b 100644
--- a/storm-dist/binary/src/main/assembly/binary.xml
+++ b/storm-dist/binary/src/main/assembly/binary.xml
@@ -46,13 +46,36 @@
</includes>
<fileMode>0755</fileMode>
</fileSet>
+ <!--
+ Allow for variable substitution for cache busting in HTML files and script.js
+ See storm-dist/binary/pom.xml for custom variables that will be substituted in.
+
+ The source files should have a ${variable to be replaced} wherever
+ maven assembly plugin should inject a value.
+ -->
<fileSet>
<directory>${project.basedir}/../../storm-core/src/ui/public</directory>
<outputDirectory>public</outputDirectory>
<includes>
- <include>*/**</include>
+ <include>*.html</include>
+ <include>js/script.js</include>
</includes>
<excludes/>
+ <filtered>true</filtered>
+ </fileSet>
+ <!--
+ Include rest of public/ directory, without any filtering
+ -->
+ <fileSet>
+ <directory>${project.basedir}/../../storm-core/src/ui/public</directory>
+ <outputDirectory>public</outputDirectory>
+ <includes>
+ <include>*/**</include>
+ </includes>
+ <excludes>
+ <exclude>*.html</exclude>
+ <exclude>js/script.js</exclude>
+ </excludes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../examples</directory>
[3/8] storm git commit: STORM-1890: add code Cache-Control: no-cache
to root html pages (/*.html)
Posted by pt...@apache.org.
STORM-1890: add code Cache-Control: no-cache to root html pages (/*.html)
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/95246793
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/95246793
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/95246793
Branch: refs/heads/master
Commit: 9524679388564aa6c2b7dacf1737c2de8572dc6f
Parents: 42858ab
Author: Alessandro Bellina <ab...@yahoo-inc.com>
Authored: Sat Jun 18 14:05:27 2016 -0500
Committer: Alessandro Bellina <ab...@yahoo-inc.com>
Committed: Fri Jul 1 13:41:55 2016 -0500
----------------------------------------------------------------------
.../src/clj/org/apache/storm/ui/helpers.clj | 28 +++++++++++++++++---
1 file changed, 24 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/95246793/storm-core/src/clj/org/apache/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/ui/helpers.clj b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
index e681cfb..e5d64b1 100644
--- a/storm-core/src/clj/org/apache/storm/ui/helpers.clj
+++ b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
@@ -22,6 +22,7 @@
(:use [org.apache.storm config log])
(:use [org.apache.storm.util :only [clojurify-structure defnk not-nil?]])
(:use [clj-time coerce format])
+ (:import [org.apache.commons.lang StringUtils])
(:import [org.apache.storm.generated ExecutorInfo ExecutorSummary]
[org.apache.storm.ui UIHelpers]
[org.apache.storm.metric StormMetricsRegistry])
@@ -36,22 +37,41 @@
[org.eclipse.jetty.server DispatcherType]
[org.eclipse.jetty.servlets CrossOriginFilter]
(org.json.simple JSONValue))
- (:require [ring.util servlet])
+ (:require [ring.util servlet]
+ [ring.util.response :as response])
(:require [compojure.route :as route]
[compojure.handler :as handler]))
;; TODO this function and its callings will be replace when ui.core and logviewer and drpc move to Java
(def num-web-requests (StormMetricsRegistry/registerMeter "num-web-requests"))
+;; (defn requests-middleware
+;; "Coda Hale metric for counting the number of web requests."
+;; [handler]
+;; (fn [req]
+;; (.mark num-web-requests)
+;; (handler req)))
+
(defn requests-middleware
- "Coda Hale metric for counting the number of web requests."
+ "Wrap request with Coda Hale metric for counting the number of web requests,
+ and add Cache-Control: no-cache for /*.html files (html files in root directory)"
[handler]
(fn [req]
(.mark num-web-requests)
- (handler req)))
+ (let [uri (:uri req)
+ res (handler req)
+ content-type (response/get-header res "Content-Type")]
+ ;; check that the response is html and that uri is for a root page: a single / in the url
+ ;; then we know we don't want it cached (e.g. index.html)
+ (if (and (= content-type "text/html")
+ (= 1 (StringUtils/countMatches uri "/")))
+ ;; response for html page in root directory, no-cache
+ (response/header res "Cache-Control" "no-cache")
+ ;; else, carry on
+ res))))
;; TODO this function and its callings will be replace when ui.core and logviewer move to Java
(defnk json-response
[data callback :need-serialize true :status 200 :headers {}]
{:status status
:headers (UIHelpers/getJsonResponseHeaders callback headers)
- :body (UIHelpers/getJsonResponseBody data callback need-serialize)})
\ No newline at end of file
+ :body (UIHelpers/getJsonResponseBody data callback need-serialize)})
[4/8] storm git commit: STORM-1890: add maven depency to for
ring-core 1.3.1,
move org.apache.commons.FileUtils to 1.3.2 as that is needed by ring-core
1.3.1, move compojure to 1.1.9 since it matches 1.3.1
Posted by pt...@apache.org.
STORM-1890: add maven depency to for ring-core 1.3.1, move org.apache.commons.FileUtils to 1.3.2 as that is needed by ring-core 1.3.1, move compojure to 1.1.9 since it matches 1.3.1
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/09c76f51
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/09c76f51
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/09c76f51
Branch: refs/heads/master
Commit: 09c76f510a13a1a8f6454fd867f00579622fb488
Parents: 9524679
Author: Alessandro Bellina <ab...@yahoo-inc.com>
Authored: Thu Jun 16 11:07:48 2016 -0500
Committer: Alessandro Bellina <ab...@yahoo-inc.com>
Committed: Fri Jul 1 14:18:30 2016 -0500
----------------------------------------------------------------------
pom.xml | 11 ++++++++---
storm-core/pom.xml | 4 ++++
storm-core/src/clj/org/apache/storm/ui/helpers.clj | 12 +++---------
3 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/09c76f51/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e8e7bb7..5989553 100644
--- a/pom.xml
+++ b/pom.xml
@@ -209,19 +209,19 @@
<!-- dependency versions -->
<clojure.version>1.7.0</clojure.version>
<java_jmx.version>0.3.1</java_jmx.version>
- <compojure.version>1.1.3</compojure.version>
+ <compojure.version>1.1.9</compojure.version>
<hiccup.version>0.3.6</hiccup.version>
<commons-compress.version>1.4.1</commons-compress.version>
<commons-io.version>2.5</commons-io.version>
<commons-lang.version>2.5</commons-lang.version>
<commons-exec.version>1.1</commons-exec.version>
- <commons-fileupload.version>1.2.1</commons-fileupload.version>
+ <commons-fileupload.version>1.3.2</commons-fileupload.version>
<commons-codec.version>1.6</commons-codec.version>
<commons-cli.version>1.3.1</commons-cli.version>
<clj-time.version>0.8.0</clj-time.version>
<curator.version>2.10.0</curator.version>
<json-simple.version>1.1</json-simple.version>
- <ring.version>1.3.0</ring.version>
+ <ring.version>1.3.1</ring.version>
<ring-json.version>0.3.1</ring-json.version>
<jetty.version>7.6.13.v20130916</jetty.version>
<clojure.tools.logging.version>0.2.3</clojure.tools.logging.version>
@@ -673,6 +673,11 @@
</dependency>
<dependency>
<groupId>ring</groupId>
+ <artifactId>ring-core</artifactId>
+ <version>${ring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ring</groupId>
<artifactId>ring-devel</artifactId>
<version>${ring.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/storm/blob/09c76f51/storm-core/pom.xml
----------------------------------------------------------------------
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index a012172..016bde5 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -74,6 +74,10 @@
</dependency>
<dependency>
<groupId>ring</groupId>
+ <artifactId>ring-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>ring</groupId>
<artifactId>ring-devel</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/storm/blob/09c76f51/storm-core/src/clj/org/apache/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/ui/helpers.clj b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
index e5d64b1..16e6a6a 100644
--- a/storm-core/src/clj/org/apache/storm/ui/helpers.clj
+++ b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
@@ -44,24 +44,18 @@
;; TODO this function and its callings will be replace when ui.core and logviewer and drpc move to Java
(def num-web-requests (StormMetricsRegistry/registerMeter "num-web-requests"))
-;; (defn requests-middleware
-;; "Coda Hale metric for counting the number of web requests."
-;; [handler]
-;; (fn [req]
-;; (.mark num-web-requests)
-;; (handler req)))
(defn requests-middleware
"Wrap request with Coda Hale metric for counting the number of web requests,
- and add Cache-Control: no-cache for /*.html files (html files in root directory)"
+ and add Cache-Control: no-cache for html files in root directory (index.html, topology.html, etc)"
[handler]
(fn [req]
(.mark num-web-requests)
(let [uri (:uri req)
res (handler req)
content-type (response/get-header res "Content-Type")]
- ;; check that the response is html and that uri is for a root page: a single / in the url
- ;; then we know we don't want it cached (e.g. index.html)
+ ;; check that the response is html and that the path is for a root page: a single / in the path
+ ;; then we know we don't want it cached (e.g. /index.html)
(if (and (= content-type "text/html")
(= 1 (StringUtils/countMatches uri "/")))
;; response for html page in root directory, no-cache
[7/8] storm git commit: add STORM-1890 to changelog
Posted by pt...@apache.org.
add STORM-1890 to changelog
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/63947dda
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/63947dda
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/63947dda
Branch: refs/heads/master
Commit: 63947dda331fa9d8cced9abb4935eedcb18b4d35
Parents: b8b5e9e
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Thu Jul 21 11:13:28 2016 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Thu Jul 21 11:13:28 2016 -0400
----------------------------------------------------------------------
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/63947dda/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41ed606..aa63e35 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
## 2.0.0
+ * STORM-1890: ensure we refetch static resources after package build
* STORM-1966 Expand metric having Map type as value into multiple metrics based on entries
* STORM-1737: storm-kafka-client has compilation errors with Apache Kafka 0.10
* STORM-1910 One topology cannot use hdfs spout to read from two locations
[2/8] storm git commit: STORM-1890: add temp-file store since
wrap-multipart-params for ring 1.3 needs it
Posted by pt...@apache.org.
STORM-1890: add temp-file store since wrap-multipart-params for ring 1.3 needs it
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/42858abe
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/42858abe
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/42858abe
Branch: refs/heads/master
Commit: 42858abe3c2f13b0b6a5f997753d23ee149164ae
Parents: a76eadb
Author: Alessandro Bellina <ab...@yahoo-inc.com>
Authored: Sat Jun 18 14:04:36 2016 -0500
Committer: Alessandro Bellina <ab...@yahoo-inc.com>
Committed: Fri Jul 1 13:41:55 2016 -0500
----------------------------------------------------------------------
storm-core/src/clj/org/apache/storm/ui/core.clj | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/42858abe/storm-core/src/clj/org/apache/storm/ui/core.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/ui/core.clj b/storm-core/src/clj/org/apache/storm/ui/core.clj
index 455691a..f7bb2e7 100644
--- a/storm-core/src/clj/org/apache/storm/ui/core.clj
+++ b/storm-core/src/clj/org/apache/storm/ui/core.clj
@@ -18,7 +18,8 @@
(:use compojure.core)
(:use [clojure.java.shell :only [sh]])
(:use ring.middleware.reload
- ring.middleware.multipart-params)
+ ring.middleware.multipart-params
+ ring.middleware.multipart-params.temp-file)
(:use [ring.middleware.json :only [wrap-json-params]])
(:use [hiccup core page-helpers])
(:use [org.apache.storm config util log converter])
[5/8] storm git commit: STORM-1890: use pure clojure to detect html
files from root path
Posted by pt...@apache.org.
STORM-1890: use pure clojure to detect html files from root path
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/05a4d9df
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/05a4d9df
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/05a4d9df
Branch: refs/heads/master
Commit: 05a4d9df227c8b083177505ae131962e17e0e47b
Parents: 09c76f5
Author: Alessandro Bellina <ab...@yahoo-inc.com>
Authored: Wed Jul 13 20:47:14 2016 -0500
Committer: Alessandro Bellina <ab...@yahoo-inc.com>
Committed: Wed Jul 13 20:47:14 2016 -0500
----------------------------------------------------------------------
storm-core/src/clj/org/apache/storm/ui/helpers.clj | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/05a4d9df/storm-core/src/clj/org/apache/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/ui/helpers.clj b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
index 16e6a6a..ac1ecd1 100644
--- a/storm-core/src/clj/org/apache/storm/ui/helpers.clj
+++ b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
@@ -22,7 +22,6 @@
(:use [org.apache.storm config log])
(:use [org.apache.storm.util :only [clojurify-structure defnk not-nil?]])
(:use [clj-time coerce format])
- (:import [org.apache.commons.lang StringUtils])
(:import [org.apache.storm.generated ExecutorInfo ExecutorSummary]
[org.apache.storm.ui UIHelpers]
[org.apache.storm.metric StormMetricsRegistry])
@@ -57,7 +56,7 @@
;; check that the response is html and that the path is for a root page: a single / in the path
;; then we know we don't want it cached (e.g. /index.html)
(if (and (= content-type "text/html")
- (= 1 (StringUtils/countMatches uri "/")))
+ (= 1 (count (re-seq #"/" uri))))
;; response for html page in root directory, no-cache
(response/header res "Cache-Control" "no-cache")
;; else, carry on
[6/8] storm git commit: Merge branch
'STORM-1890_ensure_we_refetch_static_resources_after_package_build' of
github.com:abellina/storm
Posted by pt...@apache.org.
Merge branch 'STORM-1890_ensure_we_refetch_static_resources_after_package_build' of github.com:abellina/storm
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/b8b5e9e6
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/b8b5e9e6
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/b8b5e9e6
Branch: refs/heads/master
Commit: b8b5e9e67b0d40e64b0ba33ad9110c9f6043f800
Parents: 85d87ee 05a4d9d
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Thu Jul 21 11:11:50 2016 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Thu Jul 21 11:11:50 2016 -0400
----------------------------------------------------------------------
pom.xml | 11 +++++--
storm-core/pom.xml | 4 +++
storm-core/src/clj/org/apache/storm/ui/core.clj | 3 +-
.../src/clj/org/apache/storm/ui/helpers.clj | 21 +++++++++++---
storm-core/src/ui/public/component.html | 30 ++++++++++----------
.../src/ui/public/deep_search_result.html | 10 +++----
storm-core/src/ui/public/index.html | 18 ++++++------
storm-core/src/ui/public/js/script.js | 12 ++++++++
storm-core/src/ui/public/js/visualization.js | 4 +--
storm-core/src/ui/public/logviewer_search.html | 6 ++--
storm-core/src/ui/public/search_result.html | 6 ++--
storm-core/src/ui/public/topology.html | 10 +++----
storm-dist/binary/pom.xml | 10 +++++++
storm-dist/binary/src/main/assembly/binary.xml | 25 +++++++++++++++-
14 files changed, 119 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/b8b5e9e6/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/b8b5e9e6/storm-core/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/b8b5e9e6/storm-core/src/clj/org/apache/storm/ui/core.clj
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/b8b5e9e6/storm-core/src/ui/public/topology.html
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/b8b5e9e6/storm-dist/binary/src/main/assembly/binary.xml
----------------------------------------------------------------------
[8/8] storm git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/storm
Posted by pt...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/storm
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e5be9863
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e5be9863
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e5be9863
Branch: refs/heads/master
Commit: e5be9863cd825e9fb1dc21d84c1283a23fddc7cc
Parents: 63947dd 90eeeee
Author: P. Taylor Goetz <pt...@gmail.com>
Authored: Thu Jul 21 12:26:45 2016 -0400
Committer: P. Taylor Goetz <pt...@gmail.com>
Committed: Thu Jul 21 12:26:45 2016 -0400
----------------------------------------------------------------------
CHANGELOG.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/e5be9863/CHANGELOG.md
----------------------------------------------------------------------