Test Pinned via API
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
@namespace OI.Metrology.ClientHub
|
||||
|
||||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
@ -1,4 +0,0 @@
|
||||
namespace OI.Metrology.ClientHub;
|
||||
|
||||
public partial class App
|
||||
{ }
|
@ -1,12 +0,0 @@
|
||||
namespace OI.Metrology.ClientHub.Data;
|
||||
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
namespace OI.Metrology.ClientHub.Data;
|
||||
|
||||
public class WeatherForecastService
|
||||
{
|
||||
private static readonly string[] _Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
public Task<WeatherForecast[]> GetForecastAsync(DateOnly startDate)
|
||||
{
|
||||
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = startDate.AddDays(index),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = _Summaries[Random.Shared.Next(_Summaries.Length)]
|
||||
}).ToArray());
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Models;
|
||||
|
||||
public record AppSettings(string ApiUrl,
|
||||
string BuildNumber,
|
||||
string Company,
|
||||
string GitCommitSeven,
|
||||
bool IsDevelopment,
|
||||
bool IsStaging,
|
||||
string MonAResource,
|
||||
string MonASite)
|
||||
{
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Models.Binder;
|
||||
|
||||
public class AppSettings
|
||||
{
|
||||
|
||||
#nullable disable
|
||||
|
||||
[Display(Name = "Api Url"), Required] public string ApiUrl { get; set; }
|
||||
[Display(Name = "Build Number"), Required] public string BuildNumber { get; set; }
|
||||
[Display(Name = "Company"), Required] public string Company { get; set; }
|
||||
[Display(Name = "Git Commit Seven"), Required] public string GitCommitSeven { get; set; }
|
||||
[Display(Name = "Is Development"), Required] public bool? IsDevelopment { get; set; }
|
||||
[Display(Name = "Is Staging"), Required] public bool? IsStaging { get; set; }
|
||||
[Display(Name = "MonA Resource"), Required] public string MonAResource { get; set; }
|
||||
[Display(Name = "MonA Site"), Required] public string MonASite { get; set; }
|
||||
|
||||
#nullable restore
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
return result;
|
||||
}
|
||||
|
||||
private static Models.AppSettings Get(AppSettings? appSettings)
|
||||
{
|
||||
Models.AppSettings result;
|
||||
if (appSettings is null)
|
||||
throw new NullReferenceException(nameof(appSettings));
|
||||
if (appSettings.ApiUrl is null)
|
||||
throw new NullReferenceException(nameof(ApiUrl));
|
||||
if (appSettings.BuildNumber is null)
|
||||
throw new NullReferenceException(nameof(BuildNumber));
|
||||
if (appSettings.Company is null)
|
||||
throw new NullReferenceException(nameof(Company));
|
||||
if (appSettings.GitCommitSeven is null)
|
||||
throw new NullReferenceException(nameof(GitCommitSeven));
|
||||
if (appSettings.IsDevelopment is null)
|
||||
throw new NullReferenceException(nameof(IsDevelopment));
|
||||
if (appSettings.IsStaging is null)
|
||||
throw new NullReferenceException(nameof(IsStaging));
|
||||
if (appSettings.MonAResource is null)
|
||||
throw new NullReferenceException(nameof(MonAResource));
|
||||
if (appSettings.MonASite is null)
|
||||
throw new NullReferenceException(nameof(MonASite));
|
||||
result = new(
|
||||
appSettings.ApiUrl,
|
||||
appSettings.BuildNumber,
|
||||
appSettings.Company,
|
||||
appSettings.GitCommitSeven,
|
||||
appSettings.IsDevelopment.Value,
|
||||
appSettings.IsStaging.Value,
|
||||
appSettings.MonAResource,
|
||||
appSettings.MonASite);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Models.AppSettings Get(IConfigurationRoot configurationRoot)
|
||||
{
|
||||
Models.AppSettings result;
|
||||
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
||||
result = Get(appSettings);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -6,12 +6,14 @@
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MudBlazor" Version="6.1.7" />
|
||||
<PackageReference Include="MudBlazor" Version="6.1.8" />
|
||||
<PackageReference Include="IgniteUI.Blazor" Version="22.2.24" />
|
||||
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="1.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.BrowserHttp" Version="1.0.0-dev-00032" />
|
||||
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Shared\OI.Metrology.Shared.csproj" />
|
||||
<ProjectReference Include="..\View\OI.Metrology.View.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,71 +0,0 @@
|
||||
@page "/"
|
||||
@page "/AwaitingDisposition"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using MudBlazor
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Awaiting Disposition</PageTitle>
|
||||
<h4>Awaiting Disposition</h4>
|
||||
|
||||
<div style="height: 450px;">
|
||||
<table id="grid"></table>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" id="OpenButton">Open</MudButton>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" id="RefreshButton" OnClick=RefreshClick>Refresh</MudButton>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Default" OnClick=LoadClickAsync>View</MudButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (_Records == null)
|
||||
{
|
||||
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
|
||||
}
|
||||
else if (_Records.Any())
|
||||
{
|
||||
<MudTable Items="_Records" FixedHeader="true" SortLabel="Sort By" Elevation="0" Dense="true" Hover="true" Bordered="true" Striped="true" Height="400px" Filter="new Func<Metrology.Shared.DataModels.AwaitingDisposition, bool>(FilterRecords)">
|
||||
<ToolBarContent>
|
||||
<MudTextField @bind-Value="@_ToolTypeFilter" Placeholder="Tool Type" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
<MudTextField @bind-Value="@_ToolFilter" Placeholder="Tool" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
<MudTextField @bind-Value="@_ReactorFilter" Placeholder="Reactor" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
<MudTextField @bind-Value="@_RdsFilter" Placeholder="RDS" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
<MudTextField @bind-Value="@_PSNFilter" Placeholder="PSN" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
<MudTextField @bind-Value="@_LayerFilter" Placeholder="Layer" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
<MudTextField @bind-Value="@_ZoneFilter" Placeholder="Zone" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
|
||||
</ToolBarContent>
|
||||
<HeaderContent>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.ToolType)">ToolType</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.Tool)">Tool</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.Reactor)">Reactor</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.RDS)">RDS</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.PSN)">PSN</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.Layer)">Layer</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, string?>(x=>x.Zone)">Zone</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, object>(x=>x.InsertDate)">InsertDate</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<OI.Metrology.Shared.DataModels.AwaitingDisposition, object>(x=>x.Expiration)">Expiration</MudTableSortLabel></MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="ToolType">@context.ToolType</MudTd>
|
||||
<MudTd DataLabel="Tool">@context.Tool</MudTd>
|
||||
<MudTd DataLabel="Reactor">@context.Reactor</MudTd>
|
||||
<MudTd DataLabel="RDS">@context.RDS</MudTd>
|
||||
<MudTd DataLabel="PSN">@context.PSN</MudTd>
|
||||
<MudTd DataLabel="Layer">@context.Layer</MudTd>
|
||||
<MudTd DataLabel="Zone">@context.Zone</MudTd>
|
||||
<MudTd DataLabel="InsertDate">@context.InsertDate</MudTd>
|
||||
<MudTd DataLabel="Expiration">@context.Expiration</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
}
|
||||
|
||||
<script suppress-error="BL9992">
|
||||
setInterval(function () { $("#RefreshButton").click(); }, 60000);
|
||||
</script>
|
@ -1,82 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using OI.Metrology.ClientHub.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class AwaitingDisposition
|
||||
{
|
||||
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
[Inject] protected HttpClient? HttpClient { get; set; }
|
||||
[Inject] protected AppSettings? AppSettings { get; set; }
|
||||
[Inject] protected ILogger<AwaitingDisposition>? Logger { get; set; }
|
||||
|
||||
private string? _ToolTypeFilter;
|
||||
private string? _ToolFilter;
|
||||
private string? _ReactorFilter;
|
||||
private string? _RdsFilter;
|
||||
private string? _PSNFilter;
|
||||
private string? _LayerFilter;
|
||||
private string? _ZoneFilter;
|
||||
private readonly List<Metrology.Shared.DataModels.AwaitingDisposition> _Records;
|
||||
|
||||
public AwaitingDisposition() => _Records = new();
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
throw new NullReferenceException(nameof(JSRuntime));
|
||||
if (AppSettings is null)
|
||||
throw new NullReferenceException(nameof(AppSettings));
|
||||
return JSRuntime.InvokeVoidAsync("initAwaitingDisposition", AppSettings.ApiUrl).AsTask();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private bool FilterRecords(Metrology.Shared.DataModels.AwaitingDisposition? record)
|
||||
{
|
||||
bool? result = _ToolTypeFilter is not null ? record?.ToolType?.Contains(_ToolTypeFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
if (result is null || result.Value)
|
||||
result = _ToolFilter is not null ? record?.Tool?.Contains(_ToolFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
if (result is null || result.Value)
|
||||
result = _ReactorFilter is not null ? record?.Reactor?.Contains(_ReactorFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
if (result is null || result.Value)
|
||||
result = _RdsFilter is not null ? record?.RDS?.Contains(_RdsFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
if (result is null || result.Value)
|
||||
result = _PSNFilter is not null ? record?.PSN?.Contains(_PSNFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
if (result is null || result.Value)
|
||||
result = _LayerFilter is not null ? record?.Layer?.Contains(_LayerFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
if (result is null || result.Value)
|
||||
result = _ZoneFilter is not null ? record?.Zone?.Contains(_ZoneFilter, StringComparison.CurrentCultureIgnoreCase) : null;
|
||||
result ??= true;
|
||||
return result.Value;
|
||||
}
|
||||
|
||||
private void RefreshClick() => _Records.Clear();
|
||||
|
||||
private async Task LoadClickAsync()
|
||||
{
|
||||
if (Logger is null)
|
||||
throw new NullReferenceException(nameof(Logger));
|
||||
if (HttpClient is null)
|
||||
throw new NullReferenceException(nameof(HttpClient));
|
||||
_Records.Clear();
|
||||
string controllerName = IAwaitingDispoController<object>.GetRouteName();
|
||||
try
|
||||
{
|
||||
Metrology.Shared.DataModels.AwaitingDisposition[]? collection = await HttpClient.GetFromJsonAsync<Metrology.Shared.DataModels.AwaitingDisposition[]>($"api/{controllerName}");
|
||||
if (collection is not null)
|
||||
_Records.AddRange(collection);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
string json = await HttpClient.GetStringAsync($"api/{controllerName}");
|
||||
Logger.LogInformation(message: json);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -1,13 +0,0 @@
|
||||
@page "/counter"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter - Bye</h1>
|
||||
|
||||
<p role="status">Current count: @_CurrentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
@ -1,20 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class Counter
|
||||
{
|
||||
|
||||
[Inject] protected ILogger<Counter>? Logger { get; set; }
|
||||
|
||||
private int _CurrentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
if (Logger is null)
|
||||
throw new NullReferenceException(nameof(Logger));
|
||||
Logger.LogWarning("Someone has clicked me!");
|
||||
_CurrentCount++;
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
@page
|
||||
@page
|
||||
@model OI.Metrology.ClientHub.Pages.ErrorModel
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
@page "/Export"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using MudBlazor
|
||||
@using OI.Metrology.Shared.DataModels
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Export Data</PageTitle>
|
||||
|
||||
<h3>Export Data</h3>
|
||||
|
||||
<hr />
|
||||
|
||||
@if (_TimeSpan is null || _DateRange is null || _ToolTypeNameId is null || _ToolTypeNameIdCollection is null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table id="ExportData">
|
||||
<tr>
|
||||
<td>
|
||||
<MudSelect @bind-Value="_ToolTypeNameId" ToStringFunc="@_ConvertFunc" Label="Tool Type" Placeholder="Please Select" AdornmentColor="Color.Primary">
|
||||
@foreach (ToolTypeNameId toolTypeNameId in _ToolTypeNameIdCollection)
|
||||
{
|
||||
<MudSelectItem Value="@toolTypeNameId" />
|
||||
}
|
||||
</MudSelect>
|
||||
</td>
|
||||
<td>
|
||||
<MudDateRangePicker Label="Date Range" @bind-DateRange="_DateRange" />
|
||||
</td>
|
||||
<td>
|
||||
<MudTimePicker Label="Start and End Time" AmPm="true" @bind-Time="_TimeSpan" />
|
||||
</td>
|
||||
<td>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" OnClick="DownloadAsync">Download</MudButton>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MudBlazor;
|
||||
using OI.Metrology.Shared.DataModels;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using System.Net;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class Export
|
||||
{
|
||||
|
||||
protected TimeSpan? _TimeSpan;
|
||||
protected DateRange? _DateRange;
|
||||
protected ToolTypeNameId? _ToolTypeNameId;
|
||||
protected ToolTypeNameId[]? _ToolTypeNameIdCollection;
|
||||
|
||||
[Inject] protected HttpClient? HttpClient { get; set; }
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||
[Inject] protected ILogger<AwaitingDisposition>? Logger { get; set; }
|
||||
|
||||
protected Func<ToolTypeNameId, string> _ConvertFunc = toolTypeNameId => string.Concat(toolTypeNameId?.ToolTypeName);
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
throw new NullReferenceException(nameof(JSRuntime));
|
||||
if (AppSettings is null)
|
||||
throw new NullReferenceException(nameof(AppSettings));
|
||||
return JSRuntime.InvokeVoidAsync("initExport", AppSettings.ApiUrl, DateTime.Now.AddMonths(-1), DateTime.Now).AsTask();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_ToolTypeNameId ??= new();
|
||||
_TimeSpan ??= new TimeSpan(DateTime.Now.Hour, DateTime.Now.Minute, 00);
|
||||
_DateRange ??= new DateRange(DateTime.Now.AddMonths(-1).Date, DateTime.Now.Date);
|
||||
if (Logger is null)
|
||||
throw new NullReferenceException(nameof(Logger));
|
||||
if (HttpClient is null)
|
||||
throw new NullReferenceException(nameof(HttpClient));
|
||||
string controllerName = IToolTypesController<object>.GetRouteName();
|
||||
try
|
||||
{
|
||||
Result<ToolTypeNameId[]>? result = await HttpClient.GetFromJsonAsync<Result<ToolTypeNameId[]>>($"api/{controllerName}");
|
||||
if (result is not null)
|
||||
_ToolTypeNameIdCollection = result.Results;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
string json = await HttpClient.GetStringAsync($"api/{controllerName}");
|
||||
Logger.LogInformation(message: json);
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task DownloadAsync()
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
throw new NullReferenceException(nameof(JSRuntime));
|
||||
if (HttpClient is null)
|
||||
throw new NullReferenceException(nameof(HttpClient));
|
||||
if (_TimeSpan is null || _DateRange is null || _ToolTypeNameId is null || _ToolTypeNameIdCollection is null || _ToolTypeNameId.ToolTypeName is null || _DateRange.Start is null || _DateRange.End is null)
|
||||
return;
|
||||
string controllerName = IToolTypesController<object>.GetRouteName();
|
||||
string endTime = _DateRange.End.Value.AddTicks(_TimeSpan.Value.Ticks).ToString();
|
||||
string startTime = _DateRange.Start.Value.AddTicks(_TimeSpan.Value.Ticks).ToString();
|
||||
string fileName = $"Export_{_ToolTypeNameId.ToolTypeName}_{startTime:yyyyMMddHHmm}_to_{endTime:yyyyMMddHHmm}.csv";
|
||||
string query = $"datebegin={startTime:MM/dd/yyyy hh:mm tt}&dateend={endTime:MM/dd/yyyy hh:mm tt}&filename={WebUtility.UrlEncode(fileName)}";
|
||||
await JSRuntime.InvokeVoidAsync("triggerFileDownload", fileName, $"{HttpClient.BaseAddress}api/{controllerName}/{_ToolTypeNameId.ID}/csv?{query}");
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
td {
|
||||
padding-bottom: 2em;
|
||||
padding-right: 1em;
|
||||
}
|
@ -1 +0,0 @@
|
||||
|
@ -1,41 +0,0 @@
|
||||
@page "/fetchdata"
|
||||
|
||||
@using OI.Metrology.ClientHub.Data
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Weather forecast</PageTitle>
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
||||
<p>This component demonstrates fetching data from a service.</p>
|
||||
|
||||
@if (_WeatherForecasts is null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (WeatherForecast weatherForecast in _WeatherForecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@weatherForecast.Date.ToShortDateString()</td>
|
||||
<td>@weatherForecast.TemperatureC</td>
|
||||
<td>@weatherForecast.TemperatureF</td>
|
||||
<td>@weatherForecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using OI.Metrology.ClientHub.Data;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class FetchData
|
||||
{
|
||||
private WeatherForecast[]? _WeatherForecasts;
|
||||
[Inject] protected WeatherForecastService? ForecastService { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (ForecastService is null)
|
||||
throw new NullReferenceException(nameof(ForecastService));
|
||||
_WeatherForecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
@page "/fetchServiceShoporders"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Service-Shop Orders</PageTitle>
|
@ -1,4 +0,0 @@
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class FetchServiceShopOrders
|
||||
{ }
|
@ -1,7 +0,0 @@
|
||||
@page "/Index"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
@ -1,4 +0,0 @@
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class Index
|
||||
{ }
|
@ -1,41 +0,0 @@
|
||||
@page "/RunHeaders"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using MudBlazor
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Run Headers</PageTitle>
|
||||
|
||||
<h4>Run Headers</h4>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="ToolType">Tool Type:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div id="ToolType"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" height="80%" style="min-height:480px;">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<table id="HeaderGrid"></table>
|
||||
</td>
|
||||
<td width="50%">
|
||||
<table id="FieldsGrid"></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" id="OpenButton">Open</MudButton>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" id="RefreshButton">Refresh</MudButton>
|
||||
</div>
|
||||
</div>
|
@ -1,25 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class RunHeaders
|
||||
{
|
||||
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
throw new NullReferenceException(nameof(JSRuntime));
|
||||
if (AppSettings is null)
|
||||
throw new NullReferenceException(nameof(AppSettings));
|
||||
return JSRuntime.InvokeVoidAsync("initRunHeaders", AppSettings.ApiUrl).AsTask();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div.container-fluid {
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
#HeaderGrid,
|
||||
#FieldsGrid {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.FieldTitle {
|
||||
font-weight: bold;
|
||||
}
|
@ -1 +0,0 @@
|
||||
|
@ -1,70 +0,0 @@
|
||||
@page "/RunInfo/{ToolTypeId:int?}/{HeaderId:int?}"
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using MudBlazor
|
||||
|
||||
@namespace OI.Metrology.ClientHub.Pages
|
||||
|
||||
<PageTitle>Run Info</PageTitle>
|
||||
|
||||
<h4>Run Information</h4>
|
||||
|
||||
<form class="form-inline mb-4">
|
||||
<div class="form-group">
|
||||
<label for="ToolType">Tool Type</label>
|
||||
<div class="form-control" id="ToolType"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="StartDate">Start Time</label>
|
||||
<div class="form-control mb-2 mr-sm-2" id="StartDate"></div>
|
||||
<div class="form-control mb-2 mr-sm-2" id="StartTime"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="EndDate">End Time</label>
|
||||
<div class="form-control mb-2 mr-sm-2" id="EndDate"></div>
|
||||
<div class="form-control mb-2 mr-sm-2" id="EndTime"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" id="LoadHeadersButton">Load Headers</MudButton>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-check-label" for="chkAutoRefresh">
|
||||
Auto-Refresh
|
||||
</label>
|
||||
<input class="form-check-input" type="checkbox" id="chkAutoRefresh">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div style="height: 300px;" id="HeaderGridDiv">
|
||||
<span id="ToolTypeID" hidden></span>
|
||||
<table id="HeaderGrid"></table>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" id="GetDataButton" Disabled="true">Get Data</MudButton>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Secondary" id="ReviewButton" Disabled="true">Review</MudButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DetailsDiv" hidden>
|
||||
|
||||
<span id="HeaderId" hidden></span>
|
||||
<span id="HeaderAttachmentId" hidden></span>
|
||||
<div style="padding-bottom: 20px;" id="DetailsGridDiv">
|
||||
<table id="DetailsGrid"></table>
|
||||
</div>
|
||||
|
||||
<div id="ExportDiv" style="margin-top: 10px;" hidden>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Warning" id="OIExportButton">Send to OpenInsight</MudButton>
|
||||
<span id="OIExportResult" style="margin-left: 10px; font-weight: bold; color: #366b02;"></span>
|
||||
</div>
|
||||
|
||||
<p style="text-align: center; margin-top: 20px;">
|
||||
<iframe id="DataAttachmentFrame" style="height:900px; border-width:thin; margin-right: 10px;" hidden></iframe>
|
||||
<iframe id="HeaderAttachmentFrame" style="height:900px; border-width:thin;" hidden></iframe>
|
||||
</p>
|
||||
|
||||
</div>
|
@ -1,32 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Pages;
|
||||
|
||||
public partial class RunInfo
|
||||
{
|
||||
|
||||
[Parameter] public int? HeaderId { get; set; }
|
||||
[Parameter] public int? ToolTypeId { get; set; }
|
||||
|
||||
[Inject] protected IJSRuntime? JSRuntime { get; set; }
|
||||
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (JSRuntime is null)
|
||||
throw new NullReferenceException(nameof(JSRuntime));
|
||||
if (AppSettings is null)
|
||||
throw new NullReferenceException(nameof(AppSettings));
|
||||
Metrology.Shared.ViewModels.RunInfo? model = null;
|
||||
int initialHeaderId = model is not null ? model.HeaderID : HeaderId is not null ? HeaderId.Value : 0;
|
||||
string initialHeaderAttachmentId = model is not null ? model.HeaderAttachmentID.ToString() : string.Empty;
|
||||
int initialToolTypeID = model is not null ? model.ToolTypeID : ToolTypeId is not null ? ToolTypeId.Value : 1;
|
||||
return JSRuntime.InvokeVoidAsync("initRunInfo", AppSettings.ApiUrl, initialToolTypeID, initialHeaderId, initialHeaderAttachmentId).AsTask();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
#HeaderGridDiv,
|
||||
#DetailsGridDiv {
|
||||
font-size: 12px;
|
||||
}
|
||||
p {
|
||||
color: red;
|
||||
background-color: aqua;
|
||||
}
|
@ -1 +0,0 @@
|
||||
|
@ -25,6 +25,7 @@
|
||||
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="icon-192.png" />
|
||||
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
||||
<link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
|
||||
|
||||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
|
||||
|
||||
@ -47,7 +48,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<component type="typeof(App)" render-mode="ServerPrerendered" />
|
||||
<component type="typeof(View.App)" render-mode="ServerPrerendered" />
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
<environment include="Staging,Production">
|
||||
@ -62,6 +63,7 @@
|
||||
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
||||
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
|
||||
<script src="js/bootstrap.min.js" type="text/javascript" asp-append-version="true"></script>
|
||||
<script src="js/respond.min.js" type="text/javascript" asp-append-version="true"></script>
|
||||
</body>
|
||||
|
@ -1,6 +1,6 @@
|
||||
using IgniteUI.Blazor.Controls;
|
||||
using OI.Metrology.View.Models;
|
||||
using MudBlazor.Services;
|
||||
using OI.Metrology.ClientHub.Data;
|
||||
using OI.Metrology.ClientHub.Models;
|
||||
using Serilog;
|
||||
using Serilog.Core;
|
||||
|
||||
@ -21,16 +21,15 @@ internal class Program
|
||||
Serilog.ILogger log = Log.ForContext<Program>();
|
||||
try
|
||||
{
|
||||
AppSettings appSettings = Models.Binder.AppSettings.Get(builder.Configuration);
|
||||
AppSettings appSettings = View.Models.Binder.AppSettings.Get(builder.Configuration);
|
||||
// Add services to the container.
|
||||
_ = builder.Services.AddRazorPages();
|
||||
_ = builder.Services.AddMudServices();
|
||||
_ = builder.Services.AddIgniteUIBlazor(typeof(IgbIconModule));
|
||||
_ = builder.Services.AddServerSideBlazor();
|
||||
_ = builder.Services.AddHttpContextAccessor();
|
||||
|
||||
_ = builder.Services.AddSingleton(_ => appSettings);
|
||||
_ = builder.Services.AddSingleton<WeatherForecastService>();
|
||||
_ = builder.Services.AddSingleton<WeatherForecastService>();
|
||||
_ = builder.Services.AddScoped(serviceProvider => new HttpClient { BaseAddress = new Uri(appSettings.ApiUrl) });
|
||||
|
||||
WebApplication app = builder.Build();
|
||||
|
@ -1,55 +0,0 @@
|
||||
@inherits LayoutComponentBase
|
||||
@namespace OI.Metrology.ClientHub.Shared
|
||||
@using MudBlazor
|
||||
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
|
||||
<MudThemeProvider @ref="@_MudThemeProvider" @bind-IsDarkMode="@_IsDarkMode" />
|
||||
|
||||
<MudPaper Style="padding:1px;">
|
||||
<div class="navbar navbar-fixed-top @(AppSettings is not null && AppSettings.IsDevelopment ? "test-database" : "" )">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="/"><img src="images/IFX_LOGO_RGB.png" height="20" /></a>
|
||||
OI Metrology Viewer
|
||||
</div>
|
||||
</div>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p class="navbar-text hidden-xs hidden-sm"><span class="test-database-text">TEST DATABASE</span></p>
|
||||
}
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="AwaitingDisposition">Awaiting Disposition</a></li>
|
||||
<li><a href="RunInfo">Run Information</a></li>
|
||||
<li><a href="RunHeaders">Run Headers</a></li>
|
||||
<li><a href="Export">Export</a></li>
|
||||
<li><a href="https://oi-metrology-viewer-archive.mes.infineon.com/" target="_blank">Archive</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid body-content">
|
||||
@Body
|
||||
<hr />
|
||||
<footer>
|
||||
<p class="navbar-text navbar-right">
|
||||
<MudSwitch @bind-Checked="@_IsDarkMode" Color="Color.Primary" Class="ma-4" T="bool" Label="Toggle Light/Dark Mode" />
|
||||
</p>
|
||||
<p>© @DateTime.Now.Year - Infineon Technologies</p>
|
||||
@if (AppSettings is not null && AppSettings.IsDevelopment)
|
||||
{
|
||||
<p><strong>Request ID:</strong><code>@_RequestId</code></p>
|
||||
}
|
||||
</footer>
|
||||
</div>
|
||||
</MudPaper>
|
||||
|
||||
<div id="MessageModal"></div>
|
@ -1,35 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace OI.Metrology.ClientHub.Shared;
|
||||
|
||||
public partial class MainLayout
|
||||
{
|
||||
|
||||
bool _DrawerOpen = true;
|
||||
private bool _IsDarkMode;
|
||||
private string? _RequestId;
|
||||
private MudThemeProvider? _MudThemeProvider;
|
||||
|
||||
[Inject] protected Models.AppSettings? AppSettings { get; set; }
|
||||
[Inject] protected IHttpContextAccessor? HttpContextAccessor { get; set; }
|
||||
|
||||
void DrawerToggle() => _DrawerOpen = !_DrawerOpen;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
_RequestId = Activity.Current?.Id ?? HttpContextAccessor?.HttpContext?.TraceIdentifier;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender && _MudThemeProvider is not null)
|
||||
{
|
||||
_IsDarkMode = await _MudThemeProvider.GetSystemPreference();
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
.page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
justify-content: flex-end;
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
.top-row a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row:not(.auth) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.top-row.auth {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row a, .top-row .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-row, article {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
@namespace OI.Metrology.ClientHub.Shared
|
||||
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">ClientHub</a>
|
||||
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="oi oi-home" aria-hidden="true"></span> Home
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="counter">
|
||||
<span class="oi oi-plus" aria-hidden="true"></span> Counter
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="fetchdata">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private bool collapseNavMenu = true;
|
||||
|
||||
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||
|
||||
private void ToggleNavMenu()
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
namespace OI.Metrology.ClientHub.Shared;
|
||||
|
||||
public partial class NavMenu
|
||||
{ }
|
@ -1,68 +0,0 @@
|
||||
.navbar-toggler {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
height: 3.5rem;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.oi {
|
||||
width: 2rem;
|
||||
font-size: 1.1rem;
|
||||
vertical-align: text-top;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-item:first-of-type {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-item:last-of-type {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep a {
|
||||
color: #d7d7d7;
|
||||
border-radius: 4px;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 3rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep a.active {
|
||||
background-color: rgba(255,255,255,0.25);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item ::deep a:hover {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
/* Never collapse the sidebar for wide screens */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav-scrollable {
|
||||
/* Allow sidebar to scroll for tall menus */
|
||||
height: calc(100vh - 3.5rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
@ -7,4 +7,3 @@
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using OI.Metrology.ClientHub
|
||||
@using OI.Metrology.ClientHub.Shared
|
||||
|
@ -545,4 +545,7 @@ function triggerFileDownload(fileName, url) {
|
||||
anchorElement.download = fileName ?? '';
|
||||
anchorElement.click();
|
||||
anchorElement.remove();
|
||||
}
|
||||
|
||||
function initIndex(){
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
background-color: darkgrey;
|
||||
}
|
||||
|
||||
/* Set padding to keep content from hitting the edges */
|
||||
@ -71,6 +70,25 @@ div.modal-content-warning {
|
||||
background-color: red !important;
|
||||
}
|
||||
|
||||
.prod-database {
|
||||
background-color: #d7d7d7 !important;
|
||||
}
|
||||
|
||||
/* hover */
|
||||
.ui-iggrid td.ui-state-hover,
|
||||
.ui-iggrid .ui-ig-altrecord td.ui-state-hover,
|
||||
.ui-iggrid .ui-ig-altrecord td.ui-state-default.ui-state-hover,
|
||||
.ui-iggrid th.ui-iggrid-rowselector-class.ui-state-hover,
|
||||
.ui-iggrid .ui-ig-altrecord th.ui-iggrid-rowselector-class.ui-state-hover,
|
||||
.ui-iggrid .ui-ig-altrecord th.ui-iggrid-rowselector-class.ui-state-default.ui-state-hover,
|
||||
.ui-iggrid-responsive-vertical tr > td.ui-state-hover:first-child,
|
||||
.ui-iggrid-responsive-vertical tr.ui-ig-altrecord > td.ui-state-hover:first-child {
|
||||
color: #333333;
|
||||
background: #f5ff3b;
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.test-database .navbar-brand,
|
||||
.test-database .navbar-text,
|
||||
.test-database .navbar-nav > li > a {
|
||||
@ -107,4 +125,4 @@ div.modal-content-warning {
|
||||
|
||||
#ExportData {
|
||||
zoom: 2;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user