Commit Graph

202 Commits (011fb4816fe55bef62e0ae96886a8cb6ceb91536)

Author SHA1 Message Date
Hostea dashboard 011fb4816f
fix: validate VM names
fixes: https://gitea.gna.org/Hostea/dashboard/issues/51
2022-09-04 17:49:53 +05:30
Hostea dashboard 6c31555a52
feat: password reset workflow
fixes: https://gitea.hostea.org/Hostea/support/issues/2
2022-07-10 12:42:16 +05:30
Hostea dashboard 060e9b84d4
fix: update password reset link 2022-07-10 12:40:00 +05:30
Hostea dashboard 418bb7dec0
fix: tests rely on a string from login page. Login page update reflects
in tests
2022-07-10 12:39:33 +05:30
Loïc Dachary c4375a43b2 Merge pull request 'Update the page content' (#48) from dachary/dashboard:wip-site into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/48
2022-07-10 02:43:43 -04:00
Loïc Dachary 705c3a282b
copy/paste the hostea.org home page content
ci/woodpecker/push/woodpecker Pipeline failed Details
So they are consistent with each other.

Fixes: #47

Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-07-10 08:42:38 +02:00
Loïc Dachary cfd5518518
Add link to https://hostea.org
So that the user can conveniently go back to hostea.org without
editing with the URL manually.

Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-07-10 08:20:24 +02:00
Aravinth Manivannan a95158f3df
fix: Gite credentials email: fix subject and let user know instance is
being provisioned

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/44
2022-07-09 10:54:45 +05:30
Aravinth Manivannan b12cc044da
fix: Invoice generation must not consider deleted VMs' names for
checking if payment is already fulfilled

DESCRIPTION
    Invoice generation is dependent on instance_name. Deleting a VM
    doesn't delete the corresponding payments record since payment
    receipts should be preserved for accounting purposes.

    But being heavily dependent on instance_name, without taking deleted
    VMs into account produces incorrect behavior under certain
    circumstances: if a VM named 'foo' is paid for and is deleted before
    its billing cycle is competed and a new VM is created with the same
    name, either by the same user or a different user, invoice won't be
    generated for the new VM since a payment record already exists for
    that billing cycle for the VM named 'foo'.

    Marking deleted VMs' payment records unsuitable for checking if a VM
    is already paid for will result in correct behavior.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/38
2022-07-08 22:28:39 +05:30
Aravinth Manivannan cc12d1a77d
fix: hard-code CI_COMMIT_AUTHOR_* details to avoid failures in PR builds
ref: https://gitea.hostea.org/Hostea/dashboard/pulls/42
2022-07-08 19:51:06 +05:30
Aravinth Manivannan cb6bce0c44 Merge pull request 'git config before push' (#43) from dachary/dashboard:wip-config-3 into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/43
2022-07-08 10:18:00 -04:00
Aravinth Manivannan bebf18946a
fix: re-enable billing app tests
Commented out for debugging, forgot to enable(!!)
2022-07-08 19:31:06 +05:30
Loïc Dachary 6e84746a2c
git config before push
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-07-08 15:47:53 +02:00
Aravinth Manivannan 2c8a5909cb
fix: generate absolute URI when attaching links in invoice and payment
notification

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/37
2022-07-08 18:51:04 +05:30
Aravinth Manivannan ce0498b013
fix: add instance link in primary nav bar points to right page 2022-07-08 18:43:04 +05:30
Aravinth Manivannan 809322d245
feat: docs: generate_invoice management cmd
fixes: https://gitea.hostea.org/Hostea/dashboard/issues/29
2022-07-08 01:51:22 +05:30
Aravinth Manivannan 2ee54a71e3
feat: management command to periodically generate invoices
SUMMARY
    `python manage.py generate_invoice` generates invoices for VMs when
    it enters a new billing cycle and sends a notification email to
    VM owners.

    This command should be run as frequently as desirable. Running daily
    is recommended.

BILLING CYCLE
    By default, a billing cycle is 30 days.
2022-07-08 01:46:17 +05:30
Aravinth Manivannan 438e34f7d6
chore: refactor invoice generation into a util fn 2022-07-08 00:51:11 +05:30
Aravinth Manivannan 9c239ad78b
feat: send invoice generated notification email and payments receipt mail 2022-07-07 20:51:33 +05:30
Aravinth Manivannan 147eead388 Merge pull request 'clone instead of fetch' (#19) from dachary/dashboard:wip-pull into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/19
2022-07-07 04:42:46 -04:00
Aravinth Manivannan f2f2fadae4
feat: use whitenoise for static file in development too for uniform Behavior
> it opens up the possibility for differences in behaviour between development and production environments. For this reason it’s a good idea to use WhiteNoise in development as well.

source: http://whitenoise.evans.io/en/stable/django.html#using-whitenoise-in-development
2022-07-07 13:59:06 +05:30
Aravinth Manivannan 5f6c3c459e
chore: mv common static files to common-static 2022-07-07 13:58:53 +05:30
Loïc Dachary 8d02fe107f
always clone the fleet repository
ci/woodpecker/push/woodpecker Pipeline failed Details
It is small and not worth the trouble of dealing with fetch/pull

Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-07-07 10:05:18 +02:00
Aravinth Manivannan b4183c1790
feat & fix: install and configure whitenoise to serve static files in
prod

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/24
2022-07-07 10:59:23 +05:30
Aravinth Manivannan 22abe08f68
feat: mv static files to dash/static/dash and migrate load static template tags 2022-07-07 10:41:22 +05:30
Aravinth Manivannan 4c51eb77b0 chore: rm gitea/app.in
SUMMARY
    This file was used to spawn a Gitea instance from binary for
    integration testing. That strategy was abandoned long ago but this
    file wasn't cleaned up.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/34
2022-07-05 01:59:26 -04:00
Aravinth Manivannan 9303ea59ed fix: s/EMAIL_SENDER_ADDRESS/DEFAULT_FROM_EMAIL/ 2022-07-04 12:42:02 -04:00
Aravinth Manivannan eb68b1e984 feat: Gitea root creds email with nicer content 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 5e5ce02759 feat: instance created notification email template with nicer body 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 63f4f987a9 feat: verification link email template with polished email body 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 4a1c0a5cdc feat: add EMAIL_SENDER_ADDRESS to settings.py 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 280807d96c
fix: rm dummy section
NOTE
    The dummy section is commented out for future reference.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/27
2022-07-04 13:55:28 +05:30
Aravinth Manivannan e79fb65cdf
fix: rm WIP services from homepage
fixes: https://gitea.hostea.org/Hostea/dashboard/issues/28
2022-07-04 13:44:43 +05:30
Aravinth Manivannan c72773fc9e Merge pull request 's/ammount/amount/' (#22) from dachary/dashboard:wip-typo into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/22
2022-07-03 16:39:49 -04:00
Aravinth Manivannan 8e7a11b9a4 Merge pull request 'Revert "enough hoste delete is not idempotent"' (#21) from dachary/dashboard:wip-delete into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/21
2022-07-03 16:38:34 -04:00
Loïc Dachary ed0186912d
s/ammount/amount/ 2022-07-03 15:01:09 +02:00
Loïc Dachary 7c045b12d5
Revert "enough hoste delete is not idempotent"
Fixes: #18

This reverts commit ccec1262f0.
2022-07-03 14:58:27 +02:00
Aravinth Manivannan 5397e38d22 Merge pull request 'enough host delete is not idempotent' (#20) from dachary/dashboard:wip-delete into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/20
2022-07-02 10:48:01 -04:00
Loïc Dachary eefa2120a9
enough host delete is not idempotent
pretend it is until
https://lab.enough.community/main/infrastructure/-/issues/359 is resolved
2022-07-02 16:43:51 +02:00
Aravinth Manivannan ccfa81ce2c Merge pull request 'feat: notify user on instance creation' (#14) from wip-instance-ready-notify into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/14
2022-07-02 03:42:34 -04:00
Aravinth Manivannan 7464604928 Merge pull request 'feat: configurable VM base domain and customer Gitea and Woodpecker URI generators' (#12) from wip-hostea-domain into master
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/12
2022-07-02 03:42:15 -04:00
Aravinth Manivannan 4a47543a0f
hostfix: use default source code link when settings.py doesn't provide one 2022-07-01 20:59:10 +05:30
Aravinth Manivannan e5ebdc29ce
feat: CI: replace fleet repo remote URI with remote URI template 2022-07-01 19:57:22 +05:30
Aravinth Manivannan f86dd2ff37
feat: delete_vm takes only one parameter 2022-07-01 19:54:20 +05:30
Aravinth Manivannan 8fc20d16be
feat: ues separate fleet repo for each unit test 2022-07-01 19:54:15 +05:30
Aravinth Manivannan bbcd373fe4
feat: redirect to VM deletion post sudo authentication 2022-07-01 19:53:00 +05:30
Aravinth Manivannan 412230bd99
feat: create repo and add deploy key util 2022-07-01 19:52:10 +05:30
Aravinth Manivannan 8be1e02a21
feat: load footer ctx in all templates 2022-06-30 14:37:49 +05:30
Aravinth Manivannan faca7286b7
feat: load Dashboard source code repository URL from settings 2022-06-30 14:33:56 +05:30
Aravinth Manivannan 9d89bc071c
fet: show Gitea and woodpecker URIs in view instance page 2022-06-30 13:05:57 +05:30