Browse Source

Prepare 7.2.0 (#940)

* Changelog.

* Update dependency.

* Update Newtonsoft
pull/942/head 7.2.0
Sebastian Stehle 4 years ago
committed by GitHub
parent
commit
196867d708
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 43
      CHANGELOG.md
  2. 1
      backend/i18n/frontend_en.json
  3. 1
      backend/i18n/frontend_it.json
  4. 1
      backend/i18n/frontend_nl.json
  5. 1
      backend/i18n/frontend_zh.json
  6. 1
      backend/i18n/source/frontend_en.json
  7. 5
      backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs
  8. 2
      backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/TemplateCommandMiddleware.cs
  9. 4
      backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj
  10. 15
      backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs
  11. 2
      backend/src/Squidex/Pipeline/Squid/SquidMiddleware.cs
  12. 9
      backend/src/Squidex/Squidex.csproj
  13. 203
      backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/HandleRules/RuleTypeProviderTests.cs
  14. 4
      backend/tools/TestSuite/TestSuite.Shared/TestSuite.Shared.csproj
  15. 6
      frontend/src/app/shared/components/assets/asset-dialog.component.html
  16. 8
      frontend/src/app/shared/components/assets/asset-dialog.component.scss

43
CHANGELOG.md

@ -4,6 +4,49 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [7.2.0] - 2022-11-11
### Fixed
* **Assets**: Configured timeout for queries was ignored.
* **Assets**: Several fixes for tags which was causing duplicate tag names when a tag was renamed.
* **Backups**: Fix timeout handling for backups to mark timed out backups as failed.
* **Contents**: Configured timeout for queries was ignored.
* **Contents**: Disable component fields when field is disabled.
* **Contents**: Disable drag and drop for array editors, when the array field is disabled.
* **Contents**: Fix generated OpenApi specs.
* **Contents**: Fix geo queries (latitude and longitude) was swapped.
* **Rules**: Fixes cache duration for rule handling.
* **Templates**: Updated the template system to create a new temporary folder for each operation to query the repository.
* **UI**: More help pages.
* **UI**: More history pages.
* **UI**: Several fixes to handle schema fields.
* **UI**: Use a fallback image, if the app image cannot be loaded.
### Changed
* **API**: Better status handling for exceptions.
* **API**: Move to file scoped namespaces.
* **Backups**: More logs for the backup.
* **Contents**: Mark content-version endpoint as obsolete.
* **Helm**: Document helm parameters.
* **Rules**: Dedicated Rule action for OpenSearch.
* **Rules**: More logs for rule enqueuer.
* **UI**: Updated Angular to 15.0
* **UI**: Updated Bootstrap.
### Added
* **Billing**: Introducing teams to manage subscriptions across teams.
* **Billing**: Several changes to introduce a referral program.
* **Contents**: Button to show or hide the input for custom ID.
* **Contents**: Column to show the translation status.
* **Contents**: Define a custom GraphQL schema for JSON fields.
* **Contents**: New endpoint to fetch a specific content by version.
* **Contents**: OpenAPI definitions for the bulkd endpoint.
* **OpenAPI**: Add more controllers to OpenAPI spec.
* **Users**: Added tests for user management.
## [7.1.0] - 2022-09-01
### Fixed

1
backend/i18n/frontend_en.json

@ -100,6 +100,7 @@
"assets.metadataAdd": "Add Metadata",
"assets.moveFailed": "Failed to move asset. Please reload.",
"assets.protected": "Protected",
"assets.protectedHint": "Assets are public by default. Everybody with the link can download the file. If you make an asset protected, only authenticated users (usually a client) can download the asset.",
"assets.refreshTooltip": "Refresh Assets",
"assets.reloaded": "Assets reloaded.",
"assets.removeConfirmText": "Do you really want to remove the asset?",

1
backend/i18n/frontend_it.json

@ -100,6 +100,7 @@
"assets.metadataAdd": "Aggiungi un metadato",
"assets.moveFailed": "Non è stato possibile spostare la risorsa. Per favore ricarica.",
"assets.protected": "Protetto",
"assets.protectedHint": "Assets are public by default. Everybody with the link can download the file. If you make an asset protected, only authenticated users (usually a client) can download the asset.",
"assets.refreshTooltip": "Aggiorna le risorse",
"assets.reloaded": "Risorse ricaricate.",
"assets.removeConfirmText": "Sei sicuro di voler cancellare la risorsa?",

1
backend/i18n/frontend_nl.json

@ -100,6 +100,7 @@
"assets.metadataAdd": "Metadata toevoegen",
"assets.moveFailed": "Verplaatsen van item is mislukt. Laad opnieuw.",
"assets.protected": "Beschermd",
"assets.protectedHint": "Assets are public by default. Everybody with the link can download the file. If you make an asset protected, only authenticated users (usually a client) can download the asset.",
"assets.refreshTooltip": "Bestanden vernieuwen",
"assets.reloaded": "Bestanden herladen.",
"assets.removeConfirmText": "Wil je het bestand echt verwijderen?",

1
backend/i18n/frontend_zh.json

@ -100,6 +100,7 @@
"assets.metadataAdd": "添加元数据",
"assets.moveFailed": "资源移动失败。请重新加载。",
"assets.protected": "受保护",
"assets.protectedHint": "Assets are public by default. Everybody with the link can download the file. If you make an asset protected, only authenticated users (usually a client) can download the asset.",
"assets.refreshTooltip": "刷新资源",
"assets.reloaded": "资源重新加载。",
"assets.removeConfirmText": "你真的要移除资源吗?",

1
backend/i18n/source/frontend_en.json

@ -100,6 +100,7 @@
"assets.metadataAdd": "Add Metadata",
"assets.moveFailed": "Failed to move asset. Please reload.",
"assets.protected": "Protected",
"assets.protectedHint": "Assets are public by default. Everybody with the link can download the file. If you make an asset protected, only authenticated users (usually a client) can download the asset.",
"assets.refreshTooltip": "Refresh Assets",
"assets.reloaded": "Assets reloaded.",
"assets.removeConfirmText": "Do you really want to remove the asset?",

5
backend/src/Squidex.Domain.Apps.Entities/Apps/DefaultAppLogStore.cs

@ -33,8 +33,7 @@ public sealed class DefaultAppLogStore : IAppLogStore, IDeleter
private static readonly CsvConfiguration CsvConfiguration = new CsvConfiguration(CultureInfo.InvariantCulture)
{
DetectDelimiter = false,
Delimiter = "|",
LeaveOpen = true
Delimiter = "|"
};
private readonly IRequestLogStore requestLogStore;
@ -88,7 +87,7 @@ public sealed class DefaultAppLogStore : IAppLogStore, IDeleter
var writer = new StreamWriter(stream, Encoding.UTF8, 4096, true);
try
{
await using (var csv = new CsvWriter(writer, CsvConfiguration))
await using (var csv = new CsvWriter(writer, CsvConfiguration, true))
{
csv.WriteField(FieldTimestamp);
csv.WriteField(FieldRequestPath);

2
backend/src/Squidex.Domain.Apps.Entities/Apps/Templates/TemplateCommandMiddleware.cs

@ -105,7 +105,7 @@ public sealed class TemplateCommandMiddleware : ICommandMiddleware
private static async Task<ISyncService> CreateSyncServiceAsync(string repository, ISession session)
{
var fs = await FileSystems.CreateAsync(repository, session.WorkingDirectory);
var fs = await FileSystems.CreateAsync(repository);
return new SyncService(fs, session);
}

4
backend/src/Squidex.Domain.Apps.Entities/Squidex.Domain.Apps.Entities.csproj

@ -19,7 +19,7 @@
<ProjectReference Include="..\Squidex.Shared\Squidex.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CsvHelper" Version="27.2.1" />
<PackageReference Include="CsvHelper" Version="30.0.0" />
<PackageReference Include="GraphQL" Version="7.1.1" />
<PackageReference Include="GraphQL.DataLoader" Version="7.1.1" />
<PackageReference Include="Meziantou.Analyzer" Version="1.0.702">
@ -29,7 +29,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
<PackageReference Include="Notifo.SDK" Version="1.2.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Squidex.CLI.Core" Version="8.21.0" />
<PackageReference Include="Squidex.CLI.Core" Version="9.2.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />

15
backend/src/Squidex/Areas/Api/Config/OpenApi/OpenApiServices.cs

@ -15,6 +15,7 @@ using NSwag.Generation.Processors;
using Squidex.Areas.Api.Controllers.Rules.Models;
using Squidex.Domain.Apps.Core.Assets;
using Squidex.Domain.Apps.Core.Contents;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure;
using Squidex.Infrastructure.Json.Objects;
using Squidex.Infrastructure.Queries;
@ -115,10 +116,20 @@ public static class OpenApiServices
CreateAnyMap<JsonDocument>(),
CreateAnyMap<JsonValue>(),
CreateAnyMap<FilterNode<JsonValue>>()
CreateAnyMap<FilterNode<JsonValue>>(),
new PrimitiveTypeMapper(typeof(FieldNames), schema =>
{
schema.Type = JsonObjectType.Array;
schema.Item = new JsonSchema
{
Type = JsonObjectType.String
};
}),
};
settings.SchemaType = SchemaType.OpenApi3;
settings.SchemaType = NJsonSchema.SchemaType.OpenApi3;
settings.FlattenInheritanceHierarchy = flatten;
}

2
backend/src/Squidex/Pipeline/Squid/SquidMiddleware.cs

@ -5,8 +5,8 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.Infrastructure;
using System.Text;
using Squidex.Infrastructure;
namespace Squidex.Pipeline.Squid;

9
backend/src/Squidex/Squidex.csproj

@ -56,12 +56,10 @@
<PackageReference Include="Microsoft.OData.Core" Version="7.11.0" />
<PackageReference Include="MongoDB.Driver" Version="2.17.1" />
<PackageReference Include="MongoDB.Driver.Core.Extensions.OpenTelemetry" Version="1.0.0" />
<PackageReference Include="Namotion.Reflection" Version="2.1.1" ExcludeAssets="all" />
<PackageReference Include="NetTopologySuite.IO.GeoJSON4STJ" Version="2.1.1" />
<PackageReference Include="NJsonSchema" Version="10.7.2" />
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.0.0" />
<PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.0.0" />
<PackageReference Include="NSwag.AspNetCore" Version="13.16.1" />
<PackageReference Include="NSwag.AspNetCore" Version="13.17.0" />
<PackageReference Include="OpenCover" Version="4.7.1221" PrivateAssets="all" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc7" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc7" />
@ -76,11 +74,10 @@
<PackageReference Include="Squidex.Assets.S3" Version="4.13.0" />
<PackageReference Include="Squidex.Assets.TusAdapter" Version="4.13.0" />
<PackageReference Include="Squidex.Caching.Orleans" Version="1.9.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="10.2.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="12.2.0" />
<PackageReference Include="Squidex.Hosting" Version="4.13.0" />
<PackageReference Include="Squidex.Messaging.All" Version="4.13.0" />
<PackageReference Include="Squidex.Messaging.Subscriptions" Version="4.13.0" />
<PackageReference Include="Squidex.Namotion.Reflection" Version="2.0.10" />
<PackageReference Include="Squidex.OpenIddict.MongoDb" Version="4.0.1-dev" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="System.Linq" Version="4.3.0" />

203
backend/tests/Squidex.Domain.Apps.Core.Tests/Operations/HandleRules/RuleTypeProviderTests.cs

@ -0,0 +1,203 @@
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System.ComponentModel.DataAnnotations;
using FluentAssertions;
using Squidex.Domain.Apps.Core.HandleRules;
using Squidex.Domain.Apps.Core.Rules;
using Squidex.Infrastructure.Validation;
using Xunit;
namespace Squidex.Domain.Apps.Core.Operations.HandleRules;
public class RuleTypeProviderTests
{
private readonly RuleTypeProvider sut = new RuleTypeProvider();
private abstract class MyRuleActionHandler : RuleActionHandler<MyRuleAction, string>
{
protected MyRuleActionHandler(RuleEventFormatter formatter)
: base(formatter)
{
}
}
public enum ActionEnum
{
Yes,
No
}
[RuleAction(
Title = "Action",
IconImage = "<svg></svg>",
IconColor = "#1e5470",
Display = "Action display",
Description = "Action description.",
ReadMore = "https://www.readmore.com/")]
public sealed record MyRuleAction : RuleAction
{
[LocalizedRequired]
[Display(Name = "Url Name", Description = "Url Description")]
[Editor(RuleFieldEditor.Url)]
[Formattable]
public Uri Url { get; set; }
[Editor(RuleFieldEditor.Javascript)]
public string Script { get; set; }
[Editor(RuleFieldEditor.Text)]
public string Text { get; set; }
[Editor(RuleFieldEditor.TextArea)]
public string TextMultiline { get; set; }
[Editor(RuleFieldEditor.Password)]
public string Password { get; set; }
[Editor(RuleFieldEditor.Text)]
public ActionEnum Enum { get; set; }
[Editor(RuleFieldEditor.Text)]
public ActionEnum? EnumOptional { get; set; }
[Editor(RuleFieldEditor.Text)]
public bool Boolean { get; set; }
[Editor(RuleFieldEditor.Text)]
public bool? BooleanOptional { get; set; }
[Editor(RuleFieldEditor.Text)]
public int Number { get; set; }
[Editor(RuleFieldEditor.Text)]
public int? NumberOptional { get; set; }
}
[Fact]
public void Should_create_definition()
{
var expected = new RuleActionDefinition
{
Type = typeof(MyRuleAction),
Title = "Action",
IconImage = "<svg></svg>",
IconColor = "#1e5470",
Display = "Action display",
Description = "Action description.",
ReadMore = "https://www.readmore.com/"
};
expected.Properties.Add(new RuleActionProperty
{
Name = "url",
Display = "Url Name",
Description = "Url Description",
Editor = RuleFieldEditor.Url,
IsFormattable = true,
IsRequired = true
});
expected.Properties.Add(new RuleActionProperty
{
Name = "script",
Display = "Script",
Description = null,
Editor = RuleFieldEditor.Javascript,
IsRequired = false
});
expected.Properties.Add(new RuleActionProperty
{
Name = "text",
Display = "Text",
Description = null,
Editor = RuleFieldEditor.Text,
IsRequired = false
});
expected.Properties.Add(new RuleActionProperty
{
Name = "textMultiline",
Display = "TextMultiline",
Description = null,
Editor = RuleFieldEditor.TextArea,
IsRequired = false
});
expected.Properties.Add(new RuleActionProperty
{
Name = "password",
Display = "Password",
Description = null,
Editor = RuleFieldEditor.Password,
IsRequired = false
});
expected.Properties.Add(new RuleActionProperty
{
Name = "enum",
Display = "Enum",
Description = null,
Editor = RuleFieldEditor.Dropdown,
IsRequired = false,
Options = new[] { "Yes", "No" }
});
expected.Properties.Add(new RuleActionProperty
{
Name = "enumOptional",
Display = "EnumOptional",
Description = null,
Editor = RuleFieldEditor.Dropdown,
IsRequired = false,
Options = new[] { "Yes", "No" }
});
expected.Properties.Add(new RuleActionProperty
{
Name = "boolean",
Display = "Boolean",
Description = null,
Editor = RuleFieldEditor.Checkbox,
IsRequired = false
});
expected.Properties.Add(new RuleActionProperty
{
Name = "booleanOptional",
Display = "BooleanOptional",
Description = null,
Editor = RuleFieldEditor.Checkbox,
IsRequired = false
});
expected.Properties.Add(new RuleActionProperty
{
Name = "number",
Display = "Number",
Description = null,
Editor = RuleFieldEditor.Number,
IsRequired = true
});
expected.Properties.Add(new RuleActionProperty
{
Name = "numberOptional",
Display = "NumberOptional",
Description = null,
Editor = RuleFieldEditor.Number,
IsRequired = false
});
sut.Add<MyRuleAction>();
var currentDefinition = sut.Actions.Values.First();
currentDefinition.Should().BeEquivalentTo(expected);
}
}

4
backend/tools/TestSuite/TestSuite.Shared/TestSuite.Shared.csproj

@ -16,8 +16,8 @@
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Squidex.ClientLibrary" Version="11.1.0" />
<PackageReference Include="Squidex.ClientLibrary.ServiceExtensions" Version="11.1.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="12.1.0" />
<PackageReference Include="Squidex.ClientLibrary.ServiceExtensions" Version="12.1.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="Verify" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.1" />

6
frontend/src/app/shared/components/assets/asset-dialog.component.html

@ -136,7 +136,7 @@
<div class="form-group">
<label>{{ 'assets.metadata' | sqxTranslate }}</label>
<div class="form-group row g-0" *ngFor="let form of annotateForm.metadataControls; let i = index" [formGroup]="form">
<div class="metadata-row row g-0" *ngFor="let form of annotateForm.metadataControls; let i = index" [formGroup]="form">
<div class="col col-name pe-1">
<sqx-control-errors for="name" fieldName="Name"></sqx-control-errors>
@ -171,6 +171,10 @@
<input type="checkbox" class="form-check-input" id="isProtected" formControlName="isProtected">
<label class="form-check-label" for="isProtected">{{ 'assets.protected' | sqxTranslate }}</label>
<sqx-form-hint>
{{ 'assets.protectedHint' | sqxTranslate }}
</sqx-form-hint>
</div>
</div>
</ng-container>

8
frontend/src/app/shared/components/assets/asset-dialog.component.scss

@ -33,6 +33,14 @@
visibility: hidden;
}
.metadata-row {
margin-bottom: .5rem;
&:last-child {
margin: 0;
}
}
.path {
min-height: 2.5rem;
}

Loading…
Cancel
Save