Browse Source

Dropdown toggle.

pull/711/head
Sebastian Stehle 5 years ago
parent
commit
f5cd2d0421
  1. 2
      backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj
  2. 25
      backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs
  3. 5
      backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldDto.cs
  4. 2
      backend/src/Squidex/Squidex.csproj
  5. 8
      backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestContent.cs
  6. 2
      frontend/app/features/content/pages/content/content-history-page.component.html

2
backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj

@ -27,7 +27,7 @@
<PackageReference Include="Squidex.Assets" Version="1.4.0" />
<PackageReference Include="Squidex.Caching" Version="1.8.0" />
<PackageReference Include="Squidex.Hosting.Abstractions" Version="1.9.0" />
<PackageReference Include="Squidex.Log" Version="1.2.0" />
<PackageReference Include="Squidex.Log" Version="1.4.0" />
<PackageReference Include="Squidex.Text" Version="1.6.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />

25
backend/src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs

@ -28,9 +28,21 @@ namespace Squidex.Web.Pipeline
public async Task InvokeAsync(HttpContext context, ISemanticLog log)
{
var watch = ValueStopwatch.StartNew();
var shouldStartSession = requestLogOptions.LogRequests || Profiler.HasListener;
using (Profiler.StartSession())
if (requestLogOptions.LogRequests || shouldStartSession)
{
var session =
shouldStartSession ?
Profiler.StartSession() :
default;
var watch =
requestLogOptions.LogRequests ?
ValueStopwatch.StartNew() :
default;
using (session)
{
try
{
@ -38,10 +50,10 @@ namespace Squidex.Web.Pipeline
}
finally
{
var elapsedMs = watch.Stop();
if (requestLogOptions.LogRequests)
{
var elapsedMs = watch.Stop();
log.LogInformation((elapsedMs, context), (ctx, w) =>
{
if (requestLogOptions.LogProfiler)
@ -56,6 +68,11 @@ namespace Squidex.Web.Pipeline
}
}
}
else
{
await next(context);
}
}
private static void LogFilters(HttpContext httpContext, IObjectWriter c)
{

5
backend/src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldDto.cs

@ -130,14 +130,17 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models
AddPutLink("disable", resources.Url<SchemaFieldsController>(x => nameof(x.DisableField), values));
}
if (Properties is ArrayFieldPropertiesDto)
if (Nested != null)
{
var parentValues = new { values.app, values.schema, parentId = FieldId };
AddPostLink("fields/add", resources.Url<SchemaFieldsController>(x => nameof(x.PostNestedField), parentValues));
if (Nested.Count > 0)
{
AddPutLink("fields/order", resources.Url<SchemaFieldsController>(x => nameof(x.PutNestedFieldOrdering), parentValues));
}
}
if (!IsLocked)
{

2
backend/src/Squidex/Squidex.csproj

@ -66,7 +66,7 @@
<PackageReference Include="Squidex.Assets.Mongo" Version="1.4.0" />
<PackageReference Include="Squidex.Assets.S3" Version="1.4.0" />
<PackageReference Include="Squidex.Caching.Orleans" Version="1.8.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="6.19.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="7.3.0" />
<PackageReference Include="Squidex.Hosting" Version="1.9.0" />
<PackageReference Include="Squidex.OpenIddict.MongoDb" Version="4.0.1-dev" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />

8
backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/TestContent.cs

@ -326,14 +326,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL
}
}
},
["myGeolocation"] = new
{
iv = new
{
latitude = 10,
longitude = 20
}
},
["myTags"] = new
{
iv = new[]

2
frontend/app/features/content/pages/content/content-history-page.component.html

@ -29,7 +29,7 @@
<ng-template #newVersion>
<label>{{ 'contents.draftStatus' | sqxTranslate }}</label>
<button type="button" class="btn btn-outline-secondary btn-block btn-status dropdown-toggle" (click)="dropdownNew.toggle()" #buttonOptions>
<button type="button" class="btn btn-outline-secondary btn-block btn-status" (click)="dropdownNew.toggle()" #buttonOptions>
<sqx-content-status
layout="multiline"
[status]="content.newStatus!"

Loading…
Cancel
Save