Merge pull request from influxdata/fix/scraper-create-bucket-change

Fix create scraper bucket dropdown
pull/13636/head
Palakp41 2019-04-25 12:17:02 -07:00 committed by GitHub
commit 2a76243170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 14 deletions
ui/src
authorizations/utils
buckets
actions
components
dataLoaders/components
organizations/actions
scrapers/components
telegrafs/components

View File

@ -122,7 +122,7 @@ export const specificBucketsPermissions = (
action: permission,
resource: {
type: PermissionResource.TypeEnum.Buckets,
orgID: b.organizationID,
orgID: b.orgID,
id: b.id,
},
}

View File

@ -110,7 +110,7 @@ export const createBucket = (bucket: Bucket) => async (
const createdBucket = await client.buckets.create({
...bucket,
organizationID: org.id,
orgID: org.id,
})
dispatch(addBucket(createdBucket))

View File

@ -147,7 +147,7 @@ class BucketList extends PureComponent<Props & WithRouterProps, State> {
link: string
) => {
const {onSetBucketInfo, onSetDataLoadersType, router} = this.props
onSetBucketInfo(bucket.organizationID, bucket.name, bucket.id)
onSetBucketInfo(bucket.orgID, bucket.name, bucket.id)
this.setState({
bucketID: bucket.id,

View File

@ -97,9 +97,9 @@ class CollectorsWizard extends PureComponent<Props & WithRouterProps, State> {
private handleSetBucketInfo = () => {
const {bucket, buckets} = this.props
if (!bucket && (buckets && buckets.length)) {
const {organizationID, name, id} = buckets[0]
const {orgID, name, id} = buckets[0]
this.props.onSetBucketInfo(organizationID, name, id)
this.props.onSetBucketInfo(orgID, name, id)
}
}

View File

@ -96,9 +96,9 @@ export class SelectCollectorsStep extends PureComponent<Props> {
}
private handleSelectBucket = (bucket: Bucket) => {
const {organizationID, id, name} = bucket
const {orgID, id, name} = bucket
this.props.onSetBucketInfo(organizationID, name, id)
this.props.onSetBucketInfo(orgID, name, id)
}
private handleTogglePluginBundle = (

View File

@ -81,9 +81,9 @@ class LineProtocolWizard extends PureComponent<Props & WithRouterProps> {
private handleSetBucketInfo = () => {
const {bucket, buckets} = this.props
if (!bucket && (buckets && buckets.length)) {
const {organizationID, name, id} = buckets[0]
const {orgID, name, id} = buckets[0]
this.props.onSetBucketInfo(organizationID, name, id)
this.props.onSetBucketInfo(orgID, name, id)
}
}

View File

@ -167,7 +167,7 @@ export const createOrgWithBucket = (
await client.buckets.create({
...bucket,
organizationID: createdOrg.id,
orgID: createdOrg.id,
})
dispatch(notify(bucketCreateSuccess()))

View File

@ -111,8 +111,9 @@ class CreateScraperOverlay extends PureComponent<Props, State> {
}
private handleSelectBucket = (bucket: Bucket) => {
const {organizationID, id} = bucket
const scraper = {...this.state.scraper, orgID: organizationID, bucketID: id}
const {orgID, id} = bucket
const scraper = {...this.state.scraper, orgID: orgID, bucketID: id}
this.setState({scraper})
}

View File

@ -194,8 +194,8 @@ class Collectors extends PureComponent<Props, State> {
} = this.props
if (buckets && buckets.length) {
const {organizationID, name, id} = buckets[0]
onSetBucketInfo(organizationID, name, id)
const {orgID, name, id} = buckets[0]
onSetBucketInfo(orgID, name, id)
}
onSetDataLoadersType(DataLoaderType.Scraping)