-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
593 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
..._lifecycle_management/public/application/sections/edit_policy/components/active_badge.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...public/application/sections/edit_policy/components/active_highlight/active_highlight.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
* 2.0. | ||
*/ | ||
|
||
export { ActiveHighlight } from './active_highlight'; | ||
export { InfinityIcon } from './infinity_icon'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...cycle_management/public/application/sections/edit_policy/components/phase_footer/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export { PhaseFooter } from './phase_footer'; |
7 changes: 7 additions & 0 deletions
7
...agement/public/application/sections/edit_policy/components/phase_footer/phase_footer.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.euiPanel.ilmPhaseFooter { | ||
padding-top: $euiSizeS; | ||
padding-bottom: $euiSizeS; | ||
border: none; | ||
border-top-left-radius: 0; | ||
border-top-right-radius: 0; | ||
} |
74 changes: 74 additions & 0 deletions
74
...nagement/public/application/sections/edit_policy/components/phase_footer/phase_footer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React, { FunctionComponent } from 'react'; | ||
|
||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
|
||
import { EuiIcon, EuiText, EuiLink, EuiPanel } from '@elastic/eui'; | ||
|
||
import { usePhaseTimings } from '../../form'; | ||
|
||
import { InfinityIcon } from '../infinity_icon'; | ||
|
||
import './phase_footer.scss'; | ||
|
||
interface Props { | ||
phase: 'hot' | 'warm' | 'cold'; | ||
} | ||
|
||
export const PhaseFooter: FunctionComponent<Props> = ({ phase }) => { | ||
const phaseTimings = usePhaseTimings(); | ||
const phaseConfiguration = phaseTimings[phase]; | ||
const setValue = phaseTimings.setDeletePhaseEnabled; | ||
|
||
if (phaseConfiguration === 'disabled' || phaseConfiguration === 'enabled') { | ||
return ( | ||
<EuiPanel className={'ilmPhaseFooter'} hasShadow={false}> | ||
<EuiText size={'s'}> </EuiText> | ||
</EuiPanel> | ||
); | ||
} | ||
|
||
if (phaseConfiguration === 'forever') { | ||
return ( | ||
<EuiPanel color={'subdued'} className={'ilmPhaseFooter'} hasShadow={false}> | ||
<InfinityIcon size={'s'} />{' '} | ||
<EuiText size={'s'} grow={false} className={'eui-displayInlineBlock'}> | ||
<FormattedMessage | ||
id="xpack.indexLifecycleMgmt.editPolicy.phaseTiming.foreverTimingDescription" | ||
defaultMessage="Data will remain in this phase forever." | ||
/>{' '} | ||
<EuiLink onClick={() => setValue(true)} data-test-subj={'enableDeletePhaseLink'}> | ||
<FormattedMessage | ||
id="xpack.indexLifecycleMgmt.editPolicy.deletePhase.enablePhaseButtonLabel" | ||
defaultMessage="Enable data deletion" | ||
/> | ||
</EuiLink> | ||
</EuiText> | ||
</EuiPanel> | ||
); | ||
} | ||
|
||
return ( | ||
<EuiPanel color={'subdued'} className={'ilmPhaseFooter'} hasShadow={false}> | ||
<EuiIcon type={'storage'} size={'s'} />{' '} | ||
<EuiText size={'s'} grow={false} className={'eui-displayInlineBlock'}> | ||
<FormattedMessage | ||
id="xpack.indexLifecycleMgmt.editPolicy.phaseTiming.beforeDeleteDescription" | ||
defaultMessage="Data will be deleted after this phase." | ||
/>{' '} | ||
<EuiLink onClick={() => setValue(false)} data-test-subj={'disableDeletePhaseLink'}> | ||
<FormattedMessage | ||
id="xpack.indexLifecycleMgmt.editPolicy.deletePhase.disablePhaseButtonLabel" | ||
defaultMessage="Disable data deletion" | ||
/> | ||
</EuiLink> | ||
</EuiText> | ||
</EuiPanel> | ||
); | ||
}; |
8 changes: 8 additions & 0 deletions
8
...fecycle_management/public/application/sections/edit_policy/components/phase_icon/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export { PhaseIcon } from './phase_icon'; |
28 changes: 28 additions & 0 deletions
28
..._management/public/application/sections/edit_policy/components/phase_icon/phase_icon.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.ilmPhaseIcon { | ||
width: 32px; | ||
height: 32px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 50%; | ||
background-color: $euiColorLightestShade; | ||
&--delete { | ||
background-color: $euiColorLightShade; | ||
} | ||
&__inner--hot { | ||
fill: $euiColorVis9_behindText; | ||
} | ||
&__inner--warm { | ||
fill: $euiColorVis5_behindText; | ||
} | ||
&__inner--cold { | ||
fill: $euiColorVis1_behindText; | ||
} | ||
&__inner--delete { | ||
fill: $euiColorDarkShade; | ||
} | ||
|
||
&__inner--disabled { | ||
fill: $euiColorMediumShade; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...e_management/public/application/sections/edit_policy/components/phase_icon/phase_icon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React, { FunctionComponent } from 'react'; | ||
import { EuiIcon } from '@elastic/eui'; | ||
import { Phases } from '../../../../../../common/types'; | ||
import './phase_icon.scss'; | ||
interface Props { | ||
enabled: boolean; | ||
phase: string & keyof Phases; | ||
} | ||
export const PhaseIcon: FunctionComponent<Props> = ({ enabled, phase }) => { | ||
return ( | ||
<div | ||
className={`ilmPhaseIcon ilmPhaseIcon--${phase} ${enabled ? '' : 'ilmPhaseIcon--disabled'}`} | ||
> | ||
{enabled ? ( | ||
<EuiIcon | ||
className={`ilmPhaseIcon__inner--${phase}`} | ||
type={phase === 'delete' ? 'trash' : 'checkInCircleFilled'} | ||
size={phase === 'delete' ? 'm' : 'l'} | ||
/> | ||
) : ( | ||
<EuiIcon className="ilmPhaseIcon__inner--disabled" type={'dot'} size={'l'} /> | ||
)} | ||
</div> | ||
); | ||
}; |
15 changes: 15 additions & 0 deletions
15
.../public/application/sections/edit_policy/components/phases/delete_phase/delete_phase.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.ilmDeletePhase { | ||
.euiCommentEvent { | ||
&__header { | ||
padding: $euiSize; | ||
background-color: $euiColorEmptyShade; | ||
|
||
} | ||
&__body { | ||
padding: $euiSize; | ||
background-color: $euiColorLightestShade; | ||
|
||
} | ||
|
||
} | ||
} |
Oops, something went wrong.