Webapp/SDAF/Views/Environment/Edit.cshtml (179 lines of code) (raw):
@model EnvironmentModel
@{
ViewBag.Title = "Edit environment";
}
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script type="text/javascript">
window.onload = function () {
$('.notificationContainer').delay(6000).fadeOut();
}
</script>
<fluent-breadcrumb>
<fluent-breadcrumb-item href="@Url.Action("Index", "Home")">Home</fluent-breadcrumb-item>
<fluent-breadcrumb-item href="@Url.Action("Index", "Environment")">Environments</fluent-breadcrumb-item>
<fluent-breadcrumb-item href="#">Edit</fluent-breadcrumb-item>
</fluent-breadcrumb>
<div class="text-center">
<h2>@Model.name </h2>
</div>
@if (!ViewData.ModelState.IsValid)
{
<div class="notificationContainer" style="display: flex; background: rgb(253, 231, 233);">
<div class="notificationInner">
<span class="notificationText">
@Html.ValidationSummary(false)
</span>
</div>
</div>
}
<form class="wrapper" asp-controller="environment" asp-action="edit">
@Html.AntiForgeryToken()
<div class="parameters">
<p>Note, any values left blank will be updated as such.</p>
<div class="ms-TextField">
<div class="left-input">
@Html.Label("newName", "Environment name", new { @class = $"ms-Label required" })
<p>Modify the variable group name. "SDAF-" will be prepended. </p>
</div>
<div class="right-input">
@Html.TextBox("newName", Model.name, new { @class = "ms-TextField-field" })
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.Label("description", "Description", new { @class = $"ms-Label" })
<p>Add a description for the variable group. </p>
</div>
<div class="right-input">
@Html.TextBox("description", Model.description, new { @class = "ms-TextField-field" })
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.Agent, new { @class = $"ms-Label" })
<p>'Azure Pipelines' or the name of the agent pool</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.Agent.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.Agent)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.ARM_CLIENT_ID, new { @class = $"ms-Label" })
<p>Enter the Service principal application ID</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.ARM_CLIENT_ID.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.ARM_CLIENT_ID)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.ARM_OBJECT_ID, new { @class = $"ms-Label" })
<p>Enter the Service principal object ID</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.ARM_OBJECT_ID.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.ARM_OBJECT_ID)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.ARM_CLIENT_SECRET, new { @class = $"ms-Label" })
<p>Enter the Service principal password</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.ARM_CLIENT_SECRET.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.ARM_CLIENT_SECRET)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.ARM_SUBSCRIPTION_ID, new { @class = $"ms-Label" })
<p>Enter the target subscription ID</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.ARM_SUBSCRIPTION_ID.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.ARM_SUBSCRIPTION_ID)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.ARM_TENANT_ID, new { @class = $"ms-Label" })
<p>Enter the subscription's Tenant ID</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.ARM_TENANT_ID.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.ARM_TENANT_ID)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.sap_fqdn, new { @class = $"ms-Label" })
<p>SAP Fully Qualified Domain Name, for example 'sap.contoso.net'</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.sap_fqdn.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.sap_fqdn)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.POOL, new { @class = $"ms-Label" })
<p>The Agent pool to use for this environment</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.POOL.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.POOL)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.Deployer_Key_Vault, new { @class = $"ms-Label" })
<p>Enter the name of the Control Plane keyvault.</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.Deployer_Key_Vault.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.Deployer_Key_Vault)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.Deployer_State_FileName, new { @class = $"ms-Label" })
<p>Enter the name of the state file for the Deployer.</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.Deployer_State_FileName.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.Deployer_State_FileName)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.Terraform_Remote_Storage_Account_Name, new { @class = $"ms-Label" })
<p>Enter the name of the storage account containing the Terraform state files.</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.Terraform_Remote_Storage_Account_Name.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.Terraform_Remote_Storage_Account_Name)
</div>
</div>
<div class="ms-TextField">
<div class="left-input">
@Html.LabelFor(m => m.variables.Terraform_Remote_Storage_Subscription, new { @class = $"ms-Label" })
<p>Enter the Id of the subscription containing the storage account containing the Terraform state files.</p>
</div>
<div class="right-input">
@Html.TextBoxFor(m => m.variables.Terraform_Remote_Storage_Subscription.value, new { @class = "ms-TextField-field" })
@Html.ValidationMessageFor(m => m.variables.Terraform_Remote_Storage_Subscription)
</div>
</div>
@Html.HiddenFor(m => m.name)
</div>
<fluent-button appearance="accent" style="margin-top: 15px" type="submit">
Save
</fluent-button>
<fluent-anchor href="@Url.Action("Index", "Environment")">
Back
</fluent-anchor>
</form>