changes based on suggestions

This commit is contained in:
tirongi
2023-11-21 21:45:51 +01:00
parent 681890a600
commit 88c9514cca
2 changed files with 5 additions and 6 deletions
@@ -12,10 +12,11 @@ class ElasticSearchUserPassword implements INodeCredential {
this.name = 'elasticSearchUserPassword'
this.version = 1.0
this.description =
'Refer to <a target="_blank" href="https://www.elastic.co/guide/en/kibana/current/tutorial-secure-access-to-kibana.html">official guide</a> on how to get User Password from ElasticSearch'
`Use Cloud ID field to enter your Elastic Cloud ID or the URL of the Elastic server instance.
Refer to <a target="_blank" href="https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-up-authentication.html">official guide</a> on how to get User Password from ElasticSearch.`
this.inputs = [
{
label: 'Cloud ID or custom server URL',
label: 'Cloud ID',
name: 'cloudId',
type: 'string'
},
@@ -145,8 +145,6 @@ export abstract class ElasticSearchBase {
let username = getCredentialParam('username', credentialData, nodeData)
let password = getCredentialParam('password', credentialData, nodeData)
if (cloudId.startsWith('http')) {
let username = getCredentialParam('username', credentialData, nodeData)
let password = getCredentialParam('password', credentialData, nodeData)
elasticSearchClientOptions = {
node: cloudId,
auth: {
@@ -157,7 +155,7 @@ export abstract class ElasticSearchBase {
rejectUnauthorized: false
}
}
} else{
} else {
elasticSearchClientOptions = {
cloud: {
id: cloudId
@@ -167,7 +165,7 @@ export abstract class ElasticSearchBase {
password: password
}
}
}
}
}
return elasticSearchClientOptions
}