Skip to content

Commit

Permalink
PS-658 attr batch edit (#445)
Browse files Browse the repository at this point in the history
* refactor attributes

* add attribute entity

* upgrade keycloak
  • Loading branch information
4rthem authored Jul 31, 2024
1 parent c0f884e commit e161403
Show file tree
Hide file tree
Showing 229 changed files with 8,920 additions and 2,610 deletions.
2 changes: 1 addition & 1 deletion bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ COMPOSE_PROFILES="${COMPOSE_PROFILES},setup" docker compose run --rm -T --entryp
"

docker compose restart keycloak
docker compose run --rm dockerize -wait http://keycloak:8080 -timeout 200s
docker compose run --rm dockerize -wait http://keycloak:9000/health/ready -timeout 200s

PRESETS=""
for p in $@; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ public function configure(OutputInterface $output, array $presets): void

$defaultAdmin = $this->keycloakManager->createUser([
'username' => getenv('DEFAULT_ADMIN_USERNAME'),
'email' => getenv('DEFAULT_ADMIN_USERNAME').'@'.getenv('PHRASEA_DOMAIN'),
'enabled' => true,
'firstName' => 'Admin',
'lastName' => 'Admin',
'credentials' => [[
'type' => 'password',
'value' => getenv('DEFAULT_ADMIN_PASSWORD'),
Expand Down
62 changes: 62 additions & 0 deletions databox/api/config/packages/fos_elastica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,68 @@ fos_elastica:
provider:
query_builder_method: getESQueryBuilder

attribute_entity:
settings:
index:
analysis:
analyzer:
text: *text_analyzer
filter:
worddelimiter: *worddelimiter_filter
use_alias: '%elastica.use_alias%'
index_name: "%es_index_prefix%attribute_entity_%kernel.environment%"
properties:
type:
type: keyword
value:
type: text
analyzer: text
fields:
suggest:
type: search_as_you_type
doc_values: false
max_shingle_size: 3
raw:
type: keyword
workspaceId:
type: keyword
persistence:
driver: orm
model: App\Entity\Core\AttributeEntity
listener: { enabled: false }
provider:
query_builder_method: getESQueryBuilder

tag:
settings:
index:
analysis:
analyzer:
text: *text_analyzer
filter:
worddelimiter: *worddelimiter_filter
use_alias: '%elastica.use_alias%'
index_name: "%es_index_prefix%tag_%kernel.environment%"
properties:
name:
type: text
analyzer: text
fields:
suggest:
type: search_as_you_type
doc_values: false
max_shingle_size: 3
raw:
type: keyword
workspaceId:
type: keyword
persistence:
driver: orm
model: App\Entity\Core\Tag
listener: { enabled: false }
provider:
query_builder_method: getESQueryBuilder

when@dev:
parameters:
elastica.use_alias: false
Expand Down
11 changes: 2 additions & 9 deletions databox/api/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ services:
ApiPlatform\State\ProviderInterface $collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
bool $useAlias: '%elastica.use_alias%'
string $kernelEnv: '%kernel.environment%'
Elastica\Index $assetIndex: '@fos_elastica.index.asset'
Elastica\Index $collectionIndex: '@fos_elastica.index.collection'

_instanceof:
Alchemy\Workflow\Executor\Action\ActionInterface:
Expand Down Expand Up @@ -78,12 +80,6 @@ services:
$configManager: '@fos_elastica.config_manager'
$mappingBuilder: '@fos_elastica.mapping_builder'

App\Elasticsearch\IndexCleaner:
arguments:
$client: '@fos_elastica.client'
$collectionIndex: '@fos_elastica.index.collection'
$assetIndex: '@fos_elastica.index.asset'

fos_elastica.elastica_to_model_transformer.prototype.orm:
class: App\Elasticsearch\Transformer\AppElasticaToModelTransformer
abstract: true
Expand All @@ -98,9 +94,6 @@ services:
class: App\Serializer\HydraMetaNormalizer
public: true

App\Repository\Cache\AttributeDefinitionRepositoryMemoryCachedDecorator:
decorates: 'App\Repository\Core\AttributeDefinitionRepository'

App\Api\Serializer\GroupNormalizerContextBuilder:
decorates: 'alchemy_webhook.normalizer.context_builder'
arguments: [ '@App\Api\Serializer\GroupNormalizerContextBuilder.inner' ]
Expand Down
Loading

0 comments on commit e161403

Please sign in to comment.