Skip to content

Commit

Permalink
Merge pull request #12531 from influxdata/feat/remove-dash-export-fea…
Browse files Browse the repository at this point in the history
…ture-flag

feat(ui): Show dashboard and template export buttons
  • Loading branch information
ischolten authored Mar 12, 2019
2 parents 947aade + d0a76dd commit b9808ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,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
1. [12531](https://github.com/influxdata/influxdb/pull/12531): Add ability to export a dashboard and a task

### Bug Fixes

Expand Down
19 changes: 8 additions & 11 deletions ui/src/dashboards/components/dashboard_index/DashboardCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {withRouter, WithRouterProps} from 'react-router'
// Components
import {IconFont, ComponentColor} from '@influxdata/clockface'
import {ResourceList, Context} from 'src/clockface'
import FeatureFlag from 'src/shared/components/FeatureFlag'
import InlineLabels from 'src/shared/components/inlineLabels/InlineLabels'

// Actions
Expand Down Expand Up @@ -98,15 +97,13 @@ class DashboardCard extends PureComponent<Props> {

return (
<Context>
<FeatureFlag>
<Context.Menu icon={IconFont.CogThick}>
<Context.Item
label="Export"
action={this.handleExport}
value={dashboard}
/>
</Context.Menu>
</FeatureFlag>
<Context.Menu icon={IconFont.CogThick}>
<Context.Item
label="Export"
action={this.handleExport}
value={dashboard}
/>
</Context.Menu>
<Context.Menu
icon={IconFont.Duplicate}
color={ComponentColor.Secondary}
Expand Down Expand Up @@ -166,7 +163,7 @@ class DashboardCard extends PureComponent<Props> {
// notify success
return newLabel
} catch (err) {
console.log(err)
console.error(err)
// notify of fail
throw err
}
Expand Down
5 changes: 1 addition & 4 deletions ui/src/tasks/components/TaskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {withRouter, WithRouterProps} from 'react-router'
// Components
import {SlideToggle, ComponentSize} from '@influxdata/clockface'
import {ResourceList, Context} from 'src/clockface'
import FeatureFlag from 'src/shared/components/FeatureFlag'
import InlineLabels from 'src/shared/components/inlineLabels/InlineLabels'

// API
Expand Down Expand Up @@ -90,9 +89,7 @@ export class TaskCard extends PureComponent<Props & WithRouterProps> {
return (
<Context>
<Context.Menu icon={IconFont.CogThick}>
<FeatureFlag>
<Context.Item label="Export" action={this.handleExport} />
</FeatureFlag>
<Context.Item label="Export" action={this.handleExport} />
<Context.Item label="View Task Runs" action={this.handleViewRuns} />
<Context.Item label="Run Task" action={onRunTask} value={task.id} />
</Context.Menu>
Expand Down

0 comments on commit b9808ed

Please sign in to comment.