Project

General

Profile

Task #3717 » differences.txt

Differences between repo master branch and existing code in server - Juan José González, 2024-02-28 16:46

 
diff -bur crashreport/django/crashreport/base/models.py /srv/crashreport/crash/django/crashreport/base/models.py
--- crashreport/django/crashreport/base/models.py 2024-02-28 15:39:05.848457245 +0000
+++ /srv/crashreport/crash/django/crashreport/base/models.py 2024-02-12 15:59:54.805191576 +0000
@@ -11,7 +11,7 @@
def get_by_version_string(self, version):
res = self.get_queryset()
filter_params = Version.get_filter_params(version)
- res = res.filter(**filter_params)
+ res = res.filter(**filter_params).order_by('-major_version')
return res
def create_from_string(self, version_string, **kwargs):
diff -bur crashreport/django/crashreport/crashreport/settings.py /srv/crashreport/crash/django/crashreport/crashreport/settings.py
--- crashreport/django/crashreport/crashreport/settings.py 2024-02-28 15:39:05.848457245 +0000
+++ /srv/crashreport/crash/django/crashreport/crashreport/settings.py 2023-03-23 14:16:06.494748966 +0000
@@ -21,7 +21,7 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('SECRET_KEY', 'at_4nc!x(m=v2dxwzr*kdsvzz_()r+jt^5usmzexh^jvaaj9iz')
-DEBUG = bool(os.environ.get('DEBUG', True))
+DEBUG = bool(os.environ.get('DEBUG', False))
TEMP_UPLOAD_DIR = os.environ.get('TEMP_UPLOAD_DIR', '/tmp/upload_dir')
@@ -112,7 +112,7 @@
'ENGINE': 'django.db.backends.postgresql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': os.environ.get('DB_NAME', 'crashreport'),
- 'USER': os.environ.get('DB_USER', 'root'),
+ 'USER': os.environ.get('DB_USER', 'moggi'),
'PASSWORD': os.environ.get('DB_PASSWORD', ''),
'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.
'PORT': os.environ.get('DB_PORT', ''), # Set to empty string for default.
@@ -152,11 +152,7 @@
USE_TZ = True
-HOME_DIR = os.path.expanduser("~")
-if not os.path.exists("{}/django_logs".format(HOME_DIR)):
- os.mkdir("{}/django_logs".format(HOME_DIR))
-
-LOGGING_DIR = os.environ.get('LOGGING_DIR', "{}/django_logs/".format(HOME_DIR))
+LOGGING_DIR = os.environ.get('LOGGING_DIR', '/home/moggi/django_logs/')
LOGGING = {
'version': 1,
diff -bur crashreport/django/crashreport/crashreport/urls.py /srv/crashreport/crash/django/crashreport/crashreport/urls.py
--- crashreport/django/crashreport/crashreport/urls.py 2024-02-28 15:39:05.848457245 +0000
+++ /srv/crashreport/crash/django/crashreport/crashreport/urls.py 2023-03-23 14:16:06.498748786 +0000
@@ -26,6 +26,7 @@
from django.conf.urls import include, url
from django.contrib import admin
+from django.contrib.auth import views as auth_views
from django.views.generic.base import RedirectView
import debug_toolbar
@@ -41,6 +42,7 @@
url(r'^management/', include('management.urls')),
url(r'^admin/', admin.site.urls),
url(r'^accounts/', include('django.contrib.auth.urls')),
+ url(r'^accounts/login/$', auth_views.LoginView, name='login'),
url(r'^debug/', include(debug_toolbar.urls)),
]
diff -bur crashreport/django/crashreport/crashsubmit/signals.py /srv/crashreport/crash/django/crashreport/crashsubmit/signals.py
--- crashreport/django/crashreport/crashsubmit/signals.py 2024-02-28 15:39:05.852457147 +0000
+++ /srv/crashreport/crash/django/crashreport/crashsubmit/signals.py 2018-02-05 13:22:01.827553485 +0000
@@ -22,7 +22,7 @@
@receiver(post_save, sender=UploadedCrash)
def process_uploaded_crash(sender, instance, **kwargs):
- do_process_uploaded_crash.spool({"crash_id": instance.crash_id})
+ do_process_uploaded_crash.spool(crash_id = instance.crash_id)
@receiver(pre_delete, sender=UploadedCrash)
def process_deleted_crash(sender, instance, **kwargs):
diff -bur crashreport/django/crashreport/processor/processor.py /srv/crashreport/crash/django/crashreport/processor/processor.py
--- crashreport/django/crashreport/processor/processor.py 2024-02-28 15:39:05.852457147 +0000
+++ /srv/crashreport/crash/django/crashreport/processor/processor.py 2024-01-19 12:08:31.721290512 +0000
@@ -95,6 +95,8 @@
lib_name = parsed_line[2]
function_name = parsed_line[3]
file_name = parsed_line[4].strip()
+ file_name = file_name.replace("\\","/")
+ file_name = file_name.replace("C:/cygwin64/", "/")
if file_name.startswith("/home/buildslave/source/libo-core/"):
file_name = file_name.replace("/home/buildslave/source/libo-core/", "")
line_number = parsed_line[5]
diff -bur crashreport/django/crashreport/stats/static/stats/js/signature.js /srv/crashreport/crash/django/crashreport/stats/static/stats/js/signature.js
--- crashreport/django/crashreport/stats/static/stats/js/signature.js 2024-02-28 15:39:05.948454814 +0000
+++ /srv/crashreport/crash/django/crashreport/stats/static/stats/js/signature.js 2016-07-03 22:15:31.950341593 +0000
@@ -4,7 +4,5 @@
$("#os_tab").tabs();
$("#cpu_tab").tabs();
$("#version_tab").tabs();
-
- $("#data-table").tablesorter();
}
);
diff -bur crashreport/django/crashreport/stats/templates/stats/base.html /srv/crashreport/crash/django/crashreport/stats/templates/stats/base.html
--- crashreport/django/crashreport/stats/templates/stats/base.html 2024-02-28 15:39:05.948454814 +0000
+++ /srv/crashreport/crash/django/crashreport/stats/templates/stats/base.html 2018-02-05 13:22:00.875553501 +0000
@@ -67,7 +67,7 @@
</div>
<div id="footer" class="page-footer">
<p class="about">
- <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>
+ <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>
</p>
</div>
</body>
diff -bur crashreport/django/crashreport/stats/templates/stats/signature.html /srv/crashreport/crash/django/crashreport/stats/templates/stats/signature.html
--- crashreport/django/crashreport/stats/templates/stats/signature.html 2024-02-28 15:39:05.948454814 +0000
+++ /srv/crashreport/crash/django/crashreport/stats/templates/stats/signature.html 2024-02-12 16:28:17.203909531 +0000
@@ -34,7 +34,7 @@
</ul>
<div id="reports" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
- <table id="data-table" class="tablesorter record data-table vertical">
+ <table class="record data-table vertical">
<thead>
<tr>
<th scope="col">Crash ID</th>
diff -bur crashreport/django/crashreport/stats/views.py /srv/crashreport/crash/django/crashreport/stats/views.py
--- crashreport/django/crashreport/stats/views.py 2024-02-28 15:39:05.948454814 +0000
+++ /srv/crashreport/crash/django/crashreport/stats/views.py 2024-02-12 17:18:18.623209976 +0000
@@ -11,7 +11,7 @@
from processor.models import ProcessedCrash, Signature, CrashCount, BugReport
from base.models import Version
from django.contrib.staticfiles import finders
-from django.core.urlresolvers import reverse
+from django.urls import reverse
from django.views.generic import ListView
from django import forms
@@ -19,21 +19,21 @@
from django.core.paginator import Paginator
import json, itertools
-import urllib
+import urllib.request, urllib.parse, urllib.error
import logging
logger = logging.getLogger(__name__)
def generate_product_version_data():
data = {}
- data['versions'] = Version.objects.order_by('-major_version', '-minor_version', '-micro_version', '-patch_version')
+ data['versions'] = Version.objects.all()
return data
class ListViewBase(ListView):
# this is an abstract class, each subclass needs to set at least the template_name and base_url
def generate_product_version_data(self, data):
- data['versions'] = Version.objects.order_by('-major_version', '-minor_version', '-micro_version', '-patch_version')
+ data['versions'] = Version.objects.all()
def get_context_data(self, **kwargs):
context = super(ListView, self).get_context_data(**kwargs)
@@ -46,7 +46,7 @@
return HttpResponseRedirect(reverse(base_url, {'product': product, 'version': version}))
def main(request):
- featured_versions = Version.objects.filter(featured=True).order_by('-major_version', '-minor_version', '-micro_version', '-patch_version')
+ featured_versions = Version.objects.filter(featured=True)
data = generate_product_version_data()
data['featured'] = featured_versions
data['version'] = 'current'
@@ -55,7 +55,7 @@
def generate_bug_info(crash):
comment_text = "This bug was filed from the crash reporting server and is br-%s.\n=========================================" % crash.crash_id
signature = "[\"%s\"]" % crash.signature.signature
- 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='') )
+ 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='') )
def crash_details(request, crash_id):
crash = get_object_or_404(ProcessedCrash, crash_id=crash_id)
@@ -118,6 +118,13 @@
def get_queryset(self):
self.signature_obj = get_object_or_404(Signature, signature=self.kwargs['signature'])
version = self.request.GET.get('version', None)
+ order = self.request.GET.get('order', '-upload_time')
+
+ possible_orders = {
+ '-upload_time',
+ 'upload_time',
+ }
+
crashes = self.signature_obj.processedcrash_set.all()
if version is not None:
version_filter_params = Version.get_filter_params(version, prefix='version__')
    (1-1/1)