in Webapp/SDAF/Controllers/ArmclientController.cs [67:82]
public ActionResult GetVnetFromResource(string resourceId)
{
try
{
ResourceIdentifier rsc = new(resourceId);
if (rsc.SubscriptionId == null) return null;
int subnetsIndex = resourceId.IndexOf("/subnets");
if (subnetsIndex <= 0) return null;
string vnetId = resourceId.Substring(0, resourceId.IndexOf("/subnets"));
return Json(vnetId);
}
catch
{
return null;
}
}