Update client to 0.2.1

pull/11744/head
Brandon Farmer 2019-02-06 16:24:16 -08:00
parent 625d7f47b7
commit 139ac34f4d
5 changed files with 9 additions and 12 deletions

6
ui/package-lock.json generated
View File

@ -829,9 +829,9 @@
"dev": true
},
"@influxdata/influx": {
"version": "0.1.17",
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.1.17.tgz",
"integrity": "sha512-8cbN7VGPlNcE3iqqobhY8JKLX33WRgUN9tBWIze4J5SPx2MMO2wlssrQpuEUJ+AwTcMlvGhPlrWaNajW4ZG9Dg==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@influxdata/influx/-/influx-0.2.1.tgz",
"integrity": "sha512-7pzbmw68/k+Zu9ql+NrOOQOvOXCupiy5xiO41HmwWuRbe4UR+wNDa5k/gfiHk3AxNASxN75777D5T3eUOAI+Qw==",
"requires": {
"axios": "^0.18.0"
}

View File

@ -117,7 +117,7 @@
},
"dependencies": {
"@influxdata/react-custom-scrollbars": "4.3.8",
"@influxdata/influx": "^0.1.17",
"@influxdata/influx": "^0.2.1",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"bignumber.js": "^4.0.2",

View File

@ -120,11 +120,8 @@ export default class Buckets extends PureComponent<Props, State> {
notify(bucketDeleted(deletedBucket.name))
}
private handleCreateBucket = async (
org: Organization,
bucket: Bucket
): Promise<void> => {
await client.buckets.create(org, bucket)
private handleCreateBucket = async (bucket: Bucket): Promise<void> => {
await client.buckets.create(bucket)
this.props.onChange()
this.handleCloseModal()
}

View File

@ -16,7 +16,7 @@ import {Bucket, BucketRetentionRules, Organization} from '@influxdata/influx'
interface Props {
org: Organization
onCloseModal: () => void
onCreateBucket: (org: Organization, bucket: Partial<Bucket>) => Promise<void>
onCreateBucket: (bucket: Partial<Bucket>) => Promise<void>
}
interface State {
@ -114,7 +114,7 @@ export default class BucketOverlay extends PureComponent<Props, State> {
organization,
}
onCreateBucket(org, bucket)
onCreateBucket(bucket)
}
private handleChangeInput = (e: ChangeEvent<HTMLInputElement>) => {

View File

@ -73,7 +73,7 @@ export const readSources = () => async (dispatch: Dispatch<Action>) => {
export const createSource = (attrs: Partial<Source>) => async (
dispatch: Dispatch<Action>
) => {
const source = await client.sources.create('', attrs)
const source = await client.sources.create(attrs)
dispatch(setSource(source))
}