Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
[OKD] Nav: Fix after upstream merge
Browse files Browse the repository at this point in the history
Do not use Separator
  • Loading branch information
mareklibra committed Jan 2, 2019
1 parent 04a1e3f commit 5f9ad6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/public/components/nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ const MonitoringNavSection = connectToURLs(MonitoringRoutes.Prometheus, Monitori

export const Navigation = ({ isNavOpen, onNavSelect }) => {
if (isKubevirt()) {
// The ResourceNSLink, HrefLink, Sep components are passed as props to eliminate the need for additional changes in OKD core code. Ugly anti-pattern, but serves its purpose.
const PageNav = <KubevirtNav isOpen={isOpen} onToggle={this.toggle} close={this.close} scroller={this.scroller} onWheel={this.preventScroll} searchStartsWith={searchStartsWith} ResourceNSLink={ResourceNSLink} HrefLink={HrefLink} Sep={Sep} ResourceClusterLink={ResourceClusterLink} MonitoringNavSection={MonitoringNavSection} rolesStartsWith={rolesStartsWith} rolebindingsStartsWith={rolebindingsStartsWith} quotaStartsWith={quotaStartsWith} />;
// The ResourceNSLink, HrefLink components are passed as props to eliminate the need for additional changes in OKD core code. Ugly anti-pattern, but serves its purpose.
const PageNav = <KubevirtNav isOpen={isNavOpen} onToggle={this.toggle} close={this.close} scroller={this.scroller} onWheel={this.preventScroll} searchStartsWith={searchStartsWith} ResourceNSLink={ResourceNSLink} HrefLink={HrefLink} ResourceClusterLink={ResourceClusterLink} MonitoringNavSection={MonitoringNavSection} rolesStartsWith={rolesStartsWith} rolebindingsStartsWith={rolebindingsStartsWith} quotaStartsWith={quotaStartsWith} />;
return <PageSidebar nav={PageNav} isNavOpen={isNavOpen} />;
}

Expand Down
5 changes: 2 additions & 3 deletions frontend/public/kubevirt/components/nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { VmTemplatesPageTitle } from './vm-template';

// With respect to keep changes to OKD codebase at bare minimum,
// the navigation needs to be reconstructed.
// The ResourceNSLink, HrefLink, Sep, MonitoringNavSection components are passed as props to eliminate the need for additional changes in OKD core code. Ugly anti-pattern, but serves its purpose.
const Nav = ({ isOpen, onToggle, close, scroller, onWheel, searchStartsWith, ResourceNSLink, HrefLink, Sep, ResourceClusterLink, MonitoringNavSection, rolesStartsWith, rolebindingsStartsWith, quotaStartsWith }) => {
// The ResourceNSLink, HrefLink, MonitoringNavSection components are passed as props to eliminate the need for additional changes in OKD core code. Ugly anti-pattern, but serves its purpose.
const Nav = ({ isOpen, onToggle, close, scroller, onWheel, searchStartsWith, ResourceNSLink, HrefLink, ResourceClusterLink, MonitoringNavSection, rolesStartsWith, rolebindingsStartsWith, quotaStartsWith }) => {
return (
<React.Fragment>
<button type="button" className="sidebar-toggle" aria-controls="sidebar" aria-expanded={isOpen} onClick={onToggle}>
Expand Down Expand Up @@ -42,7 +42,6 @@ const Nav = ({ isOpen, onToggle, close, scroller, onWheel, searchStartsWith, Res
<ResourceNSLink resource="statefulsets" name="Stateful Sets" onClick={close} />
<ResourceNSLink resource="secrets" name="Secrets" onClick={close} />
<ResourceNSLink resource="configmaps" name="Config Maps" onClick={close} />
<Sep />
<ResourceNSLink resource="cronjobs" name="Cron Jobs" onClick={close} />
<ResourceNSLink resource="jobs" name="Jobs" onClick={close} />
<ResourceNSLink resource="daemonsets" name="Daemon Sets" onClick={close} />
Expand Down

0 comments on commit 5f9ad6e

Please sign in to comment.