Skip to content

Commit

Permalink
Swap Project for Namespace kind on ClusterOverviewPage if openshiftFl…
Browse files Browse the repository at this point in the history
…ag is true
  • Loading branch information
benjaminapetersen committed Jul 17, 2018
1 parent e292038 commit 05bd88a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion frontend/public/components/cluster-overview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ const LimitedGraphs = ({openshiftFlag}) => {
};

const GraphsPage = ({fake, limited, namespace, openshiftFlag}) => {
if (flagPending(openshiftFlag)) {
return null;
}
const graphs = limited ? <LimitedGraphs namespace={namespace} openshiftFlag={openshiftFlag} /> : <Graphs namespace={namespace} />;
const body = <div className="row">
<div className="col-lg-8 col-md-12">
Expand Down Expand Up @@ -191,7 +194,16 @@ const GraphsPage = ({fake, limited, namespace, openshiftFlag}) => {
return body;
}

return <Firehose resources={[{kind: 'Namespace', name: namespace, isList: false, prop: 'data'}]}>
const resources = [{
kind: openshiftFlag
? 'Project'
: 'Namespace',
name: namespace,
isList: false,
prop: 'data'
}];

return <Firehose resources={resources}>
<StatusBox label="Namespaces">
{ body }
</StatusBox>
Expand Down

0 comments on commit 05bd88a

Please sign in to comment.