Skip to content

Commit 13e041e

Browse files
authored
Add search definition for VirtualMachines (stolostron#3465)
Signed-off-by: zlayne <zlayne@redhat.com>
1 parent 9458b0f commit 13e041e

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

frontend/src/routes/Home/Search/__snapshots__/searchDefinitions.test.tsx.snap

+62
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,68 @@ Array [
19911991
]
19921992
`;
19931993

1994+
exports[`Correctly returns all resource definitions: SearchDefinitions-virtualmachine 1`] = `
1995+
Array [
1996+
Object {
1997+
"cell": <CreateDetailsLink
1998+
item={
1999+
Object {
2000+
"cluster": "testCluster",
2001+
"created": "2021-01-01T00:00:00Z",
2002+
"kind": "Pod",
2003+
"label": "testLabel=label; testLabel1=label1",
2004+
"name": "testName",
2005+
"namespace": "testNamespace",
2006+
"selfLink": "/apigroup/cluster/name",
2007+
}
2008+
}
2009+
/>,
2010+
"header": "Name",
2011+
"sort": "name",
2012+
},
2013+
Object {
2014+
"cell": "namespace",
2015+
"header": "Namespace",
2016+
"sort": "namespace",
2017+
},
2018+
Object {
2019+
"cell": <React.Fragment>
2020+
testCluster
2021+
</React.Fragment>,
2022+
"header": "Cluster",
2023+
"sort": "cluster",
2024+
},
2025+
Object {
2026+
"cell": "status",
2027+
"header": "Status",
2028+
"sort": "status",
2029+
},
2030+
Object {
2031+
"cell": "ready",
2032+
"header": "Ready",
2033+
"sort": "ready",
2034+
},
2035+
Object {
2036+
"cell": "in a month",
2037+
"header": "Created",
2038+
"sort": "created",
2039+
},
2040+
Object {
2041+
"cell": <AcmLabels
2042+
collapse={Array []}
2043+
labels={
2044+
Array [
2045+
"testLabel=label",
2046+
"testLabel1=label1",
2047+
]
2048+
}
2049+
/>,
2050+
"header": "Labels",
2051+
"sort": "label",
2052+
},
2053+
]
2054+
`;
2055+
19942056
exports[`Correctly returns category components 1`] = `
19952057
<AcmLabels
19962058
collapse={Array []}

frontend/src/routes/Home/Search/searchDefinitions.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ export const getSearchDefinitions: SearchDefinitions = (t: TFunction) => {
362362
AddColumn('Channel', t('Channel')),
363363
]),
364364
},
365+
virtualmachine: {
366+
columns: AddDefaultColumns(t, [AddColumn('status', t('Status')), AddColumn('ready', t('Ready'))]),
367+
},
365368
}
366369
}
367370

0 commit comments

Comments
 (0)