mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Fleet] Remove No Tags
from add/remove popover (#218673)
Closes #218636 ## Summary - Removes the `No Tags` option from the add/remove popover as it is not actually a tag, but only to be used in the filter dropdown. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks N/A --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
09740a63d1
commit
25ffb0d1d9
2 changed files with 7 additions and 6 deletions
|
@ -15,6 +15,7 @@ import {
|
|||
EuiToolTip,
|
||||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { useIsFirstTimeAgentUserQuery } from '../../../../../integrations/sections/epm/screens/detail/hooks';
|
||||
|
||||
|
@ -99,7 +100,10 @@ export const SearchAndFilterBar: React.FunctionComponent<SearchAndFilterBarProps
|
|||
const { isFirstTimeAgentUser, isLoading: isFirstTimeAgentUserLoading } =
|
||||
useIsFirstTimeAgentUserQuery();
|
||||
const { cloud } = useStartServices();
|
||||
|
||||
const NO_TAGS_VALUE = i18n.translate('xpack.fleet.agentList.noTagsValue', {
|
||||
defaultMessage: 'No Tags',
|
||||
});
|
||||
const tagsWithNoTagsIncluded = [...tags, NO_TAGS_VALUE];
|
||||
return (
|
||||
<>
|
||||
<EuiFlexGroup direction="column">
|
||||
|
@ -187,7 +191,7 @@ export const SearchAndFilterBar: React.FunctionComponent<SearchAndFilterBarProps
|
|||
disabled={agentPolicies.length === 0}
|
||||
/>
|
||||
<TagsFilter
|
||||
tags={tags}
|
||||
tags={tagsWithNoTagsIncluded}
|
||||
selectedTags={selectedTags}
|
||||
onSelectedTagsChange={onSelectedTagsChange}
|
||||
/>
|
||||
|
|
|
@ -32,9 +32,6 @@ import { getKuery } from '../utils/get_kuery';
|
|||
|
||||
const REFRESH_INTERVAL_MS = 30000;
|
||||
const MAX_AGENT_ACTIONS = 100;
|
||||
const NO_TAGS_VALUE = i18n.translate('xpack.fleet.noTagsValue', {
|
||||
defaultMessage: 'No Tags',
|
||||
});
|
||||
/** Allow to fetch full agent policy using a cache */
|
||||
function useFullAgentPolicyFetcher() {
|
||||
const authz = useAuthz();
|
||||
|
@ -289,7 +286,7 @@ export function useFetchAgentsData() {
|
|||
|
||||
setAgentsStatus(agentStatusesToSummary(statusSummary));
|
||||
|
||||
const newAllTags = [...agentTagsResponse.data.items, NO_TAGS_VALUE];
|
||||
const newAllTags = [...agentTagsResponse.data.items];
|
||||
// We only want to update the list of available tags if
|
||||
// - We haven't set any tags yet
|
||||
// - We've received the "refreshTags" flag which will force a refresh of the tags list when an agent is unenrolled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue