Merge pull request #9965 from Budibase/budi-6667-change-oracle-db-name-to-service-name

Change Database to Service Name in Oracle config
This commit is contained in:
Michael Drury 2023-03-10 16:38:06 +00:00 committed by GitHub
commit c553f053fe
2 changed files with 11 additions and 2 deletions

View File

@ -74,6 +74,14 @@
} }
return capitalise(name) return capitalise(name)
} }
function getDisplayError(error, configKey) {
return error?.replace(
new RegExp(`${configKey}`, "i"),
getDisplayName(configKey)
)
}
function getFieldGroupKeys(fieldGroup) { function getFieldGroupKeys(fieldGroup) {
return Object.entries(schema[fieldGroup].fields || {}) return Object.entries(schema[fieldGroup].fields || {})
.filter(el => filter(el)) .filter(el => filter(el))
@ -147,7 +155,7 @@
type={schema[configKey].type} type={schema[configKey].type}
on:change on:change
bind:value={config[configKey]} bind:value={config[configKey]}
error={$validation.errors[configKey]} error={getDisplayError($validation.errors[configKey], configKey)}
/> />
</div> </div>
{:else if schema[configKey].type === "fieldGroup"} {:else if schema[configKey].type === "fieldGroup"}
@ -180,7 +188,7 @@
type={configKey === "port" ? "string" : schema[configKey].type} type={configKey === "port" ? "string" : schema[configKey].type}
on:change on:change
bind:value={config[configKey]} bind:value={config[configKey]}
error={$validation.errors[configKey]} error={getDisplayError($validation.errors[configKey], configKey)}
environmentVariablesEnabled={$licensing.environmentVariablesEnabled} environmentVariablesEnabled={$licensing.environmentVariablesEnabled}
{handleUpgradePanel} {handleUpgradePanel}
/> />

View File

@ -67,6 +67,7 @@ const SCHEMA: Integration = {
database: { database: {
type: DatasourceFieldType.STRING, type: DatasourceFieldType.STRING,
required: true, required: true,
display: "Service Name",
}, },
user: { user: {
type: DatasourceFieldType.STRING, type: DatasourceFieldType.STRING,