1
|
diff -bur crashreport/django/crashreport/base/models.py /srv/crashreport/crash/django/crashreport/base/models.py
|
2
|
--- crashreport/django/crashreport/base/models.py 2024-02-28 15:39:05.848457245 +0000
|
3
|
+++ /srv/crashreport/crash/django/crashreport/base/models.py 2024-02-12 15:59:54.805191576 +0000
|
4
|
@@ -11,7 +11,7 @@
|
5
|
def get_by_version_string(self, version):
|
6
|
res = self.get_queryset()
|
7
|
filter_params = Version.get_filter_params(version)
|
8
|
- res = res.filter(**filter_params)
|
9
|
+ res = res.filter(**filter_params).order_by('-major_version')
|
10
|
return res
|
11
|
|
12
|
def create_from_string(self, version_string, **kwargs):
|
13
|
diff -bur crashreport/django/crashreport/crashreport/settings.py /srv/crashreport/crash/django/crashreport/crashreport/settings.py
|
14
|
--- crashreport/django/crashreport/crashreport/settings.py 2024-02-28 15:39:05.848457245 +0000
|
15
|
+++ /srv/crashreport/crash/django/crashreport/crashreport/settings.py 2023-03-23 14:16:06.494748966 +0000
|
16
|
@@ -21,7 +21,7 @@
|
17
|
# SECURITY WARNING: keep the secret key used in production secret!
|
18
|
SECRET_KEY = os.environ.get('SECRET_KEY', 'at_4nc!x(m=v2dxwzr*kdsvzz_()r+jt^5usmzexh^jvaaj9iz')
|
19
|
|
20
|
-DEBUG = bool(os.environ.get('DEBUG', True))
|
21
|
+DEBUG = bool(os.environ.get('DEBUG', False))
|
22
|
|
23
|
TEMP_UPLOAD_DIR = os.environ.get('TEMP_UPLOAD_DIR', '/tmp/upload_dir')
|
24
|
|
25
|
@@ -112,7 +112,7 @@
|
26
|
'ENGINE': 'django.db.backends.postgresql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
27
|
'NAME': os.environ.get('DB_NAME', 'crashreport'),
|
28
|
|
29
|
- 'USER': os.environ.get('DB_USER', 'root'),
|
30
|
+ 'USER': os.environ.get('DB_USER', 'moggi'),
|
31
|
'PASSWORD': os.environ.get('DB_PASSWORD', ''),
|
32
|
'HOST': os.environ.get('DB_HOST', '127.0.0.1'), # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
|
33
|
'PORT': os.environ.get('DB_PORT', ''), # Set to empty string for default.
|
34
|
@@ -152,11 +152,7 @@
|
35
|
|
36
|
USE_TZ = True
|
37
|
|
38
|
-HOME_DIR = os.path.expanduser("~")
|
39
|
-if not os.path.exists("{}/django_logs".format(HOME_DIR)):
|
40
|
- os.mkdir("{}/django_logs".format(HOME_DIR))
|
41
|
-
|
42
|
-LOGGING_DIR = os.environ.get('LOGGING_DIR', "{}/django_logs/".format(HOME_DIR))
|
43
|
+LOGGING_DIR = os.environ.get('LOGGING_DIR', '/home/moggi/django_logs/')
|
44
|
|
45
|
LOGGING = {
|
46
|
'version': 1,
|
47
|
diff -bur crashreport/django/crashreport/crashreport/urls.py /srv/crashreport/crash/django/crashreport/crashreport/urls.py
|
48
|
--- crashreport/django/crashreport/crashreport/urls.py 2024-02-28 15:39:05.848457245 +0000
|
49
|
+++ /srv/crashreport/crash/django/crashreport/crashreport/urls.py 2023-03-23 14:16:06.498748786 +0000
|
50
|
@@ -26,6 +26,7 @@
|
51
|
|
52
|
from django.conf.urls import include, url
|
53
|
from django.contrib import admin
|
54
|
+from django.contrib.auth import views as auth_views
|
55
|
from django.views.generic.base import RedirectView
|
56
|
|
57
|
import debug_toolbar
|
58
|
@@ -41,6 +42,7 @@
|
59
|
url(r'^management/', include('management.urls')),
|
60
|
url(r'^admin/', admin.site.urls),
|
61
|
url(r'^accounts/', include('django.contrib.auth.urls')),
|
62
|
+ url(r'^accounts/login/$', auth_views.LoginView, name='login'),
|
63
|
url(r'^debug/', include(debug_toolbar.urls)),
|
64
|
]
|
65
|
|
66
|
diff -bur crashreport/django/crashreport/crashsubmit/signals.py /srv/crashreport/crash/django/crashreport/crashsubmit/signals.py
|
67
|
--- crashreport/django/crashreport/crashsubmit/signals.py 2024-02-28 15:39:05.852457147 +0000
|
68
|
+++ /srv/crashreport/crash/django/crashreport/crashsubmit/signals.py 2018-02-05 13:22:01.827553485 +0000
|
69
|
@@ -22,7 +22,7 @@
|
70
|
|
71
|
@receiver(post_save, sender=UploadedCrash)
|
72
|
def process_uploaded_crash(sender, instance, **kwargs):
|
73
|
- do_process_uploaded_crash.spool({"crash_id": instance.crash_id})
|
74
|
+ do_process_uploaded_crash.spool(crash_id = instance.crash_id)
|
75
|
|
76
|
@receiver(pre_delete, sender=UploadedCrash)
|
77
|
def process_deleted_crash(sender, instance, **kwargs):
|
78
|
diff -bur crashreport/django/crashreport/processor/processor.py /srv/crashreport/crash/django/crashreport/processor/processor.py
|
79
|
--- crashreport/django/crashreport/processor/processor.py 2024-02-28 15:39:05.852457147 +0000
|
80
|
+++ /srv/crashreport/crash/django/crashreport/processor/processor.py 2024-01-19 12:08:31.721290512 +0000
|
81
|
@@ -95,6 +95,8 @@
|
82
|
lib_name = parsed_line[2]
|
83
|
function_name = parsed_line[3]
|
84
|
file_name = parsed_line[4].strip()
|
85
|
+ file_name = file_name.replace("\\","/")
|
86
|
+ file_name = file_name.replace("C:/cygwin64/", "/")
|
87
|
if file_name.startswith("/home/buildslave/source/libo-core/"):
|
88
|
file_name = file_name.replace("/home/buildslave/source/libo-core/", "")
|
89
|
line_number = parsed_line[5]
|
90
|
diff -bur crashreport/django/crashreport/stats/static/stats/js/signature.js /srv/crashreport/crash/django/crashreport/stats/static/stats/js/signature.js
|
91
|
--- crashreport/django/crashreport/stats/static/stats/js/signature.js 2024-02-28 15:39:05.948454814 +0000
|
92
|
+++ /srv/crashreport/crash/django/crashreport/stats/static/stats/js/signature.js 2016-07-03 22:15:31.950341593 +0000
|
93
|
@@ -4,7 +4,5 @@
|
94
|
$("#os_tab").tabs();
|
95
|
$("#cpu_tab").tabs();
|
96
|
$("#version_tab").tabs();
|
97
|
-
|
98
|
- $("#data-table").tablesorter();
|
99
|
}
|
100
|
);
|
101
|
diff -bur crashreport/django/crashreport/stats/templates/stats/base.html /srv/crashreport/crash/django/crashreport/stats/templates/stats/base.html
|
102
|
--- crashreport/django/crashreport/stats/templates/stats/base.html 2024-02-28 15:39:05.948454814 +0000
|
103
|
+++ /srv/crashreport/crash/django/crashreport/stats/templates/stats/base.html 2018-02-05 13:22:00.875553501 +0000
|
104
|
@@ -67,7 +67,7 @@
|
105
|
</div>
|
106
|
<div id="footer" class="page-footer">
|
107
|
<p class="about">
|
108
|
- <strong>LibreOffice Crash Reports</strong> - Powered by <a href="https://gerrit.libreoffice.org/admin/repos/infra/crashreport,general">Crashreport</a> - Inspired by <a href="https://github.com/mozilla/socorro">Socorro</a> - All dates are UTC - <a href="https://www.libreoffice.org/imprint">Impressum (some German legal stuff)</a>
|
109
|
+ <strong>LibreOffice Crash Reports</strong> - Powered by <a href="https://github.com/mmohrhard/crash">Crash</a> - Inspired by <a href="https://github.com/mozilla/socorro">Socorro</a> - All dates are UTC - <a href="https://www.libreoffice.org/imprint">Impressum (some German legal stuff)</a>
|
110
|
</p>
|
111
|
</div>
|
112
|
</body>
|
113
|
diff -bur crashreport/django/crashreport/stats/templates/stats/signature.html /srv/crashreport/crash/django/crashreport/stats/templates/stats/signature.html
|
114
|
--- crashreport/django/crashreport/stats/templates/stats/signature.html 2024-02-28 15:39:05.948454814 +0000
|
115
|
+++ /srv/crashreport/crash/django/crashreport/stats/templates/stats/signature.html 2024-02-12 16:28:17.203909531 +0000
|
116
|
@@ -34,7 +34,7 @@
|
117
|
</ul>
|
118
|
|
119
|
<div id="reports" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
|
120
|
- <table id="data-table" class="tablesorter record data-table vertical">
|
121
|
+ <table class="record data-table vertical">
|
122
|
<thead>
|
123
|
<tr>
|
124
|
<th scope="col">Crash ID</th>
|
125
|
diff -bur crashreport/django/crashreport/stats/views.py /srv/crashreport/crash/django/crashreport/stats/views.py
|
126
|
--- crashreport/django/crashreport/stats/views.py 2024-02-28 15:39:05.948454814 +0000
|
127
|
+++ /srv/crashreport/crash/django/crashreport/stats/views.py 2024-02-12 17:18:18.623209976 +0000
|
128
|
@@ -11,7 +11,7 @@
|
129
|
from processor.models import ProcessedCrash, Signature, CrashCount, BugReport
|
130
|
from base.models import Version
|
131
|
from django.contrib.staticfiles import finders
|
132
|
-from django.core.urlresolvers import reverse
|
133
|
+from django.urls import reverse
|
134
|
|
135
|
from django.views.generic import ListView
|
136
|
from django import forms
|
137
|
@@ -19,21 +19,21 @@
|
138
|
from django.core.paginator import Paginator
|
139
|
|
140
|
import json, itertools
|
141
|
-import urllib
|
142
|
+import urllib.request, urllib.parse, urllib.error
|
143
|
import logging
|
144
|
|
145
|
logger = logging.getLogger(__name__)
|
146
|
|
147
|
def generate_product_version_data():
|
148
|
data = {}
|
149
|
- data['versions'] = Version.objects.order_by('-major_version', '-minor_version', '-micro_version', '-patch_version')
|
150
|
+ data['versions'] = Version.objects.all()
|
151
|
return data
|
152
|
|
153
|
class ListViewBase(ListView):
|
154
|
# this is an abstract class, each subclass needs to set at least the template_name and base_url
|
155
|
|
156
|
def generate_product_version_data(self, data):
|
157
|
- data['versions'] = Version.objects.order_by('-major_version', '-minor_version', '-micro_version', '-patch_version')
|
158
|
+ data['versions'] = Version.objects.all()
|
159
|
|
160
|
def get_context_data(self, **kwargs):
|
161
|
context = super(ListView, self).get_context_data(**kwargs)
|
162
|
@@ -46,7 +46,7 @@
|
163
|
return HttpResponseRedirect(reverse(base_url, {'product': product, 'version': version}))
|
164
|
|
165
|
def main(request):
|
166
|
- featured_versions = Version.objects.filter(featured=True).order_by('-major_version', '-minor_version', '-micro_version', '-patch_version')
|
167
|
+ featured_versions = Version.objects.filter(featured=True)
|
168
|
data = generate_product_version_data()
|
169
|
data['featured'] = featured_versions
|
170
|
data['version'] = 'current'
|
171
|
@@ -55,7 +55,7 @@
|
172
|
def generate_bug_info(crash):
|
173
|
comment_text = "This bug was filed from the crash reporting server and is br-%s.\n=========================================" % crash.crash_id
|
174
|
signature = "[\"%s\"]" % crash.signature.signature
|
175
|
- return 'comment=%s&cf_crashreport=%s&short_desc=%s' % ( urllib.quote(comment_text, safe=''), urllib.quote(signature, safe=''), urllib.quote("Crash in: %s" % crash.signature.signature, safe='') )
|
176
|
+ return 'comment=%s&cf_crashreport=%s&short_desc=%s' % ( urllib.parse.quote(comment_text, safe=''), urllib.parse.quote(signature, safe=''), urllib.parse.quote("Crash in: %s" % crash.signature.signature, safe='') )
|
177
|
|
178
|
def crash_details(request, crash_id):
|
179
|
crash = get_object_or_404(ProcessedCrash, crash_id=crash_id)
|
180
|
@@ -118,6 +118,13 @@
|
181
|
def get_queryset(self):
|
182
|
self.signature_obj = get_object_or_404(Signature, signature=self.kwargs['signature'])
|
183
|
version = self.request.GET.get('version', None)
|
184
|
+ order = self.request.GET.get('order', '-upload_time')
|
185
|
+
|
186
|
+ possible_orders = {
|
187
|
+ '-upload_time',
|
188
|
+ 'upload_time',
|
189
|
+ }
|
190
|
+
|
191
|
crashes = self.signature_obj.processedcrash_set.all()
|
192
|
if version is not None:
|
193
|
version_filter_params = Version.get_filter_params(version, prefix='version__')
|