Browse Source

Fix issue where you cannot re-enable storage after disabling it

pull/1886/head
Gabe Kangas 5 years ago
parent
commit
53cf80282e
  1. 4
      web/pages/components/config/edit-storage.tsx

4
web/pages/components/config/edit-storage.tsx

@ -27,12 +27,10 @@ const { Panel } = Collapse;
function checkSaveable(formValues: any, currentValues: any) { function checkSaveable(formValues: any, currentValues: any) {
const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues; const { endpoint, accessKey, secret, bucket, region, enabled, servingEndpoint, acl } = formValues;
// if fields are filled out and different from what's in store, then return true // if fields are filled out and different from what's in store, then return true
if (!enabled || enabled !== currentValues.enabled) {
return true;
}
if (enabled) { if (enabled) {
if (!!endpoint && isValidUrl(endpoint) && !!accessKey && !!secret && !!bucket && !!region) { if (!!endpoint && isValidUrl(endpoint) && !!accessKey && !!secret && !!bucket && !!region) {
if ( if (
enabled !== currentValues.enabled ||
endpoint !== currentValues.endpoint || endpoint !== currentValues.endpoint ||
accessKey !== currentValues.accessKey || accessKey !== currentValues.accessKey ||
secret !== currentValues.secret || secret !== currentValues.secret ||

Loading…
Cancel
Save