src/Stratis.FederatedSidechains.AdminDashboard/Controllers/HomeController.cs
/// <summary>
/// This action redraw the dashboard with the new cached datas, it's only called from the SignalR event
/// </summary>
This action redraw the dashboard with the new cached datas, it's only called from the SignalR event
This action redraw the dashboard with the new cached datas it ' s only called from the SignalR event
[Ajax]
        [Route("update-dashboard")]
        public IActionResult UpdateDashboard()
        {
            if(!string.IsNullOrEmpty(this.distributedCache.GetString("DashboardData")))
            {
                var dashboardModel = JsonConvert.DeserializeObject<DashboardModel>(this.distributedCache.GetString("DashboardData"));
                this.ViewBag.History = new[] {
                    dashboardModel.StratisNode.History,
                    dashboardModel.SidechainNode.History
                };
                this.ViewBag.StratisTicker = dashboardModel.StratisNode.CoinTicker;
                this.ViewBag.SidechainTicker= dashboardModel.SidechainNode.CoinTicker;
                return PartialView("Dashboard", dashboardModel);
            }
            return NoContent();
        }
[ Ajax ] [ Route ( " " ) ] public IActionResult UpdateDashboard ( ) { if ( ! string . IsNullOrEmpty ( this . distributedCache . GetString ( " " ) ) ) { var dashboardModel = JsonConvert . DeserializeObject < DashboardModel > ( this . distributedCache . GetString ( " " ) ) ; this . ViewBag . History = new [ ] { dashboardModel . StratisNode . History , dashboardModel . SidechainNode . History } ; this . ViewBag . StratisTicker = dashboardModel . StratisNode . CoinTicker ; this . ViewBag . SidechainTicker = dashboardModel . SidechainNode . CoinTicker ; return PartialView ( " " , dashboardModel ) ; } return NoContent ( ) ; }
This action redraw the dashboard with the new cached datas, it's only called from the SignalR event
This action redraw the dashboard with the new cached datas it ' s only called from the SignalR event