Skip to content

Commit

Permalink
Fix URL replace
Browse files Browse the repository at this point in the history
  • Loading branch information
aorzelskiGH committed Jun 6, 2024
1 parent 18619a2 commit 48b30a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
8 changes: 2 additions & 6 deletions src/AasxServerBlazor/Pages/Pcf2.razor
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@
var registry = AasRegistryService.GetRegistryList();
if (registry.Count != 0)
{
string registryURL = "";
string registryURL = registry[0];

// check for buffered shell descriptors from getregistry() for basyx
var aasDescriptors = AasRegistryService.GetAasDescriptorsForSubmodelView();
if (aasDescriptors != null && aasDescriptors.Count != 0)
Expand All @@ -362,10 +363,6 @@
registryURL = registryURL.Substring(0, registryURL.Length - "/pcf".Length);
Console.WriteLine("registryURL " + registryURL);
}
else
{
registryURL = registry[0];
}

if (AasxCredentials.get(cs.credentials, registryURL, out queryPara, out userPW, out urlEdcWrapper, out replace, true))
{
Expand All @@ -376,7 +373,6 @@
link += "&registryURL=" + registryURL;
}

// JUIJUI
queryPara = "";
userPW = "";
urlEdcWrapper = "";
Expand Down
25 changes: 17 additions & 8 deletions src/AasxServerBlazor/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -301,25 +301,34 @@
{
if (env != null)
{
var queryPara = "";
var userPW = "";
var urlEdcWrapper = "";
string replace = "";

var aas = env.AasEnv.AssetAdministrationShells[0];
if (aas.IdShort != "ZveiControlCabinetAas - EXTERNAL")
continue;

link = getAasLink(aas);

// var registry = IO.Swagger.Registry.Controllers.RegistryAndDiscoveryInterfaceApiController.getRegistry;
// JUIJUI
var registry = AasRegistryService.GetRegistryList();
if (registry != null && registry.Count != 0)
{
link += "&registryURL=" + registry[0];
string registryURL = registry[0];

if (AasxCredentials.get(cs.credentials, registryURL, out queryPara, out userPW, out urlEdcWrapper, out replace, true))
{
if (replace != "")
registryURL = replace;
}
link += registryURL;
}
// JUIJUI

var queryPara = "";
var userPW = "";
var urlEdcWrapper = "";
string replace = "";
queryPara = "";
userPW = "";
urlEdcWrapper = "";
replace = "";
if (AasxCredentials.get(cs.credentials, link, out queryPara, out userPW, out urlEdcWrapper, out replace, true))
{
if (replace != "")
Expand Down

0 comments on commit 48b30a5

Please sign in to comment.