Skip to content

Commit 0eaefa7

Browse files
committed
remove old code
1 parent 71d9056 commit 0eaefa7

File tree

3 files changed

+5
-42
lines changed

3 files changed

+5
-42
lines changed

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { GetPackagesResponse } from '../../../../../../ingest_manager/common';
87
import { HostResultList } from '../../../../../common/endpoint/types';
98
import { ImmutableMiddlewareFactory } from '../../../../common/store';
109
import { isOnHostPage, hasSelectedHost, uiQueryParams, listData } from './selectors';
1110
import { HostState } from '../types';
12-
import { sendGetSecurityPackages } from '../../policy/store/policy_list/services/ingest';
1311

1412
export const hostMiddlewareFactory: ImmutableMiddlewareFactory<HostState> = (coreStart) => {
15-
const http = coreStart.http;
1613
return ({ getState, dispatch }) => (next) => async (action) => {
1714
next(action);
1815
const state = getState();
@@ -94,27 +91,6 @@ export const hostMiddlewareFactory: ImmutableMiddlewareFactory<HostState> = (cor
9491
payload: error,
9592
});
9693
}
97-
98-
// call the policy package api
99-
let endpointPackageInfo: GetPackagesResponse['response'][0] | undefined;
100-
try {
101-
const securityPackages: GetPackagesResponse = await sendGetSecurityPackages(http);
102-
endpointPackageInfo = securityPackages.response.find(
103-
(epmPackage) => epmPackage.name === 'endpoint'
104-
);
105-
if (!endpointPackageInfo) {
106-
throw new Error('Endpoint package was not found.');
107-
}
108-
dispatch({
109-
type: 'serverReturnedEndpointPackageVersion',
110-
payload: endpointPackageInfo.version,
111-
});
112-
} catch (error) {
113-
dispatch({
114-
type: 'serverFailedToReturnEndpointPackageVersion',
115-
payload: error,
116-
});
117-
}
11894
}
11995
};
12096
};

x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ const HostIds = styled(EuiListGroupItem)`
3636

3737
const LinkToExternalApp = styled.div`
3838
margin-top: ${(props) => props.theme.eui.ruleMargins.marginMedium};
39-
.hostDetailsLinkToExternalApp {
40-
.linkToAppIcon {
41-
margin-right: ${(props) => props.theme.eui.ruleMargins.marginXSmall};
42-
}
43-
.linkToAppPopoutIcon {
44-
margin-left: ${(props) => props.theme.eui.ruleMargins.marginXSmall};
45-
}
39+
.linkToAppIcon {
40+
margin-right: ${(props) => props.theme.eui.ruleMargins.marginXSmall};
41+
}
42+
.linkToAppPopoutIcon {
43+
margin-left: ${(props) => props.theme.eui.ruleMargins.marginXSmall};
4644
}
4745
`;
4846

@@ -176,7 +174,6 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => {
176174
/>
177175
<LinkToExternalApp>
178176
<LinkToApp
179-
className="hostDetailsLinkToExternalApp"
180177
appId={ingestAppId}
181178
appPath={ingestAppPath}
182179
href={ingestUrl}

x-pack/plugins/security_solution/public/management/pages/policy/store/policy_list/services/ingest.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
GetDatasourcesRequest,
1010
GetAgentStatusResponse,
1111
DATASOURCE_SAVED_OBJECT_TYPE,
12-
GetPackagesResponse,
1312
} from '../../../../../../../../ingest_manager/common';
1413
import { GetPolicyListResponse, GetPolicyResponse, UpdatePolicyResponse } from '../../../types';
1514
import { NewPolicyData } from '../../../../../../../common/endpoint/types';
@@ -18,7 +17,6 @@ const INGEST_API_ROOT = `/api/ingest_manager`;
1817
export const INGEST_API_DATASOURCES = `${INGEST_API_ROOT}/datasources`;
1918
const INGEST_API_FLEET = `${INGEST_API_ROOT}/fleet`;
2019
const INGEST_API_FLEET_AGENT_STATUS = `${INGEST_API_FLEET}/agent-status`;
21-
const INGEST_API_EPM_PACKAGES = `${INGEST_API_ROOT}/epm/packages`;
2220

2321
/**
2422
* Retrieves a list of endpoint specific datasources (those created with a `package.name` of
@@ -95,11 +93,3 @@ export const sendGetFleetAgentStatusForConfig = (
9593
},
9694
});
9795
};
98-
99-
/**
100-
* Get all security EPM packages
101-
*/
102-
export const sendGetSecurityPackages = (http: HttpStart) => {
103-
const options = { query: { category: 'security' } };
104-
return http.get<GetPackagesResponse>(`${INGEST_API_EPM_PACKAGES}`, options);
105-
};

0 commit comments

Comments
 (0)