Constantin Ziesche | 687f888 | 2020-10-02 16:17:44 +0200 | [diff] [blame] | 1 | @page |
Constantin Ziesche | ce27660 | 2020-10-27 09:36:00 +0100 | [diff] [blame] | 2 | @model BaSyx.Common.UI.Pages.AssetAdministrationShellModel |
Constantin Ziesche | 687f888 | 2020-10-02 16:17:44 +0200 | [diff] [blame] | 3 | @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 Ziesche | ce27660 | 2020-10-27 09:36:00 +0100 | [diff] [blame] | 12 | IHostingEnvironment hostingEnvironment = Model.HostingEnvironment; |
Constantin Ziesche | 687f888 | 2020-10-02 16:17:44 +0200 | [diff] [blame] | 13 | 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 | |