This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 412ad0d0 Prepare to work in Openshift for #885
412ad0d0 is described below
commit 412ad0d008caacffbe9017c26aa086d17f7907ff
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Sun Sep 17 14:44:32 2023 -0400
Prepare to work in Openshift for #885
---
.../src/main/webui/src/project/files/CreateFileModal.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/karavan-web/karavan-app/src/main/webui/src/project/files/CreateFileModal.tsx
b/karavan-web/karavan-app/src/main/webui/src/project/files/CreateFileModal.tsx
index 328657b6..4eda93a6 100644
---
a/karavan-web/karavan-app/src/main/webui/src/project/files/CreateFileModal.tsx
+++
b/karavan-web/karavan-app/src/main/webui/src/project/files/CreateFileModal.tsx
@@ -50,9 +50,13 @@ export function CreateFileModal (props: Props) {
}
}
+ function fileNameCheck (title: string) {
+ return title.replace(/[^0-9a-zA-Z.]+/gi, "-").toLowerCase();
+ }
+
const extension = ProjectFileTypes.filter(value => value.name ===
fileType)[0].extension;
const filename = (extension !== 'java')
- ? CamelUi.nameFromTitle(name)
+ ? fileNameCheck(name)
: CamelUi.javaNameFromTitle(name)
return (
<Modal