mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
New Feature Pagination (#4704)
* common pagination component * Pagination for Doc Store Dashboard * Pagination for Executions Dashboard * Pagination Support for Tables * lint fixes * update view message dialog UI * initial loading was ignoring the pagination counts * 1) default page size change 2) ensure page limits are passed on load 3) co-pilot review comments (n+1 query) 4) * 1) default page size change 2) ensure page limits are passed on load 3) co-pilot review comments (n+1 query) 4) refresh lists after insert/delete. * Enhancement: Improve handling of empty responses in DocumentStore and API key services - Added check for empty entities in DocumentStoreDTO.fromEntities to return an empty array. - Updated condition in getAllDocumentStores to handle total count correctly, allowing for zero total. - Refined logic in getAllApiKeys to check for empty keys and ensure correct API key retrieval. - Adjusted UI components to safely handle potential undefined apiKeys array. * Refresh API key list on pagination change * Enhancement: Update pagination and filter handling across components - Increased default items per page in AgentExecutions from 10 to 12. - Improved JSON parsing for chat type and feedback type filters in ViewMessagesDialog. - Enhanced execution filtering logic in AgentExecutions to ensure proper pagination and state management. - Refactored filter section in AgentExecutions for better readability and functionality. - Updated refresh logic in Agentflows to use the correct agentflow version. * add workspaceId to removeAllChatMessages * Refactor chat message retrieval logic for improved efficiency and maintainability - Introduced a new `handleFeedbackQuery` function to streamline feedback-related queries. - Enhanced pagination handling for session-based queries in `getMessagesWithFeedback`. - Updated `ViewMessagesDialog` to sort messages in descending order by default. - Simplified image rendering logic in `DocumentStoreTable` for better readability. * - Update `validateChatflowAPIKey` and `validateAPIKey` functions to get the correct keys array - Enhanced error handling in the `sanitizeExecution` function to ensure safe access to nested properties * Refactor API key validation logic for improved accuracy and error handling - Consolidated API key validation in `validateAPIKey` to return detailed validation results. - Updated `validateFlowAPIKey` to streamline flow API key validation. - Introduced `getApiKeyById` function in the API key service for better key retrieval. - Removed unused function `getAllChatSessionsFromChatflow` from the chat message API. --------- Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllAPIKeys = () => client.get('/apikey')
|
||||
const getAllAPIKeys = (params) => client.get('/apikey', { params })
|
||||
|
||||
const createNewAPI = (body) => client.post(`/apikey`, body)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllChatflows = () => client.get('/chatflows?type=CHATFLOW')
|
||||
const getAllChatflows = (params) => client.get('/chatflows?type=CHATFLOW', { params })
|
||||
|
||||
const getAllAgentflows = (type) => client.get(`/chatflows?type=${type}`)
|
||||
const getAllAgentflows = (type, params) => client.get(`/chatflows?type=${type}`, { params })
|
||||
|
||||
const getSpecificChatflow = (id) => client.get(`/chatflows/${id}`)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllDatasets = () => client.get('/datasets')
|
||||
const getAllDatasets = (params) => client.get('/datasets', { params })
|
||||
|
||||
//dataset
|
||||
const getDataset = (id) => client.get(`/datasets/set/${id}`)
|
||||
const getDataset = (id, params) => client.get(`/datasets/set/${id}`, { params })
|
||||
const createDataset = (body) => client.post(`/datasets/set`, body)
|
||||
const updateDataset = (id, body) => client.put(`/datasets/set/${id}`, body)
|
||||
const deleteDataset = (id) => client.delete(`/datasets/set/${id}`)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllDocumentStores = () => client.get('/document-store/store')
|
||||
const getAllDocumentStores = (params) => client.get('/document-store/store', { params })
|
||||
const getDocumentLoaders = () => client.get('/document-store/components/loaders')
|
||||
const getSpecificDocumentStore = (id) => client.get(`/document-store/store/${id}`)
|
||||
const createDocumentStore = (body) => client.post(`/document-store/store`, body)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import client from './client'
|
||||
|
||||
//evaluation
|
||||
const getAllEvaluations = () => client.get('/evaluations')
|
||||
const getAllEvaluations = (params) => client.get('/evaluations', { params })
|
||||
const getIsOutdated = (id) => client.get(`/evaluations/is-outdated/${id}`)
|
||||
const getEvaluation = (id) => client.get(`/evaluations/${id}`)
|
||||
const createEvaluation = (body) => client.post(`/evaluations`, body)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllEvaluators = () => client.get('/evaluators')
|
||||
const getAllEvaluators = (params) => client.get('/evaluators', { params })
|
||||
|
||||
//evaluators
|
||||
const createEvaluator = (body) => client.post(`/evaluators`, body)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllTools = () => client.get('/tools')
|
||||
const getAllTools = (params) => client.get('/tools', { params })
|
||||
|
||||
const getSpecificTool = (id) => client.get(`/tools/${id}`)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import client from './client'
|
||||
|
||||
const getAllVariables = () => client.get('/variables')
|
||||
const getAllVariables = (params) => client.get('/variables', { params })
|
||||
|
||||
const createVariable = (body) => client.post(`/variables`, body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user