2022-06-02 21:24:11 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doSetDaemonSetting, doGetDaemonStatus, doCleanBlobs } from 'redux/actions/settings';
|
|
|
|
import { selectViewHostingLimit, selectViewBlobSpace, selectSettingDaemonSettings } from 'redux/selectors/settings';
|
|
|
|
import SettingViewHosting from './view';
|
|
|
|
import { selectDiskSpace } from 'redux/selectors/app';
|
|
|
|
|
|
|
|
const select = (state) => ({
|
|
|
|
viewHostingLimit: selectViewHostingLimit(state),
|
|
|
|
viewBlobSpace: selectViewBlobSpace(state),
|
|
|
|
diskSpace: selectDiskSpace(state),
|
|
|
|
isSetting: selectSettingDaemonSettings(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
|
|
|
getDaemonStatus: () => dispatch(doGetDaemonStatus()),
|
|
|
|
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
|
2022-06-03 22:09:34 +02:00
|
|
|
cleanBlobs: () => dispatch(doCleanBlobs(false)),
|
2022-06-02 21:24:11 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(SettingViewHosting);
|