mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Alerting] Renaming AlertType to RuleType and updating Alerting Task Runner (#120661)
* Renaming AlertType to RuleType and updating Alerting Task Runner * Fixing types * Fixing types * holy cannoli * Fixing types * Fixing types and tests * Fixing types and tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
f14540ff63
commit
7c27163d6a
82 changed files with 1163 additions and 1202 deletions
|
@ -24,7 +24,7 @@ import { isEmpty } from 'lodash';
|
|||
import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants';
|
||||
import {
|
||||
Alert,
|
||||
AlertTaskState,
|
||||
RuleTaskState,
|
||||
LEGACY_BASE_ALERT_API_PATH,
|
||||
} from '../../../../plugins/alerting/common';
|
||||
|
||||
|
@ -34,7 +34,7 @@ type Props = RouteComponentProps & {
|
|||
};
|
||||
export const ViewAlertPage = withRouter(({ http, id }: Props) => {
|
||||
const [alert, setAlert] = useState<Alert | null>(null);
|
||||
const [alertState, setAlertState] = useState<AlertTaskState | null>(null);
|
||||
const [alertState, setAlertState] = useState<RuleTaskState | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!alert) {
|
||||
|
@ -42,7 +42,7 @@ export const ViewAlertPage = withRouter(({ http, id }: Props) => {
|
|||
}
|
||||
if (!alertState) {
|
||||
http
|
||||
.get<AlertTaskState | null>(`${LEGACY_BASE_ALERT_API_PATH}/alert/${id}/state`)
|
||||
.get<RuleTaskState | null>(`${LEGACY_BASE_ALERT_API_PATH}/alert/${id}/state`)
|
||||
.then(setAlertState);
|
||||
}
|
||||
}, [alert, alertState, http, id]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue