Commit Graph

56 Commits

Author SHA1 Message Date
Aravinth Manivannan
4e2758f415 chore: clippy lints 2023-10-16 21:50:53 +05:30
Aravinth Manivannan
78d85ab9a9 feat: annotate license headers using reuse on text source files 2023-07-03 23:19:51 +05:30
Aravinth Manivannan
1e0aedad61 chore: linting 2023-07-02 21:51:24 +05:30
Aravinth Manivannan
2ca49cffe4 feat: see publication status in sitekey view page 2023-06-30 16:50:04 +05:30
Aravinth Manivannan
22edb04ce2 feat: advance sitekey edit now allows modifying publication status 2023-06-30 16:48:53 +05:30
Aravinth Manivannan
56dba7b77f feat: option to publish pow performance numbers. Can un/publish from edit page too. 2023-06-30 07:55:12 +05:30
realaravinth
249b6461ee chore: migrate tests to also run with mariadb 2022-07-23 11:59:42 +05:30
realaravinth
d7fd23f565 chore: get rid of direct DB init and use db_* 2022-05-27 18:25:27 +05:30
realaravinth
cd72ae6ffe feat: migrate fetch captcha config to use db_* 2022-05-27 18:16:47 +05:30
realaravinth
a15d963c3e feat: migrate get_levels to use db_* 2022-05-27 17:24:40 +05:30
realaravinth
098d0cfc24 feat: migrate fetching stats to use db_* 2022-05-27 17:11:15 +05:30
realaravinth
4cd4605266 chore: use local app ctx 2022-05-27 15:25:10 +05:30
realaravinth
12edac7915 feat: migrate get_email to use db_* 2022-05-27 03:08:37 +05:30
realaravinth
2dd18897b0 feat: migrate getting traffic pattern to use db_* interface 2022-05-14 18:45:59 +05:30
realaravinth
a6920f5f36 feat: migrate add user's traffic pattern sqlx postgres to use db_* 2022-05-14 18:22:50 +05:30
realaravinth
a971d4209d fix and chore: refactor tests to minimize initializing DB connections
SUMMARY
    The test suite was spinning up way too many database connections that what's
    strictly needed and so the test suite was failing with[0]:
	code: "53300", message: "sorry, too many clients already"

EXPERIMENTS
    Tried sharing database connection pool across all tests with
    async_once[0] but faced:
	- IO errors
	    The connections were probably getting dropped in between tests
	- actix Actor errors
	    The actor was probably not getting initialized before a
	    a reference to the async_once initialized app
	    context(crate::data::Data) is retrieved and used

FIX
    crate::tests was spinning up an App context
    instance(crate::data::Data) for most utility functions, which was
    unnecessarily excessive.

    Each test now creates an instance of the application context at the
    beginning and shared a reference with all test utility functions. So
    number of database connections/app context instance = number of unit
    tests.

[0]: permanently fixes #22
[1]: https://docs.rs/async_once/latest/async_once/
2022-05-14 12:55:56 +05:30
realaravinth
91c6f77cab chore: update actix-* deps 2022-05-07 16:10:14 +05:30
realaravinth
b057e48d72 feat: migrate pages mod to use actix_auth_middleware 2022-05-07 12:29:02 +05:30
realaravinth
fc8a1670d2 update copyright notice 2022-01-08 22:16:05 +05:30
realaravinth
c46b3f4f4c Implement easy edit view
When user tries to visit this view without an easy configuration
available, i.e, user had created the CAPTCHA using advance view and no
TrafficPattern is available in database, the user will be automatically
redirected to the advance edit page.

But the default edit link everywhere is to the easy edit view.
2021-12-18 21:01:19 +05:30
realaravinth
784aa26dbb mv edit sitekey into advance edit sitekey 2021-12-18 18:19:23 +05:30
realaravinth
a73542cf18 implement easy sitekey addition 2021-12-18 16:42:27 +05:30
realaravinth
fa9762200e mv sitekey edit to easy edit 2021-12-18 16:41:00 +05:30
realaravinth
5a49940b89 Get sitekey routes using methods on pages::panel::sitekey::routes::Sitekey
for consistency purposes
2021-12-18 16:00:09 +05:30
realaravinth
73ce2d1cb1 refactor captcha.rs and levels.rs and rm duration routes 2021-12-16 20:46:50 +05:30
realaravinth
b2297eab6d mv add form into advance 2021-12-10 06:16:38 +05:30
realaravinth
751a1046fb add sitekey helper in list sitekey page 2021-08-12 08:38:09 +05:30
realaravinth
1d759fcb25 captcha stats 2021-07-27 15:28:21 +05:30
realaravinth
e9e6aac770 sitemap 2021-07-21 22:15:52 +05:30
realaravinth
db941d51b7 delete captcha option and sudo page 2021-07-20 15:22:15 +05:30
realaravinth
8f87efeeb3 error correction, tests for err branches, rm get_token, get_token,
delete captcha
2021-07-17 17:43:53 +05:30
realaravinth
102ef5b4a1 edit sitekey button in sitekey list table 2021-07-16 17:50:38 +05:30
realaravinth
ea8264054a edit sitekey, router pattern matching, sitekey update optimization, rm level delete and level err handling 2021-07-16 17:40:52 +05:30
realaravinth
863d22f62c list sitekey: copy sitekey 2021-07-15 18:07:12 +05:30
realaravinth
69de0aaeef notifications styling 2021-07-14 20:09:00 +05:30
realaravinth
b7ec1bca22 duplicate email check and address clippy warnings 2021-07-11 21:46:50 +05:30
realaravinth
9f940c317a upgrading to actix-v4-beta 2021-06-30 20:13:12 +05:30
realaravinth
dcfba60c86 addressing clippy lints 2021-06-11 23:39:38 +05:30
realaravinth
f5624947b9 redis storage for captcha mech 2021-06-11 19:31:03 +05:30
realaravinth
98cf4a476d widget: verification works 2021-05-29 21:19:45 +05:30
realaravinth
2c209bf8d5 widget template 2021-05-28 21:26:36 +05:30
realaravinth
282b285afa fixed view urls 2021-05-28 20:54:46 +05:30
realaravinth
fcdbe66b26 captcha stats 2021-05-27 14:47:29 +05:30
realaravinth
bfc6bca73c view sitekey route and redirection 2021-05-26 12:51:23 +05:30
realaravinth
72667bd2e1 using custom version of actix-codegen and cors for pow routes 2021-05-25 14:34:24 +05:30
realaravinth
91ca00ea79 get notifications 2021-05-10 15:38:09 +05:30
realaravinth
bd20b4238b sitekey view 2021-05-09 19:54:10 +05:30
realaravinth
95bc1feef7 panel: overview 2021-05-09 19:45:25 +05:30
realaravinth
d42a9c6bb8 view sitekey 2021-05-07 19:44:44 +05:30
realaravinth
6069962d3e refactored sitekey routes 2021-05-05 12:57:05 +05:30