Commit graph

36 commits

Author SHA1 Message Date
ditatompel
30b37b922f
Ability to list cron from CLI #2
Since `tbl_cron` will contain a few rows (for now just 1),
cron list function call is not using any arguments.

This commit also remove cron http handler and endpoint.
2024-05-18 20:13:00 +07:00
ditatompel
120ba51c87
Ability to edit prober name by ID from CLI #2 2024-05-18 19:50:20 +07:00
ditatompel
b5e2787420
Ability to delete prober by ID from CLI #2 2024-05-18 19:39:27 +07:00
ditatompel
d2f927e3db
Ability to add prober from CLI #2 2024-05-18 19:03:56 +07:00
ditatompel
59f1dd9421
List Probers CLI command #2
Listing probers is now only available from server CLI.

The `ProbersQueryParams` struct also changed. I don't think that I will
use more than 20 probers in this project, so paging is not required.

The search param also simplified in one field struct `Search" which
search both in `name` and `api_key` column.
2024-05-18 00:56:13 +07:00
ditatompel
46bc3dc2e8
Using slog for logging level
The log level for the apps is using `log/slog` from Go standard library.
This commit change log format for fiber http logger to match with
the slog standard log format (date and time).

This commit also remove `APP_DEBUG` field from config struct.

TODO:
Use `slog` for default app output. Note that in this commit, the `slog`
output only implemented in `cron` "db migrate" and probe client.
2024-05-13 18:40:01 +07:00
ditatompel
d3113bf598
feat: MySQL db migration
Create database schema migration for this app that run when the `serve`
command is executed.
2024-05-12 04:19:40 +07:00
ditatompel
efca11e51c
Make nettype and protocol query more strict
It will return error if nettype and protocol query string value is wrong
2024-05-09 20:44:49 +07:00
ditatompel
ec11fa0126
removing current page & next page in api response
This response was used for my HTMX "infinite scroll" data, which is not
used in this Svelte project.
2024-05-09 18:29:48 +07:00
ditatompel
5496692c5d
Avoid naming module using a domain name pattern
I hope it will be less discoverable by other users and less likely to
be used unintentionally in other projects.
2024-05-08 21:35:04 +07:00
ditatompel
edb27100bb
chore: Indention query 2024-05-08 19:29:26 +07:00
ditatompel
738c0826c8
Delete old probe logs older than 1 month +2 days 2024-05-08 19:28:42 +07:00
ditatompel
f931066c8c
Keep nettype, height, etc same as before
Do not replace existing database record if prober can't reach the remote
nodes. Only update node status and last fetch record.
2024-05-08 19:03:41 +07:00
ditatompel
8821ad7995
Make cron datatable filterable 2024-05-08 17:24:34 +07:00
ditatompel
50588da322
Edit prober name action 2024-05-07 23:23:31 +07:00
ditatompel
09490a8250
Adding prober delete action 2024-05-07 22:37:36 +07:00
ditatompel
32ef14d1d5
Update prober last activity timestamp
This executed after prober submit fetch report
2024-05-07 22:01:21 +07:00
ditatompel
2a4721b8de
Add filter log by failed reason and status 2024-05-07 21:31:40 +07:00
ditatompel
d04473a807
Add details node by ID endpoint 2024-05-07 01:08:01 +07:00
ditatompel
9aad56103a
Delete old probe logs task 2024-05-06 18:40:09 +07:00
ditatompel
34e4d8c98d
Delete monero node uptime <= 0% with > 300 records 2024-05-06 17:45:18 +07:00
ditatompel
8f5f972faf
Simple display probe logs 2024-05-06 17:19:17 +07:00
ditatompel
33aae21237
Filter datatable (backend)
Adding filter by country, protocol, status, cors and nettype
2024-05-06 14:33:13 +07:00
ditatompel
59b368d91e
Add monero country list endpoint (backend) 2024-05-06 13:35:15 +07:00
ditatompel
1ceb00543b
Adding majority net fee
Note that because this app not caching "expensive" query from database,
I use static majority data for frontend to reduce API call.
2024-05-06 13:19:48 +07:00
ditatompel
92472c2616
Fix country name and country code json response 2024-05-05 02:27:20 +07:00
ditatompel
553aca1074
Adding GeoIP support 2024-05-05 02:20:54 +07:00
ditatompel
1baddfd2d1
Process submitted job from prober 2024-05-05 01:42:47 +07:00
ditatompel
e9577b9bcf
Follow the monero RPC response
This commit change database name and MoneroNode struct:

- `NodeVersion` to `Version`
- `LastHeight` to `Height`

This commit also add `Status` to the MoneroNode struct.
2024-05-04 22:53:03 +07:00
ditatompel
8724b81431
Probe (client) check remote node
Please note that this commit is not complete. I commit to the repo
because I have something to do with my another project. Just don't
want to lost my work for the last couple hours.
2024-05-04 22:36:57 +07:00
ditatompel
cee2b4341b
Add prober API key check middleware 2024-05-04 19:52:22 +07:00
ditatompel
6430e37548
Give job api response 2024-05-04 19:27:21 +07:00
ditatompel
ca759fc1d0
Monero remote node UI for frontend
This commit also implement the simple remote node queries.

TODO: Add filter for various data
2024-05-04 18:52:47 +07:00
ditatompel
7cd802e640
Basic add node action implemented 2024-05-04 17:24:47 +07:00
ditatompel
949db1573b
Add sort order for prober data table
Allowed sort order by `id` and `last_submit_ts`
2024-05-04 01:11:21 +07:00
ditatompel
ced266159e
Copying my other project structure to this project 2024-05-04 00:11:56 +07:00