Skip to content

Commit 56d187a

Browse files
authored
Change remaining references to historical analysis; other minor wording tuning (opensearch-project#72)
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 1f10007 commit 56d187a

File tree

7 files changed

+21
-22
lines changed

7 files changed

+21
-22
lines changed

public/pages/DetectorConfig/containers/__tests__/DetectorJobs.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('<DetectorJobs /> spec', () => {
5454
getByText('Real-time detector');
5555
getByText(DETECTOR_STATE.INIT);
5656
});
57-
test('renders with disabled historical detector', () => {
57+
test('renders with disabled historical analysis', () => {
5858
const { getByText } = render(
5959
<DetectorJobs
6060
detector={{

public/pages/DetectorResults/components/OutOfRangeModal/OutOfRangeModal.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ export const OutOfRangeModal = (props: OutOfRangeModalProps) => {
5757
<EuiFlexGroup direction="column">
5858
<EuiFlexItem grow={false}>
5959
<EuiText>
60-
{`The selected dates are not in the range from when the detector
60+
{`Your selected dates are not in the range from when the detector
6161
last started streaming data (${convertTimestampToString(
6262
props.lastEnabledTime
63-
)}). To see historical data, go to
64-
historical analysis.`}
63+
)}).`}
6564
</EuiText>
6665
</EuiFlexItem>
6766
</EuiFlexGroup>

public/pages/HistoricalDetectorResults/components/HistoricalDetectorCallout/HistoricalDetectorCallout.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const HistoricalDetectorCallout = (
6565
<EuiFlexGroup direction="row" gutterSize="xs">
6666
<EuiLoadingSpinner size="l" style={{ marginRight: '8px' }} />
6767
<EuiText>
68-
<p>Stopping the historical detector</p>
68+
<p>Stopping the historical analysis</p>
6969
</EuiText>
7070
</EuiFlexGroup>
7171
</div>
@@ -78,7 +78,7 @@ export const HistoricalDetectorCallout = (
7878
case DETECTOR_STATE.DISABLED:
7979
return (
8080
<EuiCallOut
81-
title="The historical detector is stopped"
81+
title="The historical analysis is stopped"
8282
color="primary"
8383
iconType="alert"
8484
/>
@@ -91,7 +91,7 @@ export const HistoricalDetectorCallout = (
9191
<EuiFlexGroup direction="row" gutterSize="xs">
9292
<EuiLoadingSpinner size="l" style={{ marginRight: '8px' }} />
9393
<EuiText>
94-
<p>Initializing the historical detector.</p>
94+
<p>Initializing the historical analysis.</p>
9595
</EuiText>
9696
</EuiFlexGroup>
9797
</div>
@@ -110,7 +110,7 @@ export const HistoricalDetectorCallout = (
110110
style={{ marginRight: '8px', marginTop: '4px' }}
111111
/>
112112
<EuiText>
113-
<p>Running the historical detector</p>
113+
<p>Running the historical analysis</p>
114114
</EuiText>
115115
</EuiFlexGroup>
116116
{runningProgress ? (
@@ -137,7 +137,7 @@ export const HistoricalDetectorCallout = (
137137
<EuiSpacer size="s" />
138138
<EuiFlexItem grow={false} style={{ marginLeft: '22px' }}>
139139
<EuiButton fill={false} onClick={() => props.onStopDetector()}>
140-
Stop historical detector
140+
Stop historical analysis
141141
</EuiButton>
142142
</EuiFlexItem>
143143
</div>
@@ -158,7 +158,7 @@ export const HistoricalDetectorCallout = (
158158
<EuiCallOut
159159
title={
160160
<EuiText>
161-
The historical detector has failed unexpectedly. Try restarting
161+
The historical analysis has failed unexpectedly. Try restarting
162162
the detector.
163163
</EuiText>
164164
}

public/pages/HistoricalDetectorResults/components/__tests__/HistoricalDetectorCallout.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('<HistoricalDetectorCallout /> spec', () => {
4040
isStoppingDetector={false}
4141
/>
4242
);
43-
getByText(`Initializing the historical detector.`);
43+
getByText(`Initializing the historical analysis.`);
4444
});
4545
test('renders component when running and partial progress', () => {
4646
const { getByText } = render(
@@ -53,8 +53,8 @@ describe('<HistoricalDetectorCallout /> spec', () => {
5353
isStoppingDetector={false}
5454
/>
5555
);
56-
getByText('Running the historical detector');
57-
getByText('Stop historical detector');
56+
getByText('Running the historical analysis');
57+
getByText('Stop historical analysis');
5858
getByText('50%');
5959
});
6060
test('shows task failure if failed', () => {
@@ -81,7 +81,7 @@ describe('<HistoricalDetectorCallout /> spec', () => {
8181
/>
8282
);
8383
getByText(
84-
`The historical detector has failed unexpectedly. Try restarting the detector.`
84+
`The historical analysis has failed unexpectedly. Try restarting the detector.`
8585
);
8686
});
8787
});

public/pages/HistoricalDetectorResults/containers/HistoricalDetectorResults.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ export function HistoricalDetectorResults(
133133
.then((response: any) => {
134134
setTaskId(get(response, 'response._id'));
135135
core.notifications.toasts.addSuccess(
136-
`Successfully started the historical detector`
136+
`Successfully started the historical analysis`
137137
);
138138
})
139139
.catch((err: any) => {
140140
core.notifications.toasts.addDanger(
141141
prettifyErrorMessage(
142142
getErrorMessage(
143143
err,
144-
'There was a problem starting the historical detector'
144+
'There was a problem starting the historical analysis'
145145
)
146146
)
147147
);
@@ -152,7 +152,7 @@ export function HistoricalDetectorResults(
152152
};
153153

154154
// We query the task state 5s after making the stop detector call. If the task is still running,
155-
// then it is assumed there was an error stopping this task / historical detector.
155+
// then it is assumed there was an error stopping this task / historical analysis.
156156
// TODO: change this from await dispatch() to using .then(), .catch(), etc.
157157
const onStopDetector = async () => {
158158
try {
@@ -164,13 +164,13 @@ export function HistoricalDetectorResults(
164164
throw 'please try again.';
165165
} else {
166166
core.notifications.toasts.addSuccess(
167-
'Successfully stopped the historical detector'
167+
'Successfully stopped the historical analysis'
168168
);
169169
}
170170
});
171171
} catch (err) {
172172
core.notifications.toasts.addDanger(
173-
`There was a problem stopping the historical detector: ` +
173+
`There was a problem stopping the historical analysis: ` +
174174
prettifyErrorMessage(getErrorMessage(err, ''))
175175
);
176176
fetchDetector();

public/pages/ReviewAndCreate/containers/ReviewAndCreate.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ export function ReviewAndCreate(props: ReviewAndCreateProps) {
131131
)
132132
.then((response: any) => {
133133
core.notifications.toasts.addSuccess(
134-
`Successfully started the historical detector`
134+
`Successfully started the historical analysis`
135135
);
136136
})
137137
.catch((err: any) => {
138138
core.notifications.toasts.addDanger(
139139
prettifyErrorMessage(
140140
getErrorMessage(
141141
err,
142-
'There was a problem starting the historical detector'
142+
'There was a problem starting the historical analysis'
143143
)
144144
)
145145
);

server/routes/ad.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export default class AdService {
333333
const endTime = request.body?.endTime;
334334
let requestParams = { detectorId: detectorId } as {};
335335
let requestPath = 'ad.startDetector';
336-
// If a start and end time are passed: we want to start a historical detector
336+
// If a start and end time are passed: we want to start a historical analysis
337337
if (isNumber(startTime) && isNumber(endTime)) {
338338
requestParams = {
339339
...requestParams,

0 commit comments

Comments
 (0)