зеркало из https://github.com/mozilla/MozDef.git
no tooltip until acked, sync acking with tooltip trigger
This commit is contained in:
Родитель
aec3e49777
Коммит
aaeb55783f
|
@ -6,14 +6,19 @@ Copyright (c) 2014 Mozilla Corporation
|
|||
|
||||
Contributors:
|
||||
Jeff Bryner jbryner@mozilla.com
|
||||
Anthony Verez averez@mozilla.com
|
||||
*/
|
||||
|
||||
if (Meteor.isClient) {
|
||||
|
||||
Template.alertTableItem.rendered = function() {
|
||||
Template.alertTableItem.events({
|
||||
//if button has just changed to disabled
|
||||
//bootstrap hasn't had a chance to decorate
|
||||
//the tooltip, so use this opportunity to
|
||||
//tell bootstrap to show the tooltip
|
||||
//
|
||||
"mouseenter .alert-row": function(e,t){
|
||||
$('[data-toggle="tooltip"]').tooltip({
|
||||
'placement': 'top'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
|
@ -100,7 +100,7 @@ Anthony Verez averez@mozilla.com
|
|||
</template>
|
||||
|
||||
<template name="alertTableItem">
|
||||
<tr>
|
||||
<tr class="alert-row">
|
||||
<td>{{utctimestamp}}</td>
|
||||
<td><a href="/alert/{{esmetadata.id}}">mozdef</a><br><a href="{{mozdef.kibanaURL}}/#dashboard/script.alert.js?id={{esmetadata.id}}" target="_blank">kibana</a></td>
|
||||
<td>{{severity}}</td>
|
||||
|
@ -112,7 +112,7 @@ Anthony Verez averez@mozilla.com
|
|||
<button class="btn btn-xs btn-warning btnAlertAck" disabled data-target="{{_id}}">acked</button>
|
||||
</span>
|
||||
{{else}}
|
||||
<button class="btn btn-xs btn-warning btnAlertAck" data-target="{{_id}}" data-toggle="tooltip" title="click to ack">ack</button>
|
||||
<button class="btn btn-xs btn-warning btnAlertAck" data-target="{{_id}}">ack</button>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -75,8 +75,7 @@ if (Meteor.isClient) {
|
|||
//acknowledge the alert
|
||||
alerts.update(id, {$set: {'acknowledged':new Date()}});
|
||||
alerts.update(id, {$set: {'acknowledgedby':Meteor.user().profile.email}});
|
||||
//disable the button once ack'd
|
||||
$(e.target).prop('disabled', true);
|
||||
|
||||
},
|
||||
"keyup #alertsfiltertext": function(e,t){
|
||||
var code = e.which;
|
||||
|
@ -504,6 +503,7 @@ if (Meteor.isClient) {
|
|||
refreshVolumeChartXAxis();
|
||||
//re-render
|
||||
dc.renderAll("alertssummary");
|
||||
|
||||
}
|
||||
|
||||
hookAlertsCount = function(){
|
||||
|
@ -545,9 +545,6 @@ if (Meteor.isClient) {
|
|||
$('#alertsfiltertext').val(Session.get('alertsfiltertext'));
|
||||
$('#alertssearchtext').val(Session.get('alertssearchtext'));
|
||||
$('#recordLimit').val(Session.get('alertsrecordlimit'));
|
||||
$('[data-toggle="tooltip"]').tooltip({
|
||||
'placement': 'top'
|
||||
});
|
||||
}); //end deps.autorun
|
||||
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче