Changeset 462702b18f888d8a942b8d6e68ef2dcc5d61c014

Show
Ignore:
Timestamp:
03/05/09 18:58:55 (5 years ago)
Author:
Umar Farooq <umar@omniti.com>
git-committer:
Umar Farooq <umar@omniti.com> 1236279535 +0000
git-parent:

[54ed1f62840d4993194d05dab590230c5b7de854]

git-author:
Umar Farooq <umar@omniti.com> 1236279535 +0000
Message:

graphs now retrieve target'module'name'metric_name and display this when datatitles are moused over, displaying any fields the dataset has on hand

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ui/web/htdocs/datapoint_browse_json.php

    r32c8161 r462702b  
    4949                   ); 
    5050    if($item['unique']) { 
    51       $jitem['text'] = '<a href="javascript:graph_add_datapoint({\'sid\' : ' . $item['sid'] . ', \'name\' : \'' . $item['target'] . '`' . $item['metric_name'] . '\', \'metric_name\' : \'' . $item['metric_name'] . '\', \'metric_type\' : \'' . $item['metric_type'] . '\'})">' . $item[$want] . '</a>'; 
     51      $jitem['text'] = '<a href="javascript:graph_add_datapoint({\'sid\' : ' . $item['sid'] . ', \'module\' : \'' . $item['module'] . '\', \'target\' : \'' . $item['target'] . '\', \'name\' : \'' . $item['target'] . '`' . $item['metric_name'] . '\', \'metric_name\' : \'' . $item['metric_name'] . '\', \'metric_type\' : \'' . $item['metric_type'] . '\'})">' . $item[$want] . '</a>'; 
    5252      if($item['metric_type'] == "numeric") { 
    5353        $jitem['classes'] = 'metric numeric'; 
  • ui/web/htdocs/graph_panel.inc

    r54ed1f6 r462702b  
    273273  } 
    274274 
     275  d.mouse_title = ( (d.target!=undefined) ? d.target+"`": '') + 
     276                        ( (d.module!=undefined) ? d.module+"`": '') + 
     277                        ( (d.orig_name!=undefined)? d.orig_name+"`": '') + 
     278                        ( (d.metric_name!=undefined)? "`"+d.metric_name: ''); 
     279 
    275280  o.find(".datatitle").html(d.name); 
    276    
     281  o.find(".datatitle").attr("title", d.mouse_title); 
    277282 
    278283  recurse--; 
  • ui/web/htdocs/js/recon.js

    r54ed1f6 r462702b  
    565565                               'name':ds_c.target + '`' + ds_c.metric_name, 
    566566                               'metric_name':ds_c.metric_name, 
    567                                'metric_type':ds_c.metric_type 
     567                               'metric_type':ds_c.metric_type, 
     568                               'module': ds_c.module, 
     569                               'target': ds_c.target, 
     570                               'orig_name': ds_c.name 
    568571                              }); 
    569572          return false; 
  • ui/web/lib/Reconnoiter_DB.php

    rb76d645 r462702b  
    240240               on (c.sid = caliasmt.sid and caliasmt.name='alias')"; 
    241241    } 
     242    else if($want == 'metric_name') { 
     243      $ptr_select = "min(c.module) as module, "; 
     244    } 
    242245    $sql = " 
    243246      select $tblsrc.$want, $ptr_select 
     
    252255    $sth = $this->db->prepare($sql); 
    253256    $sth->execute($binds); 
     257 
    254258    $rv = array(); 
    255259    while($row = $sth->fetch()) { 
     
    262266      } 
    263267      $copy['cnt'] = $row['cnt']; 
     268      if(isset($row['module'])) $copy['module'] = $row['module']; 
    264269      if(isset($row['ptr'])) $copy['ptr'] = $row['ptr']; 
    265270      if($copy['cnt'] == 1 && 
     
    520525    $rvlist = array(); 
    521526    foreach($data as $row) { 
    522       error_log(" sid: ".$row['sid']." : ".$row['target']."`".$row['module']."`".$row['name']); 
    523527      $rvlist[] = array( 'sid' => $row['sid'], 
    524528                'option' => $row['target']."`".$row['module']."`".$row['name']);