Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Mair
0bace3f3af
Code structure refactor (#5582)
* moved docker files to /contrib/container

* changed code owners to make more precise

* updated CI to use new subdirs

* added manual trigger for testing

* moved ci files

* moved assets into subdir

* moved deploy template file to contrib

* moved django files to src/backend

* updated paths in scripts etc

* updated reqs path

* fixed version file path

* fixed flake8 path

* fixed path to node ressources

* fixed task paths

* added dep path for node

* removed unused yarn lockfile

* removed unused ci script

* updated internal backend paths for tasks

* updated translation stats path

* fixed source path for coverage

* fixed main commit repo path

* fit in changes from testing

* gather packager improvements (#149)

* Matmair/issue5578 (#143)

* moved docker files to /contrib/container

* changed code owners to make more precise

* updated CI to use new subdirs

* added manual trigger for testing

* moved ci files

* moved assets into subdir

* moved deploy template file to contrib

* moved django files to src/backend

* updated paths in scripts etc

* updated reqs path

* fixed version file path

* fixed flake8 path

* fixed path to node ressources

* fixed task paths

* added dep path for node

* removed unused yarn lockfile

* removed unused ci script

* updated internal backend paths for tasks

* updated translation stats path

* fixed source path for coverage

* fixed main commit repo path

* fix docker path

* use project dir

* move project dir command

* fixed docker paths

* another fix?

* seperate tasks out

* remove tasks

* some debugging

* ci: add .deepsource.toml

* Update .deepsource.toml

* also ignore migrations

* more debugging

* fix path issues

* remove debug script

* fix style

* change locale path

* Fixed paths for requirements

* Added dummy requirements to fool packager

* fixed exec path

* remove deepsource

---------

Co-authored-by: deepsource-io[bot] <42547082+deepsource-io[bot]@users.noreply.github.com>

* Added docs for file structure

* Fixed style errors

* updated deepsource paths

* fix deepsource paths

* fixed reqs

* merge fixes

* move newly added dirs too

* fix reqs files

* another dep fix

* merge upstream/master

* revert removal of tags

* merge upstream

* enabled detection of old config files

* adapt coverage src

* also detect and support old location for plugins.txt

* style fix

* fix ~/init.sh location

* fix requirements path

* fix config to current master

* move new folders

* fix import order

* fix paths for qc_check

* fix docs build

* fix fix path

* set docker project dir

* just use a cd

* set image path?

* set file correct

* fix copy path

* fix tasks dir

* fix init path

* fix copy path

* set prject dir

* fix paths

* remove old prod files

* fix dev env path

* set docker file

* Fix devcontainer docker compose file

* fix login attempt values

* fix init.sh path

* Fix pathing for Docker

* Docker build fix

- Set INVENTREE_BACKEND_DIR separately

* Update init.sh

* Fix path

* Update requirements.txt

* merge

* fix rq merge

* fix docker compose usage

---------

Co-authored-by: deepsource-io[bot] <42547082+deepsource-io[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-04-03 12:16:59 +11:00
Oliver
2e81a304d1
Devcontainer postgresql (#6590)
* Working on devcontainer with postgresql

* Fix for docker-compose.yml

* Update postCreateCommand

* Tweak docker compose file

* Fix Dockerfile

- Do not use uv (breaks process)

* Update postCreateCommand.sh

- Skip database backup

* Tweak file

* Further improvements

- Remove 'devcontainer' Dockerfile target
- Fix postCreateCommand

* Further cleanup

* Reduce SQL errors

- Use filter().exists() rather than get()

* Set default SITE_URL

* Docs updates

* Fix hard-coded django version

* Update faq.md

* Typo fix: PluginObject -> PluginConfig

* Docs: strict mode

* docs: fix link

* docs: fix typo

* Fix error message

* Revert change to config_template default
2024-02-28 15:04:14 +11:00
Oliver
f97cdef9fc
[PUI] Login / Logout State Fixes (#6368)
* Fix API endpoint URLs

* Adds "authenticated" field to root API endpoint

* Load global status data separately

- Create new global state manager
- Load *after* login
- Prevents auth popup dialog and failure messages

* Add launch config for frontend dev

* Update docs

* Clear token auth if no token is defined

* remove unneeded import

* Revert format of InfoView endpoint

* Remove "authenticated" from InfoView

* Refactor is_staff token check

- Using new get_token_from_request method

* Cleanup code

- return early

* URL fixes

- More fixes for incorrect api calls

* Better tracking of authenticated status

- track an internal flag in apiState

* Prioritize token auth

* Only fetch userState if authenticated

* Force unauthenticated state on first launch

* Updates to login procedure

- Rename doClassicLogin to doBasicLogin (reflecting "basic" auth)
- Add "loggedIn" attribute to sessionState
- Cleanup procedure for securing a token

* Abort early on checkLoginState

- Prevent failed calls to user_me

* Refactoring

- Simpler to just track token state
- No need for separate status tracker
- Works much cleaner this way

* Remove debug messages

* Cleanup unused imports

* Fix unused variable

* Revert timeout to 2000ms

* Rename doClassicLogout -> doLogout

* Improvements for checkLoginState

- Account for the presence of a CSRF session cookie
- If available, use it to fetch a token

* Clear CSRF cookie on logout

- Forces logout from session
- Tested, works well!
- Clean up notifications

* Cleanup setApiDefaults method

* fix global logout (PUI -> CUI)

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-02-02 12:02:55 +11:00
Oliver Lippert
7fa0c6d280
Add worker task to VS Code (#5605)
* add worker task to vscode

* add documentation for devcontainer backgorund workers

* fix misphrased sentence ("want need" -> "need")

---------

Co-authored-by: Oliver Lippert <oliver@lipperts-web.de>
2023-10-01 21:06:34 +11:00
Lukas
17057f4266
Docs/devcontainer (#4787)
* Added empty problemMatchers to prevent vscode from asking

* Added first draft for devcontainer docs

* Add 3rd space to tips

* Fix wording

* Add 4rd space to tips

* Refphased intro text

* Fixed spelling mistakes and added note

* Added dynamic variables for devcontainer

* Added missing containerWorkspaceFolder vars other devcontainer files

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>

* Added note for inventree core intelicense for plugin devs

* Added where is dev data stored question to faq

* Update docs/docs/start/devcontainer.md

* update toc

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2023-05-12 17:13:48 +10:00
luwol03
2d63122ebe
vscode devcontainer (#3474)
* Added devcontainer configuration files

* Added launch.json and improved devcontainer

* Added tasks.json

* fix: lint

* fix: lint

* Applied suggestions from codereview

* Added more system dependencies and preserve history

* devcontainer updates

- Add extra environment variables for InvenTree config
- Move venv into dev directory (cleaner structure)
- Ensure base package requirements get installed
- Handle write-permission error for compiling translations
- Install test data inside dev directory

* Auto create plugin dir and added gh cli

* Refactored postCreateCommand into own file

* Applied suggestions from codereview

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2022-08-09 16:06:32 +10:00