fix(home): remove edge devices from homepage list EE-3919 (#7471)

pull/6864/head^2
matias-portainer 2 years ago committed by GitHub
parent 81d1f35bdc
commit 4c23513a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -130,7 +130,7 @@ export function EnvironmentList({ onClickItem, onRefresh }: Props) {
status: statusFilter,
tagIds: tagFilter?.length ? tagFilter : undefined,
groupIds: groupFilter,
edgeDevice: getEdgeDeviceFilter(connectionTypes.map((p) => p.value)),
edgeDevice: false,
tagsPartialMatch: true,
agentVersions: agentVersions.map((a) => a.value),
};
@ -331,19 +331,6 @@ export function EnvironmentList({ onClickItem, onRefresh }: Props) {
</>
);
function getEdgeDeviceFilter(connectionTypes: ConnectionType[]) {
// show both types of edge agent if both are selected or if no connection type is selected
if (
connectionTypes.length === 0 ||
(connectionTypes.includes(ConnectionType.EdgeAgent) &&
connectionTypes.includes(ConnectionType.EdgeDevice))
) {
return undefined;
}
return connectionTypes.includes(ConnectionType.EdgeDevice);
}
function getTypes(
platformTypes: PlatformType[],
connectionTypes: ConnectionType[]
@ -495,7 +482,6 @@ function getConnectionTypeOptions(platformTypes: Filter<PlatformType>[]) {
{ value: ConnectionType.API, label: 'API' },
{ value: ConnectionType.Agent, label: 'Agent' },
{ value: ConnectionType.EdgeAgent, label: 'Edge Agent' },
{ value: ConnectionType.EdgeDevice, label: 'Edge Device' },
];
if (platformTypes.length === 0) {

Loading…
Cancel
Save