Commit graph

3,997 commits

Author SHA1 Message Date
anovazzi1
04db803f34 format code 2023-08-10 10:41:06 -03:00
anovazzi1
f7fdc5d7bc feat(App.tsx): add support for displaying header component on all pages except login and signup pages to improve user experience 2023-08-10 10:33:01 -03:00
igorrCarvalho
33944e5baf refactor[loginPage]: Refactor login Page to use Form UI Radix Modal 2023-08-10 03:22:18 -03:00
igorrCarvalho
69ec2681bd refactor[signUpPage]: refactor sign up page to use radix ui form modal 2023-08-10 02:26:06 -03:00
Cristhian Zanforlin Lousa
9bccb95cd0 Merge branch 'login-admin' into login 2023-08-09 20:34:53 -03:00
Cristhian Zanforlin Lousa
5a690ecb6f 🔨 refactor(AdminPage/index.tsx): improve code formatting and structure for better readability and maintainability 2023-08-09 20:34:36 -03:00
igorrCarvalho
21f47e6c4d refactor: Remove unnecesary email field 2023-08-09 20:30:02 -03:00
igorrCarvalho
3348bfbcb6 merge login into login 2023-08-09 20:14:33 -03:00
igorrCarvalho
468f6ec573 feat: Add signUp page and Sign out button 2023-08-09 20:06:22 -03:00
Cristhian Zanforlin Lousa
075e9dc254 🐛 fix(AdminPage/index.tsx): adjust height of custom-scroll div to improve layout consistency 2023-08-09 20:05:31 -03:00
anovazzi1
5ae597497e
Add Admin Login Page with User Management (#737)
This pull request introduces a new admin login page to the application,
enhancing the user management experience by implementing a user table
with pagination. This will allow administrators to efficiently manage
users, edit passwords, delete accounts, and apply filters through a
user-friendly table interface.

/login/admin - Just click login
2023-08-09 19:46:41 -03:00
Cristhian Zanforlin Lousa
5009715835 🔧 fix(PaginatorComponent): remove unused imports and replace lucide-react icons with IconComponent for better modularity and reusability
 feat(PaginatorComponent): add support for custom icons using IconComponent for better customization options
🔧 fix(UserManagementModal): remove unused imports and fix import order for better organization
 feat(UserManagementModal): add password confirmation validation and reset form on modal open for better user experience
🔧 fix(UserManagementModal): fix modal size to be full height for better visibility and usability
 feat(UserManagementModal): add form fields for username and password with validation for better user input handling
🔧 fix(UserManagementModal): fix form field labels and error messages for better clarity and user guidance
 feat(UserManagementModal): add form submission and confirmation handling for better user interaction and data management
🔧 fix(UserManagementModal): fix cancel button styling for better consistency and user experience

🔧 fix(baseModal): add missing size options to the size prop to support additional modal sizes
 feat(baseModal): add support for "small-h-full" and "medium-h-full" sizes to allow modals with smaller height and full width
🔧 fix(AdminPage): import missing IconComponent and ShadTooltip components
 feat(AdminPage): add functionality to handle editing and adding new users
🔧 fix(applies.css): add missing semicolon to .field-invalid and .label-invalid classes
🔧 fix(styleUtils.ts): import missing Pencil, ChevronsRight, and ChevronsLeft icons
2023-08-09 19:33:46 -03:00
Cristhian Zanforlin Lousa
26345cc9a6 📦 chore(frontend): update package.json to add @radix-ui/react-form dependency
🔨 refactor(PaginatorComponent): remove unnecessary whitespace in paginate prop
📝 docs(ConfirmationModal): add missing JSDoc comments and improve code readability
📝 docs(UserManagementModal): add missing JSDoc comments and improve code readability
🔨 refactor(baseModal): improve code readability by adding a div wrapper for headerChild

 feat(AdminPage/index.tsx): add Pencil icon from lucide-react library to the import statement to use it in the component
 feat(AdminPage/index.tsx): add ConfirmationModal and UserManagementModal components to import statements to use them in the component
🐛 fix(AdminPage/index.tsx): remove unused handleSaveClick function
 feat(AdminPage/index.tsx): add modalEditOpen and modalDeleteOpen states to handle the opening and closing of the modals
 feat(AdminPage/index.tsx): add handleEditUser function to handle the edit user functionality
🐛 fix(AdminPage/index.tsx): remove unused handleSaveClick function
 feat(AdminPage/index.tsx): add ConfirmationModal component to handle the delete user functionality
 feat(AdminPage/index.tsx): add UserManagementModal component to handle the edit user functionality
 feat(components/index.ts): add ConfirmationModalType and UserManagementType types to handle the props of ConfirmationModal and UserManagementModal components
🐛 fix(components/index.ts): add missing newline at the end of the file
 feat(utils/styleUtils.ts): add UserMinus2 and UserPlus2 icons from lucide-react library to the import statement
2023-08-09 12:13:58 -03:00
Cristhian Zanforlin Lousa
a88bf657a7 📦 chore(authContext.tsx): add AuthContext component and its initial value to provide authentication-related data throughout the app
📦 chore(authContext.tsx): add login, logout, and refreshAccessToken functions to handle authentication logic
📦 chore(authContext.tsx): add userData state and setUserData function to store user data
📦 chore(baseModal/index.tsx): add "x-small" size option to BaseModal component to make it smaller
📦 chore(deleteAccountPage/index.tsx): create DeleteAccountPage component to handle account deletion logic
📦 chore(routes.tsx): add route for DeleteAccountPage component under /account/delete path
📦 chore(types/auth.ts): create AuthContextType and userData types to define the shape of authentication-related data
2023-08-08 20:15:37 -03:00
Cristhian Zanforlin Lousa
dd6d1e64f7 🔧 chore(frontend): add @radix-ui/react-select package to package.json dependencies
🔧 chore(frontend): add PaginatorComponent and Select component to the project

🔧 fix(api.tsx): comment out error retry logic to temporarily disable it

 feat(LoginPage): add login functionality for admin page

🆕 feat(AdminPage): add AdminPage component to display a list of users and provide filtering and pagination functionality
🐛 fix(AdminPage): fix handleInputChange function to update the password value correctly
🔨 refactor(AdminPage): refactor handleFilterUsers function to filter users based on user and email fields
🔥 chore(AdminPage): remove unused imports and console.log statements

 feat(routes.tsx): add routes for admin login and admin page to enable access to admin features
🔧 chore(components/index.ts): add PaginatorComponentType to define the type for a paginator component
2023-08-08 20:10:28 -03:00
anovazzi1
303f1862c5 chore(baseModal): add support for x-small size option to make the modal smaller in width and height
feat(deleteAccountPage): create a new page for deleting user account with a confirmation modal
feat(routes): add route for delete account page under /account/delete path
2023-08-08 10:57:44 -03:00
anovazzi1
d5a1fda457 created basic authentication contenxt 2023-08-07 12:12:08 -03:00
Cristhian Zanforlin Lousa
c1d1684c73 feat(routes.tsx): add new route for LoginPage component at /login path to enable user login functionality 2023-08-07 11:40:42 -03:00
anovazzi1
61d1e13644 feat(loginPage): add LoginPage component to handle user login functionality
The LoginPage component is added to handle the user login functionality. It includes UI elements such as buttons, icons, and input fields for email address and password. The component also includes a login button and a sign-up button for users who don't have an account.
2023-08-07 09:51:40 -03:00
Gabriel Luiz Freitas Almeida
9106b6d482 📦 chore(frontend): add .dockerignore file to exclude node_modules directory from Docker build context 2023-08-05 16:49:39 -03:00
Gabriel Luiz Freitas Almeida
4409e85ba5 Merge remote-tracking branch 'origin/main' into dev 2023-08-05 16:39:20 -03:00
Gabriel Luiz Freitas Almeida
e300a05d26 🐛 fix(dev.Dockerfile): update uvicorn command to use --factory flag and create_app function to improve modularity and maintainability
🐛 fix(docker-compose.debug.yml): update uvicorn command to use --factory flag and create_app function to match changes in dev.Dockerfile

🐛 fix(docker-compose.yml): update uvicorn command to use --factory flag and create_app function to match changes in dev.Dockerfile
2023-08-05 16:26:32 -03:00
Gabriel Luiz Freitas Almeida
ae6ee05f25 🔥 refactor(chat.py): remove unused code line that accessed vertex_type attribute of a vertex object 2023-08-04 17:11:56 -03:00
Gabriel Luiz Freitas Almeida
3583161064 🐛 fix(base.py): fix typo in "successfully" in the built object representation message
🐛 fix(custom_component.py): add support for custom representation of repr_value if it is a dictionary by using yaml.dump() function
2023-08-04 17:11:55 -03:00
Gabriel Luiz Freitas Almeida
16be5f573a 📝 docs(custom-component.mdx): update guidelines for loading custom components
🔧 fix(custom-component.mdx): correct the recommended way to load custom components by setting LANGFLOW_COMPONENTS_PATH environment variable instead of using --components-path argument

💡 docs(custom-component.mdx): provide an alternative method to specify the path to custom components using --components-path argument
2023-08-04 17:11:54 -03:00
Lucas Oliveira
a35445ec28 Fixed chat message size 2023-08-04 17:11:53 -03:00
Lucas Oliveira
6b844fca68 Fixed break words on all code 2023-08-04 17:11:52 -03:00
Gabriel Luiz Freitas Almeida
79d9d42e33 🐛 fix(types.py): fix syntax error in adding component to valid menu dictionary 2023-08-04 17:11:51 -03:00
Gabriel Luiz Freitas Almeida
3e8595cfc2 🔒 chore(poetry.lock): update cohere package version from 4.17.0 to 4.19.2
🔒 chore(poetry.lock): update debugpy package version from 1.6.8 to 1.6.7

🔀 chore: update dependencies

🔄 refactor: update debugpy package to version 1.6.7

🔒 chore(poetry.lock): update google-cloud-resource-manager to version 1.10.3
🔒 chore(poetry.lock): update jcloud to version 0.2.16
🔒 chore(poetry.lock): update more-itertools to version 10.1.0
2023-08-04 17:11:50 -03:00
Gabriel Luiz Freitas Almeida
a6dbc693cc 🐛 fix(chat.py): fix debug log message to include vertex type and output 2023-08-04 17:11:49 -03:00
Gabriel Luiz Freitas Almeida
a0585786d5 🐛 fix(custom_component.py): handle case when repr_value is a string in custom_repr method 2023-08-04 17:11:48 -03:00
Gabriel Luiz Freitas Almeida
7151d0f358 🐛 fix(types.py): fix syntax error in adding component_template to valid_menu
 feat(types.py): improve component name generation logic based on component_output_types and file name
2023-08-04 17:11:47 -03:00
Gabriel Luiz Freitas Almeida
092035f880 🔧 chore(loading.py): add debug log to show instantiation of node_type and base_type 2023-08-04 17:11:46 -03:00
Gabriel Luiz Freitas Almeida
e4e01b8853 🐛 fix(utils.py): simplify import_custom_component function by directly importing the CustomComponent class 2023-08-04 17:11:45 -03:00
Gabriel Luiz Freitas Almeida
967c91d19c 🔧 fix(directory_reader.py): fix typo in variable name 'filtered' to improve code readability 2023-08-04 17:11:44 -03:00
Gabriel Luiz Freitas Almeida
5608b197f2 🔧 chore(component.py): add missing import for 'Any' type in typing module to fix type hinting
🚀 feat(component.py): add 'build' method to Component class to enforce implementation in subclasses
2023-08-04 17:11:43 -03:00
Gabriel Luiz Freitas Almeida
e36b72ecb2 🔨 refactor(types.py): add logging statements for debugging purposes in build_langchain_template_custom_component function
🔨 refactor(types.py): add logging statements for debugging purposes in build_and_validate_all_files function
🔨 refactor(types.py): add logging statements for debugging purposes in build_valid_menu function
🔨 refactor(types.py): add logging statements for debugging purposes in build_invalid_menu function
2023-08-04 17:11:42 -03:00
Gabriel Luiz Freitas Almeida
afe4816df6 🔧 fix(endpoints.py): add logging statements to improve debugging and monitoring
🔧 fix(endpoints.py): add logging statements to improve debugging and monitoring in the get_all() function
2023-08-04 17:11:41 -03:00
Gabriel Luiz Freitas Almeida
a6c7e951ba 🐛 fix(settings.py): fix issue with extending components_path list with duplicate paths
 feat(settings.py): add logging of components_path and updated settings values for debugging purposes
2023-08-04 17:11:40 -03:00
Gabriel Luiz Freitas Almeida
65850b9920 🐛 fix(types.py): update error message to include the output types of the component that failed to load for better debugging 2023-08-04 17:11:39 -03:00
Gabriel Luiz Freitas Almeida
31dba43e73 🔧 fix(settings.py): convert BASE_COMPONENTS_PATH to string to ensure compatibility with other parts of the codebase
🔧 fix(settings.py): update COMPONENTS_PATH to accept a list of strings instead of a list of Paths to improve flexibility and compatibility
🔧 fix(settings.py): update set_components_path method to handle LANGFLOW_COMPONENTS_PATH as a list of paths or a single path string
2023-08-04 17:11:38 -03:00
Gabriel Luiz Freitas Almeida
bfe86b45fc feat(components): add new custom component and chains package
- Added a new file `__init__.py` in the `components` directory to import the `CustomComponent` class from `langflow.interface.custom.custom_component`.
- Created a new package `chains` in the `components` directory.
2023-08-04 17:11:37 -03:00
Gabriel Luiz Freitas Almeida
2c6b88f4f9 🔨 refactor(custom_component.py): read build method 2023-08-04 17:11:36 -03:00
Gabriel Luiz Freitas Almeida
15d0327f62 🔧 chore(constants.py): import BaseOutputParser from langchain.schema to use it in LANGCHAIN_BASE_TYPES 2023-08-04 17:11:35 -03:00
Gabriel Luiz Freitas Almeida
956ba45e9b 🔀 chore(utils.py): rename cache variable to CACHE for consistency with other settings
🔀 chore(utils.py): rename `LANGFLOW_LANGCHAIN_CACHE` environment variable to `CACHE` for clarity and consistency
2023-08-04 17:11:34 -03:00
Gabriel Luiz Freitas Almeida
3495375f50 🔧 chore(settings.py): update debug log messages for setting default components path 2023-08-04 17:11:33 -03:00
Gabriel Luiz Freitas Almeida
929d51ea61 🐛 fix(prompt_runner.py): fix issue with accessing result content when invoking chain with an empty dict input 2023-08-04 17:11:32 -03:00
Gabriel Luiz Freitas Almeida
c5b0f6a7f1 🔥 refactor(component.py): remove unused build method from Component class
🔥 refactor(custom_component.py): remove unused build method from CustomComponent class
2023-08-04 17:11:31 -03:00
Gabriel Luiz Freitas Almeida
997c8aba0a 📝 docs(README.md): update CLI options section to remove --database-url option
The `--database-url` option has been removed from the CLI options. Instead, a local SQLite database will be used if no database URL is provided. This change simplifies the configuration process and aligns with the default behavior.
2023-08-04 17:11:31 -03:00
Gabriel Luiz Freitas Almeida
75ee8f0e2d feat(prompt_runner.py): add PromptRunner component to run a Chain with a given PromptTemplate 2023-08-04 17:11:30 -03:00