Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #333 from lauraxt/669108

Fixes bug 669108, add some more stuff from the raw JSON to the UI.  Also added better error checking.
  • Loading branch information...
commit 49b4bdad598df7ff9a899c9d3cc3abfbcaf289f1 2 parents 8212638 + 8735569
Adrian Gaudebert AdrianGaudebert authored
12 webapp-php/application/libraries/CrashReportDump.php
@@ -78,9 +78,17 @@ public function populate($report, $json, $raw_json=NULL) {
78 78 if ($raw_json) {
79 79 //note: $raw_json? not actually json, but a PHP object.
80 80 // put it in the report, but only the selected fields...
81   - $whitelist = array('JavaStackTrace');
  81 + $whitelist = array('JavaStackTrace',
  82 + 'TotalVirtualMemory',
  83 + 'AvailableVirtualMemory',
  84 + 'SystemMemoryUsePercentage',
  85 + 'AvailablePageFile',
  86 + 'AvailablePhysicalMemory',
  87 + 'OOMAllocationSize'
  88 + );
82 89 foreach ($whitelist as $key) {
83   - $report->{$key} = $raw_json->{$key};
  90 + if (isset($raw_json->{$key}))
  91 + $report->{$key} = $raw_json->{$key};
84 92 }
85 93 }
86 94
19 webapp-php/application/views/report/index.php
@@ -210,7 +210,24 @@
210 210 <th>Java Stack Trace</th><td><pre><?php out::H($report->JavaStackTrace) ?></pre></td>
211 211 </tr>
212 212 <?php } ?>
213   -
  213 +<?php if (property_exists($report, 'TotalVirtualMemory')) { ?>
  214 + <tr><th>Total Virtual Memory</th><td><?php out::H($report->TotalVirtualMemory) ?></td></tr>
  215 +<?php } ?>
  216 +<?php if (property_exists($report, 'AvailableVirtualMemory')) { ?>
  217 + <tr><th>Available Virtual Memory</th><td><?php out::H($report->AvailableVirtualMemory) ?></td></tr>
  218 +<?php } ?>
  219 +<?php if (property_exists($report, 'SystemMemoryUsePercentage')) { ?>
  220 + <tr><th>System Memory Use Percentage</th><td><?php out::H($report->SystemMemoryUsePercentage) ?></td></tr>
  221 +<?php } ?>
  222 +<?php if (property_exists($report, 'AvailablePageFile')) { ?>
  223 + <tr><th>Available Page File</th><td><?php out::H($report->AvailablePageFile) ?></td></tr>
  224 +<?php } ?>
  225 +<?php if (property_exists($report, 'AvailablePhysicalMemory')) { ?>
  226 + <tr><th>Available Physical Memory</th><td><?php out::H($report->AvailablePhysicalMemory) ?></td></tr>
  227 +<?php } ?>
  228 +<?php if (property_exists($report, 'OOMAllocationSize')) { ?>
  229 + <tr><th>OOMAllocationSize</th><td><?php out::H($report->OOMAllocationSize) ?></td></tr>
  230 +<?php } ?>
214 231 </table>
215 232
216 233

0 comments on commit 49b4bda

Please sign in to comment.
Something went wrong with that request. Please try again.