Commit graph

73 commits

Author SHA1 Message Date
Fabricio Silva
8600d3a2ab
fix(indexes): toggle on and off with switch (#1164)
* chore(indexers): replace array position with id

* fix(indexers): enable and disable without editing

* feat(indexer): add toggle endpoint and refactoring

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-10-03 21:57:11 +02:00
ze0s
d3ca3e59c0
feat(web): show more app info (#1145)
* feat(web): add app info

* database type used
* application binary path
* config path

* feat(web): label colors light theme

* feat(web): truncate long fields
2023-09-22 22:05:14 +02:00
Fabricio Silva
6a4d96f988
feat(config): check for updates reading from config (#1038)
* go indent linting

* getLatest endpoint follows config.CheckForUpdates

* Revert "getLatest endpoint follows config.CheckForUpdates"

This reverts commit 495fabad13b1a96aa83ce50792f5725e9b51061a.

* getLatestRelease follows config.check_for_updates

* revert: rename data - less changes to conflict

* fixup: revert: rename data - less changes to conflict

* change queryFn to arrow function
2023-09-10 16:59:59 +02:00
ze0s
b6de7144e0
feat(feeds): clear feed cache (#1071) 2023-09-01 21:39:39 +02:00
ze0s
3e244fac10
fix(filters): store and update with no external filters (#1049)
* fix(filters): store and update

* fix(filters): bad fmt var

* fix(filters): store expect status

* fix(filters): store expect status

* fix(filters): external filter always rejected
2023-08-17 21:42:43 +02:00
ze0s
dde0d0ed61
feat(filters): add support for multiple external filters (#1030)
* feat(filters): add support for multiple ext filters

* refactor(filters): crud and check

* feat(filters): add postgres migrations

* fix(filters): field array types

* fix(filters): formatting

* fix(filters): formatting

* feat(filters): external webhook improve logs
2023-08-15 23:07:39 +02:00
soup
e6f32596a1
fix(releases): delete older than X (#993)
* fix(release): DeleteOlder func for zero duration

resolves a bug in the `DeleteOlder` function where recent 24-hour data wasn't deleted when set to `delete everything`. We now correctly set the olderThanTimestamp to a future date when duration is zero, ensuring complete deletion of all records.

* fix(releases): delete older

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-07-22 14:49:28 +02:00
ze0s
c361f23139
feat(http): improve error handling (#1006) 2023-07-02 14:03:39 +02:00
soup
f774831d76
feat(releases): delete older than x (#924)
* feat: delete releases older than x

* check timestamp

* incomplete front end changes

commiting changes from codespace to not lose them

* change to dropdown with options

* using int comparisons to avoid nightmares

* Revert "using int comparisons to avoid nightmares"

This reverts commit dc55966a73e9f6ad79ed28c3a3e0dbe0e35448a6.

* suggestions by stacksmash76

come back to discord @stacksmash76

* Curves - a touch of warmth in our pixel realm

* replace inline css with tailwind

* remove unnecessary comment

* align label with dropdown
changed first paragraph to something more sensible

* change font weight for duration label

* padding changes

* nitpicky

* merged divs where possible

* small adjustments for light theme

* attempt to fix for postgres

* refactor: split into component and add confirmation modal

also restyle component

* fix: go fmt

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-05-21 18:39:28 +02:00
Kyle Sanderson
8bef297841
fix(http): set ReadHeaderTimeout to mitigate Slowloris (#946)
* fix(http): add header timeout for connections

* fix: add import

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-05-21 16:27:07 +02:00
ze0s
ccabe96bdf
feat(irc): view announces per channel (#948)
* feat(irc): add sse to handler

* feat(irc): view and send irc messages per network

* refactor(irc): use id as handlerkey

* refactor(irc): use id as handlerkey

* feat(web): add irc context

* refactor: create sse stream per network channel

* fix(irc): remove non-working wildcard callback handler

* feat: use fork of sse

* chore(deps): update ergo/irc-go to v0.3.0

* fix: clean irc msg before sse publish

* feat: add view channel button

* feat: styling improvements

* feat: show time
2023-05-21 15:51:40 +02:00
ze0s
6898ad8315
feat(releases): replay actions (#932)
* feat(releases): replay actions

* feat(releases): replay actions component

* fix: update filter actions

* fix: select filter_id from ras
2023-05-15 21:30:04 +02:00
ze0s
97333d334f
fix(auth): too restrictive session handling (#933) 2023-05-15 19:09:06 +02:00
ze0s
319bc2f200
fix(web): PWA asset and route handling (#898)
* fix(web): PWA asset and fallback route handling

* fix(web): strip baseurl

* fix(web): add back manifest.json

* fix(web): add back manifest.json

* fix(web): log file

* fix(web): do not trim baseurl

* fix(web): try different start_url

* fix(web): pwa with subfolder
2023-05-02 19:06:53 +02:00
ze0s
604c7896bd
chore: add LICENSE GPLv2-or-later (#897)
* chore: add LICENSE

* chore: add LICENSE to README
2023-05-01 16:21:59 +02:00
ze0s
83e9232b98
fix(auth): invalid session error (#892)
* chore: ignore dist dir

* fix(auth): speculative invalid session
2023-05-01 14:27:30 +02:00
Nelson Pecora
da5492febb
feat(notifications): add Pushover (#598)
* feat(notifications): add pushover

* add db migration

* fix lint error

* some small corrections

* fixed README

* added missing columns to postgres_migrate.go

* use token for user_key

* refactor(notifications): change priority to int

* fix: only test selected events

---------

Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-29 17:07:15 +02:00
ze0s
7f05dd1efd
fix(onboarding): could not create user (#848)
fix: onboarding not working
2023-04-17 20:56:17 +02:00
ze0s
f3cfeed8cd
feat(indexers): test API from settings (#829)
* refactor(indexers): test api clients

* feat(indexers): test api connection

* fix(indexers): api client tests

* refactor: indexer api clients

* feat: add Toasts for indexer api tests

* fix: failing red tests
2023-04-15 23:34:27 +02:00
martylukyy
169863dded
feat(logs): webhook sanitization (#809)
* feat: sanitize passwords from json payload

* add webhook sanitization

* update comments

Co-authored-by: soup <soup@r4tio.dev>

* sanitize RED apikeys from webhook payloads

* added an optional whitespace token between field name and data

---------

Co-authored-by: soup <soup@r4tio.dev>
2023-04-10 14:32:19 +02:00
KaiserBh
1cdbbe5bf3
refactor(web): migrate create-react-app to vite (#823)
* fix(build): dockerignore add exclusions

* fix: baseurl and build

* chore: removed react-app-env instead use vite

* chore: updated server and embedding static files.

* commented because conflict I believe, and not needed.

* docs: updated readme

* chore: updated json and added vite

* chore: import fix

* chore: updated yarn.lock and package json

* build: add empty dist to compile backend

* fix: use / as default baseurl

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-10 14:28:24 +02:00
ze0s
33897b04a1
Revert #787 (#821)
Revert "refactor(web): migrate create-react-app to vite (#787)"

This reverts commit edae1bbf4b.
2023-04-07 19:08:42 +02:00
KaiserBh
edae1bbf4b
refactor(web): migrate create-react-app to vite (#787)
* removed react-app type instead use vite.

* removed index.html from public since vite uses it from root: read more: https://vitejs.dev/guide/#index-html-and-project-root

* yarn.lock update.

* added vite config file. With commented rollUp option if we want the build to be called build but using default stuff for now.

* updated tsconfig to use vite and include vite.config.ts

* changed package json build commands to use vite.

* for some reason there is an error in vite config when we put project as tsconfig.json.

* build.go updated to use the new dist folder.

* refactored as well updated to use dist and web.AssetHandler again.

* Fixed issue forcing the frontend to be reloaded for all routes to work if logged in fresh without reloading it will always go back to dashboard.

* updated it to use the new function; need to fix the Index for baseUrl I believe, if enabled it works except logs route will crash due to cors.

* refactored and default port to 7474, don't think we need the rollUpOptions.

* added tmp/ to ignore .

* init air.toml, for dev hot reloading both app and backend. https://github.com/cosmtrek/air run it using air but make sure it's in PATH

* updated the start command to build and watch for changes, works great with air.

* revert

* added proxy for vite config. To be used for dev.

* refactor: I think this should fix it, when logs route etc getting accessed usually it throws error but by getting rid of the catch-all it should work as intended, since web.RegisterHandler(r) will catch the unmatched ones.

* fix: baseurl and build

* fix(build): docker ignore !web/dist

* fix(build): dockerignore add exclusions

* docs: update README.md

* build: update postcss config

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-07 16:04:10 +02:00
soup
37261c9432
refactor(logs): use zerolog instead of log (#797)
fix(logs): use zerolog instead of log
2023-03-30 22:04:44 +02:00
soup
c2fcd91da7
refactor(logs): improve log sanitization performance (#779)
* refactor log sanitization for better performance

* Fix token error, add mutex for safer concurrency

* serve sanitized version directly from memory

* further improvements

made it check for "module":"irc" before running the irc regex checks

* Revert "further improvements"

This reverts commit 260037c3a58e1e760613167d3e15136b313c0612.

* update irc regexes to handle special characters

- added prefixes to the irc patterns
- improved tests

* more improvements for irc regexes

* fixed errors

* another edge case bites the dust

* regex improvements

* lock to 1 worker if cpu cores is 2 or less

* removed unused code

* revert to single thread

Moved regex patterns and replacements into a separate array for easier maintenance and readability.

Optimized the regex patterns that share the same replacement string to avoid redundancy.

Modify SanitizeLogFile to accept io.Writer for direct output

* style

* only check relevant lines

- only check relevant lines
- dont break unless length=0

* revert breaking change

* handle api and auth cases

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2023-03-26 23:25:23 +02:00
Kyle Sanderson
0d6e23f278
chore(http): set log level to trace (#765) 2023-03-19 22:01:43 +01:00
soup
4ade1b0ecf
feat(logs): sanitize logfile on download (#767)
* initial commit

* handle tleech urls

* improved and simplified regex

* add sanitization status & loading anim for log dl

* removed unused imports

* improved regex

* fixed regex and added tests

* regex improvements and tests

* added unicode matching to saslRegex

* added missing baseurl

* swapped the css animator for a react component

the css version froze when served through a reverse proxy

* optimized regex compilation

---------

Co-authored-by: soup <soup@r4tio.cat>
2023-03-19 21:57:16 +01:00
ze0s
b21c01a7df
feat(logs): make log files downloadable (#706)
* feat(logs): show and download log files

* feat(logs): make logs settings dropdown

* feat(logs): minor cosmetic changes

* fix(logs): send empty response when lohpath not configured

* fix(logs): remove unused imports

* feat(logs): check if logs dir exists

* feat(logs): list log files in settings
2023-02-12 17:34:09 +01:00
ze0s
ac276868fb
feat(settings): make log level configurable from UI (#704)
* feat(settings): set log level

* fix: light theme colors

* fix: light theme colors size unit
2023-02-11 22:37:06 +01:00
ze0s
2917a7d42d
feat: show new updates in dashboard (#690)
* feat: show new update banner

* feat(http): add request logger

* refactor: updates checker

* feat: make update check optional

* fix: empty releases

* add toggle switch for update checks

* feat: toggle updates check from settings

* feat: toggle updates check from settings

* feat: check on toggle enabled

---------

Co-authored-by: soup <soup@r4tio.dev>
2023-02-05 18:44:11 +01:00
ze0s
fd67a7b24e
feat(feeds): view latest RSS and Torznab feed (#609)
feat(feeds): view latest run
2023-01-02 23:00:11 +01:00
ze0s
6b1490726f
feat(http): improve invalid login handling (#597)
* feat(http): improve invalid login handling

* fix(http): do not log password
2022-12-31 01:04:41 +01:00
Kyle Sanderson
154b2d6578
feat(http/releases): report errors to end-users. (#596)
feat(http): report errors to end-users.
2022-12-31 00:35:44 +01:00
ze0s
e6c48a5228
feat(http): log invalid login attempts (#587) 2022-12-28 17:58:26 +01:00
ze0s
29da2416ec
feat(clients): add support for qBittorrent 4.4.0+ (#558)
* refactor: move client to go-qbittorrent

* refactor: move client to go-qbittorrent

* feat(downloadclient): cache qbittorrent client

* feat(downloadclient): update qbit

* feat(downloadclient): client test and remove pkg qbit

* feat(downloadclient): update pkg qbit

* fix(release): method

* feat(release): make GetCachedClient concurrent safe

* feat(release): add additional tests for buildLegacyHost

* feat(release): remove branching

* chore: update pkg autobrr/go-qbittorrent to v.1.2.0
2022-12-10 19:25:04 +01:00
ze0s
300418b9f1
feat(irc): improve list view (#466)
* feat(irc): add irc status examples

* feat(irc): add dropdown menu to list

* feat(irc): update heroicons and add expand button

* feat(irc): update heroicons and add expand button
2022-09-22 16:39:05 +02:00
ze0s
f5faf066a9
feat(filters): improve list view with filtering (#465) 2022-09-22 11:54:17 +02:00
ze0s
3a334121f7
feat(filters): support partial update (#409) 2022-08-15 15:54:34 +02:00
ze0s
fa20978d58
feat(api): add apikey support (#408)
* feat(api): add apikey support

* feat(web): api settings crud
2022-08-15 11:58:13 +02:00
Ludvig Lundgren
ebba72ec1f
feat(feeds): torznab add test button (#347) 2022-07-10 15:54:56 +02:00
Ludvig Lundgren
33e3691737
fix(indexers): delete and clean (#343) 2022-07-07 18:31:42 +02:00
Ludvig Lundgren
f9cf837486
fix(indexers): duplicates in list (#317)
* feat(indexers): refactor setup and updates

* feat(indexers): use definitions as non-pointer
2022-06-19 21:24:04 +02:00
Ludvig Lundgren
258754643d
feat(web): search releases (#302)
* feat(releases): search in ui

* refactor(releases): optimize query recent releases
2022-06-14 01:51:33 +02:00
Ludvig Lundgren
38addb99e6
feat(notifications): add telegram support (#299)
* feat(notifications): add telegram support

* feat(notifications): change list view

* refactor(notifications): overall setup

* feat(notifications): forms add telegram
2022-06-13 17:01:36 +02:00
stacksmash76
4d753b76ed
refactor(web): update to react 18 and other deps (#285)
* Started refactoring codebase for React 18.

* Migrated to react-router v6 fully

* Removed useless test setup along with relevant packages.

* Removed leftover console.log statement

* feat: use status forbidden for onboarding

* refactor(web): use react hook form on login

* fix: comply with r18 shenanigans

* chore: update packages
2022-06-10 19:31:46 +02:00
Ludvig Lundgren
91b094f4f4
feat(confg): reload on save and refactor logging (#275)
* feat(confg): reload on save

* refactor(logging): rework
2022-05-20 09:27:01 +02:00
Ludvig Lundgren
2903e7b493
fix(indexers-irc): load new values on update (#274)
* fix(indexers-irc): reload config on restart

* fix(indexers-irc): reload config

* fix: indexer add form
2022-05-17 09:35:08 +02:00
Ludvig Lundgren
bb62e724a1
feat: add torznab feed support (#246)
* feat(torznab): initial impl

* feat: torznab processing

* feat: torznab more scheduling

* feat: feeds web

* feat(feeds): create on indexer create

* feat(feeds): update migration

* feat(feeds): restart on update

* feat(feeds): set cron schedule

* feat(feeds): use basic empty state

* chore: remove duplicate migrations

* feat: parse release size from torznab

* chore: cleanup unused code
2022-04-25 12:58:54 +02:00
Ludvig Lundgren
2a3b5ce448
feat(http): add healthcheck endpoints liveness and readiness (#240)
* feat(http): add liveness and readiness endpoints

* feat(http): improve unhealthy msg
2022-04-12 18:19:07 +02:00
stacksmash76
1a4f3cf55d
feat: add ability to create an account via the webui (#223)
* feat: add ability to create an account via the webui without the need for autobrrctl

* refactor redundant code block.

* fix: early return and 0 value
2022-04-10 18:26:14 +02:00