Skip to content

Commit

Permalink
Updated snapshots, and implemented fix for a unit test.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Apr 20, 2022
1 parent 595932f commit 7afdddc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,15 @@ export default class AlertsDashboardFlyoutComponent extends Component {
}

getBucketLevelGraphConditions = (trigger) => {
let conditions = _.get(trigger, 'condition.script.source', '-');
conditions = conditions.replaceAll(' && ', '&AND&');
conditions = conditions.replaceAll(' || ', '&OR&');
conditions = conditions.split(/&/);
return conditions.join('\n');
let conditions = _.get(trigger, 'condition.script.source');
if (_.isEmpty(conditions)) {
return '-';
} else {
conditions = conditions.replaceAll(' && ', '&AND&');
conditions = conditions.replaceAll(' || ', '&OR&');
conditions = conditions.split(/&/);
return conditions.join('\n');
}
};

getSeverityText = (severity) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`MonitorType renders 1`] = `
<div
alignitems="flexStart"
class="euiFlexGrid euiFlexGrid--gutterMedium euiFlexGrid--wrap euiFlexGrid--responsive"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`QueryPerformance renders 1`] = `
<h3
class="euiTitle euiTitle--small"
>
Query performance
Monitor performance
</h3>
</div>
<div
Expand Down Expand Up @@ -72,7 +72,7 @@ exports[`QueryPerformance renders 1`] = `
class="euiText euiText--extraSmall"
>
<strong>
Query duration
Monitor duration
</strong>
<span
style="display:block"
Expand Down

0 comments on commit 7afdddc

Please sign in to comment.