Compare commits

..

13 Commits

Author SHA1 Message Date
pablonyx
730c0d12a8 k 2025-04-01 11:36:52 -07:00
pablonyx
1027fbe845 validation 2025-04-01 11:34:01 -07:00
pablonyx
3ec738caa5 update 2025-04-01 11:18:31 -07:00
pablonyx
4fbdbbbfa0 k 2025-04-01 10:59:12 -07:00
pablonyx
e655b4b248 fix build 2025-04-01 10:55:06 -07:00
pablonyx
7535280e6e stop using sharp 2025-04-01 10:51:54 -07:00
pablonyx
9aa4037434 nit 2025-04-01 10:35:04 -07:00
pablonyx
fe70cae942 k 2025-04-01 10:30:00 -07:00
pablonyx
e978e4e26f k 2025-04-01 10:18:11 -07:00
pablonyx
995d4feafd k 2025-04-01 10:16:05 -07:00
pablonyx
999af49687 k 2025-04-01 10:08:38 -07:00
pablonyx
6df124f593 k# Please enter the commit message for your changes. Lines starting 2025-04-01 10:04:08 -07:00
pablonyx
12f8627799 very minor standardization 2025-04-01 09:41:48 -07:00
2 changed files with 3 additions and 11 deletions

View File

@@ -302,17 +302,11 @@ export default function AddConnector({
...connector_specific_config
} = values;
// Apply special transforms according to application logic
// Apply transforms from connectors.ts configuration
const transformedConnectorSpecificConfig = Object.entries(
connector_specific_config
).reduce(
(acc, [key, value]) => {
// Filter out empty strings from arrays
if (Array.isArray(value)) {
value = (value as any[]).filter(
(item) => typeof item !== "string" || item.trim() !== ""
);
}
const matchingConfigValue = configuration.values.find(
(configValue) => configValue.name === key
);

View File

@@ -1333,10 +1333,10 @@ export function createConnectorValidationSchema(
): Yup.ObjectSchema<Record<string, any>> {
const configuration = connectorConfigs[connector];
const object = Yup.object().shape({
return Yup.object().shape({
access_type: Yup.string().required("Access Type is required"),
name: Yup.string().required("Connector Name is required"),
...[...configuration.values, ...configuration.advanced_values].reduce(
...configuration.values.reduce(
(acc, field) => {
let schema: any =
field.type === "select"
@@ -1363,8 +1363,6 @@ export function createConnectorValidationSchema(
pruneFreq: Yup.number().min(0, "Prune frequency must be non-negative"),
refreshFreq: Yup.number().min(0, "Refresh frequency must be non-negative"),
});
return object;
}
export const defaultPruneFreqDays = 30; // 30 days