Skip to content
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

feat(ui/dash): Add import dashboard button to org view #12524

Merged
merged 1 commit into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Features
1. [12496](https://github.com/influxdata/influxdb/pull/12496): Add ability to import a dashboard
1. [12524](https://github.com/influxdata/influxdb/pull/12524): Add ability to import a dashboard from org view

### Bug Fixes

Expand Down
13 changes: 6 additions & 7 deletions ui/src/organizations/components/Dashboards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import _ from 'lodash'
// Components
import DashboardsIndexContents from 'src/dashboards/components/dashboard_index/DashboardsIndexContents'
import {Input, Tabs} from 'src/clockface'
import {Button, ComponentColor, IconFont} from '@influxdata/clockface'
import {IconFont} from '@influxdata/clockface'
import ImportDashboardOverlay from 'src/dashboards/components/ImportDashboardOverlay'
import AddResourceDropdown from 'src/shared/components/AddResourceDropdown'

// APIs
import {createDashboard, cloneDashboard} from 'src/dashboards/apis/v2/'
Expand Down Expand Up @@ -112,12 +113,10 @@ class Dashboards extends PureComponent<Props, State> {
testID={`dashboards--filter-field ${searchTerm}`}
customClass="filter-dashboards"
/>
<Button
color={ComponentColor.Primary}
onClick={this.handleCreateDashboard}
icon={IconFont.Plus}
text="Create Dashboard"
titleText="Create a new dashboard"
<AddResourceDropdown
onSelectNew={this.handleCreateDashboard}
onSelectImport={this.handleToggleOverlay}
resourceName="Dashboard"
/>
</Tabs.TabContentsHeader>
<DashboardsIndexContents
Expand Down