зеркало из https://github.com/mozilla/MozDef.git
onReady subscription hooks for better refresh/syncs
This commit is contained in:
Родитель
66d4fe0a87
Коммит
c8aca1c1c2
|
@ -256,9 +256,14 @@ if (Meteor.isClient) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Deps.autorun(function(comp) {
|
Deps.autorun(function(comp) {
|
||||||
//console.log(comp);
|
//subscribe to the number of alerts
|
||||||
|
//and to the summary of alerts
|
||||||
|
//if the count changes, refresh ourselves in a non-reactive way
|
||||||
|
//to lessen the meteor hooks since we don't care about field-level changes.
|
||||||
Meteor.subscribe("alerts-count");
|
Meteor.subscribe("alerts-count");
|
||||||
Meteor.subscribe("alerts-summary");
|
Meteor.subscribe("alerts-summary", onReady=function(){
|
||||||
|
Deps.nonreactive(refreshAlertsData);
|
||||||
|
});
|
||||||
cnt=alertsCount.findOne();
|
cnt=alertsCount.findOne();
|
||||||
$('#alertsearchtext').val(Session.get('alertsearchtext'));
|
$('#alertsearchtext').val(Session.get('alertsearchtext'));
|
||||||
if ( cnt ){
|
if ( cnt ){
|
||||||
|
|
|
@ -90,11 +90,13 @@ if (Meteor.isClient) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Deps.autorun(function() {
|
Deps.autorun(function() {
|
||||||
Meteor.subscribe("healthfrontend");
|
Meteor.subscribe("healthfrontend",onReady=function(){
|
||||||
|
Deps.nonreactive(refreshChartData);
|
||||||
|
});
|
||||||
Meteor.subscribe("healthescluster");
|
Meteor.subscribe("healthescluster");
|
||||||
Meteor.subscribe("healthesnodes");
|
Meteor.subscribe("healthesnodes");
|
||||||
Meteor.subscribe("healtheshotthreads");
|
Meteor.subscribe("healtheshotthreads");
|
||||||
refreshChartData();
|
|
||||||
|
|
||||||
}); //end deps.autorun
|
}); //end deps.autorun
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче