Beispiel #1
0
        protected override async Task <TEntity> ComputeStateAsync(CancellationToken cancellationToken)
        {
            if (RequestedEntityName == null)
            {
                if (ParentPageName != null)
                {
                    NavigationManager.NavigateTo(ParentPageName);
                }
            }

            else
            {
                var kubernetesObject = await K8SRepository.Get(RequestedEntityName, RequestedEntityNamespace);

                if (kubernetesObject == null)
                {
                    NavigationManager.NavigateTo(ParentPageName ?? "/");
                }
                else
                {
                    return(kubernetesObject);
                }
            }

            throw new InvalidOperationException();
        }
Beispiel #2
0
 protected override async Task <List <TEntity> > ComputeStateAsync(CancellationToken cancellationToken)
 {
     return(await K8SRepository.GetAllNamespaced());
 }