Commit Graph

132 Commits

Author SHA1 Message Date
tigattack
175042690e refactor(frontend): don't store permissions in localstorage 2025-09-27 02:26:21 +01:00
tigattack
102546e45d fix(frontend): eliminate duplicate API calls during log in/out 2025-09-27 01:50:03 +01:00
tigattack
751a202fec fix(frontend): actually fix login after signup 2025-09-27 01:49:53 +01:00
tigattack
c886b812d6 chore: clarify auto-update feature 2025-09-27 00:52:04 +01:00
tigattack
c4e056711b fix(frontend): use React Router navigation to open add host modal
Fixes page reload on add host button click.
2025-09-26 20:17:09 +01:00
tigattack
60fa598803 fix(frontend): solve missing imports 2025-09-26 20:17:09 +01:00
tigattack
5c66887732 refactor(frontend): optimise auth process
- Stops frontend trying to make calls that require auth before auth has occured
- Stops frontend making calls that aren't necessary before auth has occured
- Implements state machine to better handle auth phases
2025-09-26 20:17:09 +01:00
tigattack
e3aa28a8d9 fix: login after signup
Also resolves entire user object being return to client, including password_hash... ⚠️
2025-09-26 20:17:09 +01:00
tigattack
71d9884a86 fix(frontend): imports are unused 2025-09-26 20:16:41 +01:00
Muhammad Ibrahim
a76a722364 Fixed inline toggle changes when viewing the list of hosts in table 2025-09-26 09:09:02 +01:00
Muhammad Ibrahim
0c0446ad69 Added a few dashboard enhancements with Doughnut charts 2025-09-26 02:10:55 +01:00
Muhammad Ibrahim
dbebb866b9 Removed formreturn data to be outputted in console log when host is created 2025-09-26 01:09:08 +01:00
Muhammad Ibrahim
eb3f3599f9 Fixed group selection to be in effect when selecting the group upon host creation page 2025-09-26 01:06:56 +01:00
Muhammad Ibrahim
527b0ccc3c Fixed auto-update toggle to refresh upon save 2025-09-26 01:05:49 +01:00
Muhammad Ibrahim
641272dfb8 Put in more env variables and fallback to localhost if BACKEND_URL and BACKEND_PORT is not found
Fixed imports for react imports for useMemo, useEffect etc from hosts and HostDetail files
2025-09-26 00:53:44 +01:00
tigattack
35eb9303b1 style: fmt 2025-09-26 00:24:32 +01:00
tigattack
469107c149 fix: incorrect cardId 2025-09-26 00:24:32 +01:00
tigattack
03802daf13 fix(frontend): bad key 2025-09-26 00:24:32 +01:00
tigattack
17509cbf3c fix(frontend): fix missing icons 2025-09-26 00:24:32 +01:00
tigattack
ffbf5f12e5 fix(frontend): add missing import 2025-09-26 00:24:32 +01:00
tigattack
ea550259ff fix(frontend): unused imports 2025-09-25 23:54:24 +01:00
tigattack
047fdb4bd1 fix(frontend): unused parameters 2025-09-25 23:54:24 +01:00
tigattack
adc142fd85 fix(frontend): Missing radix parameter 2025-09-25 23:54:24 +01:00
tigattack
42f6971da7 fix(frontend): variable unused 2025-09-25 23:54:24 +01:00
tigattack
0414ea39d0 fix(frontend): Use Date.now() instead of new Date() 2025-09-25 23:54:24 +01:00
tigattack
6357839619 fix(frontend): Change to an optional chain 2025-09-25 23:54:24 +01:00
tigattack
c840a3fdcc fix(frontend): isNaN is unsafe 2025-09-25 23:54:24 +01:00
tigattack
a1bf2df59d fix(frontend): unused vars/params 2025-09-25 23:54:24 +01:00
tigattack
67a5462a25 fix(frontend): imports are unused 2025-09-25 23:54:24 +01:00
tigattack
a32007f56b fix(frontend): Static Elements should not be interactive 2025-09-25 23:54:24 +01:00
tigattack
6e1ec0d031 fix(frontend): elements with button role can be changed to button 2025-09-25 23:54:23 +01:00
tigattack
ce2ba0face fix(frontend): hook does not specify its dependency 2025-09-25 23:54:23 +01:00
tigattack
53f8471d75 fix(frontend): Avoid using the index of an array as key property in an element 2025-09-25 23:54:23 +01:00
tigattack
74f42b5bee fix(frontend): A form label must be associated with an input 2025-09-25 23:54:23 +01:00
tigattack
a84da7c731 fix(frontend): Static Elements should not be interactive 2025-09-25 23:54:23 +01:00
tigattack
83ce7c64fd style(frontend): fmt 2025-09-25 23:54:23 +01:00
tigattack
15902da87c fix(frontend): use useId() for input IDs 2025-09-25 23:54:23 +01:00
tigattack
a11f180d23 fix(frontend): add missing explicit types for button elems 2025-09-25 23:54:23 +01:00
tigattack
35bf858977 fix(frontend): use useId() for input IDs 2025-09-25 23:54:23 +01:00
tigattack
330f80478d chore: add biome 2025-09-25 23:54:23 +01:00
tigattack
b43b20fbe9 style(frontend): fmt 2025-09-25 23:14:35 +01:00
Muhammad Ibrahim
78f4eff375 fix: correct package versions and npm flags
Frontend package.json fixes:
- react-router-dom: ^6.31.0 → ^6.30.1 (6.31.0 doesn't exist)
- postcss: ^8.5.1 → ^8.5.6 (use latest stable version)

Setup script fixes:
- Replace deprecated --production flag with --omit=dev
- Resolves npm warning: 'npm WARN config production Use --omit=dev instead'

Fixes npm install errors:
- 'No matching version found for react-router-dom@^6.31.0'
- Deprecated npm configuration warnings
2025-09-24 20:07:36 +01:00
Muhammad Ibrahim
9f3016be57 deps: update all dependencies to latest non-deprecated versions
Frontend:
- ESLint: 8.53.0 → 9.17.0 (fixes deprecated warnings)
- React/React-DOM: 18.2.0 → 18.3.1
- Axios: 1.6.2 → 1.7.9
- Chart.js: 4.4.0 → 4.4.7
- Date-fns: 2.30.0 → 4.1.0 (major update)
- Express: 4.18.2 → 4.21.2
- HTTP-proxy-middleware: 2.0.6 → 3.0.3
- Lucide-react: 0.294.0 → 0.468.0
- React-router-dom: 6.20.1 → 6.31.0
- Add ESLint v9 flat config (eslint.config.js)
- Add required @eslint/js and globals dependencies

Backend:
- Prisma: 5.7.0 → 6.1.0
- Express: 4.18.2 → 4.21.2
- Dotenv: 16.3.1 → 16.4.7
- Express-rate-limit: 7.1.5 → 7.5.0
- Express-validator: 7.0.1 → 7.2.0
- Helmet: 7.1.0 → 8.0.0
- UUID: 9.0.1 → 11.0.3
- Winston: 3.11.0 → 3.17.0
- Nodemon: 3.0.2 → 3.1.9

Fixes npm warnings:
- rimraf < v4 deprecated
- inflight memory leaks
- glob < v9 deprecated
- @humanwhocodes packages deprecated
- ESLint v8 no longer supported
2025-09-24 19:50:50 +01:00
Muhammad Ibrahim
99aa79a6a4 Fixed authentication redirect upon signin using states
Finally fixed dashboard defaults for new user signups
2025-09-24 07:42:15 +01:00
Muhammad Ibrahim
3a0b564a6f Fixed permissions issues
Created default user role
modified server.js to check if roles of admin/user is present
modified server.js to check dashboard cards
set up default dashboard cards to show
2025-09-24 02:33:26 +01:00
tigattack
bf2ea908f4 refactor(docker): rework docker
- Move Docker files to own directory (tidier since I added several more files)
- Optimise images and reduce size
  - Uses multi-stage builds
  - Optimises layer efficiency
  - Uses NGINX as base for frontend
- Sets default env vars
- Uses tini for proper signal handling
2025-09-22 23:42:00 +01:00
tigattack
43ce146987 fix(frontend): fix login page icons 2025-09-22 23:42:00 +01:00
tigattack
69a121cdde fix(frontend): don't poll for updates when user not authorised 2025-09-22 23:42:00 +01:00
tigattack
5ca0f086d4 fix(frontend): don't force HTTPS port 2025-09-22 22:23:54 +01:00
tigattack
c3365fedb2 fix: conflate frontend_url and server_url 2025-09-22 22:23:54 +01:00