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

Update and delete green grass deployment #2113

Merged
merged 10 commits into from
May 26, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,17 @@
</MudExpansionPanel>
</MudItem>
</MudGrid>
<MudGrid>
<MudItem xs="12">
<MudExpansionPanel Text="Labels">
<TitleContent><MudText Typo="Typo.h6">Labels</MudText></TitleContent>
<ChildContent>
<LabelsEditor Labels="Model.Labels" />
</ChildContent>
</MudExpansionPanel>
</MudItem>
</MudGrid>
}
<MudGrid>
<MudItem xs="12">
<MudExpansionPanel Text="Labels">
<TitleContent><MudText Typo="Typo.h6">Labels</MudText></TitleContent>
<ChildContent>
<LabelsEditor Labels="Model.Labels" />
</ChildContent>
</MudExpansionPanel>
</MudItem>
</MudGrid>

</MudExpansionPanels>
</MudTabPanel>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,21 @@
<MudAlert Severity="Severity.Info"><MudLink Href="https://learn.microsoft.com/en-us/azure/iot-edge/how-to-use-create-options" Target="_blank ">How to configure container create options for IoT Edge modules</MudLink></MudAlert>
</MudItem>
}

else
{
<MudItem xs="5">
<MudTextField @bind-Value="@currentNumVersion"
id=@nameof(IoTEdgeModule.Version)
Label="Version Number"
Variant="Variant.Outlined"
For="@(() => Module.Version)"
Required="true"/>
</MudItem>
<MudItem xs="12">
<MudAlert Severity="Severity.Warning">The Version Number should be incremented when updating the component</MudAlert>
</MudItem>
kbeaugrand marked this conversation as resolved.
Show resolved Hide resolved
}

</MudGrid>

<MudTabs Elevation="1" Class="mt-10" Rounded="true" PanelClass="mt-6">
Expand Down Expand Up @@ -77,6 +91,7 @@
private string currentModuleName = default!;
private string currentImageUri = default!;
private string currentContainerCreateOptions = default!;
private string currentNumVersion = "1.0.0";

private List<IoTEdgeModuleEnvironmentVariable> currentEnvironmentVariables = new();
private List<IoTEdgeModuleTwinSetting> currentModuleIdentityTwinSettings = new();
Expand All @@ -92,6 +107,7 @@
currentModuleName = Module.ModuleName;
currentImageUri = Module.ImageURI;
currentContainerCreateOptions = Module.ContainerCreateOptions;
currentNumVersion = Module.Version;
currentEnvironmentVariables = new List<IoTEdgeModuleEnvironmentVariable>(Module.EnvironmentVariables.ToArray());
currentModuleIdentityTwinSettings = new List<IoTEdgeModuleTwinSetting>(Module.ModuleIdentityTwinSettings.ToArray());
currentCommands = new List<IoTEdgeModuleCommand>(Module.Commands.ToArray());
Expand All @@ -104,6 +120,10 @@
Module.ModuleName = currentModuleName;
Module.ImageURI = currentImageUri;
Module.ContainerCreateOptions = currentContainerCreateOptions;

if (Portal.CloudProvider.Equals(CloudProviders.Azure)) { Module.Version = " "; }
kbeaugrand marked this conversation as resolved.
Show resolved Hide resolved
else { Module.Version = currentNumVersion; }

Module.EnvironmentVariables = new List<IoTEdgeModuleEnvironmentVariable>(currentEnvironmentVariables.ToArray());
Module.ModuleIdentityTwinSettings = new List<IoTEdgeModuleTwinSetting>(currentModuleIdentityTwinSettings.ToArray());
Module.Commands = new List<IoTEdgeModuleCommand>(currentCommands.ToArray());
Expand Down
1 change: 1 addition & 0 deletions src/AzureIoTHub.Portal.Domain/ConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ public abstract class ConfigHandler
public abstract string AWSRegion { get; }
public abstract string AWSS3StorageConnectionString { get; }
public abstract string AWSBucketName { get; }
public abstract string AWSAccountId { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class EdgeDeviceModel : EntityBase
public string Name { get; set; } = default!;

public string? Description { get; set; }
public string? ExternalIdentifier { get; set; }

/// <summary>
/// Labels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ internal abstract class ConfigHandlerBase : ConfigHandler
internal const string AWSRegionKey = "AWS:Region";
internal const string AWSS3StorageConnectionStringKey = "AWS:S3Storage:ConnectionString";
internal const string AWSBucketNameKey = "AWS:BucketName";
internal const string AWSAccountIdKey = "AWS:AccountId";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ internal DevelopmentConfigHandler(IConfiguration config)
public override string AWSRegion => this.config[AWSRegionKey]!;
public override string AWSS3StorageConnectionString => this.config[AWSS3StorageConnectionStringKey]!;
public override string AWSBucketName => this.config[AWSBucketNameKey]!;
public override string AWSAccountId => this.config[AWSAccountIdKey]!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,7 @@ internal ProductionAWSConfigHandler(IConfiguration config)
public override string AWSRegion => this.config[AWSRegionKey]!;
public override string AWSS3StorageConnectionString => this.config[AWSS3StorageConnectionStringKey]!;
public override string AWSBucketName => this.config[AWSBucketNameKey]!;
public override string AWSAccountId => this.config[AWSAccountIdKey]!;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,7 @@ internal ProductionAzureConfigHandler(IConfiguration config)
public override string AWSS3StorageConnectionString => throw new NotImplementedException();

public override string AWSBucketName => throw new NotImplementedException();
public override string AWSAccountId => throw new NotImplementedException();

}
}
Loading