mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 05:20:43 +00:00
feat(service): add Elasticsearch password handling in extraFields method
- Implemented logic to retrieve and display the default user password for Elasticsearch in the extraFields method of the Service model. - Enhanced data collection for environment variables related to Elasticsearch, improving service configuration management.
This commit is contained in:
@@ -547,6 +547,21 @@ class Service extends BaseModel
|
||||
}
|
||||
$fields->put('Grafana', $data->toArray());
|
||||
break;
|
||||
case $image->contains('elasticsearch'):
|
||||
$data = collect([]);
|
||||
$elastic_password = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_ELASTICSEARCH')->first();
|
||||
if ($elastic_password) {
|
||||
$data = $data->merge([
|
||||
'Password (default user: elastic)' => [
|
||||
'key' => data_get($elastic_password, 'key'),
|
||||
'value' => data_get($elastic_password, 'value'),
|
||||
'rules' => 'required',
|
||||
'isPassword' => true,
|
||||
],
|
||||
]);
|
||||
}
|
||||
$fields->put('Elasticsearch', $data->toArray());
|
||||
break;
|
||||
case $image->contains('directus'):
|
||||
$data = collect([]);
|
||||
$admin_email = $this->environment_variables()->where('key', 'ADMIN_EMAIL')->first();
|
||||
|
||||
Reference in New Issue
Block a user