Commit Graph
100 Commits
Author SHA1 Message Date
junv 839aadcf21 Update ban ip form 2026-05-11 22:57:25 +10:00
junv f587ab3053 UI tweaks 2026-05-11 21:53:43 +10:00
junv 1b04d500d1 Add price check 2026-05-11 21:28:59 +10:00
junv 81c56207d4 update 2026-05-11 20:25:25 +10:00
junv cb81fa8601 update 2026-05-03 14:53:39 +10:00
junv b52b821baf test change rate 2026-05-02 20:55:02 +10:00
junv 68dd32d2cd update performance chart logic! 2026-05-02 20:36:32 +10:00
junvandGitHub e5ea1e9bf4 Merge pull request #85 from wahyd4/feature/invest-portfolio
fix: remove duplicate serializer classes causing 500 on Transaction API
2026-04-28 14:17:12 +10:00
junv e82a9c285e Update invest UI 2026-04-25 11:58:42 +10:00
junv 748a39975f Fix snapshot! 2026-04-25 11:58:42 +10:00
junv 971fa992dc fix: pull --rebase before manifest push to avoid rejection 2026-04-25 11:00:34 +10:00
junv 9646cd7c7a fix: derive portfolio header change from sum of per-stock changes for consistency 2026-04-25 10:58:24 +10:00
junv f3e9e13297 fix: compare live portfolio value against last week snapshot (not this week) 2026-04-25 10:46:55 +10:00
junv 18c5a554d2 feat: show dollar + % week change per stock in portfolio table 2026-04-25 10:45:30 +10:00
junv 3acaa328cb feat: add per-stock weekly price change column to portfolio table 2026-04-25 10:42:21 +10:00
junv d4183f30e6 fix: show live values and correct change% on invest dashboard cards 2026-04-25 10:40:46 +10:00
junvandGitHub c0093ac6ab Merge pull request #83 from wahyd4/feature/invest-portfolio
fix: API bugs in invest portfolio
2026-04-18 23:42:21 +10:00
junv e9f7c90420 add transaction history section to invest dashboard 2026-04-18 23:29:56 +10:00
junv 8209ac34c7 fix weekly overview: use asof snapshot lookup and 5-day gap for last_week 2026-04-18 23:03:33 +10:00
junv 56bb5df57c cache benchmark prices in DB, refresh weekly 2026-04-18 22:58:25 +10:00
junv 221cdcdbee add yfinance dependency 2026-04-18 22:56:16 +10:00
junv 3c2d97b31d update ui 2026-04-18 22:43:58 +10:00
junv b345534277 update dockerfile 2026-04-18 22:43:58 +10:00
junv 028b2eda76 Update ui 2026-04-18 22:43:58 +10:00
junv f6f9bd167d fix build 2026-04-18 22:30:41 +10:00
junvandGitHub 55c9285967 Merge pull request #82 from wahyd4/feature/invest-portfolio
feat(invest): Add investment portfolio management feature
2026-04-18 22:26:46 +10:00
junv 93bc6bd1e5 Update 2026-04-18 22:25:55 +10:00
junv a5e9fe9cbb Update UI 2026-04-18 22:24:17 +10:00
junv e202304043 ui update 2026-04-18 22:16:45 +10:00
junv 830171b38a UI update 2026-04-18 22:04:01 +10:00
junv d933a99b8d Update logic 2026-04-18 22:01:34 +10:00
junv f44d76e9ad Rebase 2026-04-18 14:19:51 +10:00
junvandCopilot 11fa2ad673 routermon: replace ISP column with Target Service badge in WAN table
- Remove ISP column (always empty with local MMDB — no ISP data)
- Add Target Service column with color-coded badges (SSH/RDP/VNC/SMB=red,
  HTTP/HTTPS=blue, MySQL/PostgreSQL/Redis/MongoDB=purple, SMTP/POP3/IMAP=green,
  DNS=yellow, FTP=orange)
- Restore inline service label in Dst Port cell (e.g. '22 SSH')
- Expand port mapping: 21 ports covered (FTP, Telnet, SMTP, DNS, POP3,
  IMAP, SMB, MSSQL, MySQL, RDP, PostgreSQL, VNC, Redis, HTTP-alt,
  HTTPS-alt, Elasticsearch, MongoDB)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 17:06:55 +10:00
junvandCopilot 3955e95b9e geo: replace ip-api.com with local DB-IP City Lite MMDB
- Rewrite nginxmon/geo.py to use maxminddb + DB-IP City Lite MMDB
  (https://cdn.jsdelivr.net/npm/dbip-city-lite/dbip-city-lite.mmdb.gz)
  instead of ip-api.com HTTP API — eliminates all network timeouts and
  rate-limit issues; lookups are now sub-millisecond in-process
- Keep _lookup_batch() signature unchanged so routermon receiver
  requires no changes
- MMDB downloaded on first use (lazy) and refreshed monthly via
  APScheduler; reader cached module-level (thread-safe for reads)
- Add management command: manage.py download_geo_db
- Update k8s init container to download MMDB on first deploy if absent
- Add maxminddb==3.1.1 dependency

CC BY 4.0 — DB-IP (https://db-ip.com)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 16:44:02 +10:00
junvandCopilot 60dd5aeffb routermon: break chunk loop early when circuit breaker fires
Stop sending further API requests mid-batch once the backoff is
triggered, saving remaining missing IPs as empty placeholders
immediately instead of waiting for them to timeout one-by-one.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 16:35:00 +10:00
junvandCopilot dde1c6640c routermon: add circuit breaker for ip-api.com geo lookups
After _GEO_MISS_THRESHOLD (2) consecutive large all-empty API responses,
assume ip-api.com is unreachable and enter a 5-minute backoff.
During backoff all missing IPs are immediately saved as empty IPGeoCache
placeholders so they are not re-queued. Resets automatically when the
backoff expires and any result is returned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 16:24:33 +10:00
junvandCopilot cfca2c2ed7 routermon: add WAN geo map + fix batch geo enrichment
- Add WanGeoStatsView (api/wan/geo/) returning country choropleth +
  bubble data for WAN source IPs using IPGeoCache lat/lon
- Add wanGeoMap (420px) in dashboard between ports chart and live table:
  red colour scale by country, rose bubbles sized by attempt count,
  top-5 country legend
- Rewrite _geo_worker_loop to drain up to 200 queue items per cycle,
  bulk DB cache check, batch API calls (100 IPs per request) instead
  of 1 request per IP — fixes ip-api.com timeout pile-up under scan
  volumes
- Add _geo_skip in-memory set: IPs that return no geo data get an
  empty IPGeoCache placeholder saved to DB so they are never retried;
  skip set also prevents re-queuing known-empty IPs during flush
- Remove _fetch_geo / _enrich_dns_geo / _enrich_wan_geo helpers
  (logic consolidated into the new batch worker)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 16:13:30 +10:00
junvandCopilot 430ca18b41 routermon: add WAN incoming traffic monitoring
- Add WanEvent model (src_ip, protocol, dst_port, src_port, geo fields)
  with migration 0003_wanevent

- Extend parser to handle kernel:/iptables WAN_IN: syslog lines
  - Generalise _RE_SYSLOG to accept 'kernel' process name (no pid)
  - Parse KEY=value tokens from iptables log (robust vs monolithic regex)
  - Reject private source IPs silently

- Receiver: bulk-create WanEvent rows in _flush(); replace per-flush
  geo threads with a single bounded geo-enrichment worker (_geo_queue,
  max 500) to safely handle high-volume port scans

- Tasks: batch-delete WanEvent rows (<=3 day retention cap); batch-delete
  DnsQuery rows to avoid long SQLite locks

- Views: WanLivePartialView (filterable HTMX table), WanChartDataView
  (timeline JSON); dashboard context adds wan_total_24h,
  top_attacked_ports_json, top_wan_sources

- Templates:
  - _live_wan.html: live event table with color-coded protocol,
    clickable IP/port filters, well-known port labels
  - dashboard.html: WAN section with 24h counter, timeline chart,
    top attacked ports bar chart, top source IPs table, live event stream
  - settings.html: Step 5 guide for /jffs/scripts/firewall-start with
    rate-limited iptables LOG rules (INPUT + FORWARD chains, 60/min limit)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 15:34:39 +10:00
junvandCopilot 611305b0ab fix(routermon): fix receiver startup, logging config, and JS template escaping
- Remove SO_REUSEADDR from UDP socket so only one gunicorn worker binds
  port 5514 (second worker intentionally gets EADDRINUSE and skips)
- Add print() fallback for bind confirmation/errors so startup is visible
  even when Django logging config is not fully set up
- Fix duplicate LOGGING dict in settings.py: second assignment was
  overriding the first and removing the root logger handler, silently
  swallowing all routermon/core startup logs
- Add sys.stderr fallback in core/apps.py ready() for startup exceptions
- Fix JS SyntaxError: {{ top_domains_json }} needs |safe filter since
  Django auto-escapes quotes to &quot; inside script tags

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-16 14:58:39 +10:00
junv 3d481385b0 Update 2026-04-16 14:26:28 +10:00
junv 1fb54880d6 fix build 2026-04-16 14:18:46 +10:00
junv 7e0db3cdfb fix ci 2026-04-16 14:15:15 +10:00
junv 3409fc8045 fix build 2026-04-16 14:12:21 +10:00
junv 5b1df2ee5e Add router monitor 2026-04-16 14:01:43 +10:00
junv 864166ecbd ci: fix Python setup — use setup-uv python-version instead of separate install step 2026-04-14 14:54:48 +10:00
junvandGitHub af73cdf267 Merge pull request #77 from wahyd4/dependabot/uv/pillow-12.2.0
Bump pillow from 12.1.1 to 12.2.0
2026-04-14 14:44:04 +10:00
junvandGitHub 4cd667b067 Merge pull request #78 from wahyd4/dependabot/uv/pytest-9.0.3
Bump pytest from 8.3.4 to 9.0.3
2026-04-14 14:43:52 +10:00
junvandGitHub d85402e98a Merge pull request #57 from wahyd4/dependabot/npm_and_yarn/minimatch-9.0.9
Bump minimatch from 9.0.5 to 9.0.9
2026-04-14 14:43:38 +10:00
junv 04aad674e4 Test 2026-04-14 14:42:54 +10:00
junvandGitHub a8351dab76 Merge pull request #80 from wahyd4/remove-knowledge-graph
K8s template
2026-04-14 14:35:22 +10:00
junv 6a82b59863 ci: skip workflow when only k8s/ files change to prevent commit loop 2026-04-14 14:33:39 +10:00
junv a04aa1b828 chore: add manifest template and update deploy step to commit rendered manifest 2026-04-14 14:32:30 +10:00
junvandGitHub ba7daaa879 Merge pull request #79 from wahyd4/remove-knowledge-graph
Remove knowledge graph feature
2026-04-14 12:05:46 +10:00
junv 049d417cc8 Remove knowledge graph feature
The knowledge graph feature (links graph) was not functioning correctly
and was slowing down the application. This commit removes it entirely:

- Delete knowledge_graph_urls.py, knowledge_graph_views.py, llm_client.py
- Delete knowledge_graph.html template
- Remove KnowledgeGraphSnapshot model and all llm_*/kg_* fields from
  SiteSettings (migration 0048)
- Remove build_knowledge_graph() and schedule_kg_build() from tasks.py
- Remove KG settings save logic and bulk delete action from views.py
- Remove knowledge_graph_urls include from links/urls.py
- Remove schedule_kg_build scheduler job from core/apps.py
- Remove KG snapshot job registry from links/apps.py
- Remove Knowledge Graph nav item from base.html
- Remove KG settings cards and llmSettingsHelper JS from settings.html
2026-04-14 12:04:44 +10:00
junv bf11b675e8 Update ui 2026-04-01 21:52:29 +11:00
junv 3e6d348554 Update ui 2026-04-01 21:52:26 +11:00
junv e89825a114 Add auto ban feature! 2026-04-01 21:33:07 +11:00
junv 0d489e658e Update mini app 2026-04-01 21:06:22 +11:00
junv 70fbb78a54 ui update 2026-04-01 20:27:01 +11:00
junv 57516a3c9c minor fix! 2026-04-01 20:20:25 +11:00
junv 5fee444db9 Update 2026-04-01 20:02:57 +11:00
junv 1d1fb2db55 Exclude ips 2026-04-01 19:56:46 +11:00
junv 99b35dc934 Update UI 2026-04-01 19:44:31 +11:00
junv 14ffb118c7 Update 2026-04-01 19:36:28 +11:00
junv 179702ac6d Fix nginx logs ingestion! 2026-04-01 19:26:47 +11:00
junv 26d3ac9607 Fix docker build 2026-04-01 18:58:00 +11:00
junv cc4e66b945 Add geo 2026-04-01 18:44:29 +11:00
junv ccee1f408e ignore db sqlite file 2026-04-01 15:57:02 +11:00
junv 0b564ec19c Update 2026-04-01 15:54:07 +11:00
junv 7eb002a437 Add nginx visualization 2026-04-01 15:51:20 +11:00
junv 9f9f96e86f Update graph ui 2026-03-30 21:38:18 +11:00
junv f5051ad1ea Update share post logic 2026-03-30 20:12:22 +11:00
junv bd37986b21 Update jobs 2026-03-30 19:51:12 +11:00
junv 029ed423c9 Add graph 2026-03-30 18:25:52 +11:00
junv 20c7857302 Add building graph 2026-03-30 18:06:46 +11:00
junv f222ee0fe9 Add toc 2026-03-30 17:26:32 +11:00
junv 3dcbf43749 fix image gallery 2026-03-29 20:43:57 +11:00
junvandGitHub 339186bf0c Merge pull request #70 from wahyd4/dependabot/npm_and_yarn/new_theme/static_src/picomatch-2.3.2
Bump picomatch from 2.3.1 to 2.3.2 in /new_theme/static_src
2026-03-29 11:16:34 +11:00
junvandGitHub 0ba70722ee Merge pull request #68 from wahyd4/dependabot/npm_and_yarn/new_theme/static_src/multi-8a3c414cba
Bump brace-expansion, sucrase and rimraf in /new_theme/static_src
2026-03-29 11:16:12 +11:00
junv c93b691c4d Fix error 2026-03-29 11:15:03 +11:00
junv 3a20fcb63a Optimize frontend 2026-03-29 11:10:37 +11:00
junv c26c620f78 Add redis caching 2026-03-29 10:23:46 +11:00
junvandGitHub 9f3fd66945 Merge pull request #71 from wahyd4/copilot/add-build-time-and-version-to-links-image
Add build time & version to Docker image footer
2026-03-27 12:17:27 +11:00
junvandGitHub 6d9d08d132 Update checkout action to version 6 2026-03-27 11:51:29 +11:00
junvandGitHub 22d33f4e93 Upgrade GitHub Actions to latest versions
Updated GitHub Actions to use newer versions of actions for checkout, setup-uv, login, metadata, and build-push.
2026-03-27 11:46:47 +11:00
junvandGitHub b5701290ed Merge pull request #67 from wahyd4/copilot/fix-test-errors-links-api
Fix alias validation rejecting valid slug characters (hyphens/underscores)
2026-03-27 11:37:12 +11:00
junvandGitHub f8234244aa Merge pull request #66 from wahyd4/copilot/update-template-url-logic
Allow static Unicode text alongside template parameters in template URLs
2026-03-27 11:20:19 +11:00
junvandGitHub e0b21178a8 Merge pull request #60 from wahyd4/dependabot/uv/black-26.3.1
Bump black from 25.1.0 to 26.3.1
2026-03-27 10:42:43 +11:00
junvandGitHub 77e5b95c3b Merge pull request #62 from wahyd4/dependabot/uv/requests-2.33.0
Bump requests from 2.32.4 to 2.33.0
2026-03-27 10:42:19 +11:00
junvandGitHub 9da1378e5a Merge pull request #58 from wahyd4/dependabot/uv/django-5.2.12
Bump django from 5.2.11 to 5.2.12
2026-03-27 10:42:02 +11:00
junvandGitHub 12153ce6e0 Merge pull request #59 from wahyd4/dependabot/uv/markdown-3.8.1
Bump markdown from 3.7 to 3.8.1
2026-03-27 10:41:51 +11:00
junvandGitHub 0eb4267b75 Merge pull request #63 from wahyd4/dependabot/npm_and_yarn/new_theme/static_src/yaml-2.8.3
Bump yaml from 2.5.1 to 2.8.3 in /new_theme/static_src
2026-03-27 10:41:28 +11:00
junvandGitHub 1e9ac0a7ed Merge pull request #64 from wahyd4/dependabot/npm_and_yarn/yaml-2.8.3
Bump yaml from 2.6.0 to 2.8.3
2026-03-27 10:41:09 +11:00
junv e0c1e75b45 Fix shareable link! 2026-03-22 16:34:34 +11:00
junv 7a7dedab88 Update 2026-03-22 16:29:38 +11:00
junv f4d36e6953 Add image imports 2026-03-22 16:15:53 +11:00
junvandCopilot f6f115690b Fix llms.txt/ai-plugin.json URL routing
- Move routes to top of urlpatterns (before catch-all alias resolver)
- Serve directly from committed static/ dir instead of staticfiles/ (STATIC_ROOT)
  so they work without collectstatic being run
- Eliminates APPEND_SLASH redirect to alias catch-all when file not in staticfiles/

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 15:29:52 +11:00
junvandCopilot 9d0f1fc87c Make API docs LLM-friendly
- Add operationId to all 20 API operations
- Add tag groups (Pages, Posts, Collections, Images, Files) with descriptions
- Enrich info.description with concept table, usage patterns, and examples
- Add /llms.txt (llmstxt.org standard) with plain-text API overview
- Add /.well-known/ai-plugin.json (OpenAI plugin manifest)
- Add URL routes for llms.txt and ai-plugin.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 15:23:51 +11:00
junvandCopilot 8cfe7fd775 Add random image API docs to OpenAPI spec
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 15:18:45 +11:00
junvandCopilot 64871ab7e0 Fix OpenAPI docs, add image import, file preview modal, keyboard nav
- Fix OpenAPI YAML: correct components/schemas indentation (was inside paths:)
- Downgrade openapi version 3.1.0 → 3.0.3 for ReDoc 2.5.2 compatibility
- Add /import/images/<path> endpoint with worker-mode background download
- Add source_url field to FileUpload model (migration 0044)
- Add file preview modal with image/video/audio/unsupported cases
- Add arrow key navigation + prev/next buttons + file counter in modal
- Add /import/images/{image_url} to OpenAPI spec with source_url field

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 15:11:44 +11:00