Add some info and directions to storage screen

This commit is contained in:
Gabe Kangas
2021-02-01 15:20:26 -08:00
parent d557788434
commit 66f15ceaff
3 changed files with 17 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ import {
} from '../../../utils/input-statuses';
import TextField from './form-textfield';
import FormStatusIndicator from './form-status-indicator';
import {isValidUrl} from '../../../utils/urls';
const { Panel } = Collapse;
@@ -27,7 +28,7 @@ function checkSaveable(formValues: any, currentValues: any) {
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 (enabled) {
if (!!endpoint && !!accessKey && !!secret && !!bucket && !!region) {
if (!!endpoint && isValidUrl(endpoint) && !!accessKey && !!secret && !!bucket && !!region) {
if (
endpoint !== currentValues.endpoint ||
accessKey !== currentValues.accessKey ||
@@ -188,7 +189,7 @@ export default function EditStorage() {
</div>
<Collapse className="advanced-section">
<Panel header="Advanced Settings" key="1">
<Panel header="Optional Settings" key="1">
<div className="field-container">
<TextField
{...S3_TEXT_FIELDS_INFO.acl}