Skip to content

Commit

Permalink
Use resourceObjPath instead of resourcePath for pod status links on o…
Browse files Browse the repository at this point in the history
…verview page
  • Loading branch information
TheRealJon committed Dec 11, 2018
1 parent 5b87d03 commit 522bb1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/public/components/overview/project-overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ const Metrics: React.SFC<MetricsProps> = ({metrics, item}) => {

const Status: React.SFC<StatusProps> = ({item}) => {
const {isRollingOut, readiness, obj, current} = item;
const {namespace, name} = obj.metadata;
const podLink = current ? `${resourcePath(_.get(current, 'obj.kind'), _.get(current, 'obj.metadata.name'), namespace)}/pods`
: `${resourcePath(obj.kind, name, namespace)}/pods`;
if (isRollingOut) {
// TODO: Show pod status for previous and next revisions.
return <div className="project-overview__detail project-overview__detail--status text-muted">
Expand All @@ -149,6 +146,8 @@ const Status: React.SFC<StatusProps> = ({item}) => {
}

if (readiness) {
const podLink = current ? `${resourceObjPath(current.obj, _.get(current, 'obj.kind'))}/pods`
: `${resourceObjPath(obj, obj.kind)}/pods`;
return <div className="project-overview__detail project-overview__detail--status">
<Link to={podLink}>
{readiness.ready} of {readiness.desired} pods
Expand Down

0 comments on commit 522bb1a

Please sign in to comment.