Skip to content

Commit

Permalink
Add button dropdown for switching graph / timeline
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Coray <patrick.coray@bluewin.ch>
  • Loading branch information
copa2 committed Nov 18, 2018
1 parent 7a8a730 commit 09dafb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
.TracePageHeader--titleRow {
align-items: center;
display: flex;
padding-right: 0.5rem;
}

.TracePageHeader--title {
Expand Down
13 changes: 4 additions & 9 deletions packages/jaeger-ui/src/components/TracePage/TracePageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// limitations under the License.

import * as React from 'react';
import { Button, Dropdown, Icon, Input, Menu } from 'antd';
import { Button, Dropdown, Input, Menu } from 'antd';
import IoChevronDown from 'react-icons/lib/io/chevron-down';
import IoChevronRight from 'react-icons/lib/io/chevron-right';
import IoIosFilingOutline from 'react-icons/lib/io/ios-filing-outline';
Expand Down Expand Up @@ -143,9 +143,6 @@ export function TracePageHeaderFn(props: TracePageHeaderProps) {
Trace JSON (unadjusted)
</Link>
</Menu.Item>
<Menu.Item>
<a onClick={onTraceGraphViewClicked}>{traceGraphView ? 'Trace Timeline' : 'Trace Graph'}</a>
</Menu.Item>
</Menu>
);

Expand Down Expand Up @@ -196,11 +193,9 @@ export function TracePageHeaderFn(props: TracePageHeaderProps) {
resultCount={resultCount}
ref={forwardedRef}
/>
<Dropdown overlay={viewMenu}>
<Button className="ub-mr2">
View Options <Icon type="down" />
</Button>
</Dropdown>
<Dropdown.Button overlay={viewMenu} onClick={onTraceGraphViewClicked}>
{traceGraphView ? 'Trace Timeline' : 'Trace Graph'}
</Dropdown.Button>
{archiveButtonVisible && (
<Button className="ub-mr2 ub-flex ub-items-center" onClick={onArchiveClicked}>
<IoIosFilingOutline className="TracePageHeader--archiveIcon" />
Expand Down

0 comments on commit 09dafb4

Please sign in to comment.