From fd24d1902127fa96e111d05d5c2260da7306c6a1 Mon Sep 17 00:00:00 2001 From: Deniz Kusefoglu Date: Wed, 3 Apr 2019 23:08:14 -0700 Subject: [PATCH] Fix buckets types --- ui/src/buckets/actions/index.ts | 6 +++--- ui/src/buckets/components/BucketRow.tsx | 2 +- ui/src/buckets/components/BucketsTab.tsx | 4 ++-- ui/src/buckets/reducers/index.ts | 3 +-- ui/src/types/buckets.ts | 12 +++--------- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ui/src/buckets/actions/index.ts b/ui/src/buckets/actions/index.ts index e4145355cc..3a50eeaf32 100644 --- a/ui/src/buckets/actions/index.ts +++ b/ui/src/buckets/actions/index.ts @@ -1,10 +1,10 @@ +import {Dispatch} from 'redux-thunk' + // API import {client} from 'src/utils/api' // Types -import {RemoteDataState, AppState} from 'src/types' -import {Bucket} from '@influxdata/influx' -import {Dispatch} from 'redux-thunk' +import {RemoteDataState, AppState, Bucket} from 'src/types' // Actions import {notify} from 'src/shared/actions/notifications' diff --git a/ui/src/buckets/components/BucketRow.tsx b/ui/src/buckets/components/BucketRow.tsx index 268172590b..7ac61471bd 100644 --- a/ui/src/buckets/components/BucketRow.tsx +++ b/ui/src/buckets/components/BucketRow.tsx @@ -19,7 +19,7 @@ import { ComponentColor, IconFont, } from '@influxdata/clockface' -import {Bucket} from '@influxdata/influx' +import {Bucket} from 'src/types' import {DataLoaderType} from 'src/types/dataLoaders' export interface PrettyBucket extends Bucket { diff --git a/ui/src/buckets/components/BucketsTab.tsx b/ui/src/buckets/components/BucketsTab.tsx index d813105004..1ea98ab971 100644 --- a/ui/src/buckets/components/BucketsTab.tsx +++ b/ui/src/buckets/components/BucketsTab.tsx @@ -19,9 +19,9 @@ import {createBucket, updateBucket, deleteBucket} from 'src/buckets/actions' import {ruleToString} from 'src/utils/formatting' // Types -import {Bucket, Organization, BucketRetentionRules} from '@influxdata/influx' +import {Organization, BucketRetentionRules} from '@influxdata/influx' import {IconFont, ComponentSize, ComponentColor} from '@influxdata/clockface' -import {OverlayState, AppState} from 'src/types' +import {OverlayState, AppState, Bucket} from 'src/types' interface StateProps { org: Organization diff --git a/ui/src/buckets/reducers/index.ts b/ui/src/buckets/reducers/index.ts index 0e1fdd6c0d..c616768d86 100644 --- a/ui/src/buckets/reducers/index.ts +++ b/ui/src/buckets/reducers/index.ts @@ -2,9 +2,8 @@ import {produce} from 'immer' // Types -import {RemoteDataState} from 'src/types' +import {RemoteDataState, Bucket} from 'src/types' import {Action} from 'src/buckets/actions' -import {Bucket} from '@influxdata/influx' const initialState = (): BucketsState => ({ status: RemoteDataState.NotStarted, diff --git a/ui/src/types/buckets.ts b/ui/src/types/buckets.ts index 7763213325..6346e1fba8 100644 --- a/ui/src/types/buckets.ts +++ b/ui/src/types/buckets.ts @@ -1,12 +1,6 @@ -export interface Bucket { - id: string - name: string - organization: string - orgID: string - rp?: string - retentionRules: RetentionRule[] - links: BucketLinks -} +import {IBucket} from '@influxdata/influx' + +export interface Bucket extends IBucket {} export enum RetentionRuleTypes { Expire = 'expire',