コード例 #1
0
 private Task EndpointEvent(EndpointEventApiModel ev)
 {
     EndpointList.Results.Update(ev);
     PagedendpointList = EndpointList.GetPaged(int.Parse(Page), CommonHelper.PageLength, EndpointList.Error);
     StateHasChanged();
     return(Task.CompletedTask);
 }
コード例 #2
0
 /// <summary>
 /// Notify page change
 /// </summary>
 /// <param name="page"></param>
 public async Task PagerPageChangedAsync(int page)
 {
     CommonHelper.Spinner = "loader-big";
     StateHasChanged();
     if (!string.IsNullOrEmpty(EndpointList.ContinuationToken) && page > PagedendpointList.PageCount)
     {
         EndpointList = await RegistryHelper.GetEndpointListAsync(DiscovererId, ApplicationId, SupervisorId, EndpointList);
     }
     PagedendpointList = EndpointList.GetPaged(page, CommonHelper.PageLength, null);
     NavigationManager.NavigateTo(NavigationManager.BaseUri + "endpoints/" + page + "/" + DiscovererId + "/" + ApplicationId + "/" + SupervisorId);
     CommonHelper.Spinner = string.Empty;
     StateHasChanged();
 }
コード例 #3
0
        /// <summary>
        /// OnAfterRenderAsync
        /// </summary>
        /// <param name="firstRender"></param>
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            if (firstRender)
            {
                EndpointList = await RegistryHelper.GetEndpointListAsync(DiscovererId, ApplicationId, SupervisorId);

                Page = "1";
                PagedendpointList    = EndpointList.GetPaged(int.Parse(Page), CommonHelper.PageLength, EndpointList.Error);
                CommonHelper.Spinner = string.Empty;
                CommonHelper.CheckErrorOrEmpty(PagedendpointList, ref _tableView, ref _tableEmpty);
                StateHasChanged();

                _endpointEvents = await RegistryServiceEvents.SubscribeEndpointEventsAsync(
                    ev => InvokeAsync(() => EndpointEvent(ev)));
            }
        }