зеркало из https://github.com/mozilla/MozDef.git
Fix for showing correct attack details in sidenav
Change 'vr' to Landmass
This commit is contained in:
Родитель
5c23ef38fe
Коммит
103df62cf3
|
@ -41,7 +41,7 @@ Anthony Verez averez@mozilla.com
|
|||
<ul>
|
||||
<li class="first"><a href="/logincounts/">logincounts</a></li>
|
||||
<li><a href="/attackers">attackers</a></li>
|
||||
<li><a href="/vr">vr</a></li>
|
||||
<li><a href="/landmass">Landmass</a></li>
|
||||
<li class="last"><a href="/globe">globe</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -9,6 +9,7 @@ Anthony Verez averez@mozilla.com
|
|||
Jeff Bryner jeffbryner@gmail.com
|
||||
Sanchit Kapoor sanchitlucknow@gmail.com
|
||||
Avijit Gupta 526avijit@gmail.com
|
||||
Yash Mehrotra yashmehrotra95@gmail.com
|
||||
-->
|
||||
|
||||
<template name="vr">
|
||||
|
|
|
@ -184,7 +184,7 @@ if (Meteor.isClient) {
|
|||
}
|
||||
|
||||
function parsedb() {
|
||||
Meteor.subscribe("attackers-summary-yash", onReady = function() {
|
||||
Meteor.subscribe("attackers-summary-landmass", onReady = function() {
|
||||
|
||||
// var filterType = Session.get('filterType');
|
||||
attackers.find().forEach(function(element) {
|
||||
|
@ -320,6 +320,7 @@ if (Meteor.isClient) {
|
|||
var attackRank = intersect.object.rank;
|
||||
var attackRegion = intersect.object.host;
|
||||
var attacks = intersect.object.attacks;
|
||||
|
||||
if (typeof attackRank !== "undefined") {
|
||||
var sessionAttackObj = {
|
||||
host: attackRegion,
|
||||
|
@ -331,6 +332,11 @@ if (Meteor.isClient) {
|
|||
if (!sideNav.hasClass(OPENNAV)) {
|
||||
sideNav.addClass(OPENNAV);
|
||||
}
|
||||
if (Session.get('showDetailedAttack')) {
|
||||
$('#specific-attack-details').slideToggle();
|
||||
$('#attacks-list').slideToggle();
|
||||
Session.set('showDetailedAttack', false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -385,6 +391,7 @@ if (Meteor.isClient) {
|
|||
var hostName = document.getElementById('attacks-host').innerText;
|
||||
var attackDetails = world[hostName][attackIndex];
|
||||
Session.set('attackDetails', attackDetails);
|
||||
Session.set('showDetailedAttack', true);
|
||||
$('#specific-attack-details').slideToggle();
|
||||
$('#attacks-list').slideToggle();
|
||||
},
|
||||
|
|
|
@ -199,7 +199,7 @@ if (Meteor.isServer) {
|
|||
limit:100});
|
||||
});
|
||||
|
||||
Meteor.publish("attackers-summary-yash", function () {
|
||||
Meteor.publish("attackers-summary-landmass", function () {
|
||||
//limit to the last 100 records by default
|
||||
//to ease the sync transfer to dc.js/crossfilter
|
||||
return attackers.find({});
|
||||
|
|
|
@ -188,7 +188,7 @@ Router.map(function () {
|
|||
});
|
||||
|
||||
this.route('vr', {
|
||||
path: '/vr',
|
||||
path: '/landmass',
|
||||
template: 'vr',
|
||||
layoutTemplate: 'layout'
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче