wip
parent
80e3efa37a
commit
719f296d2d
|
@ -61,6 +61,18 @@ class BucketRow extends PureComponent<Props & WithRouterProps> {
|
|||
onAddLineProtocol={this.handleAddLineProtocol}
|
||||
onAddScraper={this.handleAddScraper}
|
||||
/>
|
||||
{this.renameDeleteButtons}
|
||||
</FlexBox>
|
||||
</ResourceCard>
|
||||
)
|
||||
}
|
||||
|
||||
private renameDeleteButtons() {
|
||||
const {bucket} = this.props
|
||||
{
|
||||
if (bucket.type === 'user') {
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
text="Rename"
|
||||
testID="bucket-rename"
|
||||
|
@ -75,9 +87,10 @@ class BucketRow extends PureComponent<Props & WithRouterProps> {
|
|||
onClick={this.handleDeleteData}
|
||||
/>
|
||||
</FeatureFlag>
|
||||
</FlexBox>
|
||||
</ResourceCard>
|
||||
</>
|
||||
)
|
||||
} else return <></>
|
||||
}
|
||||
}
|
||||
|
||||
private handleDeleteData = () => {
|
||||
|
|
|
@ -292,7 +292,10 @@ export const checkBucketLimits = () => async (
|
|||
} = getState()
|
||||
|
||||
const bucketsMax = extractBucketMax(limits)
|
||||
const bucketsCount = list.length
|
||||
const buckets = list.filter(function(bucket) {
|
||||
return bucket.type == 'user'
|
||||
})
|
||||
const bucketsCount = buckets.length
|
||||
|
||||
if (bucketsCount >= bucketsMax) {
|
||||
dispatch(setBucketLimitStatus(LimitStatus.EXCEEDED))
|
||||
|
|
Loading…
Reference in New Issue