-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
130 additions
and
225 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "30 5 * * *" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: build and deploy | ||
run: | | ||
npm i && npm i -g wrangler | ||
npm run build | ||
npx wrangler pages deploy dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch=main | ||
env: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.astro/ | ||
dist/ | ||
node_modules/ | ||
|
||
package-lock.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"plugins": ["prettier-plugin-astro"], | ||
"printWidth": 120, | ||
"overrides": [ | ||
{ | ||
"files": "*.astro", | ||
"options": { "parser": "astro" } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { defineConfig } from "astro/config"; | ||
export default defineConfig({}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
{ | ||
"name": "interventions-dashboard", | ||
"description": "Lists currently applied interventions from mozilla-central, without any caches or anything.", | ||
"name": "webcompat-interventions-dashboard", | ||
"type": "module", | ||
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"start": "node server.js" | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro", | ||
"lint": "prettier --write './src/**/*.{astro,js,ts}'" | ||
}, | ||
"author": "Dennis Schubert <[email protected]>", | ||
"license": "MPL-2.0", | ||
"dependencies": { | ||
"astro": "4.15.12", | ||
"node-fetch": "3.3.2" | ||
}, | ||
"devDependencies": { | ||
"prettier": "3.3.3", | ||
"prettier-plugin-astro": "0.14.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference path="../.astro/types.d.ts" /> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
import DataFormatters from "../lib/dataFormatters"; | ||
import DataLoader from "../lib/dataLoader"; | ||
const injections = await new DataLoader( | ||
"https://hg.mozilla.org/mozilla-central/raw-file/tip/browser/extensions/webcompat/data/injections.js", | ||
).run(); | ||
const uaOverrides = await new DataLoader( | ||
"https://hg.mozilla.org/mozilla-central/raw-file/tip/browser/extensions/webcompat/data/ua_overrides.js", | ||
).run(); | ||
const allInterventions = [] | ||
.concat(injections.map(DataFormatters.Injection), uaOverrides.map(DataFormatters.UaOverride)) | ||
.sort((a, b) => (parseInt(a.bug, 10) > parseInt(b.bug, 10) ? 1 : -1)) | ||
--- | ||
|
||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Currently active WebCompat Interventions</title> | ||
<style> | ||
#content, | ||
p { | ||
margin: 25px; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
width: 100%; | ||
} | ||
|
||
td, | ||
th { | ||
border: 1px solid black; | ||
padding: 5px 7px; | ||
text-align: left; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<table> | ||
<tr> | ||
<th>Bugzilla Bug</th> | ||
<th>Affected domain(s)</th> | ||
<th>Type</th> | ||
<th>Target platform</th> | ||
</tr> | ||
{ | ||
allInterventions.map((intervention) => ( | ||
<tr> | ||
<td> | ||
<a href={`https://bugzilla.mozilla.org/show_bug.cgi?id=${intervention.bug}`}>{intervention.bug}</a> | ||
</td> | ||
<td>{intervention.domain}</td> | ||
<td>{intervention.type}</td> | ||
<td>{intervention.platform}</td> | ||
</tr> | ||
)) | ||
} | ||
</table> | ||
</div> | ||
<p> | ||
Showing all interventions currently shipping in mozilla-central. List generated on {new Date().toISOString()}. | ||
</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
} |