зеркало из https://github.com/mozilla/MozDef.git
clean up some old-style helper routines in support of #290
This commit is contained in:
Родитель
165a9e8cd5
Коммит
7d2842886a
|
@ -14,34 +14,35 @@ if (Meteor.isClient) {
|
||||||
Session.set('alertsSearch',null);
|
Session.set('alertsSearch',null);
|
||||||
Session.set('alertsDisplayed',0);
|
Session.set('alertsDisplayed',0);
|
||||||
|
|
||||||
Template.alertssummary.selectedalerts = function () {
|
Template.alertssummary.helpers({
|
||||||
//console.log(moment().format(),Session.get('alertsSearch'));
|
selectedalerts: function () {
|
||||||
|
//console.log(moment().format(),Session.get('alertsSearch'));
|
||||||
Session.set('alertsDisplayed',
|
|
||||||
alerts.find(Session.get('alertsSearch'),
|
Session.set('alertsDisplayed',
|
||||||
{limit: Session.get('alertsrecordlimit'),
|
alerts.find(Session.get('alertsSearch'),
|
||||||
reactive:false}).count()
|
{limit: Session.get('alertsrecordlimit'),
|
||||||
);
|
reactive:false}).count()
|
||||||
|
);
|
||||||
//return just what's needed for the summary table
|
|
||||||
return alerts.find(Session.get('alertsSearch'),
|
//return just what's needed for the summary table
|
||||||
{fields:{
|
return alerts.find(Session.get('alertsSearch'),
|
||||||
_id:1,
|
{fields:{
|
||||||
esmetadata:1,
|
_id:1,
|
||||||
utctimestamp:1,
|
esmetadata:1,
|
||||||
utcepoch:1,
|
utctimestamp:1,
|
||||||
summary:1,
|
utcepoch:1,
|
||||||
severity:1,
|
summary:1,
|
||||||
category:1,
|
severity:1,
|
||||||
acknowledged:1,
|
category:1,
|
||||||
acknowledgedby:1,
|
acknowledged:1,
|
||||||
url:1
|
acknowledgedby:1,
|
||||||
},
|
url:1
|
||||||
sort: {utcepoch: -1},
|
},
|
||||||
limit: Session.get('alertsrecordlimit'),
|
sort: {utcepoch: -1},
|
||||||
reactive:true})
|
limit: Session.get('alertsrecordlimit'),
|
||||||
};
|
reactive:true})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Template.alertssummary.events({
|
Template.alertssummary.events({
|
||||||
"click .reset": function(e,t){
|
"click .reset": function(e,t){
|
||||||
|
|
|
@ -13,27 +13,30 @@ if (Meteor.isClient) {
|
||||||
|
|
||||||
//elastic search cluster template functions
|
//elastic search cluster template functions
|
||||||
//return es health items
|
//return es health items
|
||||||
Template.mozdefhealth.esclusterhealthitems = function () {
|
Template.mozdefhealth.helpers({
|
||||||
return healthescluster.find();
|
|
||||||
};
|
esclusterhealthitems: function () {
|
||||||
|
return healthescluster.find();
|
||||||
|
},
|
||||||
|
|
||||||
Template.mozdefhealth.frontendhealthitems = function () {
|
frontendhealthitems: function () {
|
||||||
return healthfrontend.find({},
|
return healthfrontend.find({},
|
||||||
{fields:{},
|
{fields:{},
|
||||||
sort: {hostname: 1}
|
sort: {hostname: 1}
|
||||||
});
|
});
|
||||||
};
|
},
|
||||||
|
|
||||||
Template.mozdefhealth.esnodeshealthitems = function () {
|
esnodeshealthitems: function () {
|
||||||
return healthesnodes.find({},
|
return healthesnodes.find({},
|
||||||
{fields:{},
|
{fields:{},
|
||||||
sort: {hostname: 1}
|
sort: {hostname: 1}
|
||||||
});
|
});
|
||||||
};
|
},
|
||||||
|
|
||||||
Template.mozdefhealth.eshotthreadshealthitems = function () {
|
eshotthreadshealthitems: function () {
|
||||||
return healtheshotthreads.find();
|
return healtheshotthreads.find();
|
||||||
};
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Template.mozdefhealth.rendered = function () {
|
Template.mozdefhealth.rendered = function () {
|
||||||
var ringChartEPS = dc.pieChart("#ringChart-EPS");
|
var ringChartEPS = dc.pieChart("#ringChart-EPS");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче