@@ -57,6 +57,7 @@ import MDSEnabledComponent from "../../../../components/MDSEnabledComponent";
57
57
import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent" ;
58
58
import { getApplication , getNavigationUI , getUISettings } from "../../../../services/Services" ;
59
59
import { ExternalLink } from "../../../utils/display-utils" ;
60
+ import { TopNavControlDescriptionData , TopNavControlLinkData } from "src/plugins/navigation/public" ;
60
61
61
62
interface CreateSMPolicyProps extends RouteComponentProps , DataSourceMenuProperties {
62
63
snapshotManagementService : SnapshotManagementService ;
@@ -559,13 +560,17 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
559
560
560
561
const descriptionData = [
561
562
{
562
- renderComponent : (
563
- < EuiText size = "s" color = "subdued" >
564
- Snapshot policies allow you to define an automated snapshot schedule and retention period.{ " " }
565
- < ExternalLink href = { SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL } />
566
- </ EuiText >
567
- ) ,
568
- } ,
563
+ description : "Snapshot policies allow you to define an automated snapshot schedule and retention period." ,
564
+ links : {
565
+ label : "Learn more" ,
566
+ href : SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL ,
567
+ iconType : "popout" ,
568
+ iconSide : "right" ,
569
+ controlType : "link" ,
570
+ target : "_blank" ,
571
+ flush : "both" ,
572
+ } as TopNavControlLinkData ,
573
+ } as TopNavControlDescriptionData ,
569
574
] ;
570
575
const padding_style = this . state . useNewUX ? { padding : "0px 0px" } : { padding : "5px 50px" } ;
571
576
return (
@@ -574,15 +579,21 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
574
579
< HeaderControl setMountPoint = { setAppDescriptionControls } controls = { descriptionData } />
575
580
) : (
576
581
< >
577
- < EuiTitle size = "l " >
582
+ < EuiText size = "s " >
578
583
< h1 > { isEdit ? "Edit" : "Create" } policy</ h1 >
579
- </ EuiTitle >
584
+ </ EuiText >
580
585
{ subTitleText }
581
586
< EuiSpacer />
582
587
</ >
583
588
) }
584
589
585
- < ContentPanel title = "Policy settings" titleSize = "s" >
590
+ < EuiPanel >
591
+ < EuiFlexGroup gutterSize = "xs" alignItems = "center" >
592
+ < EuiText size = "s" >
593
+ < h2 > Policy settings</ h2 >
594
+ </ EuiText >
595
+ </ EuiFlexGroup >
596
+ < EuiHorizontalRule margin = { "xs" } />
586
597
< CustomLabel title = "Policy name" />
587
598
< EuiCompressedFormRow isInvalid = { ! ! policyIdError } error = { policyIdError } >
588
599
< EuiCompressedFieldText
@@ -605,11 +616,17 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
605
616
data-test-subj = "description"
606
617
/>
607
618
</ EuiCompressedFormRow >
608
- </ ContentPanel >
619
+ </ EuiPanel >
609
620
610
621
< EuiSpacer />
611
622
612
- < ContentPanel title = "Source and destination" titleSize = "s" >
623
+ < EuiPanel >
624
+ < EuiFlexGroup gutterSize = "xs" alignItems = "center" >
625
+ < EuiText size = "s" >
626
+ < h2 > Source and destination</ h2 >
627
+ </ EuiText >
628
+ </ EuiFlexGroup >
629
+ < EuiHorizontalRule margin = { "xs" } />
613
630
< SnapshotIndicesRepoInput
614
631
indexOptions = { indexOptions }
615
632
selectedIndexOptions = { selectedIndexOptions }
@@ -630,11 +647,17 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
630
647
snapshotManagementService = { this . props . snapshotManagementService }
631
648
repoError = { repoError }
632
649
/>
633
- </ ContentPanel >
650
+ </ EuiPanel >
634
651
635
652
< EuiSpacer />
636
653
637
- < ContentPanel title = "Snapshot schedule" titleSize = "s" >
654
+ < EuiPanel >
655
+ < EuiFlexGroup gutterSize = "xs" alignItems = "center" >
656
+ < EuiText size = "s" >
657
+ < h2 > Snapshot schedule</ h2 >
658
+ </ EuiText >
659
+ </ EuiFlexGroup >
660
+ < EuiHorizontalRule margin = { "xs" } />
638
661
< CronSchedule
639
662
frequencyTitle = "Snapshot frequency"
640
663
frequencyType = { creationScheduleFrequencyType }
@@ -657,11 +680,17 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
657
680
this . setState ( { policy : this . setPolicyHelper ( "creation.schedule.cron.expression" , expression ) } ) ;
658
681
} }
659
682
/>
660
- </ ContentPanel >
683
+ </ EuiPanel >
661
684
662
685
< EuiSpacer />
663
686
664
- < ContentPanel title = "Retention period" titleSize = "s" >
687
+ < EuiPanel >
688
+ < EuiFlexGroup gutterSize = "xs" alignItems = "center" >
689
+ < EuiText size = "s" >
690
+ < h2 > Retention period</ h2 >
691
+ </ EuiText >
692
+ </ EuiFlexGroup >
693
+ < EuiHorizontalRule margin = { "xs" } />
665
694
< EuiCompressedRadioGroup
666
695
options = { rententionEnableRadios }
667
696
idSelected = { deleteConditionEnabled ? "retention_enabled" : "retention_disabled" }
@@ -759,62 +788,71 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
759
788
</ EuiAccordion >
760
789
</ >
761
790
) : null }
762
- </ ContentPanel >
791
+ </ EuiPanel >
763
792
764
793
< EuiSpacer />
765
794
766
- < ContentPanel title = "Notifications" titleSize = "s" >
767
- < div style = { { padding : "10px 10px" } } >
768
- < EuiText > Notify on snapshot activities</ EuiText >
769
-
770
- < EuiSpacer size = "s" />
771
- < EuiCompressedCheckbox
772
- id = "notification-creation"
773
- label = "When a snapshot has been created."
774
- checked = { getNotifyCreation ( policy ) }
775
- onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
776
- this . setState ( { policy : this . setPolicyHelper ( "notification.conditions.creation" , e . target . checked ) } ) ;
777
- } }
778
- />
795
+ < EuiPanel >
796
+ < EuiFlexGroup gutterSize = "xs" alignItems = "center" >
797
+ < EuiText size = "s" >
798
+ < h2 > Notifications</ h2 >
799
+ </ EuiText >
800
+ </ EuiFlexGroup >
801
+ < EuiHorizontalRule margin = { "xs" } />
802
+ < EuiText size = "s" >
803
+ < h3 > Notify on snapshot activities</ h3 >
804
+ </ EuiText >
779
805
780
- < EuiSpacer size = "s" />
806
+ < EuiSpacer size = "s" />
807
+ < EuiCompressedCheckbox
808
+ id = "notification-creation"
809
+ label = "When a snapshot has been created."
810
+ checked = { getNotifyCreation ( policy ) }
811
+ onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
812
+ this . setState ( { policy : this . setPolicyHelper ( "notification.conditions.creation" , e . target . checked ) } ) ;
813
+ } }
814
+ />
781
815
782
- < EuiCompressedCheckbox
783
- id = "notification-deletion"
784
- label = "When a snapshots has been deleted."
785
- checked = { getNotifyDeletion ( policy ) }
786
- onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
787
- this . setState ( { policy : this . setPolicyHelper ( "notification.conditions.deletion" , e . target . checked ) } ) ;
788
- } }
789
- />
816
+ < EuiSpacer size = "s" />
790
817
791
- < EuiSpacer size = "s" />
818
+ < EuiCompressedCheckbox
819
+ id = "notification-deletion"
820
+ label = "When a snapshots has been deleted."
821
+ checked = { getNotifyDeletion ( policy ) }
822
+ onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
823
+ this . setState ( { policy : this . setPolicyHelper ( "notification.conditions.deletion" , e . target . checked ) } ) ;
824
+ } }
825
+ />
792
826
793
- < EuiCompressedCheckbox
794
- id = "notification-failure"
795
- label = "When a snapshot has failed."
796
- checked = { getNotifyFailure ( policy ) }
797
- onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
798
- this . setState ( { policy : this . setPolicyHelper ( "notification.conditions.failure" , e . target . checked ) } ) ;
799
- } }
800
- />
801
- </ div >
827
+ < EuiSpacer size = "s" />
828
+
829
+ < EuiCompressedCheckbox
830
+ id = "notification-failure"
831
+ label = "When a snapshot has failed."
832
+ checked = { getNotifyFailure ( policy ) }
833
+ onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
834
+ this . setState ( { policy : this . setPolicyHelper ( "notification.conditions.failure" , e . target . checked ) } ) ;
835
+ } }
836
+ />
802
837
{ showNotificationChannel ? (
803
- < Notification
804
- channelId = { _ . get ( policy , "notification.channel.id" ) || "" }
805
- channels = { channels }
806
- loadingChannels = { loadingChannels }
807
- onChangeChannelId = { this . onChangeChannelId }
808
- getChannels = { this . getChannels }
809
- />
838
+ < >
839
+ < EuiSpacer size = "s" />
840
+ < Notification
841
+ channelId = { _ . get ( policy , "notification.channel.id" ) || "" }
842
+ channels = { channels }
843
+ loadingChannels = { loadingChannels }
844
+ onChangeChannelId = { this . onChangeChannelId }
845
+ getChannels = { this . getChannels }
846
+ />
847
+ </ >
810
848
) : null }
811
- </ ContentPanel >
849
+ </ EuiPanel >
812
850
813
851
< EuiSpacer />
814
852
815
853
{ /* Advanced settings */ }
816
- < EuiPanel style = { { paddingLeft : "0px" , paddingRight : "0px" } } >
817
- < EuiFlexGroup style = { { padding : "0px 10px" } } justifyContent = "flexStart" alignItems = "center" gutterSize = "none" >
854
+ < EuiPanel >
855
+ < EuiFlexGroup justifyContent = "flexStart" alignItems = "center" gutterSize = "none" >
818
856
< EuiFlexItem grow = { false } >
819
857
< EuiSmallButtonIcon
820
858
iconType = { advancedSettingsOpen ? "arrowDown" : "arrowRight" }
@@ -826,11 +864,11 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
826
864
/>
827
865
</ EuiFlexItem >
828
866
< EuiFlexItem grow = { false } >
829
- < EuiTitle size = "s" >
830
- < h1 >
867
+ < EuiText size = "s" >
868
+ < h2 >
831
869
Advanced settings < i > – optional</ i >
832
- </ h1 >
833
- </ EuiTitle >
870
+ </ h2 >
871
+ </ EuiText >
834
872
</ EuiFlexItem >
835
873
</ EuiFlexGroup >
836
874
@@ -890,7 +928,7 @@ export class CreateSnapshotPolicy extends MDSEnabledComponent<CreateSMPolicyProp
890
928
891
929
< EuiSpacer />
892
930
893
- < EuiFlexGroup justifyContent = "flexEnd" >
931
+ < EuiFlexGroup justifyContent = "flexEnd" gutterSize = "s" >
894
932
< EuiFlexItem grow = { false } >
895
933
< EuiSmallButtonEmpty onClick = { this . onClickCancel } > Cancel</ EuiSmallButtonEmpty >
896
934
</ EuiFlexItem >
0 commit comments