diff --git a/src/Squidex.Infrastructure/CQRS/Events/EventReceiver.cs b/src/Squidex.Infrastructure/CQRS/Events/EventReceiver.cs index 7f5ef6686..855567b65 100644 --- a/src/Squidex.Infrastructure/CQRS/Events/EventReceiver.cs +++ b/src/Squidex.Infrastructure/CQRS/Events/EventReceiver.cs @@ -77,6 +77,8 @@ namespace Squidex.Infrastructure.CQRS.Events { DispatchConsumers(catchConsumers, @event); } + + logger.LogDebug("Event {0} handled", @event.Payload.GetType().Name); }); isSubscribed = true; diff --git a/src/Squidex.Read/Schemas/SchemaHistoryEventsCreator.cs b/src/Squidex.Read/Schemas/SchemaHistoryEventsCreator.cs index ee07a194d..f6caa3ac2 100644 --- a/src/Squidex.Read/Schemas/SchemaHistoryEventsCreator.cs +++ b/src/Squidex.Read/Schemas/SchemaHistoryEventsCreator.cs @@ -87,13 +87,22 @@ namespace Squidex.Read.Schemas var result = ForEvent(@event.Payload, channel).AddParameter("Name", schemaName); - var fieldEvent = @event.Payload as FieldEvent; + var fieldAdded = @event.Payload as FieldAdded; - if (fieldEvent != null) + if (fieldAdded != null) { - var fieldName = schemaEntity.Schema.Fields.GetOrDefault(fieldEvent.FieldId)?.Name; + result.AddParameter("Field", fieldAdded.Name); + } + else + { + var fieldEvent = @event.Payload as FieldEvent; + + if (fieldEvent != null) + { + var fieldName = schemaEntity.Schema.Fields.GetOrDefault(fieldEvent.FieldId)?.Name; - result.AddParameter("Field", fieldName); + result.AddParameter("Field", fieldName); + } } return result; diff --git a/src/Squidex/Config/Domain/EventBusModule.cs b/src/Squidex/Config/Domain/EventBusModule.cs index 9993c1e0c..d03c266af 100644 --- a/src/Squidex/Config/Domain/EventBusModule.cs +++ b/src/Squidex/Config/Domain/EventBusModule.cs @@ -27,9 +27,9 @@ namespace Squidex.Config.Domain protected override void Load(ContainerBuilder builder) { - var storeType = Configuration.GetValue("squidex:eventBus:type"); + var eventBusType = Configuration.GetValue("squidex:eventBus:type"); - if (string.IsNullOrWhiteSpace(storeType)) + if (string.IsNullOrWhiteSpace(eventBusType)) { throw new ConfigurationException("You must specify the event bus type in the 'squidex:eventBus:type' configuration section."); } @@ -41,14 +41,14 @@ namespace Squidex.Config.Domain .AsSelf() .SingleInstance(); - if (string.Equals(storeType, "Memory", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(eventBusType, "Memory", StringComparison.OrdinalIgnoreCase)) { builder.RegisterType() .As() .As() .SingleInstance(); } - if (string.Equals(storeType, "RabbitMq", StringComparison.OrdinalIgnoreCase)) + else if (string.Equals(eventBusType, "RabbitMq", StringComparison.OrdinalIgnoreCase)) { var connectionString = Configuration.GetValue("squidex:eventBus:rabbitMq:connectionString"); @@ -74,7 +74,7 @@ namespace Squidex.Config.Domain } else { - throw new ConfigurationException($"Unsupported store type '{storeType}' for key 'squidex:eventStore:type', supported: Memory, RabbmitMq."); + throw new ConfigurationException($"Unsupported store type '{eventBusType}' for key 'squidex:eventStore:type', supported: Memory, RabbmitMq."); } } } diff --git a/src/Squidex/Properties/launchSettings.json b/src/Squidex/Properties/launchSettings.json index 1aa5504bd..b1cd23a15 100644 --- a/src/Squidex/Properties/launchSettings.json +++ b/src/Squidex/Properties/launchSettings.json @@ -16,8 +16,10 @@ }, "Squidex": { "commandName": "Project", + "commandLineArgs": "replay", "launchUrl": "http://localhost:5000", "environmentVariables": { + "SQUIDEX__EVENTBUS__TYPE": "Memory", "ASPNETCORE_ENVIRONMENT": "Development" } } diff --git a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts index d8dd3ddce..08f895624 100644 --- a/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts +++ b/src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts @@ -65,7 +65,7 @@ export class SchemaPageComponent extends AppComponentBase implements OnInit { [ Validators.required, Validators.maxLength(40), - ValidatorsEx.pattern('[a-z0-9]+(\-[a-z0-9]+)*', 'Name can contain lower case letters (a-z), numbers and dashes (not at the end).') + ValidatorsEx.pattern('[a-z0-9]+(\-[a-z0-9]+)*', 'Name must be a valid javascript name in camel case.') ]] }); diff --git a/src/Squidex/app/framework/angular/control-errors.component.scss b/src/Squidex/app/framework/angular/control-errors.component.scss index d1951ab29..7308d860c 100644 --- a/src/Squidex/app/framework/angular/control-errors.component.scss +++ b/src/Squidex/app/framework/angular/control-errors.component.scss @@ -1,2 +1,8 @@ @import '_mixins'; -@import '_vars'; \ No newline at end of file +@import '_vars'; + +:host { + align-self: flex-start; + min-width: 100%; + max-width: 100%; +} \ No newline at end of file diff --git a/src/Squidex/app/theme/_bootstrap.scss b/src/Squidex/app/theme/_bootstrap.scss index 0e0d3da39..a6d9f71c1 100644 --- a/src/Squidex/app/theme/_bootstrap.scss +++ b/src/Squidex/app/theme/_bootstrap.scss @@ -110,10 +110,8 @@ body { } @mixin link-button($color) { - & { - color: $color; - cursor: pointer; - } + color: $color; + cursor: pointer; &:focus { outline-color: transparent; diff --git a/src/Squidex/app/theme/_panels.scss b/src/Squidex/app/theme/_panels.scss index fdba5d701..f2ef909e0 100644 --- a/src/Squidex/app/theme/_panels.scss +++ b/src/Squidex/app/theme/_panels.scss @@ -7,15 +7,13 @@ } @mixin panel-icon { - & { - color: $color-panel-icon; - font-size: 1.2rem; - font-weight: 400; - text-decoration: none; - text-align: center; - padding: .6rem; - cursor: pointer; - } + color: $color-panel-icon; + font-size: 1.2rem; + font-weight: 400; + text-decoration: none; + text-align: center; + padding: .6rem; + cursor: pointer; &:hover, &:focus { @@ -138,6 +136,8 @@ &-close { @include absolute($panel-padding - .3rem, $panel-padding - .8rem, auto, auto); @include panel-icon; + font-size: 1rem; + font-weight: 300; } }