Skip to content

Commit

Permalink
[Ingest Manager] Copy changes (elastic#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
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
EuiInMemoryTable,
EuiInMemoryTableProps,
EuiBadge,
EuiTextColor,
EuiContextMenuItem,
EuiButton,
EuiFlexGroup,
Expand All @@ -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;
Expand Down Expand Up @@ -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 ?? '',
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -445,7 +445,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
>
<FormattedMessage
id="xpack.ingestManager.agentList.configFilterText"
defaultMessage="Configs"
defaultMessage="Agent config"
/>
</EuiFilterButton>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const OverviewConfigurationSection: React.FC<{ agentConfigs: AgentConfig[
<h2>
<FormattedMessage
id="xpack.ingestManager.overviewPageConfigurationsPanelTitle"
defaultMessage="Configurations"
defaultMessage="Agent configurations"
/>
</h2>
</EuiTitle>
Expand All @@ -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>
Expand All @@ -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>
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "最終更新日:",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "最后更新时间",
Expand Down

0 comments on commit cbbddd9

Please sign in to comment.