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(
1326
1326
gateways = [gateway .model_dump (by_alias = True ) for gateway in await gateway_service .list_gateways (db , include_inactive = include_inactive )]
1327
1327
roots = [root .model_dump (by_alias = True ) for root in await root_service .list_roots ()]
1328
1328
root_path = settings .app_root_path
1329
+ max_name_length = settings .validation_max_name_length
1329
1330
response = request .app .state .templates .TemplateResponse (
1330
1331
request ,
1331
1332
"admin.html" ,
@@ -1339,6 +1340,7 @@ async def admin_ui(
1339
1340
"roots" : roots ,
1340
1341
"include_inactive" : include_inactive ,
1341
1342
"root_path" : root_path ,
1343
+ "max_name_length" : max_name_length ,
1342
1344
"gateway_tool_name_separator" : settings .gateway_tool_name_separator ,
1343
1345
},
1344
1346
)
Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ function validateInputName(name, type = "input") {
69
69
return { valid : false , error : `${ type } name cannot be empty` } ;
70
70
}
71
71
72
- if ( cleaned . length > 100 ) {
72
+ if ( cleaned . length > window . MAX_NAME_LENGTH ) {
73
73
return {
74
74
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` ,
76
76
} ;
77
77
}
78
78
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">
3308
3308
3309
3309
window . ROOT_PATH = { { root_path | tojson } } ;
3310
3310
window . GATEWAY_TOOL_NAME_SEPARATOR = { { gateway_tool_name_separator | tojson } } ;
3311
+ window . MAX_NAME_LENGTH = { { max_name_length | tojson } } ;
3311
3312
</ script >
3312
3313
</ body >
3313
3314
</ html >
You can’t perform that action at this time.
0 commit comments