Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.6] Bug 1921603: Fix crash when loaded is true but the data set doesn't include the pods #7985

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions frontend/public/components/daemon-set.tsx
Expand Up @@ -146,16 +146,19 @@ const DaemonSetDetails: React.FC<DaemonSetDetailsProps> = ({ obj: daemonset }) =
namespace={daemonset.metadata.namespace}
kind={daemonset.kind}
render={(d) => {
return d.loaded ? (
if (!d.loaded) {
return <LoadingInline />;
} else if (!d.data[daemonset.metadata.uid].pods) {
return null;
}
return (
<PodRing
key={daemonset.metadata.uid}
pods={d.data[daemonset.metadata.uid].pods}
obj={daemonset}
resourceKind={DaemonSetModel}
enableScaling={false}
/>
) : (
<LoadingInline />
);
}}
/>
Expand Down
9 changes: 6 additions & 3 deletions frontend/public/components/deployment-config.tsx
Expand Up @@ -172,16 +172,19 @@ export const DeploymentConfigsDetails: React.FC<{ obj: K8sResourceKind }> = ({ o
namespace={dc.metadata.namespace}
kind={dc.kind}
render={(d) => {
return d.loaded ? (
if (!d.loaded) {
return <LoadingInline />;
} else if (!d.data[dc.metadata.uid]) {
return null;
}
return (
<PodRingSet
key={dc.metadata.uid}
podData={d.data[dc.metadata.uid]}
obj={dc}
resourceKind={DeploymentConfigModel}
path="/spec/replicas"
/>
) : (
<LoadingInline />
);
}}
/>
Expand Down
9 changes: 6 additions & 3 deletions frontend/public/components/stateful-set.tsx
Expand Up @@ -61,16 +61,19 @@ const StatefulSetDetails: React.FC<StatefulSetDetailsProps> = ({ obj: ss }) => (
namespace={ss.metadata.namespace}
kind={ss.kind}
render={(d) => {
return d.loaded ? (
if (!d.loaded) {
return <LoadingInline />;
} else if (!d.data[ss.metadata.uid]) {
return null;
}
return (
<PodRingSet
key={ss.metadata.uid}
podData={d.data[ss.metadata.uid]}
obj={ss}
resourceKind={StatefulSetModel}
path="/spec/replicas"
/>
) : (
<LoadingInline />
);
}}
/>
Expand Down