Skip to content

Commit

Permalink
Fixed merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
mdefazio authored and YulNaumenko committed Nov 9, 2020
1 parent 299b66d commit c83a025
Show file tree
Hide file tree
Showing 11 changed files with 317 additions and 69 deletions.
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -20170,7 +20170,6 @@
"xpack.triggersActionsUI.home.connectorsTabTitle": "コネクター",
"xpack.triggersActionsUI.home.sectionDescription": "アラートを使用して条件を検出し、コネクターを使用してアクションを実行します。",
"xpack.triggersActionsUI.managementSection.displayName": "アラートとアクション",
"xpack.triggersActionsUI.sections.actionAdd.indexAction.indexTextFieldLabel": "タグ (任意)",
"xpack.triggersActionsUI.sections.actionConnectorAdd.cancelButtonLabel": "キャンセル",
"xpack.triggersActionsUI.sections.actionConnectorAdd.manageLicensePlanBannerLinkTitle": "ライセンスの管理",
"xpack.triggersActionsUI.sections.actionConnectorAdd.saveAndTestButtonLabel": "保存してテスト",
Expand Down Expand Up @@ -20278,7 +20277,6 @@
"xpack.triggersActionsUI.sections.alertForm.addConnectorButtonLabel": "コネクターを作成する",
"xpack.triggersActionsUI.sections.alertForm.addNewConnectorEmptyButton": "新規追加",
"xpack.triggersActionsUI.sections.alertForm.alertNameLabel": "名前",
"xpack.triggersActionsUI.sections.alertForm.changeAlertTypeAriaLabel": "削除",
"xpack.triggersActionsUI.sections.alertForm.checkFieldLabel": "確認間隔",
"xpack.triggersActionsUI.sections.alertForm.checkWithTooltip": "条件を評価する頻度を定義します。",
"xpack.triggersActionsUI.sections.alertForm.emptyConnectorsLabel": "{actionTypeName}コネクターがありません",
Expand All @@ -20295,7 +20293,6 @@
"xpack.triggersActionsUI.sections.alertForm.renotifyFieldLabel": "通知間隔",
"xpack.triggersActionsUI.sections.alertForm.renotifyWithTooltip": "アラートがアクティブな間にアクションを繰り返す頻度を定義します。",
"xpack.triggersActionsUI.sections.alertForm.selectAlertActionTypeTitle": "アクションタイプを選択してください",
"xpack.triggersActionsUI.sections.alertForm.selectAlertTypeTitle": "トリガータイプを選択してください",
"xpack.triggersActionsUI.sections.alertForm.selectedAlertTypeTitle": "{alertType}",
"xpack.triggersActionsUI.sections.alertForm.unableToAddAction": "デフォルトアクショングループの定義がないのでアクションを追加できません",
"xpack.triggersActionsUI.sections.alertForm.unableToLoadActionsMessage": "コネクターを読み込めません",
Expand Down
3 changes: 0 additions & 3 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -20189,7 +20189,6 @@
"xpack.triggersActionsUI.home.connectorsTabTitle": "连接器",
"xpack.triggersActionsUI.home.sectionDescription": "使用告警检测条件,并使用连接器采取操作。",
"xpack.triggersActionsUI.managementSection.displayName": "告警和操作",
"xpack.triggersActionsUI.sections.actionAdd.indexAction.indexTextFieldLabel": "标记(可选)",
"xpack.triggersActionsUI.sections.actionConnectorAdd.cancelButtonLabel": "取消",
"xpack.triggersActionsUI.sections.actionConnectorAdd.manageLicensePlanBannerLinkTitle": "管理许可证",
"xpack.triggersActionsUI.sections.actionConnectorAdd.saveAndTestButtonLabel": "保存并测试",
Expand Down Expand Up @@ -20298,7 +20297,6 @@
"xpack.triggersActionsUI.sections.alertForm.addConnectorButtonLabel": "创建连接器",
"xpack.triggersActionsUI.sections.alertForm.addNewConnectorEmptyButton": "新添",
"xpack.triggersActionsUI.sections.alertForm.alertNameLabel": "名称",
"xpack.triggersActionsUI.sections.alertForm.changeAlertTypeAriaLabel": "删除",
"xpack.triggersActionsUI.sections.alertForm.checkFieldLabel": "检查频率",
"xpack.triggersActionsUI.sections.alertForm.checkWithTooltip": "定义评估条件的频率。",
"xpack.triggersActionsUI.sections.alertForm.emptyConnectorsLabel": "无 {actionTypeName} 连接器",
Expand All @@ -20315,7 +20313,6 @@
"xpack.triggersActionsUI.sections.alertForm.renotifyFieldLabel": "通知频率",
"xpack.triggersActionsUI.sections.alertForm.renotifyWithTooltip": "定义告警处于活动状态时重复操作的频率。",
"xpack.triggersActionsUI.sections.alertForm.selectAlertActionTypeTitle": "选择操作类型",
"xpack.triggersActionsUI.sections.alertForm.selectAlertTypeTitle": "选择触发器类型",
"xpack.triggersActionsUI.sections.alertForm.selectedAlertTypeTitle": "{alertType}",
"xpack.triggersActionsUI.sections.alertForm.unableToAddAction": "无法添加操作,因为未定义默认操作组",
"xpack.triggersActionsUI.sections.alertForm.unableToLoadActionsMessage": "无法加载连接器",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
CoreStart,
ScopedHistory,
} from 'kibana/public';
import { Section, routeToAlertDetails } from './constants';
import { KibanaFeature } from '../../../features/common';
import { Section, routeToAlertDetails } from './constants';
import { AppContextProvider } from './app_context';
import { ActionTypeRegistryContract, AlertTypeRegistryContract } from '../types';
import { ChartsPluginStart } from '../../../../../src/plugins/charts/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import { ChartsPluginSetup } from 'src/plugins/charts/public';
import { FieldFormatsRegistry } from 'src/plugins/data/common/field_formats';
import { DataPublicPluginStartUi, IndexPatternsContract } from 'src/plugins/data/public';
import { KibanaFeature } from '../../../../features/common';
import { AlertTypeRegistryContract, ActionTypeRegistryContract } from '../../types';

export interface AlertsContextValue<MetaData = Record<string, any>> {
Expand All @@ -31,6 +32,7 @@ export interface AlertsContextValue<MetaData = Record<string, any>> {
metadata?: MetaData;
dataUi?: DataPublicPluginStartUi;
dataIndexPatterns?: IndexPatternsContract;
kibanaFeatures?: KibanaFeature[];
}

const AlertsContext = createContext<AlertsContextValue>(null as any);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ describe('alert_add', () => {

wrapper.find('[data-test-subj="my-alert-type-SelectOption"]').first().simulate('click');

expect(wrapper.contains('Metadata: some value. Fields: test.')).toBeTruthy();

expect(wrapper.find('input#alertName').props().value).toBe('');

expect(wrapper.find('[data-test-subj="tagsComboBox"]').first().text()).toBe('');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.triggersActionsUI__alertTypeNodeHeading {
margin-left: $euiSizeS;
margin-right: $euiSizeS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ describe('alert_form', () => {

it('renders alert type description', async () => {
await setup();
wrapper.find('[data-test-subj="my-alert-type-SelectOption"]').first().simulate('click');
wrapper.find('button[data-test-subj="my-alert-type-SelectOption"]').first().simulate('click');
const alertDescription = wrapper.find('[data-test-subj="alertDescription"]');
expect(alertDescription.exists()).toBeTruthy();
expect(alertDescription.first().text()).toContain('Alert when testing');
});

it('renders alert type documentation link', async () => {
await setup();
wrapper.find('[data-test-subj="my-alert-type-SelectOption"]').first().simulate('click');
wrapper.find('button[data-test-subj="my-alert-type-SelectOption"]').first().simulate('click');
const alertDocumentationLink = wrapper.find('[data-test-subj="alertDocumentationLink"]');
expect(alertDocumentationLink.exists()).toBeTruthy();
expect(alertDocumentationLink.first().prop('href')).toBe('https://localhost.local/docs');
Expand Down
Loading

0 comments on commit c83a025

Please sign in to comment.