Skip to content

Commit

Permalink
Updating terminology in alerting examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Mar 10, 2021
1 parent 28fc765 commit 73f2c4c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
6 changes: 3 additions & 3 deletions x-pack/examples/alerting_example/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ const AlertingExampleApp = ({
)}
/>
<Route
path={`/alert/:id`}
path={`/rule/:id`}
render={(props: RouteComponentProps<{ id: string }>) => {
return (
<Page title={`View Alert`} crumb={`View Alert ${props.match.params.id}`}>
<Page title={`View Rule`} crumb={`View Rule ${props.match.params.id}`}>
<ViewAlertPage http={http} id={props.match.params.id} />
</Page>
);
Expand All @@ -56,7 +56,7 @@ const AlertingExampleApp = ({
path={`/astros/:id`}
render={(props: RouteComponentProps<{ id: string }>) => {
return (
<Page title={`View People In Space Alert`} crumb={`Astros ${props.match.params.id}`}>
<Page title={`View People In Space Rule`} crumb={`Astros ${props.match.params.id}`}>
<ViewPeopleInSpaceAlertPage http={http} id={props.match.params.id} />
</Page>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,37 @@ export const ViewAlertPage = withRouter(({ http, id }: Props) => {

return alert && alertState ? (
<Fragment>
<EuiCallOut title={`Alert "${alert.name}"`} iconType="search">
<EuiCallOut title={`Rule "${alert.name}"`} iconType="search">
<p>
This is a generic view for all Alerts created by the
This is a generic view for all Rules created by the
<EuiTextColor color="accent"> {ALERTING_EXAMPLE_APP_ID} </EuiTextColor>
plugin.
</p>
<p>
You are now viewing the <EuiTextColor color="accent">{`${alert.name}`} </EuiTextColor>
Alert, whose ID is <EuiTextColor color="accent">{`${alert.id}`}</EuiTextColor>.
Rule, whose ID is <EuiTextColor color="accent">{`${alert.id}`}</EuiTextColor>.
</p>
<p>
Its AlertType is <EuiTextColor color="accent">{`${alert.alertTypeId}`}</EuiTextColor> and
Its RuleType is <EuiTextColor color="accent">{`${alert.alertTypeId}`}</EuiTextColor> and
its scheduled to run at an interval of
<EuiTextColor color="accent"> {`${alert.schedule.interval}`}</EuiTextColor>.
</p>
</EuiCallOut>
<EuiSpacer size="l" />
<EuiText>
<h2>Alert Instances</h2>
<h2>Alerts</h2>
</EuiText>
{isEmpty(alertState.alertInstances) ? (
<EuiCallOut title="No Alert Instances!" color="warning" iconType="help">
<p>This Alert doesn&apos;t have any active alert instances at the moment.</p>
<EuiCallOut title="No Alerts!" color="warning" iconType="help">
<p>This Rule doesn&apos;t have any active alerts at the moment.</p>
</EuiCallOut>
) : (
<Fragment>
<EuiCallOut title="Active State" color="success" iconType="user">
<p>
Bellow are the active Alert Instances which were activated on the alerts last run.
Below are the active Alerts which were activated on the rules last run.
<br />
For each instance id you can see its current state in JSON format.
For each alert id you can see its current state in JSON format.
</p>
</EuiCallOut>
<EuiSpacer size="l" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,20 @@ export const ViewPeopleInSpaceAlertPage = withRouter(({ http, id }: Props) => {

return alert && alertState ? (
<Fragment>
<EuiCallOut title={`Alert "${alert.name}"`} iconType="search">
<EuiCallOut title={`Rule "${alert.name}"`} iconType="search">
<p>
This is a specific view for all
<EuiTextColor color="accent"> example.people-in-space </EuiTextColor> Alerts created by
the
<EuiTextColor color="accent"> example.people-in-space </EuiTextColor> Rules created by the
<EuiTextColor color="accent"> {ALERTING_EXAMPLE_APP_ID} </EuiTextColor>
plugin.
</p>
</EuiCallOut>
<EuiSpacer size="l" />
<EuiText>
<h2>Alert Instances</h2>
<h2>Alerts</h2>
</EuiText>
{isEmpty(alertState.alertInstances) ? (
<EuiCallOut title="No Alert Instances!" color="warning" iconType="help">
<EuiCallOut title="No Alerts!" color="warning" iconType="help">
<p>
The people in {alert.params.craft} at the moment <b>are not</b> {alert.params.op}{' '}
{alert.params.outerSpaceCapacity}
Expand All @@ -73,7 +72,7 @@ export const ViewPeopleInSpaceAlertPage = withRouter(({ http, id }: Props) => {
<Fragment>
<EuiCallOut title="Active State" color="success" iconType="user">
<p>
The alert has been triggered because the people in {alert.params.craft} at the moment{' '}
The rule has been triggered because the people in {alert.params.craft} at the moment{' '}
{alert.params.op} {alert.params.outerSpaceCapacity}
</p>
</EuiCallOut>
Expand Down

0 comments on commit 73f2c4c

Please sign in to comment.