Added Object Version read-only field in Edit Lifecycle Modal (#2772)
This commit is contained in:
@@ -310,6 +310,24 @@ const EditLifecycleConfiguration = ({
|
||||
}
|
||||
};
|
||||
|
||||
let objectVersion = "";
|
||||
|
||||
if (lifecycleRule.expiration) {
|
||||
if (lifecycleRule.expiration.days > 0) {
|
||||
objectVersion = "Current Version";
|
||||
} else if (lifecycleRule.expiration.noncurrent_expiration_days) {
|
||||
objectVersion = "Non-Current Version";
|
||||
}
|
||||
}
|
||||
|
||||
if (lifecycleRule.transition) {
|
||||
if (lifecycleRule.transition.days > 0) {
|
||||
objectVersion = "Current Version";
|
||||
} else if (lifecycleRule.transition.noncurrent_transition_days) {
|
||||
objectVersion = "Non-Current Version";
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<ModalWrapper
|
||||
onClose={() => {
|
||||
@@ -329,17 +347,7 @@ const EditLifecycleConfiguration = ({
|
||||
<Grid container>
|
||||
<Grid item xs={12} className={classes.formScrollable}>
|
||||
<Grid container spacing={1}>
|
||||
<Grid item xs={12}>
|
||||
<InputBoxWrapper
|
||||
id="id"
|
||||
name="id"
|
||||
label="Id"
|
||||
value={lifecycleRule.id}
|
||||
onChange={() => {}}
|
||||
disabled
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Grid item xs={12} sx={{ marginTop: "5px" }}>
|
||||
<FormSwitchWrapper
|
||||
label="Status"
|
||||
indicatorLabels={["Enabled", "Disabled"]}
|
||||
@@ -352,6 +360,16 @@ const EditLifecycleConfiguration = ({
|
||||
}}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<InputBoxWrapper
|
||||
id="id"
|
||||
name="id"
|
||||
label="Id"
|
||||
value={lifecycleRule.id}
|
||||
onChange={() => {}}
|
||||
disabled
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<RadioGroupSelector
|
||||
currentSelection={ilmType}
|
||||
@@ -366,6 +384,16 @@ const EditLifecycleConfiguration = ({
|
||||
disableOptions
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<InputBoxWrapper
|
||||
id="object-version"
|
||||
name="object-version"
|
||||
label="Object Version"
|
||||
value={objectVersion}
|
||||
onChange={() => {}}
|
||||
disabled
|
||||
/>
|
||||
</Grid>
|
||||
{ilmType === "expiry" && lifecycleRule.expiration?.days && (
|
||||
<Grid item xs={12}>
|
||||
<InputBoxWrapper
|
||||
|
||||
Reference in New Issue
Block a user