blob: 34424c62c9cb30da555a4bab45a97f9c753333b5 [file] [log] [blame]
Constantin Ziesche687f8882020-10-02 16:17:44 +02001@page
Constantin Zieschece276602020-10-27 09:36:00 +01002@model BaSyx.Common.UI.Pages.AssetAdministrationShellModel
Constantin Ziesche687f8882020-10-02 16:17:44 +02003@using BaSyx.API.Components;
4@using BaSyx.Models.Core.AssetAdministrationShell.Generics;
5@using BaSyx.Utils.Settings.Types;
6@using Microsoft.AspNetCore.Hosting;
7
8
9@{
10 IAssetAdministrationShellServiceProvider sp = Model.ServiceProvider;
11 IAssetAdministrationShell aas = sp.GetBinding();
Constantin Zieschece276602020-10-27 09:36:00 +010012 IHostingEnvironment hostingEnvironment = Model.HostingEnvironment;
Constantin Ziesche687f8882020-10-02 16:17:44 +020013 ServerSettings settings = Model.Settings;
14 string pathToCompanyLogo = settings.Miscellaneous.TryGetValue("CompanyLogo", out string path) ? path : string.Empty;
15
16 ViewData["Title"] = aas.IdShort;
17 ViewData["ApiRoot"] = "/aas";
18 ViewData["CompanyLogo"] = pathToCompanyLogo;
19 ViewData["ApiType"] = "AssetAdministrationShell";
20 ViewData["aasId"] = aas.IdShort;
21}
22
23
24<div class="starter-template">
25 <h1>@aas.IdShort - Asset Administration Shell UI</h1>
26 <p class="lead">Generic UI to discover the Asset Administration Shell </p>
27</div>
28
29@await Html.PartialAsync("_AssetAdministrationShell", aas)
30
31@await Html.PartialAsync("_Asset", aas.Asset)
32
33@if (aas.Submodels.Count() > 0)
34{
35 foreach (var submodel in aas.Submodels)
36 {
37 @await Html.PartialAsync("_Submodel", submodel)
38 }
39}
40
41