Skip to content

Commit dc8659e

Browse files
committed
* update before refactore
1 parent e5ba065 commit dc8659e

File tree

7 files changed

+316
-386
lines changed

7 files changed

+316
-386
lines changed

src/AasxPackageExplorer/MainWindow.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2662,7 +2662,7 @@ private async Task MainTimer_Tick(object sender, EventArgs e)
26622662
// flags for tainted Identifiables
26632663
MainTimer_CheckTaintedIdentifiables(
26642664
_mainTimer_LastCheckForTaintedIdentifiables,
2665-
PackageCentral.MainItem.Container.Env?.AasEnv);
2665+
PackageCentral.MainItem.Container?.Env?.AasEnv);
26662666
_mainTimer_LastCheckForTaintedIdentifiables = DateTime.UtcNow;
26672667

26682668
// pending re-index?

src/AasxPackageExplorer/debug.MIHO.script

+3-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@
99
// Tool("sammaspectimport", "File", "C:\\HOMI\\Develop\\Aasx\\repo\\samm-test\\Batch-MM-2_0_0.ttl");
1010
// Tool("exportsmtasciidoc", "File", "C:\\HOMI\\Develop\\Aasx\\repo\\new.zip", "AntoraStyle", "true");
1111
Tool("editkey");
12-
// Tool("connectextended",
13-
// "BaseAddress", "https://eis-data.aas-voyager.com/",
14-
// "BaseType", "Repository",
15-
// "GetSingleAas", "false",
16-
// "GetAllAas", "true",
17-
// "PageLimit", "2",
18-
// "AutoLoadOnDemand", "false");
12+
// Tool("connectextended", "BaseAddress", "https://eis-data.aas-voyager.com/", "BaseType", "Repository", "GetSingleAas", "false", "GetAllAas", "true", "PageLimit", "2", "AutoLoadOnDemand", "false");
13+
// Tool("connectextended", "BaseAddress", "https://eis-data.aas-voyager.com/", "BaseType", "Repository", "GetSingleAas", "true", "PageLimit", "2", "AutoLoadOnDemand", "false", "AasId", "https://new.abb.com/products/de/2CSF204101R1400/aas");
14+
// Tool("connectextended", "BaseAddress", "https://techday2-registry.admin-shell-io.com/", "BaseType", "Registry", "GetSingleAas", "false", "GetAasByAssetLink", "true", "PageLimit", "2", "AutoLoadOnDemand", "false", "AssetId", "https://pk.harting.com/?.20P=ZSN1");
1915
// Select("AAS", "First");
2016
// Tool("apiuploadassistant");
2117
// Select("Submodel", "First");

src/AasxPackageLogic/DispEditHelperEntities.cs

+19-6
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ public static async Task<bool> ExecuteUiForFetchOfElements(
15531553
{
15541554
MainWindowLogic.LogErrorToTicketStatic(ticket,
15551555
new InvalidDataException(),
1556-
"Error building location from next fetch selection. Aborting.");
1556+
"Error building location from fetch selection. Aborting.");
15571557
return false;
15581558
}
15591559

@@ -2128,9 +2128,11 @@ public void DisplayOrEditAasEntitySubmodelOrRef(
21282128
AddActionPanel(stack, "Submodel:",
21292129
repo: repo, superMenu: superMenu,
21302130
ticketMenu: new AasxMenu()
2131-
.AddAction("aas-elem-del", "Delete",
2132-
"Deletes the currently selected element.",
2133-
inputGesture: "Ctrl+Shift+Delete"),
2131+
.AddAction("aas-elem-del", "Delete \U0001f847 here",
2132+
"Deletes the currently selected Submodel in the local environment.",
2133+
inputGesture: "Ctrl+Shift+Delete")
2134+
.AddAction("delete-sm-in-repo", "Delete SM \u274c in Repo",
2135+
"Delete Submodel by Id in a given Repository or Registry."),
21342136
ticketAction: (buttonNdx, ticket) =>
21352137
{
21362138
if (buttonNdx == 0)
@@ -2314,7 +2316,7 @@ public void DisplayOrEditAasEntitySubmodelOrRef(
23142316
"assigns the SubmodelElement to it.")
23152317
.AddAction("create-smes", "Create \U0001f844 SMEs (all)",
23162318
"Create missing CDs from semanticId of used SMEs.")
2317-
.AddAction("delete-cd-in-repo", "Delete \u274c in Repo",
2319+
.AddAction("delete-cd-in-repo", "Delete CD \u274c in Repo",
23182320
"Delete ConceptDescriptions which are referenced by semanticId of SubmodelElements " +
23192321
"in a given Repository or Registry."),
23202322
ticketActionAsync: async (buttonNdx, ticket) =>
@@ -2390,11 +2392,22 @@ public void DisplayOrEditAasEntitySubmodelOrRef(
23902392
var cdIds = lrs.Select((lr) => lr?.Reference?.GetAsExactlyOneKey()?.Value);
23912393

23922394
// call function
2395+
// (only the side info in the _specific_ endpoint gives information, in which
2396+
// repo the CDs could be deleted)
23932397
await PackageContainerHttpRepoSubset.AssistantDeleteCDsInRepo(
23942398
ticket, context,
23952399
"Delete CDs in Repository/ Registry",
23962400
cdIds,
2397-
runtimeOptions: packages.CentralRuntimeOptions);
2401+
runtimeOptions: packages.CentralRuntimeOptions,
2402+
presetRecord: new PackageContainerHttpRepoSubset.DeleteAssistantJobRecord()
2403+
{
2404+
// assume Repo ?!
2405+
BaseType = ConnectExtendedRecord.BaseTypeEnum.Repository,
2406+
2407+
// extract base address
2408+
BaseAddress = "" + PackageContainerHttpRepoSubset.GetBaseUri(
2409+
sideInfo?.Endpoint?.AbsoluteUri)?.AbsoluteUri
2410+
});
23982411

23992412
// ok
24002413
return new AnyUiLambdaActionNone();

src/AasxPackageLogic/PackageCentral/AdminShellPackageDynamicFetchEnv.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,14 @@ public async Task<bool> TryFetchThumbnail(Aas.IAssetAdministrationShell aas)
8484
// try
8585
try
8686
{
87-
await PackageHttpDownloadUtil.HttpGetToMemoryStreamOLD(
87+
await PackageHttpDownloadUtil.HttpGetToMemoryStream(
88+
null,
8889
sourceUri: PackageContainerHttpRepoSubset.BuildUriForRepoAasThumbnail(_defaultRepoBaseUri, aas.Id),
8990
runtimeOptions: _runtimeOptions,
90-
lambdaDownloadDone: (ms, contentFn) =>
91+
lambdaDownloadDoneOrFail: (code, ms, contentFn) =>
9192
{
93+
if (code != HttpStatusCode.OK)
94+
return;
9295
AddThumbnail(aas.Id, ms.ToArray());
9396
});
9497

0 commit comments

Comments
 (0)