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

Remove Exploratory View components from Observability #155629

Merged
merged 26 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
60d9600
remove exp view
shahzad31 Apr 24, 2023
65b683b
remove exp view code from obs
shahzad31 Apr 24, 2023
1d5d4f7
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 24, 2023
e5acf68
update translations
shahzad31 Apr 24, 2023
9666b87
Merge branch 'remove-exp-view-code' of github.com:shahzad31/kibana in…
shahzad31 Apr 24, 2023
e4ee1f1
update test
shahzad31 Apr 24, 2023
c39e20f
more updates
shahzad31 Apr 24, 2023
9d6f33c
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 24, 2023
720034c
update import
shahzad31 Apr 24, 2023
4edaeb2
Merge branch 'remove-exp-view-code' of github.com:shahzad31/kibana in…
shahzad31 Apr 24, 2023
08b79db
Remove Exploratory View components from Observability
CoenWarmer Apr 24, 2023
4bd2d86
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 24, 2023
b48ae01
Update translations
CoenWarmer Apr 24, 2023
bba11ef
Merge branch 'feat/clean-up-observability' of github.com:CoenWarmer/k…
CoenWarmer Apr 24, 2023
2ed975b
Update translations
CoenWarmer Apr 24, 2023
4caba4b
Update translations
CoenWarmer Apr 24, 2023
6cc8fef
Merge branch 'remove-exp-view-code' into feat/clean-up-observability
shahzad31 Apr 24, 2023
ee61156
Merge branch 'main' of github.com:elastic/kibana into feat/clean-up-o…
shahzad31 Apr 24, 2023
981e2c7
restore
shahzad31 Apr 24, 2023
8f07608
fix translations
shahzad31 Apr 24, 2023
d133dbb
update
shahzad31 Apr 24, 2023
404b3dd
update limits.yml for obs shared
shahzad31 Apr 24, 2023
adf33d9
Merge branch 'main' into feat/clean-up-observability
shahzad31 Apr 24, 2023
fe4e075
Merge branch 'main' into feat/clean-up-observability
shahzad31 Apr 26, 2023
5ed11b4
Update packages/kbn-optimizer/limits.yml
shahzad31 Apr 26, 2023
07a2411
Update x-pack/plugins/exploratory_view/public/utils/observability_dat…
shahzad31 Apr 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pageLoadAssetSize:
newsfeed: 42228
observability: 95000
observabilityOnboarding: 19573
observabilityShared: 21266
observabilityShared: 36643
osquery: 107090
painlessLab: 179748
presentationUtil: 58834
Expand Down
2 changes: 1 addition & 1 deletion x-pack/examples/exploratory_view_example/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@elastic/eui';
import type { DataView } from '@kbn/data-views-plugin/public';
import { CoreStart } from '@kbn/core/public';
import { AllSeries } from '@kbn/observability-plugin/public';
import { AllSeries } from '@kbn/exploratory-view-plugin/public';
import { StartDependencies } from './plugin';

export const App = (props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@ export function SeriesColorPicker({ seriesId, series }: { seriesId: number; seri
);
}

const PICK_A_COLOR_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.pickColor',
{
defaultMessage: 'Pick a color',
}
);
const PICK_A_COLOR_LABEL = i18n.translate('xpack.exploratoryView.pickColor', {
defaultMessage: 'Pick a color',
});

const EDIT_SERIES_COLOR_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.editSeriesColor',
{
defaultMessage: 'Edit color for series',
}
);
const EDIT_SERIES_COLOR_LABEL = i18n.translate('xpack.exploratoryView.editSeriesColor', {
defaultMessage: 'Edit color for series',
});
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getAlertsKPIConfig({ spaceId }: ConfigProps): SeriesConfig {
defaultSeriesType: 'line',
seriesTypes: [],
xAxisColumn: {
label: i18n.translate('xpack.exploratoryView.exploratoryView.alerts.alertStarted', {
label: i18n.translate('xpack.exploratoryView.alerts.alertStarted', {
defaultMessage: 'Timestamp',
}),
dataType: 'date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getLogsKPIConfig(configProps: ConfigProps): SeriesConfig {
defaultSeriesType: 'bar',
seriesTypes: [],
xAxisColumn: {
label: i18n.translate('xpack.exploratoryView.exploratoryView.logs.logRateXAxisLabel', {
label: i18n.translate('xpack.exploratoryView.logs.logRateXAxisLabel', {
defaultMessage: 'Timestamp',
}),
dataType: 'date',
Expand All @@ -28,7 +28,7 @@ export function getLogsKPIConfig(configProps: ConfigProps): SeriesConfig {
},
yAxisColumns: [
{
label: i18n.translate('xpack.exploratoryView.exploratoryView.logs.logRateYAxisLabel', {
label: i18n.translate('xpack.exploratoryView.logs.logRateYAxisLabel', {
defaultMessage: 'Log rate per minute',
}),
dataType: 'number',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ function EmptyState({ height }: { height?: string }) {
);
}

const NO_DATA_LABEL = i18n.translate('xpack.exploratoryView.overview.exploratoryView.noData', {
const NO_DATA_LABEL = i18n.translate('xpack.exploratoryView.noData', {
defaultMessage: 'No data',
});
Original file line number Diff line number Diff line change
Expand Up @@ -204,27 +204,18 @@ const ShowPreview = styled(EuiButtonEmpty)`
bottom: 34px;
`;

const PREVIEW_LABEL = i18n.translate('xpack.exploratoryView.overview.exploratoryView.preview', {
const PREVIEW_LABEL = i18n.translate('xpack.exploratoryView.preview', {
defaultMessage: 'Preview',
});

const HIDE_CHART_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.hideChart',
{
defaultMessage: 'Hide chart',
}
);
const HIDE_CHART_LABEL = i18n.translate('xpack.exploratoryView.hideChart', {
defaultMessage: 'Hide chart',
});

const SHOW_CHART_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.showChart',
{
defaultMessage: 'Show chart',
}
);
const SHOW_CHART_LABEL = i18n.translate('xpack.exploratoryView.showChart', {
defaultMessage: 'Show chart',
});

const LENS_NOT_AVAILABLE = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.lensDisabled',
{
defaultMessage: 'Lens app is not available, please enable Lens to use exploratory view.',
}
);
const LENS_NOT_AVAILABLE = i18n.translate('xpack.exploratoryView.lensDisabled', {
defaultMessage: 'Lens app is not available, please enable Lens to use exploratory view.',
});
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ export function RefreshButton() {
);
}

export const REFRESH_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.refresh',
{
defaultMessage: 'Refresh',
}
);
export const REFRESH_LABEL = i18n.translate('xpack.exploratoryView.refresh', {
defaultMessage: 'Refresh',
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function ExploratoryViewPage({
useBreadcrumbs(
[
{
text: i18n.translate('xpack.exploratoryView.overview.exploratoryView', {
text: i18n.translate('xpack.exploratoryView.overview', {
defaultMessage: 'Explore data',
}),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,30 @@ export enum DataTypes {
}

export const DataTypesLabels: Record<string, string> = {
[DataTypes.UX]: i18n.translate('xpack.exploratoryView.overview.exploratoryView.uxLabel', {
[DataTypes.UX]: i18n.translate('xpack.exploratoryView.uxLabel', {
defaultMessage: 'User experience (RUM)',
}),

[DataTypes.SYNTHETICS]: i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.syntheticsLabel',
{
defaultMessage: 'Synthetics monitoring',
}
),
[DataTypes.SYNTHETICS]: i18n.translate('xpack.exploratoryView.syntheticsLabel', {
defaultMessage: 'Synthetics monitoring',
}),

[DataTypes.UPTIME]: i18n.translate('xpack.exploratoryView.overview.exploratoryView.uptimeLabel', {
[DataTypes.UPTIME]: i18n.translate('xpack.exploratoryView.uptimeLabel', {
defaultMessage: 'Uptime',
}),

[DataTypes.METRICS]: i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.metricsLabel',
{
defaultMessage: 'Metrics',
}
),
[DataTypes.METRICS]: i18n.translate('xpack.exploratoryView.metricsLabel', {
defaultMessage: 'Metrics',
}),

[DataTypes.LOGS]: i18n.translate('xpack.exploratoryView.overview.exploratoryView.logsLabel', {
[DataTypes.LOGS]: i18n.translate('xpack.exploratoryView.logsLabel', {
defaultMessage: 'Logs',
}),

[DataTypes.MOBILE]: i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.mobileExperienceLabel',
{
defaultMessage: 'Mobile experience',
}
),
[DataTypes.ALERTS]: i18n.translate('xpack.exploratoryView.overview.exploratoryView.alertsLabel', {
[DataTypes.MOBILE]: i18n.translate('xpack.exploratoryView.mobileExperienceLabel', {
defaultMessage: 'Mobile experience',
}),
[DataTypes.ALERTS]: i18n.translate('xpack.exploratoryView.alertsLabel', {
defaultMessage: 'Alerts',
}),
};
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function LensEmbeddable(props: Props) {
});
} else {
notifications?.toasts.add(
i18n.translate('xpack.exploratoryView.exploratoryView.noBrusing', {
i18n.translate('xpack.exploratoryView.noBrushing', {
defaultMessage: 'Zoom by brush selection is only available on time series charts.',
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,18 @@ export function Breakdowns({ seriesConfig, seriesId, series }: Props) {
}

export const NO_BREAK_DOWN_LABEL = i18n.translate(
'xpack.exploratoryView.exp.breakDownFilter.noBreakdown',
'xpack.exploratoryView.breakDownFilter.noBreakdown',
{
defaultMessage: 'No breakdown',
}
);

export const BREAKDOWN_WARNING = i18n.translate(
'xpack.exploratoryView.exp.breakDownFilter.warning',
{
defaultMessage: 'Breakdowns can be applied to only one series at a time.',
}
);
export const BREAKDOWN_WARNING = i18n.translate('xpack.exploratoryView.breakDownFilter.warning', {
defaultMessage: 'Breakdowns can be applied to only one series at a time.',
});

export const BREAKDOWN_UNAVAILABLE = i18n.translate(
'xpack.exploratoryView.exp.breakDownFilter.unavailable',
'xpack.exploratoryView.breakDownFilter.unavailable',
{
defaultMessage:
'Step name breakdown is not available for monitor duration metric. Use step duration metric to breakdown by step name.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,10 @@ export function DataTypesSelect({ seriesId, series }: Props) {
);
}

const SELECT_DATA_TYPE_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.selectDataType',
{
defaultMessage: 'Select data type',
}
);
const SELECT_DATA_TYPE_LABEL = i18n.translate('xpack.exploratoryView.selectDataType', {
defaultMessage: 'Select data type',
});

const SELECT_DATA_TYPE_TOOLTIP = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.selectDataTypeTooltip',
{
defaultMessage: 'Data type cannot be edited.',
}
);
const SELECT_DATA_TYPE_TOOLTIP = i18n.translate('xpack.exploratoryView.selectDataTypeTooltip', {
defaultMessage: 'Data type cannot be edited.',
});
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function DatePickerCol({ seriesId, series }: Props) {
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={false}>
<strong>
{i18n.translate('xpack.exploratoryView.overview.exploratoryView.noDataAvailable', {
{i18n.translate('xpack.exploratoryView.noDataAvailable', {
defaultMessage: 'No {dataType} data available.',
values: {
dataType: series.dataType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function IncompleteBadge({ seriesConfig, series }: Props) {
(!dataType || isEmpty(reportDefinitions) || !selectedMetricField) && !loading;

const incompleteDefinition = isEmpty(reportDefinitions)
? i18n.translate('xpack.exploratoryView.overview.exploratoryView.missingReportDefinition', {
? i18n.translate('xpack.exploratoryView.missingReportDefinition', {
defaultMessage: 'Missing {reportDefinition}',
values: {
reportDefinition:
Expand All @@ -55,16 +55,10 @@ export function IncompleteBadge({ seriesConfig, series }: Props) {
return <EuiBadge color="warning">{incompleteMessage}</EuiBadge>;
}

const MISSING_REPORT_METRIC_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.missingReportMetric',
{
defaultMessage: 'Missing report metric',
}
);
const MISSING_REPORT_METRIC_LABEL = i18n.translate('xpack.exploratoryView.missingReportMetric', {
defaultMessage: 'Missing report metric',
});

const MISSING_DATA_TYPE_LABEL = i18n.translate(
'xpack.exploratoryView.overview.exploratoryView.missingDataType',
{
defaultMessage: 'Missing data type',
}
);
const MISSING_DATA_TYPE_LABEL = i18n.translate('xpack.exploratoryView.missingDataType', {
defaultMessage: 'Missing data type',
});
1 change: 1 addition & 0 deletions x-pack/plugins/observability/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"data",
"dataViews",
"embeddable",
"exploratoryView",
"features",
"files",
"guidedOnboarding",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import { i18n } from '@kbn/i18n';
import React from 'react';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { CoreStart } from '@kbn/core/public';
import { AllSeries } from '@kbn/exploratory-view-plugin/public';
import { SERVICE_NAME, TRANSACTION_DURATION } from '@kbn/observability-shared-plugin/common';
import { UX_APP } from '../../../../context/constants';
import { ObservabilityPublicPluginsStart } from '../../../..';
import { SectionContainer } from '..';
Expand All @@ -17,12 +18,7 @@ import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher';
import { useHasData } from '../../../../hooks/use_has_data';
import { useDatePickerContext } from '../../../../hooks/use_date_picker_context';
import CoreVitals from '../../../shared/core_web_vitals';
import { getExploratoryViewEmbeddable } from '../../../shared/exploratory_view/embeddable';
import { AllSeries } from '../../../shared/exploratory_view/hooks/use_series_storage';
import {
SERVICE_NAME,
TRANSACTION_DURATION,
} from '../../../shared/exploratory_view/configurations/constants/elasticsearch_fieldnames';

import type { BucketSize } from '../../../../pages/overview/helpers/calculate_bucket_size';
interface Props {
bucketSize: BucketSize;
Expand All @@ -31,15 +27,14 @@ interface Props {
export function UXSection({ bucketSize }: Props) {
const { forceUpdate, hasDataMap } = useHasData();
const { services } = useKibana<ObservabilityPublicPluginsStart>();

const { ExploratoryViewEmbeddable } = services.exploratoryView;

const { relativeStart, relativeEnd, absoluteStart, absoluteEnd, lastUpdated } =
useDatePickerContext();
const uxHasDataResponse = hasDataMap.ux;
const serviceName = uxHasDataResponse?.serviceName as string;

const ExploratoryViewEmbeddable = getExploratoryViewEmbeddable(
services as ObservabilityPublicPluginsStart & CoreStart
);

const seriesList: AllSeries = [
{
name: PAGE_LOAD_DISTRIBUTION_TITLE,
Expand Down
Loading