Skip to content

Commit

Permalink
[Ingest Manager] Copy changes (#70828)
Browse files Browse the repository at this point in the history
* update overview page

* remove streams column from config table

* fleet name chanegs

* remove unused component

* update translations
  • Loading branch information
neptunian committed Jul 6, 2020
1 parent 03809aa commit cbbddd9
Showing 7 changed files with 7 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -314,7 +314,7 @@ export const CreatePackageConfigPage: React.FunctionComponent = () => {
title: i18n.translate(
'xpack.ingestManager.createPackageConfig.stepDefinePackageConfigTitle',
{
defaultMessage: 'Define your integration',
defaultMessage: 'Configure integration',
}
),
status: !packageInfo || !agentConfig ? 'disabled' : undefined,
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ import {
EuiInMemoryTable,
EuiInMemoryTableProps,
EuiBadge,
EuiTextColor,
EuiContextMenuItem,
EuiButton,
EuiFlexGroup,
@@ -23,7 +22,6 @@ import { useCapabilities, useLink } from '../../../../../hooks';
import { useConfigRefresh } from '../../hooks';

interface InMemoryPackageConfig extends PackageConfig {
streams: { total: number; enabled: number };
inputTypes: string[];
packageName?: string;
packageTitle?: string;
@@ -72,30 +70,11 @@ export const PackageConfigsTable: React.FunctionComponent<Props> = ({
}

const dsInputTypes: string[] = [];
const streams = packageConfig.inputs.reduce(
(streamSummary, input) => {
if (!inputTypesValues.includes(input.type)) {
inputTypesValues.push(input.type);
}
if (!dsInputTypes.includes(input.type)) {
dsInputTypes.push(input.type);
}

streamSummary.total += input.streams.length;
streamSummary.enabled += input.enabled
? input.streams.filter((stream) => stream.enabled).length
: 0;

return streamSummary;
},
{ total: 0, enabled: 0 }
);

dsInputTypes.sort(stringSortAscending);

return {
...packageConfig,
streams,
inputTypes: dsInputTypes,
packageName: packageConfig.package?.name ?? '',
packageTitle: packageConfig.package?.title ?? '',
@@ -175,23 +154,6 @@ export const PackageConfigsTable: React.FunctionComponent<Props> = ({
return namespace ? <EuiBadge color="hollow">{namespace}</EuiBadge> : '';
},
},
{
field: 'streams',
name: i18n.translate(
'xpack.ingestManager.configDetails.packageConfigsTable.streamsCountColumnTitle',
{
defaultMessage: 'Streams',
}
),
render: (streams: InMemoryPackageConfig['streams']) => {
return (
<>
<EuiTextColor>{streams.enabled}</EuiTextColor>
<EuiTextColor color="subdued">&nbsp;/ {streams.total}</EuiTextColor>
</>
);
},
},
{
name: i18n.translate(
'xpack.ingestManager.configDetails.packageConfigsTable.actionsColumnTitle',
Original file line number Diff line number Diff line change
@@ -245,7 +245,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
{
field: 'config_id',
name: i18n.translate('xpack.ingestManager.agentList.configColumnTitle', {
defaultMessage: 'Configuration',
defaultMessage: 'Agent config',
}),
render: (configId: string, agent: Agent) => {
const configName = agentConfigs.find((p) => p.id === configId)?.name;
@@ -445,7 +445,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
>
<FormattedMessage
id="xpack.ingestManager.agentList.configFilterText"
defaultMessage="Configs"
defaultMessage="Agent config"
/>
</EuiFilterButton>
}
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => {
{
field: 'config_id',
name: i18n.translate('xpack.ingestManager.enrollmentTokensList.configTitle', {
defaultMessage: 'Config',
defaultMessage: 'Agent config',
}),
render: (configId: string) => {
const config = agentConfigs.find((c) => c.id === configId);
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ export const OverviewConfigurationSection: React.FC<{ agentConfigs: AgentConfig[
<h2>
<FormattedMessage
id="xpack.ingestManager.overviewPageConfigurationsPanelTitle"
defaultMessage="Configurations"
defaultMessage="Agent configurations"
/>
</h2>
</EuiTitle>
@@ -55,7 +55,7 @@ export const OverviewConfigurationSection: React.FC<{ agentConfigs: AgentConfig[
<EuiDescriptionListTitle>
<FormattedMessage
id="xpack.ingestManager.overviewConfigTotalTitle"
defaultMessage="Total configs"
defaultMessage="Total available"
/>
</EuiDescriptionListTitle>
<EuiDescriptionListDescription>
@@ -64,7 +64,7 @@ export const OverviewConfigurationSection: React.FC<{ agentConfigs: AgentConfig[
<EuiDescriptionListTitle>
<FormattedMessage
id="xpack.ingestManager.overviewPackageConfigTitle"
defaultMessage="Total integrations used"
defaultMessage="Configured integrations"
/>
</EuiDescriptionListTitle>
<EuiDescriptionListDescription>
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
@@ -8159,7 +8159,6 @@
"xpack.ingestManager.configDetails.packageConfigsTable.nameColumnTitle": "データソース",
"xpack.ingestManager.configDetails.packageConfigsTable.namespaceColumnTitle": "名前空間",
"xpack.ingestManager.configDetails.packageConfigsTable.packageNameColumnTitle": "統合",
"xpack.ingestManager.configDetails.packageConfigsTable.streamsCountColumnTitle": "ストリーム",
"xpack.ingestManager.configDetails.subTabs.packageConfigsTabText": "データソース",
"xpack.ingestManager.configDetails.subTabs.settingsTabText": "設定",
"xpack.ingestManager.configDetails.summary.lastUpdated": "最終更新日:",
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
@@ -8164,7 +8164,6 @@
"xpack.ingestManager.configDetails.packageConfigsTable.nameColumnTitle": "数据源",
"xpack.ingestManager.configDetails.packageConfigsTable.namespaceColumnTitle": "命名空间",
"xpack.ingestManager.configDetails.packageConfigsTable.packageNameColumnTitle": "集成",
"xpack.ingestManager.configDetails.packageConfigsTable.streamsCountColumnTitle": "流计数",
"xpack.ingestManager.configDetails.subTabs.packageConfigsTabText": "数据源",
"xpack.ingestManager.configDetails.subTabs.settingsTabText": "设置",
"xpack.ingestManager.configDetails.summary.lastUpdated": "最后更新时间",

0 comments on commit cbbddd9

Please sign in to comment.