From d9e6709d767de492efae02c4d0b0c49cc7bd9cc4 Mon Sep 17 00:00:00 2001 From: czf <2455501+czf@users.noreply.github.com> Date: Sun, 10 Jan 2021 21:42:22 -0800 Subject: [PATCH] Starting Artist and ArtistWork pages with mocked data. creating new dashboard chart for line graph some clean up --- .../MockRadiocomDataAggregateDataClient.cs | 57 ++++++- .../TopPlayedArtistSongsChart.razor | 10 ++ .../TopPlayedArtistSongsChart.razor.cs | 60 ++++++++ ...ashboardHorizontalBarChartComponent.razor} | 0 ...boardHorizontalBarChartComponent.razor.cs} | 27 ++-- .../DashboardLineGraphChartComponent.razor | 19 +++ .../DashboardLineGraphChartComponent.razor.cs | 142 ++++++++++++++++++ .../IndexCharts/TopPlayedArtistsChart.razor | 2 +- .../TopPlayedArtistsChart.razor.cs | 2 +- .../IndexCharts/TopPlayedSongsChart.razor | 2 +- .../IndexCharts/TopPlayedSongsChart.razor.cs | 2 +- .../IRadiocomDataAggregateDataClient.cs | 10 ++ .../Objects/BarChartDatasetValue.cs | 6 + RadiocomDataViewApp/Pages/Artist.razor | 12 +- RadiocomDataViewApp/Pages/Artist.razor.cs | 4 +- RadiocomDataViewApp/Pages/ArtistWork.razor | 51 +++++++ RadiocomDataViewApp/Pages/ArtistWork.razor.cs | 30 ++++ .../Pages/ArtistWorks.razor.cs | 2 +- RadiocomDataViewApp/Pages/Artists.razor.cs | 2 +- RadiocomDataViewApp/Pages/Index.razor | 9 +- RadiocomDataViewApp/Pages/Index.razor.cs | 16 +- .../Properties/launchSettings.json | 17 +-- .../RadiocomDataViewApp.csproj | 6 +- .../Shared/LayoutSiderContentNavMenu.razor | 3 +- RadiocomDataViewApp/Shared/MainLayout.razor | 4 +- RadiocomDataViewApp/web.config | 2 +- RadiocomDataViewApp/wwwroot/css/app.css | 3 + 27 files changed, 440 insertions(+), 60 deletions(-) create mode 100644 RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor create mode 100644 RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor.cs rename RadiocomDataViewApp/Components/{DashboardChartComponent.razor => DashboardHorizontalBarChartComponent.razor} (100%) rename RadiocomDataViewApp/Components/{DashboardChartComponent.razor.cs => DashboardHorizontalBarChartComponent.razor.cs} (87%) create mode 100644 RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor create mode 100644 RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor.cs create mode 100644 RadiocomDataViewApp/Pages/ArtistWork.razor create mode 100644 RadiocomDataViewApp/Pages/ArtistWork.razor.cs diff --git a/RadiocomDataViewApp/Clients/Mocks/MockRadiocomDataAggregateDataClient.cs b/RadiocomDataViewApp/Clients/Mocks/MockRadiocomDataAggregateDataClient.cs index 06443ef..6001d60 100644 --- a/RadiocomDataViewApp/Clients/Mocks/MockRadiocomDataAggregateDataClient.cs +++ b/RadiocomDataViewApp/Clients/Mocks/MockRadiocomDataAggregateDataClient.cs @@ -44,7 +44,6 @@ private static int GetTimeRangeMultipler(AggregateTimeRange timeRange) break; default: throw new NotSupportedException("Value: " + timeRange.ToString()); - break; } return multiplier; @@ -77,5 +76,61 @@ public int GetTotalUniqueArtists(AggregateTimeRange timeRange) return multiplier * _random.Next(300, 350); } + + public List GetMostPlayedSongs(AggregateTimeRange timeRange, int artistId) + { + return GetMostPlayedSongs(timeRange); + + } + + public List GetSongPlayedOverTime(AggregateTimeRange timeRange, int artistWorkId) + { + int multiplier = GetTimeRangeMultipler(timeRange); + + List result = new List() + { + new ItemCount(){Count = 10 * multiplier, Name= GetOverTimeName(0, timeRange), ItemId = artistWorkId}, + new ItemCount(){Count = 2 * multiplier, Name= GetOverTimeName(1, timeRange), ItemId = artistWorkId}, + new ItemCount(){Count = 7 * multiplier, Name= GetOverTimeName(2, timeRange), ItemId = artistWorkId}, + new ItemCount(){Count = 2 * multiplier, Name= GetOverTimeName(3, timeRange), ItemId = artistWorkId}, + new ItemCount(){Count = 2 * multiplier, Name= GetOverTimeName(4, timeRange), ItemId = artistWorkId}, + new ItemCount(){Count = 1 * multiplier, Name= GetOverTimeName(5, timeRange), ItemId = artistWorkId}, + new ItemCount(){Count = 0 * multiplier, Name= GetOverTimeName(6, timeRange), ItemId = artistWorkId}, + }; + if(timeRange == AggregateTimeRange.ThreeMonths || timeRange == AggregateTimeRange.AllTime) + { + result.Add(new ItemCount() { Count = 10 * multiplier, Name = GetOverTimeName(7, timeRange), ItemId = artistWorkId }); + result.Add(new ItemCount() { Count = 2 * multiplier, Name = GetOverTimeName(8, timeRange), ItemId = artistWorkId } ); + result.Add(new ItemCount() { Count = 7 * multiplier, Name = GetOverTimeName(9, timeRange), ItemId = artistWorkId } ); + result.Add(new ItemCount() { Count = 2 * multiplier, Name = GetOverTimeName(10, timeRange), ItemId = artistWorkId }); + result.Add(new ItemCount() { Count = 2 * multiplier, Name = GetOverTimeName(11, timeRange), ItemId = artistWorkId }); + } + result.Reverse(); + return result; + + } + + private string GetOverTimeName(int index, AggregateTimeRange aggregateTimeRange) + { + string result = string.Empty; + switch (aggregateTimeRange) + { + case AggregateTimeRange.None: + throw new InvalidEnumArgumentException("Must specify time range value other than None"); + case AggregateTimeRange.SevenDays: + result = DateTime.Now.AddDays(index * -1).DayOfWeek.ToString(); + break; + case AggregateTimeRange.ThreeMonths: + result = DateTime.Now.AddDays(index * -7).ToShortDateString(); + break; + case AggregateTimeRange.AllTime: + result = DateTime.Now.AddMonths(index * -1).ToShortDateString(); + break; + default: + throw new NotSupportedException("Value: " + aggregateTimeRange.ToString()); + + } + return result; + } } } diff --git a/RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor b/RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor new file mode 100644 index 0000000..8299627 --- /dev/null +++ b/RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor @@ -0,0 +1,10 @@ + + + + + + diff --git a/RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor.cs b/RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor.cs new file mode 100644 index 0000000..ee671ee --- /dev/null +++ b/RadiocomDataViewApp/Components/ArtistCharts/TopPlayedArtistSongsChart.razor.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Blazorise; +using Microsoft.AspNetCore.Components; +using RadiocomDataViewApp.Clients; +using RadiocomDataViewApp.Interfaces; +using RadiocomDataViewApp.Objects; + +namespace RadiocomDataViewApp.Components.ArtistCharts +{ + public partial class TopPlayedArtistSongsChart : ComponentBase + { + private List HeaderButtonConfigs; + private AggregateTimeRange ChartDataTimeRange; + private DashboardHorizontalBarChartComponent Chart; + + [Parameter] + public int ArtistId { get; set; } + + [Inject] + public NavigationManager NavManager { get; set; } + [Inject] + public IRadiocomDataAggregateDataClient RadiocomDataAggregateDataClient { get; set; } + + + + public TopPlayedArtistSongsChart() + { + HeaderButtonConfigs = new List() + { + new HeaderButtonState(){Text = "7 Days",ButtonColor=Color.Secondary,Active=true, ButtonClickCallback = EventCallback.Factory.Create(this, () => UpdateChartDataTimeRange(AggregateTimeRange.SevenDays)) } , + new HeaderButtonState(){Text = "3 Months", ButtonClickCallback = EventCallback.Factory.Create(this, () => UpdateChartDataTimeRange(AggregateTimeRange.ThreeMonths)) } , + new HeaderButtonState(){Text = "All Time", ButtonClickCallback = EventCallback.Factory.Create(this, () => UpdateChartDataTimeRange(AggregateTimeRange.AllTime)) } + }; + ChartDataTimeRange = AggregateTimeRange.SevenDays; + + } + + + private void NavigateToArtistArtistsWorkRouteOnBarClick(DashboardChartMouseEventArgs args) + { + BarChartDatasetXValue element = (BarChartDatasetXValue)args.DatasetElement; + NavManager.NavigateTo($"artist/{element.DataId}/works"); + } + + private void UpdateChartDataTimeRange(AggregateTimeRange mostPlayedTimeRange) + { + ChartDataTimeRange = mostPlayedTimeRange; + Chart.RefreshChartData(); + } + + private IEnumerable TopPlayedArtistSongs() + { + List radioComData = RadiocomDataAggregateDataClient.GetMostPlayedSongs(ChartDataTimeRange, ArtistId); + return radioComData.Select(x => new DashboardChartData() { Label = x.Name, Value = x.Count, DataId = x.ItemId }); + } + } +} diff --git a/RadiocomDataViewApp/Components/DashboardChartComponent.razor b/RadiocomDataViewApp/Components/DashboardHorizontalBarChartComponent.razor similarity index 100% rename from RadiocomDataViewApp/Components/DashboardChartComponent.razor rename to RadiocomDataViewApp/Components/DashboardHorizontalBarChartComponent.razor diff --git a/RadiocomDataViewApp/Components/DashboardChartComponent.razor.cs b/RadiocomDataViewApp/Components/DashboardHorizontalBarChartComponent.razor.cs similarity index 87% rename from RadiocomDataViewApp/Components/DashboardChartComponent.razor.cs rename to RadiocomDataViewApp/Components/DashboardHorizontalBarChartComponent.razor.cs index a899112..4bffc4c 100644 --- a/RadiocomDataViewApp/Components/DashboardChartComponent.razor.cs +++ b/RadiocomDataViewApp/Components/DashboardHorizontalBarChartComponent.razor.cs @@ -15,24 +15,17 @@ namespace RadiocomDataViewApp.Components { - public partial class DashboardChartComponent : ComponentBase + public partial class DashboardHorizontalBarChartComponent : ComponentBase { private const string DEFAULT_BAR_COLOR = "#FFF"; - private Object StandardTicks = new + private object StandardTicks = new { FontColor = "#fff", BeginAtZero = true }; - - - //[Inject] - //public IJSRuntime JSRuntime { get; set; } - //[Inject] - //public NavigationManager NavManager { get; set; } - - public readonly Object ChartOptionsObj; + public readonly object ChartOptionsObj; public readonly ChartOptions chartOptions; [Parameter] @@ -47,14 +40,14 @@ public partial class DashboardChartComponent : ComponentBase public Func BarColorGenerator { get; set; } [Parameter] public string ScaleLabelFontColor { get; set; } - [Parameter] - public string AxisTicksFontColor { get; set; } - [Parameter] - public Dictionary> ChartTimeFrames { get; set; } + //[Parameter] + //public string AxisTicksFontColor { get; set; } + //[Parameter] + //public Dictionary> ChartTimeFrames { get; set; } [Parameter] public EventCallback OnDashboardChartElementClick { get; set; } - private EventCallback OnBarElementClick { get; set;} + //private EventCallback OnBarElementClick { get; set;} private async Task OnBarElementClickedHandler(ChartMouseEventArgs args) { @@ -99,7 +92,7 @@ public void RefreshChartData() } private HorizontalBarChart Chart; - public DashboardChartComponent() + public DashboardHorizontalBarChartComponent() { #region chartOptions ChartOptionsObj = new @@ -154,7 +147,7 @@ public DashboardChartComponent() protected override bool ShouldRender() { - Console.WriteLine("should render:" + Chart.Data != null && (Chart.Data.Datasets?.Any(x => x.Data?.Any() ?? false) ?? false) && base.ShouldRender()); + //Console.WriteLine("should render:" + Chart.Data != null && (Chart.Data.Datasets?.Any(x => x.Data?.Any() ?? false) ?? false) && base.ShouldRender()); return Chart.Data != null && (Chart.Data.Datasets?.Any(x => x.Data?.Any() ?? false) ?? false) && base.ShouldRender(); } private string GetScaleFontColor() diff --git a/RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor b/RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor new file mode 100644 index 0000000..7674ebb --- /dev/null +++ b/RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor @@ -0,0 +1,19 @@ + + + @if (!String.IsNullOrEmpty(ChartTitle)) + { + + @ChartTitle + + } + + + + + + + + + + + \ No newline at end of file diff --git a/RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor.cs b/RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor.cs new file mode 100644 index 0000000..d2fd387 --- /dev/null +++ b/RadiocomDataViewApp/Components/DashboardLineGraphChartComponent.razor.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Blazorise.Charts; +using Microsoft.AspNetCore.Components; +using RadiocomDataViewApp.Objects; + +namespace RadiocomDataViewApp.Components +{ + public partial class DashboardLineGraphChartComponent : ComponentBase + { + private const string DEFAULT_POINT_COLOR = "#FFF"; + private const string DEFAULT_FILL_COLOR = "#555FAF"; + + private Object StandardTicks = new + { + FontColor = "#fff", + BeginAtZero = true + }; + public readonly ChartOptions chartOptions; + public readonly object ChartOptionsObj; + + private LineChart Chart; + + [Parameter] + public string FillColor { get; set; } + + [Parameter] + public string YAxisLabel { get; set; } + [Parameter] + public string XAxisLabel { get; set; } + [Parameter] + public string ChartTitle { get; set; } + [Parameter] + public Func PointColorGenerator { get; set; } + [Parameter] + public Func> GenerateChartDatas { get; set; } + [Parameter] + public string ScaleLabelFontColor { get; set; } + public DashboardLineGraphChartComponent() + { + #region chartOptions + ChartOptionsObj = new + { + Legend = new { Display = false }, + Scales = new + { + YAxes = new object[] + { + new + { + ScaleLabel = new + { + FontColor = GetScaleFontColor(), + Display = true, + LabelString = YAxisLabel ?? string.Empty + }, + Ticks = StandardTicks + + } + }, + XAxes = new object[] + { + new + { + ScaleLabel = new + { + FontColor = GetScaleFontColor(), + Display = true, + LabelString = XAxisLabel ?? string.Empty + }, + Ticks = StandardTicks + } + } + }, + AspectRatio = 1.5 + + }; + + + chartOptions = new ChartOptions() + { + Scales = new Scales() + { + YAxes = new List() { new Axis() { Ticks = new AxisTicks() { FontColor = "#fff" }, ScaleLabel = new AxisScaleLabel() { FontColor = "#fff", Display = true, LabelString = "valueObj" } } }, + XAxes = new List() { new Axis() { Ticks = new AxisTicks() { FontColor = "#fff" }, ScaleLabel = new AxisScaleLabel() { FontColor = "#fff", Display = true, LabelString = "dimension" } } }, + }, + }; + #endregion + + } + + public void RefreshChartData() + { + IEnumerable newDatas = GenerateChartDatas?.Invoke(); + Chart.Clear(); + Chart.AddLabels(newDatas.Select(x => x.Label).ToArray()); + + List colors = new List(); + for (int i = 0; i < newDatas.Count(); i++) + { + string lineColor = PointColorGenerator?.Invoke(i); + if (!string.IsNullOrWhiteSpace(lineColor)) + { + colors.Add(lineColor); + } + else + { + colors.Add(DEFAULT_POINT_COLOR); + } + } + + LineChartDataset newChartDataset = new LineChartDataset() + { + Data = newDatas.Select(x => new DashboardChartDatasetYValue() { Y = x.Value, DataId = x.DataId }).ToList(), + Fill = true, + BackgroundColor = DEFAULT_FILL_COLOR, + PointBackgroundColor = colors, + PointBorderColor = colors, + PointRadius = 3.5f + }; + //newChartDataset.HoverBorderColor.Clear(); + CurrentDataset = newChartDataset; + Chart.AddDataSet(newChartDataset); + Chart.Update(); + } + protected LineChartDataset CurrentDataset { get; set; } + + protected override void OnAfterRender(bool firstRender) + { + base.OnAfterRender(firstRender); + if (firstRender) + { + RefreshChartData(); + } + } + + private string GetScaleFontColor() + => string.IsNullOrWhiteSpace(ScaleLabelFontColor) ? "#fff" : ScaleLabelFontColor; + } +} diff --git a/RadiocomDataViewApp/Components/IndexCharts/TopPlayedArtistsChart.razor b/RadiocomDataViewApp/Components/IndexCharts/TopPlayedArtistsChart.razor index 3dadcd6..befd6d1 100644 --- a/RadiocomDataViewApp/Components/IndexCharts/TopPlayedArtistsChart.razor +++ b/RadiocomDataViewApp/Components/IndexCharts/TopPlayedArtistsChart.razor @@ -1,6 +1,6 @@  - HeaderButtonConfigs; private AggregateTimeRange ChartDataTimeRange; - private DashboardChartComponent Chart; + private DashboardHorizontalBarChartComponent Chart; private IEnumerable TopPlayedArtists() { List radioComData = RadiocomDataAggregateDataClient.GetMostPlayedArtists(ChartDataTimeRange); diff --git a/RadiocomDataViewApp/Components/IndexCharts/TopPlayedSongsChart.razor b/RadiocomDataViewApp/Components/IndexCharts/TopPlayedSongsChart.razor index 133f0bd..2a79a0b 100644 --- a/RadiocomDataViewApp/Components/IndexCharts/TopPlayedSongsChart.razor +++ b/RadiocomDataViewApp/Components/IndexCharts/TopPlayedSongsChart.razor @@ -1,6 +1,6 @@  - HeaderButtonConfigs { get; set; } diff --git a/RadiocomDataViewApp/Interfaces/IRadiocomDataAggregateDataClient.cs b/RadiocomDataViewApp/Interfaces/IRadiocomDataAggregateDataClient.cs index 8b6b080..11d93e8 100644 --- a/RadiocomDataViewApp/Interfaces/IRadiocomDataAggregateDataClient.cs +++ b/RadiocomDataViewApp/Interfaces/IRadiocomDataAggregateDataClient.cs @@ -10,9 +10,19 @@ namespace RadiocomDataViewApp.Interfaces public interface IRadiocomDataAggregateDataClient { List GetMostPlayedSongs(AggregateTimeRange timeRange); + + /// + /// Get the ArtistWorks for within the specfied timerange for the specified artist + /// + /// Time range to query + /// Artist id to query forr + /// + List GetMostPlayedSongs(AggregateTimeRange timeRange, int artistId); List GetMostPlayedArtists(AggregateTimeRange timeRange); int GetTotalUniqueSongs(AggregateTimeRange timeRange); + + List GetSongPlayedOverTime(AggregateTimeRange timeRange, int artistWorkId); } } diff --git a/RadiocomDataViewApp/Objects/BarChartDatasetValue.cs b/RadiocomDataViewApp/Objects/BarChartDatasetValue.cs index 2a42cc0..69beeb6 100644 --- a/RadiocomDataViewApp/Objects/BarChartDatasetValue.cs +++ b/RadiocomDataViewApp/Objects/BarChartDatasetValue.cs @@ -10,4 +10,10 @@ public class BarChartDatasetXValue public int DataId { get; set; } public int X { get; set; } } + + public class DashboardChartDatasetYValue + { + public int DataId { get; set; } + public int Y { get; set; } + } } diff --git a/RadiocomDataViewApp/Pages/Artist.razor b/RadiocomDataViewApp/Pages/Artist.razor index 58a09de..3c529e4 100644 --- a/RadiocomDataViewApp/Pages/Artist.razor +++ b/RadiocomDataViewApp/Pages/Artist.razor @@ -1,6 +1,10 @@ @page "/artist/{ArtistId:int}" +@using RadiocomDataViewApp.Components.ArtistCharts; +

Artist:

-
- Here is the artist page - @hello() -
+ + + + + + diff --git a/RadiocomDataViewApp/Pages/Artist.razor.cs b/RadiocomDataViewApp/Pages/Artist.razor.cs index 3f56096..f5d691e 100644 --- a/RadiocomDataViewApp/Pages/Artist.razor.cs +++ b/RadiocomDataViewApp/Pages/Artist.razor.cs @@ -2,11 +2,13 @@ namespace RadiocomDataViewApp.Pages { - public partial class Artist + public partial class Artist : ComponentBase { [Parameter] public int ArtistId{ get; set; } + public string ArtistName { get; set; } + public string hello() => "hello"; } diff --git a/RadiocomDataViewApp/Pages/ArtistWork.razor b/RadiocomDataViewApp/Pages/ArtistWork.razor new file mode 100644 index 0000000..a6c5e1a --- /dev/null +++ b/RadiocomDataViewApp/Pages/ArtistWork.razor @@ -0,0 +1,51 @@ +@page "/artistwork/{ArtistWorkId:int}" + +

@ArtistWorkName

+ + + Artist + Song Name + + + + + + + + + + + +@using RadiocomDataViewApp.Clients; +@code{ + + Clients.AggregateTimeRange ChartDataTimeRange = Clients.AggregateTimeRange.SevenDays; + private IEnumerable SongPlayedOverTime() + { + List radioComData = RadiocomDataAggregateDataClient.GetSongPlayedOverTime(ChartDataTimeRange,ArtistWorkId); + return radioComData.Select(x => new DashboardChartData() { Label = x.Name, Value = x.Count, DataId = x.ItemId }); + + } + private List HeaderButtonConfigs { get; set; } + private void SetupHeaderButtons() + { + HeaderButtonConfigs = new List() + { + new HeaderButtonState(){Text = "7 Days",ButtonColor=Color.Secondary,Active=true, ButtonClickCallback = EventCallback.Factory.Create(this, () => UpdateChartDataTimeRange(AggregateTimeRange.SevenDays)) } , + new HeaderButtonState(){Text = "3 Months", ButtonClickCallback = EventCallback.Factory.Create(this, () => UpdateChartDataTimeRange(AggregateTimeRange.ThreeMonths)) } , + new HeaderButtonState(){Text = "All Time", ButtonClickCallback = EventCallback.Factory.Create(this, () => UpdateChartDataTimeRange(AggregateTimeRange.AllTime)) } + }; + + ChartDataTimeRange = AggregateTimeRange.SevenDays; + } + private DashboardLineGraphChartComponent Chart; + + private void UpdateChartDataTimeRange(AggregateTimeRange mostPlayedTimeRange) + { + ChartDataTimeRange = mostPlayedTimeRange; + Chart.RefreshChartData(); + } +} \ No newline at end of file diff --git a/RadiocomDataViewApp/Pages/ArtistWork.razor.cs b/RadiocomDataViewApp/Pages/ArtistWork.razor.cs new file mode 100644 index 0000000..0b0c3c5 --- /dev/null +++ b/RadiocomDataViewApp/Pages/ArtistWork.razor.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using RadiocomDataViewApp.Interfaces; + +namespace RadiocomDataViewApp.Pages +{ + public partial class ArtistWork : ComponentBase + { + [Parameter] + public int ArtistWorkId { get; set; } + + public string ArtistWorkName { get; set; } + + + public ArtistWork() + { + SetupHeaderButtons(); + } + + + + + + [Inject] + public IRadiocomDataAggregateDataClient RadiocomDataAggregateDataClient { get; set; } + } +} diff --git a/RadiocomDataViewApp/Pages/ArtistWorks.razor.cs b/RadiocomDataViewApp/Pages/ArtistWorks.razor.cs index c2c30e6..3dde03b 100644 --- a/RadiocomDataViewApp/Pages/ArtistWorks.razor.cs +++ b/RadiocomDataViewApp/Pages/ArtistWorks.razor.cs @@ -18,7 +18,7 @@ public partial class ArtistWorks : ComponentBase [Parameter] public string AlphaChar { get; set; } - Func HrefGenerator = item => $"/artistwork/{item.Id}"; + Func HrefGenerator = item => $"artistwork/{item.Id}"; private class ArtistWorkDisplay : IHasName diff --git a/RadiocomDataViewApp/Pages/Artists.razor.cs b/RadiocomDataViewApp/Pages/Artists.razor.cs index dfdc0b7..04bc95e 100644 --- a/RadiocomDataViewApp/Pages/Artists.razor.cs +++ b/RadiocomDataViewApp/Pages/Artists.razor.cs @@ -18,6 +18,6 @@ public partial class Artists: ComponentBase [Parameter] public string AlphaChar { get; set; } - Func HrefGenerator = item => $"/artist/{item.Id}"; + Func HrefGenerator = item => $"artist/{item.Id}"; } } diff --git a/RadiocomDataViewApp/Pages/Index.razor b/RadiocomDataViewApp/Pages/Index.razor index f56bebe..936db6b 100644 --- a/RadiocomDataViewApp/Pages/Index.razor +++ b/RadiocomDataViewApp/Pages/Index.razor @@ -6,14 +6,7 @@ @inject IRadiocomDataAggregateDataClient RadiocomDataAggregateDataClient ; @using RadiocomDataViewApp.Components.IndexCharts; -A -A - -A -A -A - -

asdjfosadjf jfdios fjdsoapfjdsaif jdsiafjdisa pfdjsafpd jsaifodpsa jfidospafjd isop

+@*

asdjfosadjf jfdios fjdsoapfjdsaif jdsiafjdisa pfdjsafpd jsaifodpsa jfidospafjd isop

*@ diff --git a/RadiocomDataViewApp/Pages/Index.razor.cs b/RadiocomDataViewApp/Pages/Index.razor.cs index 0f65f9c..093a08f 100644 --- a/RadiocomDataViewApp/Pages/Index.razor.cs +++ b/RadiocomDataViewApp/Pages/Index.razor.cs @@ -18,7 +18,7 @@ using RadiocomDataViewApp.Objects; using static RadiocomDataViewApp.Components.ChartComponentHeaderButtons; -using static RadiocomDataViewApp.Components.DashboardChartComponent; +using static RadiocomDataViewApp.Components.DashboardHorizontalBarChartComponent; namespace RadiocomDataViewApp.Pages { @@ -57,13 +57,13 @@ protected override Task OnInitializedAsync() return base.OnInitializedAsync(); } - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - //await HandleRedraw(); - } - } + //protected override async Task OnAfterRenderAsync(bool firstRender) + //{ + // if (firstRender) + // { + // //await HandleRedraw(); + // } + //} diff --git a/RadiocomDataViewApp/Properties/launchSettings.json b/RadiocomDataViewApp/Properties/launchSettings.json index 36b83e7..52185de 100644 --- a/RadiocomDataViewApp/Properties/launchSettings.json +++ b/RadiocomDataViewApp/Properties/launchSettings.json @@ -30,15 +30,14 @@ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" }, "IIS": { - "commandName": "IIS", - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "launchUrl": "http://dev.radiocomview.com/", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "NO_PROXY": "dev.radiocomview.com" - } - + "commandName": "IIS", + "launchBrowser": true, + "launchUrl": "http://dev.radiocomview.com/", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "NO_PROXY": "dev.radiocomview.com" + }, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" } } } \ No newline at end of file diff --git a/RadiocomDataViewApp/RadiocomDataViewApp.csproj b/RadiocomDataViewApp/RadiocomDataViewApp.csproj index 43821c7..070e640 100644 --- a/RadiocomDataViewApp/RadiocomDataViewApp.csproj +++ b/RadiocomDataViewApp/RadiocomDataViewApp.csproj @@ -8,6 +8,10 @@ + + TRACE + + @@ -15,7 +19,7 @@ - + diff --git a/RadiocomDataViewApp/Shared/LayoutSiderContentNavMenu.razor b/RadiocomDataViewApp/Shared/LayoutSiderContentNavMenu.razor index f941514..0ff944a 100644 --- a/RadiocomDataViewApp/Shared/LayoutSiderContentNavMenu.razor +++ b/RadiocomDataViewApp/Shared/LayoutSiderContentNavMenu.razor @@ -53,8 +53,7 @@ StateHasChanged(); } public Sidebar sidebar; - SidebarSubItem mailSidebarSubItems; - SidebarSubItem appsSidebarSubItems; + private bool siderVisible = true; void ToggleSidebar() { diff --git a/RadiocomDataViewApp/Shared/MainLayout.razor b/RadiocomDataViewApp/Shared/MainLayout.razor index b35737b..5b5809d 100644 --- a/RadiocomDataViewApp/Shared/MainLayout.razor +++ b/RadiocomDataViewApp/Shared/MainLayout.razor @@ -5,8 +5,8 @@ - - here is some text + + This site is in preview. Data is mocked. @**@ diff --git a/RadiocomDataViewApp/web.config b/RadiocomDataViewApp/web.config index 2ac80c7..c9d4b34 100644 --- a/RadiocomDataViewApp/web.config +++ b/RadiocomDataViewApp/web.config @@ -5,7 +5,7 @@ - + diff --git a/RadiocomDataViewApp/wwwroot/css/app.css b/RadiocomDataViewApp/wwwroot/css/app.css index 0383874..5ebface 100644 --- a/RadiocomDataViewApp/wwwroot/css/app.css +++ b/RadiocomDataViewApp/wwwroot/css/app.css @@ -198,4 +198,7 @@ app { } .d-grid{ display: grid !important; +} +.breadcrumb { + background-color:initial; } \ No newline at end of file