-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard item page view #4142
Merged
Merged
Dashboard item page view #4142
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ab8581a
add dashboard item information to insights page
liyiy bf8d958
update all dashboard item links
liyiy 4d51174
add logic to include dashboard name on insights dashboard item
liyiy 603b219
add back to dashboards link and update all dashboard item links
liyiy 9dc7a10
style clean up
liyiy 8079675
typescript fixes
liyiy f9f0ff1
add comments for posterity
paolodamico cef441d
Merge branch 'master' into dashboard-item-view
liyiy 3fc2ecc
update dashboard item design and componentize item header
liyiy 500ef15
remove dashboardName variable
liyiy 6fa66c0
refactor displayMap
liyiy 06877c1
update dashboard item logic and props
liyiy 3c84f37
span fix
liyiy 6d8ce73
Merge branch 'master' into dashboard-item-view
liyiy 04d6bc0
clean up insight dashboard item view url
liyiy d2bfea1
fix weird state bug with trends
liyiy 3042869
update dashboard item view for paths
liyiy 2d5c48c
clean up params for dashboardItemHeader
liyiy 22ae887
maintain update dashboard item functionality
liyiy 532bdb2
bandaid fix retention insight history bug
liyiy 272b283
Merge branch 'master' into dashboard-item-view
liyiy 9fb7dbc
remove stale comment
paolodamico 996ba6a
typing tweak
paolodamico c1fc789
feedback updates
liyiy 8700dd0
url namespace update for clarity
liyiy 923162a
update e2e
liyiy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
import { Link } from 'lib/components/Link' | ||
import { PageHeader } from 'lib/components/PageHeader' | ||
import { ArrowLeftOutlined } from '@ant-design/icons' | ||
import { IconDashboard } from 'lib/components/icons' | ||
import { useValues } from 'kea' | ||
import { dashboardLogic } from './dashboardLogic' | ||
import './Dashboard.scss' | ||
import { insightLogic } from 'scenes/insights/insightLogic' | ||
|
||
interface Props { | ||
dashboardId: number | ||
} | ||
|
||
export function DashboardItemHeader({ dashboardId }: Props): JSX.Element { | ||
const { dashboard } = useValues(dashboardLogic({ id: dashboardId })) | ||
const { dashboardItem } = useValues(insightLogic) | ||
|
||
return ( | ||
<div className="dashboard-item-header"> | ||
<Link to={`/dashboard/${dashboardId}`}> | ||
liyiy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<ArrowLeftOutlined /> Back to {dashboard?.name} dashboard | ||
</Link> | ||
<div style={{ marginTop: -16 }}> | ||
<PageHeader title={dashboardItem?.name} /> | ||
<div className="dashboard-item-description text-default"> | ||
<div className="title"> | ||
<IconDashboard /> | ||
<span style={{ paddingLeft: 6 }}> | ||
Viewing graph <b>{dashboardItem?.name}</b> from{' '} | ||
<Link to={`/dashboard/${dashboardId}`}>{dashboard?.name}</Link> dashboard. | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a bit of a pain to reroute the Insights History with the new
insights/${id}
links so I'm leaving it as it was originally (for now) to maintain functionality.