Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions django/crashreport/processor/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ class ProcessedCrash(models.Model):
os_detail = models.CharField(max_length=100,
default='')

os_detail_parsed = models.CharField(max_length=100,
default='')

# CPU info
cpu_architecture = models.CharField(max_length=20)

Expand Down Expand Up @@ -236,6 +239,15 @@ def set_view_os_name_to_model(self, view_os_name):
else:
logger.warning("could not determine the os: " + view_is_name)

def set_view_os_detail_parsed_to_model(self, view_os_detail):
if self.os_name == ProcessedCrash.LINUX:
self.os_detail_parsed = self.os_name + ' ' + \
view_os_detail.split('Linux ')[1].split('-')[0]
elif self.os_name == ProcessedCrash.WINDOWS or self.os_name == ProcessedCrash.OSX:
self.os_detail_parsed = self.os_name + ' ' + view_os_detail
else:
self.os_detail_parsed = view_os_detail

def _convert_frames(self, frame_list):
text = ""
for frame in frame_list:
Expand Down
1 change: 1 addition & 0 deletions django/crashreport/processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def _parse_os(self, os_version):
os_detail = parsed_line[2]
self.processed_crash.os_detail = os_detail
self.processed_crash.set_view_os_name_to_model(os_name)
self.processed_crash.set_view_os_detail_parsed_to_model(os_detail)

def _parse_frames(self, frames):
threads = {}
Expand Down
9 changes: 5 additions & 4 deletions django/crashreport/stats/static/stats/js/signature.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
$(document).ready(function()
{
$(document).ready(function()
{
$("#tabs").tabs();
$("#os_tab").tabs();
$("#cpu_tab").tabs();
$("#os_detail_tab").tabs();
$("#version_tab").tabs();
}
);
}
);
24 changes: 24 additions & 0 deletions django/crashreport/stats/templates/stats/signature.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,30 @@ <h2>CPU architecture</h2>
</div>

</div>
<div class="panel">
<header class="title">
<h2>Detailed Operating System</h2>
</header>
<div class="content">
<table id="os_detail_tab" class="data-table">
<thead>
<tr>
<th class="header">Detail</th>
<th class="header">Count</th>
</tr>
</thead>
<tbody>
{% for os_detail, count in os_detail_info.items %}
<tr>
<td>{{os_detail}}</td>
<td>{{count}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

</div>
</div>
</div>
{% endblock %}
9 changes: 9 additions & 0 deletions django/crashreport/stats/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ def get_os_info(crashes):

return data

def get_os_detail_info(crashes):
detail_info = crashes.values('os_detail_parsed').annotate(Count('os_detail_parsed'))
data = {}
for detail in detail_info:
data[detail['os_detail_parsed']] = detail['os_detail_parsed__count']

return data

def get_cpu_architecture(crashes):
cpu_architecture = crashes.values('cpu_architecture').annotate(Count('cpu_architecture'))

Expand Down Expand Up @@ -111,6 +119,7 @@ def get_context_data(self, **kwargs):

crashes = ProcessedCrash.objects.filter(signature = signature_object)
context['os_info'] = get_os_info(crashes)
context['os_detail_info'] = get_os_detail_info(crashes)
context['cpu_info'] = get_cpu_architecture(crashes)
context['version_info'] = get_version_info(crashes)
return context
Expand Down