Add button for switching between dashboards

pull/2104/head
Alex P 2017-10-10 14:29:35 -07:00 committed by Andrew Watkins
parent 2478554d19
commit 1fe6d76f7e
2 changed files with 28 additions and 1 deletions

View File

@ -44,6 +44,22 @@ const DashboardHeader = ({
{children}
</ul>
</div>}
{children.length > 1
? <div className="dropdown dashboard-switcher">
<button
className="btn btn-square btn-default btn-sm dropdown-toggle"
type="button"
data-toggle="dropdown"
>
<span className="icon dash-f" />
</button>
<ul className="dropdown-menu">
{_.sortBy(children, c =>
c.props.children.props.children.toLowerCase()
)}
</ul>
</div>
: null}
</div>
<div className="page-header__right">
<GraphTips />

View File

@ -334,3 +334,14 @@ $tick-script-overlay-margin: 30px;
width: 126px;
}
}
/*
Dashboard Switcher
-----------------------------------------------------------------------------
*/
.dropdown.dashboard-switcher {
margin-right: 4px;
}
.dropdown.dashboard-switcher .btn.dropdown-toggle {
justify-content: center;
}