Skip to content

Commit

Permalink
Merge branch 'main' into 135874-change-infrastructure-pages-titles-to…
Browse files Browse the repository at this point in the history
…-use-breadcrumbs
  • Loading branch information
jennypavlova authored Sep 27, 2022
2 parents 5c9b6d5 + f571f80 commit 525c577
Show file tree
Hide file tree
Showing 57 changed files with 2,152 additions and 1,259 deletions.
6 changes: 3 additions & 3 deletions fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[
{
"name": "apm",
"version": "8.4.0",
"version": "8.6.0-preview-1663775281",
"forceAlignStackVersion": true
},
{
Expand All @@ -29,7 +29,7 @@
},
{
"name": "endpoint",
"version": "8.4.1"
"version": "8.5.0"
},
{
"name": "fleet_server",
Expand All @@ -39,4 +39,4 @@
"name": "synthetics",
"version": "0.10.2"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ describe('NoMatches', () => {
it('renders the no matches messages', () => {
render(<NoMatches />);

expect(screen.getByText('No matching users with required access.'));
expect(screen.getByText("User doesn't exist or is unavailable"));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
* 2.0.
*/

import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, EuiText, EuiTextAlign } from '@elastic/eui';
import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiLink,
EuiSpacer,
EuiText,
EuiTextAlign,
} from '@elastic/eui';
import React from 'react';
import * as i18n from './translations';

Expand All @@ -25,11 +33,18 @@ const NoMatchesComponent: React.FC = () => {
<EuiFlexItem grow={false}>
<EuiTextAlign textAlign="center">
<EuiText size="s" color="default">
<strong>{i18n.NO_MATCHING_USERS}</strong>
<strong>{i18n.USER_DOES_NOT_EXIST}</strong>
<br />
</EuiText>
<EuiText size="s" color="subdued">
{i18n.TRY_MODIFYING_SEARCH}
{i18n.MODIFY_SEARCH}
<br />
<EuiLink
href="https://www.elastic.co/guide/en/security/current/case-permissions.html"
target="_blank"
>
{i18n.LEARN_PRIVILEGES_GRANT_ACCESS}
</EuiLink>
</EuiText>
</EuiTextAlign>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,19 @@ export const ASSIGNEES = i18n.translate('xpack.cases.userProfile.assigneesTitle'
defaultMessage: 'Assignees',
});

export const NO_MATCHING_USERS = i18n.translate('xpack.cases.userProfiles.noMatchingUsers', {
defaultMessage: 'No matching users with required access.',
export const USER_DOES_NOT_EXIST = i18n.translate('xpack.cases.userProfiles.userDoesNotExist', {
defaultMessage: "User doesn't exist or is unavailable",
});

export const TRY_MODIFYING_SEARCH = i18n.translate('xpack.cases.userProfiles.tryModifyingSearch', {
defaultMessage: 'Try modifying your search.',
export const LEARN_PRIVILEGES_GRANT_ACCESS = i18n.translate(
'xpack.cases.userProfiles.learnPrivileges',
{
defaultMessage: 'Learn what privileges grant access to cases.',
}
);

export const MODIFY_SEARCH = i18n.translate('xpack.cases.userProfiles.modifySearch', {
defaultMessage: "Modify your search or check the user's privileges.",
});

export const INVALID_ASSIGNEES = i18n.translate('xpack.cases.create.invalidAssignees', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { KibanaLogic } from '../../../../shared/kibana';
import { LicensingLogic } from '../../../../shared/licensing';
import { CreateCustomPipelineApiLogic } from '../../../api/index/create_custom_pipeline_api_logic';
import { FetchCustomPipelineApiLogic } from '../../../api/index/fetch_custom_pipeline_api_logic';
import { isApiIndex } from '../../../utils/indices';
import { CurlRequest } from '../components/curl_request/curl_request';
import { IndexViewLogic } from '../index_view_logic';

Expand All @@ -36,7 +37,7 @@ import { PipelinesLogic } from './pipelines_logic';
export const IngestPipelinesCard: React.FC = () => {
const { indexName } = useValues(IndexViewLogic);

const { canSetPipeline, pipelineState, showModal } = useValues(PipelinesLogic);
const { canSetPipeline, index, pipelineState, showModal } = useValues(PipelinesLogic);
const { closeModal, openModal, setPipelineState, savePipeline } = useActions(PipelinesLogic);
const { makeRequest: fetchCustomPipeline } = useActions(FetchCustomPipelineApiLogic);
const { makeRequest: createCustomPipeline } = useActions(CreateCustomPipelineApiLogic);
Expand Down Expand Up @@ -97,22 +98,24 @@ export const IngestPipelinesCard: React.FC = () => {
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem>
<EuiFlexGroup>
<EuiFlexItem>
<EuiAccordion
buttonContent={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.accordion.label',
{ defaultMessage: 'View sample cURL request' }
)}
id="ingestPipelinesCurlAccordion"
>
<CurlRequest
document={{ body: 'body', title: 'Title' }}
indexName={indexName}
pipeline={pipelineState}
/>
</EuiAccordion>
</EuiFlexItem>
<EuiFlexGroup justifyContent="flexEnd">
{isApiIndex(index) && (
<EuiFlexItem>
<EuiAccordion
buttonContent={i18n.translate(
'xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.accordion.label',
{ defaultMessage: 'View sample cURL request' }
)}
id="ingestPipelinesCurlAccordion"
>
<CurlRequest
document={{ body: 'body', title: 'Title' }}
indexName={indexName}
pipeline={pipelineState}
/>
</EuiAccordion>
</EuiFlexItem>
)}
<EuiFlexItem grow={false}>
<EuiBadge color="hollow">
{i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function registerConnectorRoutes({ router, log }: RouteDependencies) {
connectorId: schema.string(),
}),
body: schema.object({
nextSyncConfig: schema.string(),
nextSyncConfig: schema.maybe(schema.string()),
}),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
})}
onTableChange={() => {}}
data-test-subj={'mlNodesAllocatedModels'}
css={{ overflow: 'auto' }}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import { FormattedMessage } from '@kbn/i18n-react';
import { cloneDeep } from 'lodash';
import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common';
import { css } from '@emotion/react';
import { NodeItem } from './nodes_list';
import { useListItemsFormatter } from '../models_management/expanded_row';
import { AllocatedModels } from './allocated_models';
Expand Down Expand Up @@ -44,10 +45,12 @@ export const ExpandedRow: FC<ExpandedRowProps> = ({ item }) => {
attributes['ml.max_jvm_size'] = bytesFormatter(attributes['ml.max_jvm_size']);

return (
<>
<EuiSpacer size={'m'} />

<EuiFlexGrid columns={2} gutterSize={'m'}>
<div
css={css`
width: 100%;
`}
>
<EuiFlexGrid columns={2} gutterSize={'s'}>
<EuiFlexItem>
<EuiPanel>
<EuiTitle size={'xs'}>
Expand Down Expand Up @@ -85,25 +88,26 @@ export const ExpandedRow: FC<ExpandedRowProps> = ({ item }) => {
/>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGrid>

{allocatedModels.length > 0 ? (
<EuiFlexItem grow={2}>
<EuiPanel>
<EuiTitle size={'xs'}>
<h5>
<FormattedMessage
id="xpack.ml.trainedModels.nodesList.expandedRow.allocatedModelsTitle"
defaultMessage="Allocated models"
/>
</h5>
</EuiTitle>
<EuiSpacer size={'m'} />
{allocatedModels.length > 0 ? (
<>
<EuiSpacer size={'s'} />
<EuiPanel>
<EuiTitle size={'xs'}>
<h5>
<FormattedMessage
id="xpack.ml.trainedModels.nodesList.expandedRow.allocatedModelsTitle"
defaultMessage="Allocated models"
/>
</h5>
</EuiTitle>
<EuiSpacer size={'m'} />

<AllocatedModels models={allocatedModels} />
</EuiPanel>
</EuiFlexItem>
) : null}
</EuiFlexGrid>
</>
<AllocatedModels models={allocatedModels} />
</EuiPanel>
</>
) : null}
</div>
);
};
49 changes: 13 additions & 36 deletions x-pack/plugins/observability/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ import {

const technicalPreviewLabel = i18n.translate(
'xpack.observability.uiSettings.technicalPreviewLabel',
{
defaultMessage: 'technical preview',
}
{ defaultMessage: 'technical preview' }
);

function feedbackLink({ href }: { href: string }) {
return `<a href="${href}" target="_blank" rel="noopener noreferrer">${i18n.translate(
'xpack.observability.uiSettings.giveFeedBackLabel',
{ defaultMessage: 'Give feedback' }
)}</a>`;
}

type UiSettings = UiSettingsParams<boolean | number | string> & { showInLabs?: boolean };

/**
Expand Down Expand Up @@ -167,12 +172,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Enable the Service groups feature on APM UI. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-service-groups" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.enableServiceGroups.feedbackLinkText', {
defaultMessage: 'Give feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-service-groups' }),
},
}),
schema: schema.boolean(),
Expand Down Expand Up @@ -206,15 +206,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Default APM Service Inventory page sort (for Services without Machine Learning applied) to sort by Service Name. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-apm-page-performance" target="_blank" rel="noopener noreferrer">' +
i18n.translate(
'xpack.observability.apmServiceInventoryOptimizedSorting.feedbackLinkText',
{
defaultMessage: 'Give feedback',
}
) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-apm-page-performance' }),
},
}
),
Expand Down Expand Up @@ -245,12 +237,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Enable the APM Trace Explorer feature, that allows you to search and inspect traces with KQL or EQL. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-trace-explorer" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.apmTraceExplorerTabDescription.feedbackLinkText', {
defaultMessage: 'Give feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-trace-explorer' }),
},
}),
schema: schema.boolean(),
Expand All @@ -269,12 +256,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Enable the APM Operations Breakdown feature, that displays aggregates for backend operations. {feedbackLink}.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-operations-breakdown" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.apmOperationsBreakdownDescription.feedbackLinkText', {
defaultMessage: 'Give feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-operations-breakdown' }),
},
}),
schema: schema.boolean(),
Expand Down Expand Up @@ -318,12 +300,7 @@ export const uiSettings: Record<string, UiSettings> = {
'{technicalPreviewLabel} Display Amazon Lambda metrics in the service metrics tab. {feedbackLink}',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
feedbackLink:
'<a href="https://ela.st/feedback-aws-lambda" target="_blank" rel="noopener noreferrer">' +
i18n.translate('xpack.observability.awsLambdaDescription', {
defaultMessage: 'Send feedback',
}) +
'</a>',
feedbackLink: feedbackLink({ href: 'https://ela.st/feedback-aws-lambda' }),
},
}),
schema: schema.boolean(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const NoParametersRequestSchema = {
body: schema.object({ ...BaseActionRequestSchema }),
};

export type BaseActionRequestBody = TypeOf<typeof NoParametersRequestSchema.body>;

export const KillOrSuspendProcessRequestSchema = {
body: schema.object({
...BaseActionRequestSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export interface PendingActionsResponse {
}

export type PendingActionsRequestQuery = TypeOf<typeof ActionStatusRequestSchema.query>;

export interface ActionDetails<TOutputContent extends object = object> {
/** The action id */
id: string;
Expand Down
Loading

0 comments on commit 525c577

Please sign in to comment.