Skip to content

Commit

Permalink
Merge branch 'main' into updateLabelDiscoverGridCheckBox
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavyarm authored Apr 29, 2022
2 parents 7150043 + b66ffe5 commit 853acf6
Show file tree
Hide file tree
Showing 776 changed files with 700 additions and 504 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,6 @@ export const applicationUsageSchema = {
siem: commonSchema,
space_selector: commonSchema,
uptime: commonSchema,
synthetics: commonSchema,
ux: commonSchema,
};
131 changes: 131 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5891,6 +5891,137 @@
}
}
},
"synthetics": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "Always `main`"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 90 days"
}
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "The application view being tracked"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application sub view since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application sub view is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
}
}
}
}
}
}
},
"ux": {
"properties": {
"appId": {
Expand Down
6 changes: 3 additions & 3 deletions test/functional/apps/discover/_field_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
);
await retry.try(async function tryingForTime() {
expect(await PageObjects.discover.getDocHeader()).to.contain('relatedContent');
});

const field = await PageObjects.discover.getDocTableIndex(1);
expect(field).to.contain('og:description');
const field = await PageObjects.discover.getDocTableIndex(1);
expect(field).to.contain('og:description');
});

const marks = await PageObjects.discover.getMarks();
expect(marks.length).to.be(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ describe('buildDefaultSettings', () => {
name: 'field2Boolean',
type: 'boolean',
},
{
name: 'field3Text',
type: 'text',
},
{
name: 'field4MatchOnlyText',
type: 'match_only_text',
},
{
name: 'field5Wildcard',
type: 'wildcard',
},
],
});

Expand All @@ -49,6 +61,9 @@ describe('buildDefaultSettings', () => {
"query": Object {
"default_field": Array [
"field1Keyword",
"field3Text",
"field4MatchOnlyText",
"field5Wildcard",
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { appContextService } from '../../../app_context';
import type { Field, Fields } from '../../fields/field';

const QUERY_DEFAULT_FIELD_TYPES = ['keyword', 'text'];
const QUERY_DEFAULT_FIELD_TYPES = ['keyword', 'text', 'match_only_text', 'wildcard'];
const QUERY_DEFAULT_FIELD_LIMIT = 1024;

const flattenFieldsToNameAndType = (
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/synthetics/common/constants/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ export const PLUGIN = {
TITLE: i18n.translate('xpack.synthetics.uptimeFeatureCatalogueTitle', {
defaultMessage: 'Uptime',
}),
SYNTHETICS: i18n.translate('xpack.synthetics.syntheticsFeatureCatalogueTitle', {
defaultMessage: 'Synthetics',
}),
};
26 changes: 26 additions & 0 deletions x-pack/plugins/synthetics/public/apps/synthetics/render_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import React from 'react';
import ReactDOM from 'react-dom';
import { AppMountParameters, CoreStart } from '@kbn/core/public';
import { ClientPluginsSetup, ClientPluginsStart } from '../../plugin';
import { SyntheticsApp } from '../synthetics_app';

export function renderApp(
core: CoreStart,
plugins: ClientPluginsSetup,
startPlugins: ClientPluginsStart,
appMountParameters: AppMountParameters,
isDev: boolean
) {
ReactDOM.render(<SyntheticsApp />, appMountParameters.element);

return () => {
ReactDOM.unmountComponentAtNode(appMountParameters.element);
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import React from 'react';

import { UMBadge } from '../badge';

export type UMUpdateBadge = (badge: UMBadge) => void;
export const SyntheticsApp = () => {
return <div>Synthetics App</div>;
};
11 changes: 0 additions & 11 deletions x-pack/plugins/synthetics/public/icons/heartbeat_white.svg

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/plugins/synthetics/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { PluginInitializerContext } from '@kbn/core/public';
import { UptimePlugin } from './apps/plugin';
import { UptimePlugin } from './plugin';

export const plugin = (initializerContext: PluginInitializerContext) =>
new UptimePlugin(initializerContext);
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
DEFAULT_DARK_MODE,
DEFAULT_TIMEPICKER_QUICK_RANGES,
INTEGRATED_SOLUTIONS,
} from '../../common/constants';
} from '../../../common/constants';
import { UptimeApp, UptimeAppProps } from './uptime_app';
import { ClientPluginsSetup, ClientPluginsStart } from './plugin';
import { ClientPluginsSetup, ClientPluginsStart } from '../../plugin';

export function renderApp(
core: CoreStart,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '@kbn/kibana-react-plugin/public';
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
import { InspectorContextProvider } from '@kbn/observability-plugin/public';
import { ClientPluginsSetup, ClientPluginsStart } from './plugin';
import { ClientPluginsSetup, ClientPluginsStart } from '../../plugin';
import { UMUpdateBadge } from '../lib/lib';
import {
UptimeRefreshContextProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import 'jest-styled-components';
import { render } from '../lib/helper/rtl_helpers';
import { UptimePageTemplateComponent } from './uptime_page_template';
import { OVERVIEW_ROUTE } from '../../common/constants';
import { OVERVIEW_ROUTE } from '../../../common/constants';
import { useBreakpoints } from '../hooks/use_breakpoints';

jest.mock('../hooks/use_breakpoints', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import styled from 'styled-components';
import { EuiPageHeaderProps, EuiPageTemplateProps } from '@elastic/eui';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { useInspectorContext } from '@kbn/observability-plugin/public';
import { CERTIFICATES_ROUTE, OVERVIEW_ROUTE } from '../../common/constants';
import { ClientPluginsStart } from './plugin';
import { CERTIFICATES_ROUTE, OVERVIEW_ROUTE } from '../../../common/constants';
import { ClientPluginsStart } from '../../plugin';
import { useNoDataConfig } from './use_no_data_config';
import { EmptyStateLoading } from '../components/overview/empty_state/empty_state_loading';
import { EmptyStateError } from '../components/overview/empty_state/empty_state_error';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useContext } from 'react';
import { useSelector } from 'react-redux';
import { KibanaPageTemplateProps, useKibana } from '@kbn/kibana-react-plugin/public';
import { UptimeSettingsContext } from '../contexts';
import { ClientPluginsStart } from './plugin';
import { ClientPluginsStart } from '../../plugin';
import { indexStatusSelector } from '../state/selectors';

export function useNoDataConfig(): KibanaPageTemplateProps['noDataConfig'] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { EuiToolTip } from '@elastic/eui';
import { CertMonitor } from '../../../common/runtime_types';
import { CertMonitor } from '../../../../common/runtime_types';
import { MonitorPageLink } from '../common/monitor_page_link';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import styled from 'styled-components';
import { EuiHealth, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { useSelector } from 'react-redux';
import { Cert } from '../../../common/runtime_types';
import { Cert } from '../../../../common/runtime_types';
import { useCertStatus } from '../../hooks';
import * as labels from './translations';
import { CERT_STATUS } from '../../../common/constants';
import { CERT_STATUS } from '../../../../common/constants';
import { selectDynamicSettings } from '../../state/selectors';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Direction, EuiBasicTable } from '@elastic/eui';
import { CertStatus } from './cert_status';
import { CertMonitors } from './cert_monitors';
import * as labels from './translations';
import { Cert, CertMonitor, CertResult } from '../../../common/runtime_types';
import { Cert, CertMonitor, CertResult } from '../../../../common/runtime_types';
import { FingerprintCol } from './fingerprint_col';
import { LOADING_CERTIFICATES, NO_CERTS_AVAILABLE } from './translations';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import { EuiButtonEmpty, EuiButtonIcon, EuiCopy, EuiToolTip } from '@elastic/eui';
import styled from 'styled-components';
import { Cert } from '../../../common/runtime_types';
import { Cert } from '../../../../common/runtime_types';
import { COPY_FINGERPRINT } from './translations';

const EmptyButton = styled(EuiButtonEmpty)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useSelector } from 'react-redux';
import { useContext } from 'react';
import { createEsParams, useEsSearch } from '@kbn/observability-plugin/public';

import { CertResult, GetCertsParams, Ping } from '../../../common/runtime_types';
import { CertResult, GetCertsParams, Ping } from '../../../../common/runtime_types';

import { selectDynamicSettings } from '../../state/selectors';
import {
Expand All @@ -20,7 +20,7 @@ import {
DEFAULT_TO,
getCertsRequestBody,
processCertsResult,
} from '../../../common/requests/get_certs_request_body';
} from '../../../../common/requests/get_certs_request_body';
import { UptimeRefreshContext } from '../../contexts';

export const useCertSearch = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@elastic/charts';
import { useSelector } from 'react-redux';
import { getChartDateLabel } from '../../../lib/helper';
import { LocationDurationLine } from '../../../../common/types';
import { LocationDurationLine } from '../../../../../common/types';
import { DurationLineSeriesList } from './duration_line_series_list';
import { ChartWrapper } from './chart_wrapper';
import { useUrlParams } from '../../../hooks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import DateMath from '@kbn/datemath';
import { DurationChartComponent } from './duration_chart';
import { MonitorDurationResult } from '../../../../common/types';
import { MonitorDurationResult } from '../../../../../common/types';
import { render } from '../../../lib/helper/rtl_helpers';

describe('MonitorCharts component', () => {
Expand Down
Loading

0 comments on commit 853acf6

Please sign in to comment.