return'<span style="width: 200px; display: inline-block; text-align: left;">The rule is overwriting rules with the same ID.</span>';
}
if(rule.status=='enabled'){
if(rule.level==0)
return'<span style="width: 200px; display: inline-block; text-align: left;">The rule is enabled, but it has alert level 0. Because this, the rule will never be triggered.</span>';
else
return'<span style="width: 200px; display: inline-block; text-align: left;">The rule is enabled.</span>';
}else{
return'<span style="width: 200px; display: inline-block; text-align: left;">The rule is not enabled.</span>';
}
};
$scope.rulesTooltips=function(key){
vartooltip;
switch(key){
case'maxsize':
tooltip='Specifies the maximum size of the event.';
break;
case'frequency':
tooltip='Specifies the number of times the rule must have matched before firing. The number that triggers the rule is actually 2 more than this setting.';
break;
case'timeframe':
tooltip='The timeframe in seconds';
break;
case'ignore':
tooltip='The time (in seconds) to ignore this rule after firing it (to avoid floods).';
break;
case'overwrite':
tooltip='Used to supercede an OSSEC rule with local changes.';
break;
case'match':
tooltip='Any string to match against the log event.';
break;
case'regex':
tooltip='Any regex to match against the log event.';
break;
case'decoded_as':
tooltip='Any decoder name.';
break;
case'category':
tooltip='The decoded category to match (ids, syslog, firewall, web-log, squid or windows).';
break;
case'srcip':
tooltip='Any IP address or CIDR block to be compared to an IP decoded as srcip.';
break;
case'dstip':
tooltip='Any IP address or CIDR block to be compared to an IP decoded as dstip.';
break;
case'extra_data':
tooltip='Any string that is decoded into the extra_data field.';
break;
case'user':
tooltip='Any username (decoded as the username).';
break;
case'program_name':
tooltip='Program name is decoded from syslog process name.';
break;
case'hostname':
tooltip='Any hostname (decoded as the syslog hostname) or log file.';
break;
case'time':
tooltip='Time that the event was generated.';
break;
case'weekday':
tooltip='Week day that the event was generated.';
break;
case'id':
tooltip='Any ID (decoded as the ID).';
break;
case'url':
tooltip='Any URL (decoded as the URL).';
break;
case'if_sid':
tooltip='Matches if the ID has matched.';
break;
case'if_group':
tooltip='Matches if the group has matched before.';
break;
case'if_level':
tooltip='Matches if the level has matched before.';
break;
case'if_matched_sid':
tooltip='Matches if an alert of the defined ID has been triggered in a set number of seconds.';
break;
case'if_matched_group':
tooltip='Matches if an alert of the defined group has been triggered in a set number of seconds.';
break;
case'same_id':
tooltip='Specifies that the decoded id must be the same.';
break;
case'same_source_ip':
tooltip='Specifies that the decoded source ip must be the same.';
break;
case'same_source_port':
tooltip='Specifies that the decoded source port must be the same.';
break;
case'same_dst_port':
tooltip='Specifies that the decoded destination port must be the same.';
break;
case'same_location':
tooltip='Specifies that the location must be the same.';
break;
case'same_user':
tooltip='Specifies that the decoded user must be the same.';
break;
case'description':
tooltip='Rule description.';
break;
case'list':
tooltip='Preform a CDB lookup using an ossec list. This is a fast on disk database which will always find keys within two seeks of the file.';
break;
case'info':
tooltip='Extra information';
break;
case'options':
tooltip='Additional rule options';
break;
case'check_diff':
tooltip='Used to determine when the output of a command changes.';
alertify.delay(10000).closeLogOnClick(true).error('Select an update type');
}
if($scope.updateForce){
vartemplate='Are you sure you want to update the ruleset?<ul style="text-align: left !important;"><li style="text-align: left !important;">The ruleset will be overwritten, except local_rules and local_decoders file.</li><li style="text-align: left !important;">OSSEC manager is going to be restarted.</li><li style="text-align: left !important;">Before the update, backup of the ruleset will be done.</li></ul>';
}
else{
vartemplate='Are you sure you want to update the ruleset?<ul style="text-align: left !important;"><li style="text-align: left !important;">The ruleset will be overwritten, except local_rules and local_decoders file.</li><li style="text-align: left !important;">If any rule included in ossec.conf is updated, OSSEC manager will be restarted.</li><li style="text-align: left !important;">Before the update, backup of the ruleset will be done.</li></ul>';
alertify.confirm('Are you sure you want to restore this backup?<ul style="text-align: left !important;"><li style="text-align: left !important;">This action can not be undone.</li></ul>',function(){