Skip to content

Commit

Permalink
[ILM] Index Lifecycle Policies show wrong unit in Kibana UI (#55228) (#…
Browse files Browse the repository at this point in the history
…55758)

* Added timing and byte size units to hot, cold, warm, and delete phase

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
jkelastic and elasticmachine authored Jan 30, 2020
1 parent e44e30c commit 0314efc
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,30 @@ export class HotPhase extends PureComponent {
defaultMessage: 'megabytes',
}),
},
{
value: 'b',
text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.bytesLabel', {
defaultMessage: 'bytes',
}),
},
{
value: 'kb',
text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.kilobytesLabel', {
defaultMessage: 'kilobytes',
}),
},
{
value: 'tb',
text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.terabytesLabel', {
defaultMessage: 'terabytes',
}),
},
{
value: 'pb',
text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.petabytesLabel', {
defaultMessage: 'petabytes',
}),
},
]}
/>
</ErrableFormRow>
Expand Down Expand Up @@ -254,6 +278,45 @@ export class HotPhase extends PureComponent {
defaultMessage: 'hours',
}),
},
{
value: 'm',
text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.minutesLabel', {
defaultMessage: 'minutes',
}),
},
{
value: 's',
text: i18n.translate('xpack.indexLifecycleMgmt.hotPhase.secondsLabel', {
defaultMessage: 'seconds',
}),
},
{
value: 'ms',
text: i18n.translate(
'xpack.indexLifecycleMgmt.hotPhase.millisecondsLabel',
{
defaultMessage: 'milliseconds',
}
),
},
{
value: 'micros',
text: i18n.translate(
'xpack.indexLifecycleMgmt.hotPhase.microsecondsLabel',
{
defaultMessage: 'microseconds',
}
),
},
{
value: 'nanos',
text: i18n.translate(
'xpack.indexLifecycleMgmt.hotPhase.nanosecondsLabel',
{
defaultMessage: 'nanoseconds',
}
),
},
]}
/>
</ErrableFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export const MinAgeInput = props => {

let daysOptionLabel;
let hoursOptionLabel;
let minutesOptionLabel;
let secondsOptionLabel;
let millisecondsOptionLabel;
let microsecondsOptionLabel;
let nanosecondsOptionLabel;

if (rolloverEnabled) {
daysOptionLabel = i18n.translate(
Expand All @@ -88,6 +93,39 @@ export const MinAgeInput = props => {
defaultMessage: 'hours from rollover',
}
);
minutesOptionLabel = i18n.translate(
'xpack.indexLifecycleMgmt.editPolicy.rolloverMinutesOptionLabel',
{
defaultMessage: 'minutes from rollover',
}
);

secondsOptionLabel = i18n.translate(
'xpack.indexLifecycleMgmt.editPolicy.rolloverSecondsOptionLabel',
{
defaultMessage: 'seconds from rollover',
}
);
millisecondsOptionLabel = i18n.translate(
'xpack.indexLifecycleMgmt.editPolicy.rolloverMilliSecondsOptionLabel',
{
defaultMessage: 'milliseconds from rollover',
}
);

microsecondsOptionLabel = i18n.translate(
'xpack.indexLifecycleMgmt.editPolicy.rolloverMicroSecondsOptionLabel',
{
defaultMessage: 'microseconds from rollover',
}
);

nanosecondsOptionLabel = i18n.translate(
'xpack.indexLifecycleMgmt.editPolicy.rolloverNanoSecondsOptionLabel',
{
defaultMessage: 'nanoseconds from rollover',
}
);
} else {
daysOptionLabel = i18n.translate(
'xpack.indexLifecycleMgmt.editPolicy.creationDaysOptionLabel',
Expand Down Expand Up @@ -150,6 +188,26 @@ export const MinAgeInput = props => {
value: 'h',
text: hoursOptionLabel,
},
{
value: 'm',
text: minutesOptionLabel,
},
{
value: 's',
text: secondsOptionLabel,
},
{
value: 'ms',
text: millisecondsOptionLabel,
},
{
value: 'micros',
text: microsecondsOptionLabel,
},
{
value: 'nanos',
text: nanosecondsOptionLabel,
},
]}
/>
</EuiFormRow>
Expand Down

0 comments on commit 0314efc

Please sign in to comment.