Changeset 5bd9db18966f6fff4da9860a6fb9943edff96483
- Timestamp:
- 07/10/08 18:46:37
(10 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1215715597 +0000
- git-parent:
[c2b37340f89c9d67e2d495d91a30d806bd9339dd]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1215715597 +0000
- Message:
fix leaf detection
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
rc2b3734 |
r5bd9db1 |
|
43 | 43 | 'text' => $item[$want], |
---|
44 | 44 | 'classes' => $want, |
---|
45 | | 'hasChildren' => $item['cnt'] > 1 ? true : false, |
---|
| 45 | 'hasChildren' => $item['unique'] ? false : true, |
---|
46 | 46 | 'params' => $params, |
---|
47 | 47 | ); |
---|
48 | | if($item['cnt'] == 1) { |
---|
49 | | $jitem['text'] = '<a href="generic_graph.php?metric=nl-' . $item['sid'] . '-' . $item['metric_name'] . '&cnt=1400">' . $item[$want] . '</a>'; |
---|
50 | | $jitem['classes'] = 'metric numeric'; |
---|
| 48 | if($item['unique']) { |
---|
| 49 | if($item['metric_type'] == "numeric") { |
---|
| 50 | $jitem['text'] = '<a href="generic_graph.php?metric=nl-' . $item['sid'] . '-' . $item['metric_name'] . '&cnt=1400">' . $item[$want] . '</a>'; |
---|
| 51 | $jitem['classes'] = 'metric numeric'; |
---|
| 52 | } |
---|
| 53 | else { |
---|
| 54 | $jitem['classes'] = 'metric text'; |
---|
| 55 | } |
---|
51 | 56 | } |
---|
52 | 57 | $bag[] = $jitem; |
---|
rc2b3734 |
r5bd9db1 |
|
93 | 93 | } |
---|
94 | 94 | $copy['cnt'] = $row['cnt']; |
---|
95 | | if($copy['cnt'] == 1) |
---|
| 95 | if($copy['cnt'] == 1 && |
---|
| 96 | isset($row['sid']) && |
---|
| 97 | isset($row['metric_name'])) { |
---|
| 98 | $copy['unique'] = true; |
---|
96 | 99 | $copy['metric_type'] = $row['metric_type']; |
---|
| 100 | } |
---|
| 101 | else |
---|
| 102 | $copy['unique'] = false; |
---|
97 | 103 | $rv[] = $copy; |
---|
98 | 104 | } |
---|