Skip to content

Commit 260374a

Browse files
authored
Merge pull request #28 from MozillaSecurity/a-bunch-of-stuff
A few smaller changes
2 parents b109c2a + 0c5572b commit 260374a

9 files changed

Lines changed: 48 additions & 29 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
# Generated by Finder in Mac OS X
55
.DS_Store
66

7-
# JetBrains
7+
# Editors
88
.idea/
9+
.vscode/
910

1011
coverage/
1112
server/db.sqlite3
1213
server/settings.secret
1314
server/static/
1415
server/logs/
1516

17+
.venv/
1618
src/WebCompatManager.egg-info/
1719
build/
1820
dist/
21+
uv.lock
1922

2023
# Code coverage
2124
.coverage*

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131
]
3232

3333
[project.optional-dependencies]
34-
dev = ["pre-commit", "tox"]
34+
dev = ["pre-commit", "tox", "ruff==0.6.5"]
3535
docker = [
3636
"gunicorn~=22.0.0",
3737
"mozilla-django-oidc~=4.0.1",

server/frontend/src/components/Buckets/List.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
sortKeys.includes('-bug__external_id'),
163163
}"
164164
>
165-
External Bug
165+
Details
166166
</th>
167167
</tr>
168168
</thead>

server/frontend/src/components/Buckets/ReportPreviewRow.vue

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
<span class="two-line-limit">{{ report.url }}</span>
66
</td>
77
<td class="wrap-normal">{{ report.comments }}</td>
8-
<td>{{ report.app_name }}</td>
9-
<td>{{ report.app_channel }}</td>
10-
<td>{{ report.app_version }}</td>
11-
<td>{{ report.breakage_category }}</td>
128
<td>
139
<img
1410
v-if="report.os === 'Linux'"
@@ -40,6 +36,28 @@
4036
/>
4137
<span v-else>{{ report.os }}</span>
4238
</td>
39+
<td>{{ report.app_name }}</td>
40+
<td>{{ report.app_channel }}</td>
41+
<td>{{ report.app_version }}</td>
42+
<td>{{ report.breakage_category }}</td>
43+
<td>
44+
{{
45+
report.details.boolean
46+
.broken_site_report_tab_info_antitracking_has_tracking_content_blocked
47+
}}
48+
</td>
49+
<td>
50+
{{
51+
report.details.string
52+
.broken_site_report_tab_info_antitracking_block_list
53+
}}
54+
</td>
55+
<td>
56+
{{
57+
report.details.boolean
58+
.broken_site_report_tab_info_antitracking_is_private_browsing
59+
}}
60+
</td>
4361
</tr>
4462
</template>
4563

server/frontend/src/components/Buckets/Row.vue

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,23 @@
2525
</td>
2626
<td>
2727
<a
28-
v-if="bucket.bug && bucket.bug_urltemplate"
29-
:class="{ fixedbug: bucket.bug_closed }"
30-
:href="bucket.bug_urltemplate"
31-
target="_blank"
28+
class="btn btn-default"
29+
title="View details and comments"
30+
:href="bucket.view_url"
3231
>
33-
{{ bucket.bug }}
32+
View details and comments
3433
</a>
35-
<p v-else-if="bucket.bug">
36-
{{ bucket.bug }} on {{ bucket.bug_hostname }}
37-
</p>
38-
<div v-else-if="canEdit" class="btn-group">
39-
<assignbutton :bucket="bucket.id" :providers="providers" />
40-
<a :href="bucket.new_bug_url" class="btn btn-danger">File a bug</a>
41-
</div>
4234
</td>
4335
</tr>
4436
</template>
4537

4638
<script>
4739
import { date } from "../../helpers";
48-
import AssignBtn from "./AssignBtn.vue";
4940
import ActivityGraph from "../ActivityGraph.vue";
5041
5142
export default {
5243
components: {
5344
activitygraph: ActivityGraph,
54-
assignbutton: AssignBtn,
5545
},
5646
filters: {
5747
date: date,

server/frontend/src/components/Buckets/View.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,14 @@
150150
<th>Date Reported</th>
151151
<th>URL</th>
152152
<th>User Comments</th>
153+
<th>OS</th>
153154
<th>App</th>
154155
<th>Channel</th>
155156
<th>Version</th>
156157
<th>Breakage Category</th>
157-
<th>OS</th>
158+
<th>ETP content blocked?</th>
159+
<th>ETP blocklist</th>
160+
<th>Is PBM?</th>
158161
</tr>
159162
</thead>
160163
<tbody>
@@ -201,7 +204,7 @@ import AssignBtn from "./AssignBtn.vue";
201204
import HideBucketBtn from "./HideBucketBtn.vue";
202205
import ReportPreviewRow from "./ReportPreviewRow.vue";
203206
204-
const pageSize = 10;
207+
const pageSize = 50;
205208
206209
export default {
207210
components: {

server/frontend/tests/buckets_list.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,5 @@ test("bucket list has two buckets", async () => {
8181
// Assert two buckets (one assigned to a bug, the other not) are displayed in the table
8282
expect(document.querySelectorAll("tbody tr").length).toBe(2);
8383
getByText("A short description for bucket 1");
84-
const buttonLink = getByText("1630739");
85-
expect(buttonLink).toHaveProperty("href", buckets.results[0].bug_urltemplate);
86-
expect(buttonLink).toHaveProperty("target", "_blank");
8784
getByText("A short description for bucket 2");
88-
getByText("Assign an existing bug");
8985
});

server/reportmanager/management/commands/import_reports_from_bigquery.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This Source Code Form is subject to the terms of the Mozilla Public
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4-
import json
54
from contextlib import suppress
65
from logging import getLogger
76
from urllib.parse import urlsplit
@@ -52,7 +51,7 @@ def handle(self, *args, **options):
5251
app_version=row.app_version,
5352
breakage_category=row.breakage_category,
5453
comments=row.comments,
55-
details=json.loads(row.details),
54+
details=row.details,
5655
reported_at=row.reported_at.replace(tzinfo=timezone.utc),
5756
url=urlsplit(row.url),
5857
os=row.os,

server/server/settings.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ def resolver_context_processor(request):
119119

120120
USE_OIDC = False
121121

122+
123+
# Credentials to connect to BigQuery
124+
# This is using service account credentials directly.
125+
# If not specified, gcloud will look for Application Default Credentials or
126+
# use a service account attached to the Compute VM.
127+
128+
BIGQUERY_PROJECT = "moz-fx-dev-dschubert-wckb"
129+
BIGQUERY_TABLE = "moz-fx-dev-dschubert-wckb.webcompat_user_reports.user_reports_prod"
130+
BIGQUERY_SERVICE_ACCOUNT = ""
131+
122132
# Modify the way we generate our usernames, based on the email address
123133
# OIDC_USERNAME_ALGO = 'server.auth.generate_username'
124134
#

0 commit comments

Comments
 (0)