feat(editor): Do not show error for remote options when credentials aren't specified (#10944)

This commit is contained in:
Eugene
2024-09-26 12:03:29 +02:00
committed by GitHub
parent 6322372610
commit 9fc3699beb
4 changed files with 76 additions and 0 deletions

View File

@@ -177,6 +177,15 @@ const displayValue = computed(() => {
if (!nodeType.value || nodeType.value?.codex?.categories?.includes(CORE_NODES_CATEGORY)) {
return i18n.baseText('parameterInput.loadOptionsError');
}
if (nodeType.value?.credentials && nodeType.value?.credentials?.length > 0) {
const credentialsType = nodeType.value?.credentials[0];
if (credentialsType.required && !node.value?.credentials) {
return i18n.baseText('parameterInput.loadOptionsCredentialsRequired');
}
}
return i18n.baseText('parameterInput.loadOptionsErrorService', {
interpolate: { service: nodeType.value.displayName },
});
@@ -1275,6 +1284,7 @@ onUpdated(async () => {
"
:title="displayTitle"
:placeholder="getPlaceholder()"
data-test-id="parameter-input-field"
@update:model-value="(valueChanged($event) as undefined) && onUpdateTextInput($event)"
@keydown.stop
@focus="setFocus"