Skip to content

Commit

Permalink
fix #2675 - Make module version ediatable on edge template screen
Browse files Browse the repository at this point in the history
  • Loading branch information
TUAILLON committed Dec 4, 2023
1 parent be7b2f9 commit 04da0dd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
For="@(() => Module.ImageURI)"
Required="true"/>
</MudItem>
<MudItem xs="12" md="6">
<MudTextField @bind-Value="@currentNumVersion"
id=@nameof(IoTEdgeModule.Version)
Label="Version"
Variant="Variant.Outlined"
For="@(() => Module.Version)"
Required="true"/>
</MudItem>

@if (Portal.CloudProvider.Equals(CloudProviders.Azure))
{
Expand Down Expand Up @@ -120,6 +128,7 @@
Module.ModuleName = currentModuleName;
Module.ImageURI = currentImageUri;
Module.ContainerCreateOptions = currentContainerCreateOptions;
Module.Version = currentNumVersion;

if (Portal.CloudProvider.Equals(CloudProviders.Azure)) { Module.Version = " "; }
else { Module.Version = currentNumVersion; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@
<MudItem xs="12">
<MudTable Items="@edgeModules" Dense=true Hover=true Bordered=true Striped=true Elevation=0>
<ColGroup>
<col style="width: 30%;" />
<col style="width: 40%;" />
<col style="width: 10%;" />
<col style="width: 5%;" />
<col style="width: 25%;" />
<col style="width: 35%;" />
<col style="width: 20%;" />
<col style="width: 20%;" />
</ColGroup>
<HeaderContent>
<MudTh Style="text-align: center">Module name</MudTh>
<MudTh Style="text-align: center">Image URI</MudTh>
<MudTh Style="text-align: center">See detail</MudTh>
<MudTh Style="text-align: center">Delete</MudTh>
<MudTh Style="text-align: center">Version</MudTh>
<MudTh Style="text-align: center" colspan="2">Actions</MudTh>
</HeaderContent>
<RowTemplate Context="moduleContext">
<MudTd DataLabel="module Name" Style="word-break: break-all;">
Expand All @@ -132,11 +132,14 @@
<MudTd DataLabel="module Image URI" Style="word-break: break-all;">
<MudTextField id="@(nameof(IoTEdgeModule.ImageURI))" @bind-Value="@moduleContext.ImageURI" Margin="Margin.Dense" Label="Image URI" For="@(() => moduleContext.ImageURI )" Variant="Variant.Outlined" Required="true" />
</MudTd>
<MudTd DataLabel="See detail" Style="text-align: center;">
<MudButton Variant="Variant.Filled" id="editButton" OnClick="@(async () => await ShowAddEdgeModuleDialog(moduleContext))">Detail</MudButton>
<MudTd DataLabel="Module Version" Style="word-break: break-all;">
<MudTextField id="@(nameof(IoTEdgeModule.Version))" @bind-Value="@moduleContext.Version" Margin="Margin.Dense" Label="Version" For="@(() => moduleContext.Version)" Variant="Variant.Outlined" Required="true"></MudTextField>
</MudTd>
<MudTd DataLabel="Delete" Style="text-align: center">
<MudIconButton Class="deleteModuleButton" Color="Color.Default" Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" OnClick="@(() => DeleteModule(moduleContext))"></MudIconButton>
<MudTd DataLabel="Actions" Style="text-align: center" colspan="2">
<div>
<MudButton Variant="Variant.Filled" id="editButton" OnClick="@(async () => await ShowAddEdgeModuleDialog(moduleContext))">Detail</MudButton>
<MudIconButton Class="deleteModuleButton" Color="Color.Default" Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" OnClick="@(() => DeleteModule(moduleContext))"></MudIconButton>
</div>
</MudTd>
</RowTemplate>
<FooterContent>
Expand Down
2 changes: 1 addition & 1 deletion src/IoTHub.Portal.Server/IoTHub.Portal.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ProjectExtensions>
<VisualStudio><UserProperties appsettings_1development_1json__JsonSchema="https://cdn.jsdelivr.net/gh/roadrunner-server/roadrunner@latest/schemas/config/2.0.schema.json" properties_4launchsettings_1json__JsonSchema="" /></VisualStudio>
<VisualStudio><UserProperties properties_4launchsettings_1json__JsonSchema="" /></VisualStudio>
</ProjectExtensions>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/IoTHub.Portal.sln
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.31911.260
Expand Down

0 comments on commit 04da0dd

Please sign in to comment.