[Continue S3 support] [Handle set configuration errors]
This commit is contained in:
@@ -11,14 +11,15 @@ export const addRemoteMount = (hostNameOrIp, port, token) => {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
|
||||
const provider = 'Remote' + hostNameOrIp + ':' + port;
|
||||
dispatch(addRemoteMount2(provider));
|
||||
dispatch(setBusy(true));
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Set_Config_Values_Reply, (_, arg) => {
|
||||
if (arg.data.Success) {
|
||||
dispatch(addRemoteMount2(provider));
|
||||
ipcRenderer.send(Constants.IPC_Detect_Mount, {
|
||||
Provider: provider,
|
||||
RemoteMounts: getState().mounts.RemoteMounts,
|
||||
S3Mounts: getState().mounts.S3Mounts,
|
||||
Version: getState().relver.InstalledVersion,
|
||||
});
|
||||
} else {
|
||||
@@ -42,18 +43,19 @@ export const addRemoteMount = (hostNameOrIp, port, token) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const addS3Mount = (name, accessKey, secretKey, region, bucketName) => {
|
||||
export const addS3Mount = (name, accessKey, secretKey, region, bucketName, url) => {
|
||||
return (dispatch, getState) => {
|
||||
const ipcRenderer = getIPCRenderer();
|
||||
|
||||
const provider = 'S3' + name;
|
||||
dispatch(addS3Mount2(provider));
|
||||
dispatch(setBusy(true));
|
||||
|
||||
ipcRenderer.once(Constants.IPC_Set_Config_Values_Reply, (_, arg) => {
|
||||
if (arg.data.Success) {
|
||||
dispatch(addS3Mount2(provider));
|
||||
ipcRenderer.send(Constants.IPC_Detect_Mount, {
|
||||
Provider: provider,
|
||||
RemoteMounts: getState().mounts.RemoteMounts,
|
||||
S3Mounts: getState().mounts.S3Mounts,
|
||||
Version: getState().relver.InstalledVersion,
|
||||
});
|
||||
@@ -70,6 +72,7 @@ export const addS3Mount = (name, accessKey, secretKey, region, bucketName) => {
|
||||
{Name: 'S3Config.SecretKey', Value: secretKey},
|
||||
{Name: 'S3Config.Region', Value: region},
|
||||
{Name: 'S3Config.BucketName', Value: bucketName},
|
||||
{Name: 'S3Config.URL', Value: url},
|
||||
],
|
||||
Provider: provider,
|
||||
S3: true,
|
||||
|
||||
Reference in New Issue
Block a user