mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Refactor make bucket and upload components (#5521)
This commit is contained in:
committed by
Harshavardhana
parent
9bfa07ecf5
commit
44f8f7059c
@@ -21,9 +21,11 @@ import {
|
||||
sortObjectsBySize,
|
||||
sortObjectsByDate
|
||||
} from "../utils"
|
||||
import { getCurrentBucket } from "../buckets/selectors"
|
||||
|
||||
export const SET_LIST = "objects/SET_LIST"
|
||||
export const APPEND_LIST = "objects/APPEND_LIST"
|
||||
export const RESET = "objects/RESET"
|
||||
export const SET_SORT_BY = "objects/SET_SORT_BY"
|
||||
export const SET_SORT_ORDER = "objects/SET_SORT_ORDER"
|
||||
export const SET_CURRENT_PREFIX = "objects/SET_CURRENT_PREFIX"
|
||||
@@ -52,7 +54,7 @@ export const fetchObjects = append => {
|
||||
.ListObjects({
|
||||
bucketName: currentBucket,
|
||||
prefix: currentPrefix,
|
||||
marker: marker
|
||||
marker: append ? marker : ""
|
||||
})
|
||||
.then(res => {
|
||||
let objects = []
|
||||
@@ -113,7 +115,8 @@ export const setSortOrder = sortOrder => ({
|
||||
export const selectPrefix = prefix => {
|
||||
return function(dispatch, getState) {
|
||||
dispatch(setCurrentPrefix(prefix))
|
||||
const currentBucket = getState().buckets.currentBucket
|
||||
dispatch(fetchObjects())
|
||||
const currentBucket = getCurrentBucket(getState())
|
||||
history.replace(`/${currentBucket}/${prefix}`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user