Commit graph

4,662 commits

Author SHA1 Message Date
igorrCarvalho
6671a6c369 Resolve merge conflict 2023-08-16 18:21:53 -03:00
anovazzi1
e33e236466 Merge branch 'login' into types_refactor 2023-08-16 18:19:36 -03:00
igorrCarvalho
1ad78dca1f Feat: add user on signUp button form 2023-08-16 18:14:49 -03:00
anovazzi1
545a099339 removed strict and implicity any from tsconfig 2023-08-16 18:13:53 -03:00
anovazzi1
c5850977a7 fix(utils.ts): add TemplateVariableType import to fix type error in checkBaseClass function
chore(tsconfig.json): set strict to false and noImplicitAny to true to relax strict type checking and enforce explicit typing
2023-08-16 18:00:37 -03:00
anovazzi1
57f580c93d refactor(utils.ts): simplify logic for getting chat input field
The logic for getting the chat input field has been simplified by removing unnecessary checks and using optional chaining. This improves readability and reduces the complexity of the code.
2023-08-16 17:52:08 -03:00
anovazzi1
af218867eb fix(formModal): fix nullish coalescing operator usage to handle nullable properties in tabsStateFlowId.formKeysData 2023-08-16 17:49:03 -03:00
anovazzi1
9b0ff166c9 fix(ApiModal): fix null assertion on tabs array
fix(ApiModal): fix strict mode in tsconfig.json to enable strict type checking
2023-08-16 17:45:12 -03:00
anovazzi1
826c62c6fc
update make file to prevent binding bug on make frontend (#694)
This pull request addresses a critical issue related to a binding bug
that has been affecting the make_frontend command. The existing Makefile
was susceptible to this bug, causing unexpected behaviors and
disruptions during the build process.
2023-08-16 17:40:35 -03:00
anovazzi1
aa44125953
v0.4.11 (#777)
**Bug Fix**:
This PR resolves a critical bug causing the deletion of custom component
edges during saves. The issue stemmed from miscommunication between edge
tracking and saving logic.

**Enhancement**:
Additionally, this PR enhances user experience by introducing a loading
screen during app startup. The loading screen offers visual feedback for
app initialization.
2023-08-16 17:32:38 -03:00
anovazzi1
16fa3a66b8 chore(Makefile): simplify install_frontend target by removing unnecessary conditional statement
feat(Makefile): add install_frontendc target to install frontend dependencies using npm ci for clean installs
feat(Makefile): add frontendc target to install frontend dependencies using npm ci and run frontend
chore(ApiModal/index.tsx): reformat codesArray for better readability
2023-08-16 17:28:35 -03:00
anovazzi1
9096fcd110 chore(Makefile): modify install_frontend target to conditionally run npm ci or npm install based on the value of the clean variable 2023-08-16 17:23:24 -03:00
gustavoschaedler
98a24d331c 🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key.py): remove unnecessary empty line
🔧 fix(api_key
2023-08-16 21:00:39 +01:00
Cristhian Zanforlin Lousa
37cdd41ec9 merge authentication 2023-08-16 16:39:51 -03:00
Cristhian Zanforlin Lousa
262ca85dbc merge conflicts 2023-08-16 16:38:48 -03:00
Cristhian Zanforlin Lousa
ba48bbe770 🐛 fix(App.tsx): remove unnecessary code block in useEffect
🔧 chore(constants.ts): add CONTROL_NEW_API_KEY constant for consistency
 feat(SecretKeyModal): add SecretKeyModal component to handle secret key generation and copying
🔧 chore(UserManagementModal): rearrange buttons in UserManagementModal for better user experience

🚀 feat(ApiKeysPage): add new page for managing API keys
🔧 chore(routes.tsx): add route for ApiKeysPage

🔧 chore(types): add ApiKeyType and ApiKeyInputType to improve type safety and readability of code
🔧 chore(utils): add Key icon from lucide-react to nodeIconsLucide to be used in styling
2023-08-16 16:38:13 -03:00
igorrCarvalho
a93f44d054 fix: login form submit when changing password visibility 2023-08-16 16:25:09 -03:00
gustavoschaedler
4eeb9449cb 🔧 fix(main.py): reformat import statements to improve readability and maintainability
 feat(main.py): add support for API key routes to enable API key management functionality
📝 docs(api_key.py): add API key routes for retrieving, creating, and deleting API keys
2023-08-16 20:20:18 +01:00
igorrCarvalho
5202e1348a feat[headerComponent]: Add api icon on header 2023-08-16 16:15:43 -03:00
anovazzi1
2be7a88687
Release conflicts (#778)
update poetry lock and fix some conflicts
2023-08-16 15:52:58 -03:00
anovazzi1
83ad6b6986 chore(pyproject.toml): update package version from 0.4.10 to 0.4.11 to reflect changes in the codebase 2023-08-16 15:47:20 -03:00
anovazzi1
9b1295942c Merge remote-tracking branch 'origin/main' into release 2023-08-16 15:44:26 -03:00
anovazzi1
5fde616f9b
Added spinning wheel when /all is loading (#757)
Added spinning wheel when all components are still loading.
2023-08-16 15:34:07 -03:00
anovazzi1
0b8d91f116 Merge branch 'release' into bug/loadingIndicator 2023-08-16 15:26:15 -03:00
igorrCarvalho
ed6ae4b380 Merge branch 'login-auth' of github.com:logspace-ai/langflow into login-auth 2023-08-16 15:24:01 -03:00
igorrCarvalho
634a5591cc feat: Add admin page button and refactor protected route /admin 2023-08-16 15:23:22 -03:00
anovazzi1
408ef81a5b chore(constants.ts): add missing newline at the end of the file
feat(tabsContext.tsx): add support for skipping node updates based on node type defined in the skipNodeUpdate constant to improve performance and prevent unnecessary updates
2023-08-16 15:02:57 -03:00
Cristhian Zanforlin Lousa
ca52a61012 Merge branch 'login-auth' of https://github.com/logspace-ai/langflow into login-auth 2023-08-16 08:38:56 -03:00
Cristhian Zanforlin Lousa
d320ddd30a 🐛 fix(App.tsx): add autoLogin function to handle automatic login on page refresh
🐛 fix(authLoginGuard/index.tsx): change condition to check autoLogin flag instead of LOCALHOST_JWT flag
🐛 fix(headerComponent/index.tsx): change condition to check autoLogin flag instead of LOCALHOST_JWT flag
🐛 fix(constants.ts): remove unused LOCALHOST_JWT variable
 feat(authContext.tsx): add autoLogin and setAutoLogin functions to AuthContext
🐛 fix(API/api.tsx): add auto_login endpoint to the list of excluded endpoints from Authorization header
 feat(API/index.ts): add autoLogin function to handle automatic login
🐛 fix(AdminPage/index.tsx): change handleDisableUser function parameter from user.is_superuser to user.is_active
🐛 fix(types/contexts/auth.ts): add autoLogin and setAutoLogin to AuthContextType
2023-08-16 08:38:49 -03:00
gustavoschaedler
91fcf33506 🐛 fix(auth.py): import get_session from correct module to fix import error
 feat(auth.py): add support for creating user API key and getting user ID from token
🐛 fix(base.py): fix typo in API_KEY_SECRET_KEY variable name
🐛 fix(base.py): fix typo in FIRST_SUPERUSER and FIRST_SUPERUSER_PASSWORD variable names
🐛 fix(base.py): fix indentation in load_settings_from_yaml function
2023-08-15 23:47:50 +01:00
anovazzi1
aae6223593 code format 2023-08-15 19:43:43 -03:00
anovazzi1
ec79cc43bd Merge remote-tracking branch 'origin/dev' into types_refactor 2023-08-15 19:34:53 -03:00
anovazzi1
85add46761 feat(AdminPage): add support for UserInputType in handleNewUser function to improve type safety and prevent potential errors
fix(UserInputType): make is_active and is_superuser optional in UserInputType to allow for flexibility in user input
2023-08-15 18:04:10 -03:00
gustavoschaedler
19c1eb6cf6 🐛 fix(auth.py): change create_user_longterm_token to use create_super_user to ensure super user exists before creating token
 feat(auth.py): add create_super_user function to create super user if it doesn't exist
🐛 fix(login.py): remove hardcoded user_id and use create_user_longterm_token without arguments
🐛 fix(users.py): remove redundant password hashing in add_super_user_for_testing_purposes_delete_me_before_merge_into_dev
🐛 fix(base.py): change AUTO_LOGIN default value to False and add FIRST_SUPERUSER and FIRST_SUPERUSER_PASSWORD settings
2023-08-15 17:58:04 -03:00
Cristhian Zanforlin Lousa
95f7a42569 formatting and merging 2023-08-15 17:07:10 -03:00
Cristhian Zanforlin Lousa
0383bc18ad 🐛 fix(App.tsx): import 'useNavigate' from 'react-router-dom' to fix compilation error
 feat(App.tsx): add support for process.env.PORT environment variable to be able to run app on a configurable port
🐛 fix(App.tsx): change 'port' variable case from lowercase to uppercase to improve semantics
🐛 fix(App.tsx): fix typo in import statement for 'getLoggedUser' function
🐛 fix(App.tsx): add missing import statement for 'LoginType' type
🐛 fix(App.tsx): add missing import statement for 'LOCALHOST_JWT' constant
🐛 fix(App.tsx): add missing import statement for 'onLogin' function
🐛 fix(App.tsx): add missing import statement for 'setUserData' function
🐛 fix(App.tsx): add missing import statement for 'setErrorData' function
🐛 fix(App.tsx): add missing import statement for 'getUser' function
 feat(App.tsx): add logic to automatically log in user on localhost with predefined credentials
🐛 fix(PaginatorComponent/index.tsx): calculate 'maxIndex' based on 'totalRowsCount' and 'pageSize' to fix pagination bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update 'currentPage' state when changing pages to fix display bug
🐛 fix(PaginatorComponent/index.tsx): update

🐛 fix(UserManagementModal): change is_disabled to is_active to improve semantics and consistency

🐛 fix(AdminPage/index.tsx): import cloneDeep from lodash to fix missing import error
 feat(AdminPage/index.tsx): add support for user management functionality, including disabling and editing user properties

🐛 fix(AdminPage/index.tsx): fix indentation and remove unnecessary code
 feat(AdminPage/index.tsx): add ConfirmationModal component for editing and disabling users
🔥 chore(AdminPage/index.tsx): remove unused code and fix formatting

🔨 refactor(UserManagement.tsx): refactor UserManagement component to improve readability and maintainability
🔥 chore(UserManagement.tsx): remove unused code and unnecessary closing div tag

🔧 fix(loginPage): add useEffect hook to import statement to fix missing dependency warning
🔄 refactor(api): rename is_disabled field to is_active in Users type for better semantics
🔄 refactor(components): rename is_disabled field to is_active in UserInputType for better semantics
🔄 refactor(utils): add UserCog2 icon import to nodeIconsLucide for future use
🔄 refactor(tailwind.config.js): add text-align-last-left and text-align-last-right utility classes for text alignment
2023-08-15 17:03:14 -03:00
gustavoschaedler
effbddbcb0 🐛 fix(base.py): set AUTO_LOGIN to True to enable automatic login as a super user
🔧 chore(base.py): improve readability by formatting logger.debug statements
2023-08-15 20:56:10 +01:00
Gabriel Luiz Freitas Almeida
5e715af875 🔧 fix(ApiModal/index.tsx): fix formatting of codesArray to improve readability
🔧 fix(formModal/index.tsx): fix formatting of getWebSocketUrl function to improve readability
🔧 fix(vite.config.ts): fix formatting of comment to improve readability
2023-08-15 16:46:53 -03:00
Gabriel Luiz Freitas Almeida
69d03f64b1 🔧 fix(base.py): remove redundant imports and nested class declaration
 feat(base.py): add validation logic to set the DATABASE_URL value based on environment variables and file paths
2023-08-15 16:37:21 -03:00
Gabriel Luiz Freitas Almeida
6e3a6ce8c3 🐛 fix(base.py): set CONFIG_DIR to default value if not provided to improve functionality
 feat(base.py): add support for setting CONFIG_DIR to a cache directory if not provided to improve file management
🐛 fix(base.py): set DATABASE_URL to default value if not provided to improve functionality
 feat(base.py): add support for setting DATABASE_URL to LANGFLOW_DATABASE_URL environment variable if not provided to improve configurability
🐛 fix(base.py): raise ValueError if CONFIG_DIR is not set when using sqlite database to improve error handling
 feat(base.py): add support for copying existing sqlite database to new location if CONFIG_DIR is set to improve migration process
2023-08-15 16:33:47 -03:00
gustavoschaedler
3cd8aff96e 🐛 fix(auth.py): change create_user_longterm_token to use create_super_user to ensure super user exists before creating token
 feat(auth.py): add create_super_user function to create super user if it doesn't exist
🐛 fix(login.py): remove hardcoded user_id and use create_user_longterm_token without arguments
🐛 fix(users.py): remove redundant password hashing in add_super_user_for_testing_purposes_delete_me_before_merge_into_dev
🐛 fix(base.py): change AUTO_LOGIN default value to False and add FIRST_SUPERUSER and FIRST_SUPERUSER_PASSWORD settings
2023-08-15 20:32:53 +01:00
anovazzi1
56f8aca796 format code 2023-08-15 16:16:40 -03:00
anovazzi1
42c0ef8569 Merge branch 'authentication' into login-auth 2023-08-15 16:13:25 -03:00
anovazzi1
8f82367300 refactor(modals/UserManagementModal): move import statement for InputComponent to the top for better organization and readability
refactor(pages/loginPage): remove unused import statement for IconComponent

refactor(pages/signUpPage): remove unused import statement for IconComponent

refactor(routes.tsx): remove unused import statement for SignUp page
2023-08-15 16:05:08 -03:00
anovazzi1
015064b453 Merge branch 'authentication' into login 2023-08-15 16:03:42 -03:00
anovazzi1
4a7ccda51c Merge branch 'login' of personal:logspace-ai/langflow into login 2023-08-15 16:01:08 -03:00
gustavoschaedler
695a337c6c 🔧 fix(auth.py): move SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, and REFRESH_TOKEN_EXPIRE_MINUTES to environment variables for better security and configurability
 feat(auth.py): add support for loading settings from environment variables in create_token and create_user_tokens functions
🔧 fix(auth.py): use settings_manager to access SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, and REFRESH_TOKEN_EXPIRE_MINUTES in create_token and create_user_tokens functions
🔧 fix(auth.py): use settings_manager to access SECRET_KEY and ALGORITHM in get_current_user function
 feat(auth.py): add create_user_longterm_token function to create long-term access token for auto login
 feat(login.py): add auto_login endpoint to automatically log in as a super user if AUTO_LOGIN is enabled in the settings
🔧 fix(settings/base.py): add SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, REFRESH_TOKEN_EXPIRE_MINUTES, and AUTO_LOGIN settings to the base settings class
 feat(settings/base.py): add AUTO_LOGIN setting to control whether auto login is enabled or not
🔧 fix(settings/base.py): use secrets.token_hex(32) to generate a random SECRET_KEY instead of hardcoding it
🔧 fix(settings/base.py): update comments and formatting in the base settings class
 feat(settings/base.py): add AUTO_LOGIN setting to control whether auto login is enabled or not
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings class
🔧 fix(settings/base.py): update comments and formatting in the base settings

🔥 refactor(settings.py): remove unused imports and code, clean up formatting and comments
🔀 chore(settings.py): merge duplicated code into reusable functions
📝 docs(settings.py): add missing docstrings and comments for better code documentation
🔧 chore(settings.py): update settings file to improve readability and maintainability
2023-08-15 20:00:02 +01:00
anovazzi1
a7ed611a15 Merge branch 'dev' into updateMakefile 2023-08-15 15:59:57 -03:00
anovazzi1
021380b6f3 format code 2023-08-15 15:40:50 -03:00
anovazzi1
b528ae86fd chore(Makefile): change npm install command to npm ci for frontend installation to ensure reproducible builds 2023-08-15 15:39:33 -03:00