Commit graph

4,667 commits

Author SHA1 Message Date
anovazzi1
d73b3b0b52 fix(users.py): improve error message when trying to add a user with an already claimed username 2023-08-29 16:26:15 -03:00
Cristhian Zanforlin Lousa
27455cbd77 Merge branch 'login' of https://github.com/logspace-ai/langflow into login 2023-08-29 11:46:52 -03:00
Cristhian Zanforlin Lousa
3e55e5f394 🐛 fix(headerComponent): change Sign out button to anchor tag for better accessibility and consistency
 feat(headerComponent): add Home link when on admin page for easier navigation
 feat(headerComponent): add Admin page link for easier navigation to admin page
🐛 fix(ApiKeysPage): handle case when api_keys.name is null or undefined by displaying "-" instead
🐛 fix(ApiKeysPage): handle case when api_keys.last_used_at is an invalid date by displaying "Never" instead
 feat(ApiKeysPage): add Total Uses column to display the total number of uses for each API key
🐛 fix(loginPage): set isAdmin context variable based on user's is_superuser property
🐛 fix(loginPage): increase delay before fetching logged user to 500ms for better user experience
🐛 fix(types): add total_uses property to ApiKey type to match backend response
2023-08-29 11:46:48 -03:00
Gabriel Luiz Freitas Almeida
8c77613f72 🔀 refactor(utils.py): change return type annotation of authenticate_user function from Union[User, None] to Optional[User] for clarity and consistency 2023-08-29 10:45:10 -03:00
Gabriel Luiz Freitas Almeida
408caea750 🔒 chore(api.tsx): refactor request interceptor logic to improve readability and maintainability 2023-08-29 10:40:09 -03:00
igorrCarvalho
787c7844f5 Merge login into login 2023-08-28 20:44:05 -03:00
igorrCarvalho
5b75d44c3e Fix: remove admin page and signout on flow page 2023-08-28 20:41:54 -03:00
anovazzi1
166cd7e9f0 added flex to avoid scroll bug on admin page 2023-08-28 20:33:39 -03:00
anovazzi1
bf81507447 feat(AdminPage): add support for displaying user ID, creation date, and update date in the user table
fix(AdminPage): add type annotations to user variables in filter and map functions to improve type safety
2023-08-28 20:07:52 -03:00
igorrCarvalho
21ef1b43c7 fix: Remove redundant button on admin page header 2023-08-28 20:04:56 -03:00
igorrCarvalho
bb4ed111ef fix: Remove redundant button on admin page header 2023-08-28 19:58:25 -03:00
anovazzi1
d1ffe5ab11 fix glitch on apiKey page 2023-08-28 18:59:59 -03:00
Cristhian Zanforlin Lousa
6c03edc50a 🐛 fix(auth.py): set AUTO_LOGIN to False to disable automatic login as a super user
🐛 fix(API/index.ts): add null check for response object before checking status to prevent potential error
2023-08-28 18:22:59 -03:00
Gabriel Luiz Freitas Almeida
acd661f629 🔧 chore(__main__.py): remove unused imports and functions to improve code cleanliness and maintainability
🔧 chore(main.py): update import statement to use get_number_of_workers from __main__ module
🔧 chore(util.py): remove unused imports and functions to improve code cleanliness and maintainability
2023-08-28 18:09:26 -03:00
Gabriel Luiz Freitas Almeida
9804d58d32 🐛 fix(base.py): add *args and **kwargs to build method in Vertex class to allow for additional arguments to be passed
🐛 fix(types.py): add *args and **kwargs to build method in AgentVertex, LLMVertex, WrapperVertex, ChainVertex, and PromptVertex classes to allow for additional arguments to be passed
🐛 fix(utils.py): change return type annotation in api_key_security function from Optional[ApiKey] to Optional[User] to reflect the actual return type
2023-08-28 18:05:43 -03:00
Gabriel Luiz Freitas Almeida
23651e3a45 🔧 chore(Makefile): exclude .venv directory from mypy type checking to improve performance and avoid unnecessary errors 2023-08-28 18:05:29 -03:00
Cristhian Zanforlin Lousa
aba898adf7 Merge branch 'login' of https://github.com/logspace-ai/langflow into login 2023-08-28 17:56:56 -03:00
Gabriel Luiz Freitas Almeida
099921514c 🐛 fix(endpoints.py): add missing colon after if statement condition to fix syntax error
🔒 chore(endpoints.py): fix indentation and add missing colon after if statement condition for better code readability
2023-08-28 17:56:40 -03:00
Gabriel Luiz Freitas Almeida
1b79c1bd7e 🐛 fix(types.py): pass user_id parameter to build methods in AgentVertex, LLMVertex, WrapperVertex, ChainVertex, and PromptVertex to enable user-specific functionality 2023-08-28 17:56:39 -03:00
Gabriel Luiz Freitas Almeida
ac6d2ff8b4 🔥 refactor(service.py): remove unused import and commented code in AuthManager class 2023-08-28 17:56:38 -03:00
Gabriel Luiz Freitas Almeida
31abe8d67e 🐛 fix(utils.py): fix missing return statement in api_key_security function
🔀 refactor(utils.py): refactor create_super_user function to use Optional types for username and password parameters
2023-08-28 17:56:38 -03:00
Gabriel Luiz Freitas Almeida
d9deb6fd5f 🔧 chore(util.py): add type ignore comment to import statement for multiprocess module
🐛 fix(util.py): fix condition to check if "BaseModel" is in the string representation of _type to avoid skipping BaseModel types in format_dict function
2023-08-28 17:56:37 -03:00
Gabriel Luiz Freitas Almeida
2edffd33ee 🐛 fix(endpoints.py): add missing colon after if statement condition
🔒 chore(endpoints.py): rename api_key parameter to api_key_user for clarity and consistency
🔒 chore(endpoints.py): add type hint for api_key_user parameter to indicate it is of type User
🔒 chore(endpoints.py): remove unnecessary assignment of api_key_user from api_key.user
2023-08-28 17:56:36 -03:00
Cristhian Zanforlin Lousa
7dcb534eb3 Merge branch 'login' of https://github.com/logspace-ai/langflow into login 2023-08-28 17:56:28 -03:00
Cristhian Zanforlin Lousa
0a2ced4e60 🔧 fix(authContext.tsx): remove unused refreshAccessToken function to improve code readability and maintainability
🔧 fix(tabsContext.tsx): remove unnecessary console.error statements to improve code readability and maintainability
🔧 fix(genericModal/index.tsx): remove unnecessary console.log statement to improve code readability and maintainability
🔧 fix(ApiKeysPage/index.tsx): remove unnecessary console.log statement to improve code readability and maintainability
🔧 fix(auth.ts): remove unused refreshAccessToken function type to improve code readability and maintainability
2023-08-28 17:56:24 -03:00
Gabriel Luiz Freitas Almeida
c9fef26981
Merge branch 'dev' into login 2023-08-28 20:34:08 +00:00
igorrCarvalho
70a8b1f630 Fix: Admin Page button showing even when logged as normal user 2023-08-28 17:28:32 -03:00
igorrCarvalho
97aa1e1443 Fix: Remove processCode() for when popUp open and make it only happen when click Check and save 2023-08-28 17:15:58 -03:00
Gabriel Luiz Freitas Almeida
a154955154 🔧 fix(__main__.py): import display_results function from utils.util to fix NameError
 feat(__main__.py): add migration command to run database migrations with an option to run in test mode
🔧 fix(util.py): import console from __main__ module to fix NameError
 feat(util.py): add display_results function to display migration results in a table format
2023-08-28 16:22:56 -03:00
Gabriel Luiz Freitas Almeida
5f2a949ec5 🔧 fix(manager.py): import missing dependencies to resolve NameError and improve code readability
 feat(manager.py): add method run_migrations_test() to check if all models are in the database and up to date with all columns
 feat(manager.py): add method check_table() to check if a table exists and if all expected columns are present
🔧 fix(utils.py): import missing dependencies to resolve NameError and improve code readability
 feat(utils.py): add dataclasses Result and TableResults to store check results for tables and columns
2023-08-28 16:22:55 -03:00
Gabriel Luiz Freitas Almeida
bdd04004b3 🔀 chore(utils.py): add type hints to the get_db_manager() function for better code readability and maintainability 2023-08-28 16:22:54 -03:00
igorrCarvalho
2b88963e64 refactor: bring back border to the login related buttons 2023-08-28 16:20:19 -03:00
igorrCarvalho
8f90e61379 Refactor: update Last Used from invalid date to never 2023-08-28 16:07:57 -03:00
Gabriel Luiz Freitas Almeida
137954de6b 🐛 fix(__main__.py): rename serve command to run command for better semantics and clarity
🔧 chore(test_cli.py): update test to use the new run command instead of serve command
 feat(test_cli.py): add test for creating a superuser with the superuser command
2023-08-28 15:47:57 -03:00
Gabriel Luiz Freitas Almeida
ecf54acb7c 🔧 fix(adds_tables.py): set default values for 'total_uses' and 'is_active' columns to improve data consistency and simplify code 2023-08-28 15:30:42 -03:00
Gabriel Luiz Freitas Almeida
9604ace084 🔥 chore(adds_tables.py): remove 'flowstyle' table and related indices if it exists during upgrade to ensure data consistency
🔥 chore(adds_tables.py): remove 'flowstyle' table and related indices if it exists during downgrade to ensure data consistency
2023-08-28 14:45:30 -03:00
Gabriel Luiz Freitas Almeida
4320b127d3 🐛 fix(utils.py): handle exception when running migrations to ignore "already exists" error and prevent unnecessary error logging and raising of RuntimeError 2023-08-28 14:43:58 -03:00
igorrCarvalho
cb3fc079c6 refactor: Migrate api key messages to constants 2023-08-28 14:06:22 -03:00
Gabriel Luiz Freitas Almeida
58317a3891 🔧 chore(adds_tables.py): add comment explaining the reason for dropping '_alembic_tmp_flow' table before creating indices 2023-08-28 11:54:13 -03:00
Gabriel Luiz Freitas Almeida
49d6054517 🔧 fix(adds_tables.py): fix foreign key creation for 'flow' table when 'user' table exists
 feat(adds_tables.py): add support for creating 'user_id' column in 'flow' table if it does not exist
🔧 fix(adds_tables.py): fix index creation for 'flow' table when 'user_id' column exists
2023-08-28 11:53:24 -03:00
Gabriel Luiz Freitas Almeida
2a53ac2688 🐛 fix(util.py): handle IndentationError when parsing class source code and log an error message 2023-08-28 11:18:16 -03:00
Gabriel Luiz Freitas Almeida
4d08d511e9 🐛 fix(manager.py): fix typo in logger.warn to logger.warning
 feat(manager.py): add check_schema_health method to DatabaseManager to verify the integrity of the database schema
🐛 fix(utils.py): add error handling when checking schema health in initialize_database method
2023-08-28 11:18:01 -03:00
Gabriel Luiz Freitas Almeida
0aa8a25e3f 🔧 chore(util.py): remove unnecessary check for "BaseModel" in _type variable
The check for "BaseModel" in the _type variable is unnecessary and can be safely removed.
2023-08-28 11:17:44 -03:00
Gabriel Luiz Freitas Almeida
f922214d2a 🐛 fix(endpoints.py): add check for missing api_key and raise HTTPException with status code 401 and detail message "Invalid API Key"
🐛 fix(crud.py): remove unnecessary return statement and update_total_uses function call if api_key_object is None
2023-08-28 11:17:34 -03:00
Gabriel Luiz Freitas Almeida
2d22737c31 🐛 fix(adds_tables.py): create "user" and "apikey" tables only if they don't exist to prevent duplicate table creation
 feat(adds_tables.py): add unique index on "username" column in "user" table for faster username lookups
 feat(adds_tables.py): add unique index on "api_key" column in "apikey" table for faster API key lookups
 feat(adds_tables.py): add index on "name" column in "apikey" table for faster name lookups
 feat(adds_tables.py): add index on "user_id" column in "apikey" table for faster user ID lookups
2023-08-28 11:17:12 -03:00
Gabriel Luiz Freitas Almeida
cb6fafb723 🔖 chore(pyproject.toml): update langchain dependency version from 0.0.256 to 0.0.274
🔖 chore(pyproject.toml): update package version from 0.4.14 to 0.5.0a0
2023-08-28 11:16:46 -03:00
Gabriel Luiz Freitas Almeida
1c498e78df 🐛 fix(test_cli.py): update CLI command in test_components_path to use 'serve' subcommand for better clarity and consistency
🐛 fix(test_llms_template.py): update description of `model` to use backticks and remove unnecessary comment
2023-08-28 11:16:37 -03:00
Gabriel Luiz Freitas Almeida
59a08cd645 🔧 chore(crud.py): change return type of check_key function from bool to Optional[ApiKey] to provide more information about the API key
🔧 chore(crud.py): rename api_key variable to api_key_object in check_key function for better clarity
🔧 chore(crud.py): change return value of check_key function from True to api_key_object.user to provide the associated user with the API key
2023-08-28 07:01:01 -03:00
Gabriel Luiz Freitas Almeida
ed9796e473 🐛 fix(api_key.py): change variable name from 'e' to 'exc' for better readability and semantics
🐛 fix(endpoints.py): add 'api_key' parameter to 'process_flow' function to fix missing dependency error
🐛 fix(endpoints.py): add exception chaining to HTTPException in 'process_flow' function for better error handling
🐛 fix(utils.py): change return type of 'api_key_security' function to Optional[ApiKey] for better type hinting
🐛 fix(utils.py): change variable name from 'e' to 'exc' for better readability and semantics
2023-08-28 07:00:45 -03:00
Gabriel Luiz Freitas Almeida
4bc4a39e5e 🔒 chore(api_key.py): refactor mask_api_key validator to improve readability and maintainability
🔒 chore(api_key.py): update api_key field in ApiKeyRead model to remove index=True and unique=True constraints
2023-08-28 06:48:38 -03:00