Skip to content

Commit 2e6bfdc

Browse files
authored
Update suggested query templates to include virtual machine search (stolostron#3466)
* Update suggested query templates to include virtual machine search Signed-off-by: zlayne <zlayne@redhat.com> * Add translations Signed-off-by: zlayne <zlayne@redhat.com> --------- Signed-off-by: zlayne <zlayne@redhat.com>
1 parent 8cf2e89 commit 2e6bfdc

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

frontend/public/locales/en/translation.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@
329329
"A placement without any label selectors or label expressions will select all clusters.": "A placement without any label selectors or label expressions will select all clusters.",
330330
"A policy contains policy templates that create policies on managed clusters.": "A policy contains policy templates that create policies on managed clusters.",
331331
"A policy generates reports and validates cluster compliance based on specified security standards, categories, and controls.": "A policy generates reports and validates cluster compliance based on specified security standards, categories, and controls.",
332-
"A pre-defined search to help you review your workloads": "A pre-defined search to help you review your workloads",
333332
"A project organizes all of your Google Cloud resources. A project consists of a set of users; a set of APIs; and billing, authentication, and monitoring settings for those APIs. So, for example, all of your Cloud Storage buckets and objects, along with user permissions for accessing them, reside in a project.": "A project organizes all of your Google Cloud resources. A project consists of a set of users; a set of APIs; and billing, authentication, and monitoring settings for those APIs. So, for example, all of your Cloud Storage buckets and objects, along with user permissions for accessing them, reside in a project.",
334333
"A proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be HTTP.": "A proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be HTTP.",
335334
"A proxy URL to use for creating HTTPS connections outside the cluster. If this is not specified, then httpProxy is used for both HTTP and HTTPS connections.": "A proxy URL to use for creating HTTPS connections outside the cluster. If this is not specified, then httpProxy is used for both HTTP and HTTPS connections.",
@@ -2292,7 +2291,6 @@
22922291
"Search application": "Search application",
22932292
"Search channel": "Search channel",
22942293
"Search filters": "Search filters",
2295-
"Search for resources created within the last hour": "Search for resources created within the last hour",
22962294
"Search guide": "Search guide",
22972295
"Search help modal toggle": "Search help modal toggle",
22982296
"Search input": "Search input",
@@ -2375,8 +2373,11 @@
23752373
"Show less": "Show less",
23762374
"Show pods with unhealthy status": "Show pods with unhealthy status",
23772375
"Show related resources": "Show related resources",
2376+
"Show resources created within the last hour": "Show resources created within the last hour",
23782377
"Show secret": "Show secret",
23792378
"Show Secrets": "Show Secrets",
2379+
"Show virtual machine resources": "Show virtual machine resources",
2380+
"Show workloads running on your fleet": "Show workloads running on your fleet",
23802381
"show.more": "{{count}} more",
23812382
"show.more_plural": "{{count}} more",
23822383
"Simple Table": "Simple Table",
@@ -3136,6 +3137,7 @@
31363137
"violation_plural": "violations",
31373138
"Violation_plural": "Violations",
31383139
"Violations": "Violations",
3140+
"Virtual Machines": "Virtual Machines",
31393141
"VM size": "VM size",
31403142
"VMware": "VMware",
31413143
"Volume mode": "Volume mode",

frontend/src/routes/Home/Search/components/SuggestedQueryTemplates.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
import { useMemo } from 'react'
77
import { useTranslation } from '../../../../lib/acm-i18next'
88

9+
// Suggested query templates are used as back up if the console-search-config ConfigMap is not found
910
export const useSuggestedQueryTemplates = () => {
1011
const { t } = useTranslation()
1112
return useMemo(
1213
() => ({
1314
templates: [
1415
{
15-
id: 'Workloads',
16+
id: 'search.suggested.workloads.name',
1617
name: t('Workloads'),
17-
description: t('A pre-defined search to help you review your workloads'),
18+
description: t('Show workloads running on your fleet'),
1819
searchText: 'kind:DaemonSet,Deployment,Job,StatefulSet,ReplicaSet',
1920
},
2021
{
@@ -27,9 +28,15 @@ export const useSuggestedQueryTemplates = () => {
2728
{
2829
id: 'search.suggested.createdLastHour.name',
2930
name: t('Created last hour'),
30-
description: t('Search for resources created within the last hour'),
31+
description: t('Show resources created within the last hour'),
3132
searchText: 'created:hour',
3233
},
34+
{
35+
id: 'search.suggested.virtualmachines.name',
36+
name: t('Virtual Machines'),
37+
description: t('Show virtual machine resources'),
38+
searchText: 'kind:VirtualMachine',
39+
},
3340
],
3441
}),
3542
[t]

0 commit comments

Comments
 (0)