@scality/data-browser-library 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/__tests__/BucketCorsPage.test.js +67 -9
- package/dist/components/__tests__/BucketDetails.test.js +1 -0
- package/dist/components/__tests__/BucketLifecycleFormPage.test.js +16 -11
- package/dist/components/__tests__/BucketNotificationFormPage.test.js +45 -0
- package/dist/components/__tests__/BucketOverview.test.js +92 -2
- package/dist/components/__tests__/BucketPolicyPage.test.js +70 -51
- package/dist/components/__tests__/BucketReplicationFormPage.test.js +18 -24
- package/dist/components/__tests__/ObjectList.test.js +43 -2
- package/dist/components/buckets/BucketConfigEditButton.d.ts +2 -0
- package/dist/components/buckets/BucketConfigEditButton.js +9 -3
- package/dist/components/buckets/BucketCorsPage.js +57 -20
- package/dist/components/buckets/BucketDetails.js +27 -2
- package/dist/components/buckets/BucketLifecycleFormPage.js +310 -270
- package/dist/components/buckets/BucketOverview.js +21 -18
- package/dist/components/buckets/BucketPolicyPage.js +119 -83
- package/dist/components/buckets/BucketReplicationFormPage.js +39 -29
- package/dist/components/buckets/BucketVersioning.js +16 -10
- package/dist/components/buckets/__tests__/BucketVersioning.test.js +76 -23
- package/dist/components/buckets/notifications/BucketNotificationFormPage.js +13 -5
- package/dist/components/objects/ObjectList.js +22 -25
- package/dist/components/objects/ObjectLock/EditRetentionButton.js +2 -2
- package/dist/components/objects/UploadButton.js +25 -15
- package/dist/config/__tests__/resolveBrandingTheme.test.d.ts +1 -0
- package/dist/config/__tests__/resolveBrandingTheme.test.js +96 -0
- package/dist/config/resolveBrandingTheme.d.ts +16 -0
- package/dist/config/resolveBrandingTheme.js +23 -0
- package/dist/config/types.d.ts +36 -0
- package/dist/hooks/factories/useCreateS3InfiniteQueryHook.js +2 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/objectOperations.d.ts +3 -3
- package/dist/hooks/objectOperations.js +3 -3
- package/dist/hooks/useBucketConfigEditor.d.ts +4 -4
- package/dist/hooks/useBucketConfigEditor.js +16 -31
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/test/mocks/esmOnlyModules.js +4 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/utils/__tests__/proxyMiddleware.test.js +34 -0
- package/dist/utils/proxyMiddleware.js +2 -0
- package/package.json +4 -4
- package/dist/components/Editor.d.ts +0 -12
- package/dist/components/Editor.js +0 -28
- package/dist/types/monaco.d.ts +0 -13
- package/dist/types/monaco.js +0 -0
|
@@ -655,14 +655,10 @@ function BucketLifecycleFormPage() {
|
|
|
655
655
|
content: /*#__PURE__*/ jsx(Controller, {
|
|
656
656
|
name: "status",
|
|
657
657
|
control: control,
|
|
658
|
-
render: ({ field })=>/*#__PURE__*/ jsx(
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
children: STATUS_OPTIONS.map((option)=>/*#__PURE__*/ jsx(Select.Option, {
|
|
663
|
-
value: option.value,
|
|
664
|
-
children: option.label
|
|
665
|
-
}, option.value))
|
|
658
|
+
render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
|
|
659
|
+
toggle: 'Enabled' === field.value,
|
|
660
|
+
onChange: (e)=>field.onChange(e.target.checked ? 'Enabled' : 'Disabled'),
|
|
661
|
+
label: 'Enabled' === field.value ? 'Enabled' : 'Disabled'
|
|
666
662
|
})
|
|
667
663
|
})
|
|
668
664
|
})
|
|
@@ -702,138 +698,140 @@ function BucketLifecycleFormPage() {
|
|
|
702
698
|
})
|
|
703
699
|
})
|
|
704
700
|
}),
|
|
705
|
-
transitionsEnabled ? /*#__PURE__*/ jsx(
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
error: errors?.transitions?.message,
|
|
710
|
-
helpErrorPosition: "bottom",
|
|
711
|
-
content: /*#__PURE__*/ jsxs(Stack, {
|
|
701
|
+
transitionsEnabled ? /*#__PURE__*/ jsx(Fragment, {
|
|
702
|
+
children: /*#__PURE__*/ jsx(FormGroup, {
|
|
703
|
+
label: "",
|
|
704
|
+
id: "transitions",
|
|
712
705
|
direction: "vertical",
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}),
|
|
722
|
-
/*#__PURE__*/ jsx(Text, {
|
|
723
|
-
color: "textSecondary",
|
|
724
|
-
children: "Value"
|
|
725
|
-
}),
|
|
726
|
-
/*#__PURE__*/ jsx(Text, {
|
|
727
|
-
color: "textSecondary",
|
|
728
|
-
children: storageClassLabel || 'Storage Class'
|
|
729
|
-
}),
|
|
730
|
-
/*#__PURE__*/ jsx("span", {})
|
|
731
|
-
]
|
|
732
|
-
}),
|
|
733
|
-
transitionFields.map((field, index)=>/*#__PURE__*/ jsxs(Box, {
|
|
706
|
+
error: errors?.transitions?.message,
|
|
707
|
+
helpErrorPosition: "bottom",
|
|
708
|
+
content: /*#__PURE__*/ jsxs(Stack, {
|
|
709
|
+
direction: "vertical",
|
|
710
|
+
gap: "r12",
|
|
711
|
+
children: [
|
|
712
|
+
/*#__PURE__*/ jsxs(FormRow, {
|
|
713
|
+
columns: "1fr 1fr 2fr",
|
|
734
714
|
children: [
|
|
735
|
-
/*#__PURE__*/
|
|
736
|
-
|
|
737
|
-
children:
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
715
|
+
/*#__PURE__*/ jsx(Text, {
|
|
716
|
+
color: "textSecondary",
|
|
717
|
+
children: "Time Type"
|
|
718
|
+
}),
|
|
719
|
+
/*#__PURE__*/ jsx(Text, {
|
|
720
|
+
color: "textSecondary",
|
|
721
|
+
children: "Value"
|
|
722
|
+
}),
|
|
723
|
+
/*#__PURE__*/ jsx(Text, {
|
|
724
|
+
color: "textSecondary",
|
|
725
|
+
children: storageClassLabel || 'Storage Class'
|
|
726
|
+
}),
|
|
727
|
+
/*#__PURE__*/ jsx("span", {})
|
|
728
|
+
]
|
|
729
|
+
}),
|
|
730
|
+
transitionFields.map((field, index)=>/*#__PURE__*/ jsxs(Box, {
|
|
731
|
+
children: [
|
|
732
|
+
/*#__PURE__*/ jsxs(FormRow, {
|
|
733
|
+
columns: "1fr 1fr 2fr",
|
|
734
|
+
children: [
|
|
735
|
+
/*#__PURE__*/ jsx(FormCell, {
|
|
736
|
+
children: /*#__PURE__*/ jsx(Controller, {
|
|
737
|
+
name: `transitions.${index}.timeType`,
|
|
738
|
+
control: control,
|
|
739
|
+
render: ({ field })=>/*#__PURE__*/ jsxs(Select, {
|
|
740
|
+
id: `transition-time-type-${index}`,
|
|
741
|
+
value: field.value,
|
|
742
|
+
onChange: field.onChange,
|
|
743
|
+
children: [
|
|
744
|
+
/*#__PURE__*/ jsx(Select.Option, {
|
|
745
|
+
value: "days",
|
|
746
|
+
children: "Days"
|
|
747
|
+
}),
|
|
748
|
+
/*#__PURE__*/ jsx(Select.Option, {
|
|
749
|
+
value: "date",
|
|
750
|
+
children: "Date"
|
|
751
|
+
})
|
|
752
|
+
]
|
|
753
|
+
})
|
|
766
754
|
})
|
|
767
|
-
})
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
name: `transitions.${index}.storageClass`,
|
|
776
|
-
control: control,
|
|
777
|
-
render: ({ field })=>StorageClassSelector ? /*#__PURE__*/ jsx(StorageClassSelector, {
|
|
778
|
-
value: field.value,
|
|
779
|
-
onChange: field.onChange,
|
|
780
|
-
context: "lifecycle"
|
|
781
|
-
}) : /*#__PURE__*/ jsx(Select, {
|
|
782
|
-
id: `transition-storage-class-${index}`,
|
|
783
|
-
value: field.value,
|
|
784
|
-
onChange: field.onChange,
|
|
785
|
-
placeholder: storageClassLabel || 'Storage Class',
|
|
786
|
-
children: storageClassOptions.map((option)=>/*#__PURE__*/ jsx(Select.Option, {
|
|
787
|
-
value: option.value,
|
|
788
|
-
children: option.label
|
|
789
|
-
}, option.value))
|
|
755
|
+
}),
|
|
756
|
+
/*#__PURE__*/ jsx(FormCell, {
|
|
757
|
+
children: 'days' === watch(`transitions.${index}.timeType`) ? /*#__PURE__*/ jsx(Input, {
|
|
758
|
+
id: `transition-days-${index}`,
|
|
759
|
+
type: "number",
|
|
760
|
+
placeholder: "Days",
|
|
761
|
+
...register(`transitions.${index}.days`, {
|
|
762
|
+
valueAsNumber: true
|
|
790
763
|
})
|
|
764
|
+
}) : /*#__PURE__*/ jsx(Input, {
|
|
765
|
+
id: `transition-date-${index}`,
|
|
766
|
+
type: "date",
|
|
767
|
+
...register(`transitions.${index}.date`)
|
|
768
|
+
})
|
|
769
|
+
}),
|
|
770
|
+
/*#__PURE__*/ jsx(FormCell, {
|
|
771
|
+
children: /*#__PURE__*/ jsx(Controller, {
|
|
772
|
+
name: `transitions.${index}.storageClass`,
|
|
773
|
+
control: control,
|
|
774
|
+
render: ({ field })=>StorageClassSelector ? /*#__PURE__*/ jsx(StorageClassSelector, {
|
|
775
|
+
value: field.value,
|
|
776
|
+
onChange: field.onChange,
|
|
777
|
+
context: "lifecycle"
|
|
778
|
+
}) : /*#__PURE__*/ jsx(Select, {
|
|
779
|
+
id: `transition-storage-class-${index}`,
|
|
780
|
+
value: field.value,
|
|
781
|
+
onChange: field.onChange,
|
|
782
|
+
placeholder: storageClassLabel || 'Storage Class',
|
|
783
|
+
children: storageClassOptions.map((option)=>/*#__PURE__*/ jsx(Select.Option, {
|
|
784
|
+
value: option.value,
|
|
785
|
+
children: option.label
|
|
786
|
+
}, option.value))
|
|
787
|
+
})
|
|
788
|
+
})
|
|
789
|
+
}),
|
|
790
|
+
/*#__PURE__*/ jsx(ArrayFieldActions, {
|
|
791
|
+
showAdd: index === transitionFields.length - 1,
|
|
792
|
+
onRemove: ()=>removeTransition(index),
|
|
793
|
+
onAdd: ()=>appendTransition({
|
|
794
|
+
timeType: 'days',
|
|
795
|
+
days: 30,
|
|
796
|
+
date: '',
|
|
797
|
+
storageClass: hasCustomSelector ? '' : 'STANDARD_IA'
|
|
798
|
+
}),
|
|
799
|
+
canRemove: transitionFields.length > 1
|
|
791
800
|
})
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
801
|
+
]
|
|
802
|
+
}),
|
|
803
|
+
getArrayFieldError(errors, 'transitions', index) && /*#__PURE__*/ jsx(Box, {
|
|
804
|
+
paddingTop: spacing.r4,
|
|
805
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
806
|
+
color: "statusCritical",
|
|
807
|
+
children: getArrayFieldError(errors, 'transitions', index)
|
|
808
|
+
})
|
|
809
|
+
}),
|
|
810
|
+
getArrayFieldError(errors, 'transitions', index, 'days') && /*#__PURE__*/ jsx(Box, {
|
|
811
|
+
paddingTop: spacing.r4,
|
|
812
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
813
|
+
color: "statusCritical",
|
|
814
|
+
children: getArrayFieldError(errors, 'transitions', index, 'days')
|
|
815
|
+
})
|
|
816
|
+
}),
|
|
817
|
+
getArrayFieldError(errors, 'transitions', index, 'storageClass') && /*#__PURE__*/ jsx(Box, {
|
|
818
|
+
paddingTop: spacing.r4,
|
|
819
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
820
|
+
color: "statusCritical",
|
|
821
|
+
children: getArrayFieldError(errors, 'transitions', index, 'storageClass')
|
|
822
|
+
})
|
|
823
|
+
}),
|
|
824
|
+
getArrayFieldError(errors, 'transitions', index, 'date') && /*#__PURE__*/ jsx(Box, {
|
|
825
|
+
paddingTop: spacing.r4,
|
|
826
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
827
|
+
color: "statusCritical",
|
|
828
|
+
children: getArrayFieldError(errors, 'transitions', index, 'date')
|
|
803
829
|
})
|
|
804
|
-
]
|
|
805
|
-
}),
|
|
806
|
-
getArrayFieldError(errors, 'transitions', index) && /*#__PURE__*/ jsx(Box, {
|
|
807
|
-
paddingTop: spacing.r4,
|
|
808
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
809
|
-
color: "statusCritical",
|
|
810
|
-
children: getArrayFieldError(errors, 'transitions', index)
|
|
811
|
-
})
|
|
812
|
-
}),
|
|
813
|
-
getArrayFieldError(errors, 'transitions', index, 'days') && /*#__PURE__*/ jsx(Box, {
|
|
814
|
-
paddingTop: spacing.r4,
|
|
815
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
816
|
-
color: "statusCritical",
|
|
817
|
-
children: getArrayFieldError(errors, 'transitions', index, 'days')
|
|
818
|
-
})
|
|
819
|
-
}),
|
|
820
|
-
getArrayFieldError(errors, 'transitions', index, 'storageClass') && /*#__PURE__*/ jsx(Box, {
|
|
821
|
-
paddingTop: spacing.r4,
|
|
822
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
823
|
-
color: "statusCritical",
|
|
824
|
-
children: getArrayFieldError(errors, 'transitions', index, 'storageClass')
|
|
825
|
-
})
|
|
826
|
-
}),
|
|
827
|
-
getArrayFieldError(errors, 'transitions', index, 'date') && /*#__PURE__*/ jsx(Box, {
|
|
828
|
-
paddingTop: spacing.r4,
|
|
829
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
830
|
-
color: "statusCritical",
|
|
831
|
-
children: getArrayFieldError(errors, 'transitions', index, 'date')
|
|
832
830
|
})
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
831
|
+
]
|
|
832
|
+
}, field.id))
|
|
833
|
+
]
|
|
834
|
+
})
|
|
837
835
|
})
|
|
838
836
|
}) : /*#__PURE__*/ jsx(Fragment, {}),
|
|
839
837
|
/*#__PURE__*/ jsx(FormGroup, {
|
|
@@ -841,23 +839,39 @@ function BucketLifecycleFormPage() {
|
|
|
841
839
|
id: "expirationEnabled",
|
|
842
840
|
direction: "horizontal",
|
|
843
841
|
labelHelpTooltip: "Expire objects after a specified time. Cannot be combined with expired delete markers removal.",
|
|
844
|
-
content: /*#__PURE__*/
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
842
|
+
content: /*#__PURE__*/ jsxs(Stack, {
|
|
843
|
+
direction: "vertical",
|
|
844
|
+
gap: "r8",
|
|
845
|
+
children: [
|
|
846
|
+
/*#__PURE__*/ jsx(Controller, {
|
|
847
|
+
name: "expirationEnabled",
|
|
848
|
+
control: control,
|
|
849
|
+
render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
|
|
850
|
+
toggle: field.value,
|
|
851
|
+
onChange: (e)=>{
|
|
852
|
+
field.onChange(e);
|
|
853
|
+
if (e.target.checked && expiredObjectDeleteMarker) methods.setValue('expiredObjectDeleteMarker', false, {
|
|
854
|
+
shouldDirty: true
|
|
855
|
+
});
|
|
856
|
+
},
|
|
857
|
+
label: field.value ? 'Enabled' : 'Disabled',
|
|
858
|
+
disabled: expiredObjectDeleteMarker
|
|
859
|
+
})
|
|
860
|
+
}),
|
|
861
|
+
expiredObjectDeleteMarker && /*#__PURE__*/ jsx(Text, {
|
|
862
|
+
variant: "Small",
|
|
863
|
+
color: "textSecondary",
|
|
864
|
+
children: 'Cannot be enabled while "Remove expired delete markers" is active'
|
|
857
865
|
})
|
|
866
|
+
]
|
|
858
867
|
})
|
|
859
868
|
}),
|
|
860
|
-
expirationEnabled ? /*#__PURE__*/ jsxs(
|
|
869
|
+
expirationEnabled ? /*#__PURE__*/ jsxs(Stack, {
|
|
870
|
+
direction: "vertical",
|
|
871
|
+
gap: "r24",
|
|
872
|
+
style: {
|
|
873
|
+
paddingLeft: spacing.r24
|
|
874
|
+
},
|
|
861
875
|
children: [
|
|
862
876
|
/*#__PURE__*/ jsx(FormGroup, {
|
|
863
877
|
label: "Expiration type",
|
|
@@ -919,26 +933,38 @@ function BucketLifecycleFormPage() {
|
|
|
919
933
|
id: "expiredObjectDeleteMarker",
|
|
920
934
|
direction: "horizontal",
|
|
921
935
|
labelHelpTooltip: "Automatically remove expired object delete markers in versioned buckets. Cannot be combined with Days/Date expiration.",
|
|
922
|
-
content: /*#__PURE__*/
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
936
|
+
content: /*#__PURE__*/ jsxs(Stack, {
|
|
937
|
+
direction: "vertical",
|
|
938
|
+
gap: "r8",
|
|
939
|
+
children: [
|
|
940
|
+
/*#__PURE__*/ jsx(Controller, {
|
|
941
|
+
name: "expiredObjectDeleteMarker",
|
|
942
|
+
control: control,
|
|
943
|
+
render: ({ field })=>/*#__PURE__*/ jsx(Toggle, {
|
|
944
|
+
toggle: field.value,
|
|
945
|
+
onChange: (e)=>{
|
|
946
|
+
field.onChange(e);
|
|
947
|
+
if (e.target.checked && expirationEnabled) methods.setValue('expirationEnabled', false, {
|
|
948
|
+
shouldDirty: true
|
|
949
|
+
});
|
|
950
|
+
},
|
|
951
|
+
label: field.value ? 'Enabled' : 'Disabled',
|
|
952
|
+
disabled: expirationEnabled
|
|
953
|
+
})
|
|
954
|
+
}),
|
|
955
|
+
expirationEnabled && /*#__PURE__*/ jsx(Text, {
|
|
956
|
+
variant: "Small",
|
|
957
|
+
color: "textSecondary",
|
|
958
|
+
children: 'Cannot be enabled while "Expiration current version" is active'
|
|
935
959
|
})
|
|
960
|
+
]
|
|
936
961
|
})
|
|
937
962
|
}),
|
|
938
963
|
/*#__PURE__*/ jsx(FormGroup, {
|
|
939
964
|
label: "Transition noncurrent version",
|
|
940
965
|
id: "noncurrentTransitionsEnabled",
|
|
941
966
|
direction: "horizontal",
|
|
967
|
+
labelHelpTooltip: noncurrentTransitionsHelpText || "Transition noncurrent object versions to a different storage class after a specified number of days",
|
|
942
968
|
content: /*#__PURE__*/ jsx(Controller, {
|
|
943
969
|
name: "noncurrentTransitionsEnabled",
|
|
944
970
|
control: control,
|
|
@@ -949,115 +975,117 @@ function BucketLifecycleFormPage() {
|
|
|
949
975
|
})
|
|
950
976
|
})
|
|
951
977
|
}),
|
|
952
|
-
noncurrentTransitionsEnabled ? /*#__PURE__*/ jsx(
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
error: errors?.noncurrentTransitions?.message,
|
|
957
|
-
helpErrorPosition: "bottom",
|
|
958
|
-
labelHelpTooltip: noncurrentTransitionsHelpText,
|
|
959
|
-
content: /*#__PURE__*/ jsxs(Stack, {
|
|
978
|
+
noncurrentTransitionsEnabled ? /*#__PURE__*/ jsx(Fragment, {
|
|
979
|
+
children: /*#__PURE__*/ jsx(FormGroup, {
|
|
980
|
+
label: "",
|
|
981
|
+
id: "noncurrentTransitions",
|
|
960
982
|
direction: "vertical",
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
}),
|
|
970
|
-
/*#__PURE__*/ jsx(Text, {
|
|
971
|
-
color: "textSecondary",
|
|
972
|
-
children: "Keep Versions"
|
|
973
|
-
}),
|
|
974
|
-
/*#__PURE__*/ jsx(Text, {
|
|
975
|
-
color: "textSecondary",
|
|
976
|
-
children: storageClassLabel || 'Storage Class'
|
|
977
|
-
}),
|
|
978
|
-
/*#__PURE__*/ jsx("span", {})
|
|
979
|
-
]
|
|
980
|
-
}),
|
|
981
|
-
noncurrentTransitionFields.map((field, index)=>/*#__PURE__*/ jsxs(Box, {
|
|
983
|
+
error: errors?.noncurrentTransitions?.message,
|
|
984
|
+
helpErrorPosition: "bottom",
|
|
985
|
+
content: /*#__PURE__*/ jsxs(Stack, {
|
|
986
|
+
direction: "vertical",
|
|
987
|
+
gap: "r12",
|
|
988
|
+
children: [
|
|
989
|
+
/*#__PURE__*/ jsxs(FormRow, {
|
|
990
|
+
columns: "1fr 1fr 2fr",
|
|
982
991
|
children: [
|
|
983
|
-
/*#__PURE__*/
|
|
984
|
-
|
|
985
|
-
children:
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
992
|
+
/*#__PURE__*/ jsx(Text, {
|
|
993
|
+
color: "textSecondary",
|
|
994
|
+
children: "Noncurrent Days"
|
|
995
|
+
}),
|
|
996
|
+
/*#__PURE__*/ jsx(Text, {
|
|
997
|
+
color: "textSecondary",
|
|
998
|
+
children: "Keep Versions"
|
|
999
|
+
}),
|
|
1000
|
+
/*#__PURE__*/ jsx(Text, {
|
|
1001
|
+
color: "textSecondary",
|
|
1002
|
+
children: storageClassLabel || 'Storage Class'
|
|
1003
|
+
}),
|
|
1004
|
+
/*#__PURE__*/ jsx("span", {})
|
|
1005
|
+
]
|
|
1006
|
+
}),
|
|
1007
|
+
noncurrentTransitionFields.map((field, index)=>/*#__PURE__*/ jsxs(Box, {
|
|
1008
|
+
children: [
|
|
1009
|
+
/*#__PURE__*/ jsxs(FormRow, {
|
|
1010
|
+
columns: "1fr 1fr 2fr",
|
|
1011
|
+
children: [
|
|
1012
|
+
/*#__PURE__*/ jsx(FormCell, {
|
|
1013
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
1014
|
+
id: `noncurrent-transition-days-${index}`,
|
|
1015
|
+
type: "number",
|
|
1016
|
+
placeholder: "Noncurrent days",
|
|
1017
|
+
...register(`noncurrentTransitions.${index}.noncurrentDays`, {
|
|
1018
|
+
valueAsNumber: true
|
|
1019
|
+
})
|
|
1003
1020
|
})
|
|
1004
|
-
})
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
onChange: field.onChange,
|
|
1013
|
-
context: "lifecycle"
|
|
1014
|
-
}) : /*#__PURE__*/ jsx(Select, {
|
|
1015
|
-
id: `noncurrent-transition-storage-class-${index}`,
|
|
1016
|
-
value: field.value,
|
|
1017
|
-
onChange: field.onChange,
|
|
1018
|
-
placeholder: storageClassLabel || 'Storage Class',
|
|
1019
|
-
children: storageClassOptions.map((option)=>/*#__PURE__*/ jsx(Select.Option, {
|
|
1020
|
-
value: option.value,
|
|
1021
|
-
children: option.label
|
|
1022
|
-
}, option.value))
|
|
1021
|
+
}),
|
|
1022
|
+
/*#__PURE__*/ jsx(FormCell, {
|
|
1023
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
1024
|
+
id: `noncurrent-transition-keep-versions-${index}`,
|
|
1025
|
+
type: "number",
|
|
1026
|
+
placeholder: "Keep versions",
|
|
1027
|
+
...register(`noncurrentTransitions.${index}.newerNoncurrentVersions`, {
|
|
1028
|
+
valueAsNumber: true
|
|
1023
1029
|
})
|
|
1030
|
+
})
|
|
1031
|
+
}),
|
|
1032
|
+
/*#__PURE__*/ jsx(FormCell, {
|
|
1033
|
+
children: /*#__PURE__*/ jsx(Controller, {
|
|
1034
|
+
name: `noncurrentTransitions.${index}.storageClass`,
|
|
1035
|
+
control: control,
|
|
1036
|
+
render: ({ field })=>StorageClassSelector ? /*#__PURE__*/ jsx(StorageClassSelector, {
|
|
1037
|
+
value: field.value,
|
|
1038
|
+
onChange: field.onChange,
|
|
1039
|
+
context: "lifecycle"
|
|
1040
|
+
}) : /*#__PURE__*/ jsx(Select, {
|
|
1041
|
+
id: `noncurrent-transition-storage-class-${index}`,
|
|
1042
|
+
value: field.value,
|
|
1043
|
+
onChange: field.onChange,
|
|
1044
|
+
placeholder: storageClassLabel || 'Storage Class',
|
|
1045
|
+
children: storageClassOptions.map((option)=>/*#__PURE__*/ jsx(Select.Option, {
|
|
1046
|
+
value: option.value,
|
|
1047
|
+
children: option.label
|
|
1048
|
+
}, option.value))
|
|
1049
|
+
})
|
|
1050
|
+
})
|
|
1051
|
+
}),
|
|
1052
|
+
/*#__PURE__*/ jsx(ArrayFieldActions, {
|
|
1053
|
+
showAdd: index === noncurrentTransitionFields.length - 1,
|
|
1054
|
+
onRemove: ()=>removeNoncurrentTransition(index),
|
|
1055
|
+
onAdd: ()=>appendNoncurrentTransition({
|
|
1056
|
+
noncurrentDays: 30,
|
|
1057
|
+
storageClass: hasCustomSelector ? '' : 'GLACIER',
|
|
1058
|
+
newerNoncurrentVersions: 0
|
|
1059
|
+
}),
|
|
1060
|
+
canRemove: noncurrentTransitionFields.length > 1
|
|
1024
1061
|
})
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1062
|
+
]
|
|
1063
|
+
}),
|
|
1064
|
+
getArrayFieldError(errors, 'noncurrentTransitions', index, 'noncurrentDays') && /*#__PURE__*/ jsx(Box, {
|
|
1065
|
+
paddingTop: spacing.r4,
|
|
1066
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
1067
|
+
color: "statusCritical",
|
|
1068
|
+
children: getArrayFieldError(errors, 'noncurrentTransitions', index, 'noncurrentDays')
|
|
1069
|
+
})
|
|
1070
|
+
}),
|
|
1071
|
+
getArrayFieldError(errors, 'noncurrentTransitions', index, 'storageClass') && /*#__PURE__*/ jsx(Box, {
|
|
1072
|
+
paddingTop: spacing.r4,
|
|
1073
|
+
children: /*#__PURE__*/ jsx(Text, {
|
|
1074
|
+
color: "statusCritical",
|
|
1075
|
+
children: getArrayFieldError(errors, 'noncurrentTransitions', index, 'storageClass')
|
|
1035
1076
|
})
|
|
1036
|
-
]
|
|
1037
|
-
}),
|
|
1038
|
-
getArrayFieldError(errors, 'noncurrentTransitions', index, 'noncurrentDays') && /*#__PURE__*/ jsx(Box, {
|
|
1039
|
-
paddingTop: spacing.r4,
|
|
1040
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
1041
|
-
color: "statusCritical",
|
|
1042
|
-
children: getArrayFieldError(errors, 'noncurrentTransitions', index, 'noncurrentDays')
|
|
1043
|
-
})
|
|
1044
|
-
}),
|
|
1045
|
-
getArrayFieldError(errors, 'noncurrentTransitions', index, 'storageClass') && /*#__PURE__*/ jsx(Box, {
|
|
1046
|
-
paddingTop: spacing.r4,
|
|
1047
|
-
children: /*#__PURE__*/ jsx(Text, {
|
|
1048
|
-
color: "statusCritical",
|
|
1049
|
-
children: getArrayFieldError(errors, 'noncurrentTransitions', index, 'storageClass')
|
|
1050
1077
|
})
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1078
|
+
]
|
|
1079
|
+
}, field.id))
|
|
1080
|
+
]
|
|
1081
|
+
})
|
|
1055
1082
|
})
|
|
1056
1083
|
}) : /*#__PURE__*/ jsx(Fragment, {}),
|
|
1057
1084
|
/*#__PURE__*/ jsx(FormGroup, {
|
|
1058
1085
|
label: "Expiration noncurrent version",
|
|
1059
1086
|
id: "noncurrentExpirationEnabled",
|
|
1060
1087
|
direction: "horizontal",
|
|
1088
|
+
labelHelpTooltip: "Permanently delete noncurrent object versions after a specified number of days",
|
|
1061
1089
|
content: /*#__PURE__*/ jsx(Controller, {
|
|
1062
1090
|
name: "noncurrentExpirationEnabled",
|
|
1063
1091
|
control: control,
|
|
@@ -1068,7 +1096,12 @@ function BucketLifecycleFormPage() {
|
|
|
1068
1096
|
})
|
|
1069
1097
|
})
|
|
1070
1098
|
}),
|
|
1071
|
-
noncurrentExpirationEnabled ? /*#__PURE__*/ jsxs(
|
|
1099
|
+
noncurrentExpirationEnabled ? /*#__PURE__*/ jsxs(Stack, {
|
|
1100
|
+
direction: "vertical",
|
|
1101
|
+
gap: "r24",
|
|
1102
|
+
style: {
|
|
1103
|
+
paddingLeft: spacing.r24
|
|
1104
|
+
},
|
|
1072
1105
|
children: [
|
|
1073
1106
|
/*#__PURE__*/ jsx(FormGroup, {
|
|
1074
1107
|
label: "Noncurrent days",
|
|
@@ -1091,6 +1124,7 @@ function BucketLifecycleFormPage() {
|
|
|
1091
1124
|
label: "Keep newer versions",
|
|
1092
1125
|
id: "noncurrentNewerVersions",
|
|
1093
1126
|
direction: "horizontal",
|
|
1127
|
+
helpErrorPosition: "bottom",
|
|
1094
1128
|
content: /*#__PURE__*/ jsx(Box, {
|
|
1095
1129
|
flex: "1",
|
|
1096
1130
|
children: /*#__PURE__*/ jsx(Input, {
|
|
@@ -1109,6 +1143,7 @@ function BucketLifecycleFormPage() {
|
|
|
1109
1143
|
label: "Expire incomplete multipart upload",
|
|
1110
1144
|
id: "abortMpuEnabled",
|
|
1111
1145
|
direction: "horizontal",
|
|
1146
|
+
labelHelpTooltip: "Automatically abort and clean up incomplete multipart uploads after a specified number of days. Cannot be used with tag-based filters.",
|
|
1112
1147
|
error: ('tags' === filterType || 'and' === filterType) && abortMpuEnabled ? 'Tag-based filter cannot be used with Abort Incomplete Multipart Upload' : void 0,
|
|
1113
1148
|
helpErrorPosition: "bottom",
|
|
1114
1149
|
content: /*#__PURE__*/ jsx(Controller, {
|
|
@@ -1121,19 +1156,24 @@ function BucketLifecycleFormPage() {
|
|
|
1121
1156
|
})
|
|
1122
1157
|
})
|
|
1123
1158
|
}),
|
|
1124
|
-
abortMpuEnabled ? /*#__PURE__*/ jsx(
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1159
|
+
abortMpuEnabled ? /*#__PURE__*/ jsx("div", {
|
|
1160
|
+
style: {
|
|
1161
|
+
paddingLeft: spacing.r24
|
|
1162
|
+
},
|
|
1163
|
+
children: /*#__PURE__*/ jsx(FormGroup, {
|
|
1164
|
+
label: "Days after initiation",
|
|
1165
|
+
id: "abortMpuDays",
|
|
1166
|
+
direction: "horizontal",
|
|
1167
|
+
error: errors?.abortMpuDays?.message,
|
|
1168
|
+
helpErrorPosition: "bottom",
|
|
1169
|
+
content: /*#__PURE__*/ jsx(Box, {
|
|
1170
|
+
flex: "1",
|
|
1171
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
1172
|
+
type: "number",
|
|
1173
|
+
id: "abortMpuDays",
|
|
1174
|
+
...register('abortMpuDays', {
|
|
1175
|
+
valueAsNumber: true
|
|
1176
|
+
})
|
|
1137
1177
|
})
|
|
1138
1178
|
})
|
|
1139
1179
|
})
|