mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
dont do unnecessary requests
This commit is contained in:
committed by
Tom Wilkie
parent
cda51ef696
commit
720c743020
@@ -49,10 +49,12 @@ function getTopologies() {
|
||||
}
|
||||
|
||||
function getNodeDetails(topology, nodeId) {
|
||||
var url = [AppStore.getUrlForTopology(topology), nodeId].join('/');
|
||||
reqwest(url, function(res) {
|
||||
AppActions.receiveNodeDetails(res.node);
|
||||
});
|
||||
if (nodeId) {
|
||||
var url = [AppStore.getUrlForTopology(topology), nodeId].join('/');
|
||||
reqwest(url, function(res) {
|
||||
AppActions.receiveNodeDetails(res.node);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
@@ -61,7 +63,7 @@ module.exports = {
|
||||
getTopologies: getTopologies,
|
||||
|
||||
getNodesDelta: function(topologyUrl) {
|
||||
if (topologyUrl) {
|
||||
if (topologyUrl && topologyUrl !== currentUrl) {
|
||||
createWebsocket(topologyUrl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user