зеркало из https://github.com/mozilla/MozDef.git
rough in get plugins function to meteor
This commit is contained in:
Родитель
f9361c1151
Коммит
ac51dec6dd
|
@ -20,6 +20,18 @@ if (Meteor.isClient) {
|
|||
Session.set('attackerlimit','10');
|
||||
});
|
||||
|
||||
getPlugins=function(){
|
||||
Meteor.apply('getplugins',[],
|
||||
onResultReceived = function(err,result){
|
||||
|
||||
if (typeof err == 'undefined') {
|
||||
console.log(err,result);
|
||||
} else {
|
||||
console.log(err.result);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//helper functions for UI templates
|
||||
//and other client javascript routines
|
||||
dateOrNull=function(maybeDate){
|
||||
|
|
|
@ -18,7 +18,8 @@ if (Meteor.isServer) {
|
|||
'ipcif': ipcif,
|
||||
'ipdshield': ipdshield,
|
||||
'verisstats': verisstats,
|
||||
'logincounts': logincounts
|
||||
'logincounts': logincounts,
|
||||
'getplugins': getplugins
|
||||
});
|
||||
|
||||
function saySomething() {
|
||||
|
@ -120,4 +121,16 @@ if (Meteor.isServer) {
|
|||
return logincountsResponse;
|
||||
}
|
||||
}
|
||||
|
||||
function getplugins(endpoint){
|
||||
//console.log('Looking up plugins registered for ' + endpoint + ' from ' + mozdef.rootAPI + '/plugins/' + endpoint);
|
||||
if ( typeof endpoint == 'undefined') {
|
||||
var response = HTTP.get(mozdef.rootAPI + '/plugins/');
|
||||
|
||||
} else {
|
||||
var response = HTTP.get(mozdef.rootAPI + '/plugins/' + endpoint);
|
||||
}
|
||||
console.log(response);
|
||||
return response
|
||||
}
|
||||
};
|
Загрузка…
Ссылка в новой задаче