Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alerting] move always-available action variables to alerting/common #60085

Open
pmuellr opened this issue Mar 13, 2020 · 1 comment
Open

[Alerting] move always-available action variables to alerting/common #60085

pmuellr opened this issue Mar 13, 2020 · 1 comment
Labels
estimate:small Small Estimated Level of Effort Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture

Comments

@pmuellr
Copy link
Member

pmuellr commented Mar 13, 2020

In PR #59756 action variables were added as a new property of alert types. There are a handful of "always available" action variables such as alertId and alertName. The definitions of these are duplicated in the alerting and triggers_actions_ui plugins:

const variables = {
alertId,
alertName,
spaceId,
tags,
alertInstanceId,
context,
state,
};
return Mustache.render(value, variables);

function getAlwaysProvidedActionVariables(): ActionVariable[] {
const result: ActionVariable[] = [];
result.push({
name: 'alertId',
description: i18n.translate('xpack.triggersActionsUI.actionVariables.alertIdLabel', {
defaultMessage: 'The id of the alert.',
}),
});
result.push({
name: 'alertName',
description: i18n.translate('xpack.triggersActionsUI.actionVariables.alertNameLabel', {
defaultMessage: 'The name of the alert.',
}),
});

To prevent these from diverging in the future, we should move them to the alerting/common folder, and then reference them in the files above from there.

@pmuellr pmuellr added Feature:Alerting technical debt Improvement of the software architecture and operational architecture Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Mar 13, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@gmmorris gmmorris added the loe:medium Medium Level of Effort label Jul 14, 2021
@gmmorris gmmorris added the estimate:small Small Estimated Level of Effort label Aug 18, 2021
@gmmorris gmmorris removed the loe:medium Medium Level of Effort label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:small Small Estimated Level of Effort Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture
Projects
No open projects
Development

No branches or pull requests

4 participants