Skip to content

Commit

Permalink
GUI S3 Objects lifecycle (#2759): Remove STS/LTS durations from stora…
Browse files Browse the repository at this point in the history
…ge creation and edit storage forms
  • Loading branch information
AleksandrGorodetskii committed Aug 25, 2022
1 parent 3e4c9e6 commit aaa15e5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 63 deletions.
24 changes: 0 additions & 24 deletions client/src/components/pipelines/browser/DataStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ export default class DataStorage extends React.Component {
this.props.info.value.policySupported &&
storage.serviceType !== ServiceTypes.fileShare &&
(
storage.longTermStorageDuration !== undefined ||
storage.shortTermStorageDuration !== undefined ||
storage.backupDuration !== undefined ||
!storage.versioningEnabled
)
Expand All @@ -348,8 +346,6 @@ export default class DataStorage extends React.Component {
await updatePolicyRequest.send({
id: this.props.storageId,
storagePolicy: {
longTermStorageDuration: storage.longTermStorageDuration,
shortTermStorageDuration: storage.shortTermStorageDuration,
backupDuration: storage.backupDuration,
versioningEnabled: storage.versioningEnabled
}
Expand Down Expand Up @@ -2114,26 +2110,6 @@ export default class DataStorage extends React.Component {
this.props.info.value.description &&
<Row><b>Description: </b>{this.props.info.value.description}</Row>
}
{
this.props.info.value.storagePolicy &&
this.props.info.value.storagePolicy.shortTermStorageDuration !== undefined
? (
<Row>
<b>Short-Term Storage duration: </b>
{`${this.props.info.value.storagePolicy.shortTermStorageDuration} days`}
</Row>
) : undefined
}
{
this.props.info.value.storagePolicy &&
this.props.info.value.storagePolicy.longTermStorageDuration !== undefined
? (
<Row>
<b>Long-Term Storage duration: </b>
{`${this.props.info.value.storagePolicy.longTermStorageDuration} days`}
</Row>
) : undefined
}
</Row>
<Row style={{marginLeft: 5}}>
<DataStorageNavigation
Expand Down
8 changes: 1 addition & 7 deletions client/src/components/pipelines/browser/Folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,6 @@ export default class Folder extends localization.LocalizedReactComponent {
path: path,
shared: storage.serviceType === ServiceTypes.objectStorage && storage.shared,
storagePolicy: {
longTermStorageDuration: storage.longTermStorageDuration,
shortTermStorageDuration: storage.shortTermStorageDuration,
backupDuration: storage.backupDuration,
versioningEnabled: storage.versioningEnabled
},
Expand Down Expand Up @@ -846,15 +844,11 @@ export default class Folder extends localization.LocalizedReactComponent {
} else {
if (this.state.editableStorage.policySupported &&
storage.serviceType !== ServiceTypes.fileShare &&
(storage.longTermStorageDuration !== undefined ||
storage.shortTermStorageDuration !== undefined ||
storage.backupDuration !== undefined || !storage.versioningEnabled)) {
(storage.backupDuration !== undefined || !storage.versioningEnabled)) {
const updatePolicyRequest = new DataStorageUpdateStoragePolicy();
await updatePolicyRequest.send({
id: this.state.editableStorage.id,
storagePolicy: {
longTermStorageDuration: storage.longTermStorageDuration,
shortTermStorageDuration: storage.shortTermStorageDuration,
backupDuration: storage.backupDuration,
versioningEnabled: storage.versioningEnabled
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,38 +458,6 @@ export class DataStorageEditDialog extends React.Component {
</Form.Item>
)
}
{
!this.isNfsMount && this.props.policySupported && this.currentRegionSupportsPolicy &&
<Form.Item
className={styles.dataStorageFormItem}
{...this.formItemLayout}
label="STS duration">
{getFieldDecorator('shortTermStorageDuration', {
initialValue: this.props.dataStorage && this.props.dataStorage.storagePolicy
? this.props.dataStorage.storagePolicy.shortTermStorageDuration : undefined
})(
<InputNumber
style={{width: '100%'}}
disabled={this.props.pending || isReadOnly} />
)}
</Form.Item>
}
{
!this.isNfsMount && this.props.policySupported && this.currentRegionSupportsPolicy &&
<Form.Item
className={styles.dataStorageFormItem}
{...this.formItemLayout}
label="LTS duration">
{getFieldDecorator('longTermStorageDuration', {
initialValue: this.props.dataStorage && this.props.dataStorage.storagePolicy
? this.props.dataStorage.storagePolicy.longTermStorageDuration: undefined
})(
<InputNumber
style={{width: '100%'}}
disabled={this.props.pending || isReadOnly} />
)}
</Form.Item>
}
{
!this.isNfsMount &&
<Row>
Expand Down

0 comments on commit aaa15e5

Please sign in to comment.