Re-add sidebar links to individual resource pages (#1191)

Add Sidebar links to Pods, Deployments, and Replication Controllers

In #1016 we removed the sidebar links to individual resource pages in favour of a namespace
page that lists all resources. These resource pages require no additional code so they're still 
in our UI (accessible under /pods, /deployments etc), just not easily findable. I find them 
useful to check when in development mode, or when debugging something, so I'd like to 
re-add links.

If we don't want them in permanently, we can gate them behind `NODE_ENV=development`
This commit is contained in:
Risha Mars 2018-06-25 14:37:16 -07:00 committed by GitHub
parent 8a513af862
commit 269714ab35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -8,13 +8,21 @@
background-repeat: no-repeat;
background-size: 100% 50vh;
& .ant-menu-submenu {
& .ant-menu-submenu-title, & .anticon{
/* override ant transition animation */
transition: none;
}
}
& .sidebar-menu {
background: none;
}
& .sidebar-menu-item {
& .sidebar-menu-item, & .sidebar-title {
font-size: 16px;
font-weight: var(--font-weight-bold);
color: white;
& a {
color: white;

View File

@ -180,6 +180,15 @@ class Sidebar extends React.Component {
: null
}
<Menu.SubMenu
className="sidebar-menu-item"
key="byresource"
title={<span className="sidebar-title"><Icon type="bars" />{this.state.collapsed ? "" : "Resources"}</span>}>
<Menu.Item><ConduitLink to="/deployments">Deployments</ConduitLink></Menu.Item>
<Menu.Item><ConduitLink to="/replicationcontrollers">Replication Controllers</ConduitLink></Menu.Item>
<Menu.Item><ConduitLink to="/pods">Pods</ConduitLink></Menu.Item>
</Menu.SubMenu>
<Menu.Item className="sidebar-menu-item" key="/docs">
<Link to="https://conduit.io/docs/" target="_blank">
<Icon type="solution" />