File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1326,6 +1326,7 @@ async def admin_ui(
13261326 gateways = [gateway .model_dump (by_alias = True ) for gateway in await gateway_service .list_gateways (db , include_inactive = include_inactive )]
13271327 roots = [root .model_dump (by_alias = True ) for root in await root_service .list_roots ()]
13281328 root_path = settings .app_root_path
1329+ max_name_length = settings .validation_max_name_length
13291330 response = request .app .state .templates .TemplateResponse (
13301331 request ,
13311332 "admin.html" ,
@@ -1339,6 +1340,7 @@ async def admin_ui(
13391340 "roots" : roots ,
13401341 "include_inactive" : include_inactive ,
13411342 "root_path" : root_path ,
1343+ "max_name_length" : max_name_length ,
13421344 "gateway_tool_name_separator" : settings .gateway_tool_name_separator ,
13431345 },
13441346 )
Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ function validateInputName(name, type = "input") {
6969 return { valid : false , error : `${ type } name cannot be empty` } ;
7070 }
7171
72- if ( cleaned . length > 100 ) {
72+ if ( cleaned . length > window . MAX_NAME_LENGTH ) {
7373 return {
7474 valid : false ,
75- error : `${ type } name must be 100 characters or less` ,
75+ error : `${ type } name must be ${ window . MAX_NAME_LENGTH } characters or less` ,
7676 } ;
7777 }
7878
Original file line number Diff line number Diff line change @@ -3308,6 +3308,7 @@ <h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">
33083308
33093309 window . ROOT_PATH = { { root_path | tojson } } ;
33103310 window . GATEWAY_TOOL_NAME_SEPARATOR = { { gateway_tool_name_separator | tojson } } ;
3311+ window . MAX_NAME_LENGTH = { { max_name_length | tojson } } ;
33113312 </ script >
33123313 </ body >
33133314</ html >
You can’t perform that action at this time.
0 commit comments