From 5255e0622ef47c6e1f3a999ea837eadf82da69a1 Mon Sep 17 00:00:00 2001 From: GEgorov Date: Mon, 15 Dec 2025 16:20:39 +0300 Subject: [PATCH] modified: frontend/src/components/EndpointModal.tsx --- frontend/src/components/EndpointModal.tsx | 139 ++++++++++++---------- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/frontend/src/components/EndpointModal.tsx b/frontend/src/components/EndpointModal.tsx index 6ed723e..bdf93d7 100644 --- a/frontend/src/components/EndpointModal.tsx +++ b/frontend/src/components/EndpointModal.tsx @@ -464,14 +464,26 @@ export default function EndpointModal({ -
-
- +
+
setQueriesExpanded(!queriesExpanded)} + > +
+ {queriesExpanded ? : } + +
- {formData.script_queries.length > 0 ? ( -
- {formData.script_queries.map((query: any, idx: number) => ( -
-
-
-
- {query.name || 'Безымянный запрос'} - {query.database_id && ( - <> - - → {databases.find(db => db.id === query.database_id)?.name || 'БД не выбрана'} - - {databases.find(db => db.id === query.database_id)?.type === 'aql' && ( - AQL - )} - + {queriesExpanded && ( + formData.script_queries.length > 0 ? ( +
+ {formData.script_queries.map((query: any, idx: number) => ( +
+
+
+
+ {query.name || 'Безымянный запрос'} + {query.database_id && ( + <> + + → {databases.find(db => db.id === query.database_id)?.name || 'БД не выбрана'} + + {databases.find(db => db.id === query.database_id)?.type === 'aql' && ( + AQL + )} + + )} +
+ {query.sql && ( +
+ {query.sql.substring(0, 100)}{query.sql.length > 100 ? '...' : ''} +
+ )} + {query.aql_endpoint && ( +
+ {query.aql_method} {query.aql_endpoint} +
)}
- {query.sql && ( -
- {query.sql.substring(0, 100)}{query.sql.length > 100 ? '...' : ''} -
- )} - {query.aql_endpoint && ( -
- {query.aql_method} {query.aql_endpoint} -
- )} -
-
- - +
+ + +
-
- ))} -
- ) : ( -
-

Нет SQL запросов. Добавьте запросы для использования в скрипте.

-
+ ))} +
+ ) : ( +
+

Нет SQL запросов. Добавьте запросы для использования в скрипте.

+
+ ) )}