Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STORM-1890: looks like too many calls were moved to getStatic. It doe… #1615

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions storm-core/src/ui/public/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ <h1><a href="/">Storm UI</a></h1>
var passed = {}
Object.keys(workerActionSelected).forEach(function (id) {
var url = "/api/v1/topology/"+topologyId+"/profiling/start/" + id + "/" + timeout;
getStatic(url, function(response,status,jqXHR) {
$.get(url, function(response,status,jqXHR) {
jsError(function() {
getStatic("/templates/component-page-template.html", function(template) {
var host_port_split = id.split(":");
Expand Down Expand Up @@ -398,7 +398,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#stop_" + id).prop('disabled', true);
setTimeout(function(){ $("#stop_" + id).prop('disabled', false); }, 5000);

getStatic(url, function(response,status,jqXHR) {
$.get(url, function(response,status,jqXHR) {
alert("Submitted request to stop profiling...");
})
.fail(function(response) {
Expand All @@ -414,7 +414,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#dump_profile_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_profile_" + id).prop('disabled', false); }, 5000);

getStatic(url, function(response,status,jqXHR) {
$.get(url, function(response,status,jqXHR) {
alert("Submitted request to dump profile snapshot...");
})
.fail(function(response) {
Expand All @@ -434,8 +434,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#dump_jstack_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_jstack_" + id).prop('disabled', false); }, 5000);

getStatic(url)
.fail(function(response) {
$.get(url).fail(function(response) {
failed[id] = response;
});
if (!(id in failed)) {
Expand All @@ -459,7 +458,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#dump_jstack_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_jstack_" + id).prop('disabled', false); }, 5000);

getStatic(url, function(response,status,jqXHR) {
$.get(url, function(response,status,jqXHR) {
alert("Submitted request for jstack dump...");
})
.fail(function(response) {
Expand All @@ -477,8 +476,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#restart_worker_jvm_" + id).prop('disabled', true);
setTimeout(function(){ $("#restart_worker_jvm_" + id).prop('disabled', false); }, 5000);

getStatic(url)
.fail(function(response) {
$.get(url).fail(function(response) {
failed[id] = response;
});
if (!(id in failed)) {
Expand All @@ -505,8 +503,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#dump_heap_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_heap_" + id).prop('disabled', false); }, 5000);

getStatic(url)
.fail(function(response) {
$.get(url).fail(function(response) {
failed[id] = response;
});
if (!(id in failed)) {
Expand All @@ -530,7 +527,7 @@ <h1><a href="/">Storm UI</a></h1>
$("#dump_heap_" + id).prop('disabled', true);
setTimeout(function(){ $("#dump_heap_" + id).prop('disabled', false); }, 5000);

getStatic(url, function(response,status,jqXHR) {
$.get(url, function(response,status,jqXHR) {
alert("Submitted request for jmap dump...");
})
.fail(function(response) {
Expand Down
4 changes: 2 additions & 2 deletions storm-core/src/ui/public/deep_search_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
if (search_archived) {
checked = "checked";
}
getStatic("/api/v1/history/summary", function (response, status, jqXHR) {
$.get("/api/v1/history/summary", function (response, status, jqXHR) {
var findIds = function findIds(query, cb) {
var found = [];
var re = new RegExp(query, 'i');
Expand Down Expand Up @@ -104,7 +104,7 @@

var result = $("#result");
if(search) {
getStatic("/api/v1/supervisor/summary", function(response, status, jqXHR) {
$.get("/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);
Expand Down
2 changes: 1 addition & 1 deletion storm-core/src/ui/public/topology.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ <h2 id="topology-resources-header">Topology resources</h2>
};
if (!responseData) {
var topologyId = $.url("?id");
getStatic ('/api/v1/topology/' + topologyId + '/logconfig', renderImpl);
$.get('/api/v1/topology/' + topologyId + '/logconfig', renderImpl);
} else {
renderImpl (responseData);
}
Expand Down