Commit 590d5c5c authored by Elger Jonker's avatar Elger Jonker

Removes non used columns, fixing #156


Former-commit-id: 6435baf5
parent a3b5bd01
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -33,6 +33,11 @@ msgid ""
"type / layer."
msgstr ""
#: failmap/game/forms.py
#, python-format
msgid "This organization %(organization)s has been suggested already."
msgstr ""
#: failmap/game/models.py
msgid "Contest name"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -36,6 +36,14 @@ msgid ""
"type / layer."
msgstr "De organisatie %(organization)s zit al in deze groep."
#: failmap/game/forms.py
#, fuzzy, python-format
#| msgid ""
#| "This organization %(organization)s already exists in the database for "
#| "this group."
msgid "This organization %(organization)s has been suggested already."
msgstr "De organisatie %(organization)s zit al in deze groep."
#: failmap/game/models.py
msgid "Contest name"
msgstr "Naam van de wedstrijd"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -32,6 +32,11 @@ msgid ""
"type / layer."
msgstr ""
#: failmap/game/forms.py
#, python-format
msgid "This organization %(organization)s has been suggested already."
msgstr ""
#: failmap/game/models.py
msgid "Contest name"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -55,6 +55,22 @@ msgstr ""
msgid "Recent Actions for %s"
msgstr ""
#: failmap/app/dashboard.py
msgid "Quick Actions"
msgstr ""
#: failmap/app/dashboard.py
msgid "Verify New Urls"
msgstr ""
#: failmap/app/dashboard.py
msgid "Verify New Organizations"
msgstr ""
#: failmap/app/dashboard.py
msgid "Applications"
msgstr ""
#: failmap/scanners/models.py
msgid "endpoint"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -55,6 +55,22 @@ msgstr ""
msgid "Recent Actions for %s"
msgstr ""
#: failmap/app/dashboard.py
msgid "Quick Actions"
msgstr ""
#: failmap/app/dashboard.py
msgid "Verify New Urls"
msgstr ""
#: failmap/app/dashboard.py
msgid "Verify New Organizations"
msgstr ""
#: failmap/app/dashboard.py
msgid "Applications"
msgstr ""
#: failmap/scanners/models.py
msgid "endpoint"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -54,6 +54,22 @@ msgstr ""
msgid "Recent Actions for %s"
msgstr ""
#: failmap/app/dashboard.py
msgid "Quick Actions"
msgstr ""
#: failmap/app/dashboard.py
msgid "Verify New Urls"
msgstr ""
#: failmap/app/dashboard.py
msgid "Verify New Organizations"
msgstr ""
#: failmap/app/dashboard.py
msgid "Applications"
msgstr ""
#: failmap/scanners/models.py
msgid "endpoint"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Fail Map <info@faalkaart.nl>\n"
"Language-Team: LANGUAGE <info@faalkaart.nl>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Fail Map <info@faalkaart.nl>\n"
"Language-Team: LANGUAGE <info@faalkaart.nl>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -462,6 +462,11 @@ class UrlAdmin(ActionMixin, ImportExportModelAdmin, nested_admin.NestedModelAdmi
def sub(obj):
return obj.computed_subdomain
# save a ton of queries
# doesn't work with sets.
# https://docs.djangoproject.com/en/2.1/ref/contrib/admin/
# list_select_related = ('endpoint_set', )
def visit(self, obj: Url):
if not obj.endpoint_set.count():
return
......
......@@ -8,7 +8,6 @@
- model: organizations.url
pk: 9001
fields:
organization_old: 42
url: faalonië.example.com
created_on: 2016-05-17 10:25:35+00:00
not_resolvable: false
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -47,6 +47,11 @@ msgstr ""
msgid "No"
msgstr ""
#: failmap/organizations/admin.py
#, python-format
msgid "Unable to parse JSON: %s"
msgstr ""
#: failmap/organizations/models.py
msgid "organization type"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -48,6 +48,11 @@ msgstr "Ja"
msgid "No"
msgstr "Nee"
#: failmap/organizations/admin.py
#, python-format
msgid "Unable to parse JSON: %s"
msgstr ""
#: failmap/organizations/models.py
msgid "organization type"
msgstr "organisatie type"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -48,6 +48,11 @@ msgstr ""
msgid "No"
msgstr ""
#: failmap/organizations/admin.py
#, python-format
msgid "Unable to parse JSON: %s"
msgstr ""
#: failmap/organizations/models.py
msgid "organization type"
msgstr ""
......
# Generated by Django 2.1.3 on 2018-12-13 10:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('organizations', '0046_auto_20181213_0854'),
]
operations = [
migrations.AlterUniqueTogether(
name='url',
unique_together=set(),
),
migrations.RemoveField(
model_name='url',
name='organization_old',
),
]
......@@ -194,12 +194,6 @@ class Coordinate(models.Model):
class Url(models.Model):
organization_old = models.ForeignKey(
Organization,
null=True,
on_delete=models.PROTECT
)
organization = models.ManyToManyField(
Organization,
related_name="u_many_o_upgrade"
......@@ -323,7 +317,6 @@ class Url(models.Model):
class Meta:
managed = True
db_table = 'url'
unique_together = (('organization_old', 'url'),)
def __str__(self):
if self.is_dead:
......
......@@ -182,16 +182,16 @@ class TlsQualysScratchpadAdmin(ImportExportModelAdmin, admin.ModelAdmin):
@admin.register(Screenshot)
class ScreenshotAdmin(ImportExportModelAdmin, admin.ModelAdmin):
list_display = ('endpoint', 'domain', 'created_on', 'filename')
search_fields = ('endpoint__url__url', 'domain', 'created_on', 'filename')
list_filter = ['endpoint', 'domain', 'created_on', 'filename'][::-1]
fields = ('endpoint', 'domain', 'created_on', 'filename', 'width_pixels', 'height_pixels')
list_display = ('endpoint', 'created_on', 'filename')
search_fields = ('endpoint__url__url', 'created_on', 'filename')
list_filter = ['endpoint', 'created_on', 'filename'][::-1]
fields = ('endpoint', 'created_on', 'filename', 'width_pixels', 'height_pixels')
readonly_fields = ['created_on']
@admin.register(EndpointGenericScan)
class EndpointGenericScanAdmin(ImportExportModelAdmin, admin.ModelAdmin):
list_display = ('endpoint', 'domain', 'type', 'rating',
list_display = ('endpoint', 'type', 'rating',
'explanation', 'last_scan_moment', 'rating_determined_on',
'comply_or_explain_is_explained', 'explain', 'is_the_latest_scan')
search_fields = ('endpoint__url__url', 'type', 'rating',
......@@ -228,7 +228,7 @@ class EndpointGenericScanAdmin(ImportExportModelAdmin, admin.ModelAdmin):
@admin.register(UrlGenericScan)
class UrlGenericScanAdmin(ImportExportModelAdmin, admin.ModelAdmin):
list_display = ('url', 'domain', 'type', 'rating',
list_display = ('url', 'type', 'rating',
'explanation', 'last_scan_moment', 'rating_determined_on',
'comply_or_explain_is_explained', 'explain', 'is_the_latest_scan', 'short_evidence')
search_fields = ('url__url', 'type', 'rating',
......
# Generated by Django 2.1.3 on 2018-12-13 10:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('scanners', '0053_auto_20181122_1514'),
]
operations = [
migrations.RemoveField(
model_name='endpointgenericscan',
name='domain',
),
migrations.RemoveField(
model_name='screenshot',
name='domain',
),
migrations.RemoveField(
model_name='urlgenericscan',
name='domain',
),
]
......@@ -439,12 +439,6 @@ class GenericScanMixin(ExplainMixin, LatestScanMixin):
"another rating or explanation (which might have the same rating). This date "
"cannot change once it's set."
)
domain = models.CharField(
max_length=255,
help_text="Deprecated. Text value representing the url scanned.",
null=True,
blank=True,
)
class Meta:
"""
......@@ -516,8 +510,6 @@ class EndpointGenericScanScratchpad(models.Model):
class Screenshot(models.Model):
endpoint = models.ForeignKey(
Endpoint, null=True, blank=True, on_delete=models.CASCADE)
domain = models.CharField(max_length=255, help_text="Deprecated. Used when there is no known URL.",
blank=True, null=True)
filename = models.CharField(max_length=255)
width_pixels = models.IntegerField(default=0)
height_pixels = models.IntegerField(default=0)
......
......@@ -306,7 +306,6 @@ def check_installation(browser):
def save_screenshot(endpoint, safe_filename):
scr = Screenshot()
scr.created_on = datetime.now(pytz.utc)
scr.domain = endpoint.uri_url()
scr.endpoint = endpoint
scr.filename = safe_filename
scr.width_pixels = 1920
......
......@@ -88,7 +88,6 @@ def analyze_headers(result: requests.Response, endpoint):
egss.when = datetime.now(pytz.utc)
egss.data = "Status: %s, Headers: %s, Redirects: %s" % (response.status_code, response.headers, response.history)
egss.type = "security headers"
egss.domain = endpoint.uri_url()
egss.save()
"""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-26 16:01+0000\n"
"POT-Creation-Date: 2018-12-13 10:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment