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>
This commit is contained in:
soup 2023-05-21 18:39:28 +02:00 committed by GitHub
parent 1f76aa38f4
commit f774831d76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 182 additions and 54 deletions

View file

@ -26,7 +26,7 @@ type Service interface {
Store(ctx context.Context, release *domain.Release) error
StoreReleaseActionStatus(ctx context.Context, actionStatus *domain.ReleaseActionStatus) error
Delete(ctx context.Context) error
DeleteOlder(ctx context.Context, duration int) error
Process(release *domain.Release)
ProcessMultiple(releases []*domain.Release)
Retry(ctx context.Context, req *domain.ReleaseActionRetryReq) error
@ -95,6 +95,10 @@ func (s *service) Delete(ctx context.Context) error {
return s.repo.Delete(ctx)
}
func (s *service) DeleteOlder(ctx context.Context, duration int) error {
return s.repo.DeleteOlder(ctx, duration)
}
func (s *service) Process(release *domain.Release) {
if release == nil {
return