Skip to content

Commit

Permalink
Change host field in config
Browse files Browse the repository at this point in the history
  • Loading branch information
julescournut committed Aug 30, 2021
1 parent 47ab847 commit 34a381b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>0.0.10</version>
<version>0.0.11</version>
<authors>
<author>
<name>Vincent Lopes-Vicente</name>
Expand Down
11 changes: 1 addition & 10 deletions ElasticProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,8 @@ public function postActivation(ConnectionInterface $con = null)

public static function getElasticSearchClient()
{
$hosts = [
[
'host' => self::getConfigValue('host', 'localhost'),
'port' => self::getConfigValue('port', '9200'),
'user' => self::getConfigValue('username'),
'pass' => self::getConfigValue('password')
]
];

$client = ClientBuilder::create()
->setHosts($hosts)
->setHosts(self::getConfigValue('host', 'http://localhost:9200'))
->build();

return $client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
{/form_field}

{render_form_field form=$form field="host"}
{render_form_field form=$form field="port"}
{render_form_field form=$form field="username"}
{render_form_field form=$form field="password"}
{render_form_field form=$form field="index_prefix"}

<input class="btn btn-success btn-block" type="submit">
Expand Down

0 comments on commit 34a381b

Please sign in to comment.