Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge create and edit device screen #1992

Merged
merged 11 commits into from
Apr 7, 2023
815 changes: 815 additions & 0 deletions src/AzureIoTHub.Portal.Client/Components/Devices/EditDevice.razor

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/AzureIoTHub.Portal.Client/Enums/CreateEditMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) CGI France. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace AzureIoTHub.Portal.Client.Enums
{
public enum CreateEditMode
{
Create,
Edit
}
}
542 changes: 1 addition & 541 deletions src/AzureIoTHub.Portal.Client/Pages/Devices/CreateDevicePage.razor

Large diffs are not rendered by default.

420 changes: 3 additions & 417 deletions src/AzureIoTHub.Portal.Client/Pages/Devices/DeviceDetailPage.razor

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ public LoRaDeviceDetailsValidator()
.NotEmpty()
.When(x => !x.UseOTAA)
.WithMessage("DevAddr is required.");

_ = RuleFor(x => x.DeviceID)
.NotEmpty()
.Length(1, 16)
.Matches("[A-F0-9]{16}")
.WithMessage("DeviceID is required. It should be a 16 bit hex string.");
}

public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
Expand Down
hocinehacherouf marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading