Slight change to the histogram

Data for types that had "|" or "-" in the name (such as ip-src)
were omitted - should be fixed now
pull/63/head
Andras Iklody 2012-11-29 16:13:31 +01:00
parent c6bdf794c1
commit 1bf1e6f2a8
1 changed files with 3 additions and 2 deletions

View File

@ -378,15 +378,16 @@ class UsersController extends AppController {
// Nice graphical histogram
$this->loadModel('Attribute');
$sigTypes = array_keys($this->Attribute->typeDefinitions);
$replace = array('-', '|');
$graphFields = '';
foreach ($sigTypes as &$sigType) {
if ($graphFields != "") $graphFields .= ", ";
$graphFields .= "'" . $sigType . "'";
}
$graphFields = str_replace($replace, "_", $graphFields);
$this->set('graphFields', $graphFields);
$replace = array('-', '|');
$graphData = array();
$prevRowOrg = "";
$i = -1;