Add tier mandatory or optional fields and navigation post save (#1612)
This commit is contained in:
committed by
GitHub
parent
006b3c7da8
commit
4bc90588fb
@@ -185,7 +185,7 @@ const AddTierConfiguration = ({
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
setSaving(false);
|
setSaving(false);
|
||||||
|
|
||||||
history.push(IAM_PAGES.TIERS_ADD);
|
history.push(IAM_PAGES.TIERS);
|
||||||
})
|
})
|
||||||
.catch((err: ErrorResponseHandler) => {
|
.catch((err: ErrorResponseHandler) => {
|
||||||
setSaving(false);
|
setSaving(false);
|
||||||
@@ -227,7 +227,7 @@ const AddTierConfiguration = ({
|
|||||||
if (prefix === "") {
|
if (prefix === "") {
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
if (region === "") {
|
if (region === "" && type !== "minio") {
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,6 +377,7 @@ const AddTierConfiguration = ({
|
|||||||
value={name}
|
value={name}
|
||||||
onChange={updateTierName}
|
onChange={updateTierName}
|
||||||
error={nameInputError}
|
error={nameInputError}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<InputBoxWrapper
|
<InputBoxWrapper
|
||||||
id="endpoint"
|
id="endpoint"
|
||||||
@@ -387,6 +388,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setEndpoint(e.target.value);
|
setEndpoint(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
{(type === s3ServiceName || type === minioServiceName) && (
|
{(type === s3ServiceName || type === minioServiceName) && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@@ -399,6 +401,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setAccessKey(e.target.value);
|
setAccessKey(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<InputBoxWrapper
|
<InputBoxWrapper
|
||||||
id="secretKey"
|
id="secretKey"
|
||||||
@@ -409,6 +412,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setSecretKey(e.target.value);
|
setSecretKey(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
@@ -428,6 +432,7 @@ const AddTierConfiguration = ({
|
|||||||
setCreds(fileName);
|
setCreds(fileName);
|
||||||
}}
|
}}
|
||||||
value={creds}
|
value={creds}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{type === azureServiceName && (
|
{type === azureServiceName && (
|
||||||
@@ -441,6 +446,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setAccountName(e.target.value);
|
setAccountName(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<InputBoxWrapper
|
<InputBoxWrapper
|
||||||
id="accountKey"
|
id="accountKey"
|
||||||
@@ -451,6 +457,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setAccountKey(e.target.value);
|
setAccountKey(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
@@ -463,6 +470,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setBucket(e.target.value);
|
setBucket(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<InputBoxWrapper
|
<InputBoxWrapper
|
||||||
id="prefix"
|
id="prefix"
|
||||||
@@ -473,6 +481,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setPrefix(e.target.value);
|
setPrefix(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<InputBoxWrapper
|
<InputBoxWrapper
|
||||||
id="region"
|
id="region"
|
||||||
@@ -483,6 +492,7 @@ const AddTierConfiguration = ({
|
|||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setRegion(e.target.value);
|
setRegion(e.target.value);
|
||||||
}}
|
}}
|
||||||
|
required={type !== "minio"}
|
||||||
/>
|
/>
|
||||||
{type === s3ServiceName ||
|
{type === s3ServiceName ||
|
||||||
(type === minioServiceName && (
|
(type === minioServiceName && (
|
||||||
|
|||||||
Reference in New Issue
Block a user