mirror of
https://github.com/weaveworks/scope.git
synced 2026-04-22 02:18:15 +00:00
Store table matches in table object
This commit is contained in:
@@ -212,7 +212,7 @@ export class NodeDetails extends React.Component {
|
||||
</span>}
|
||||
</div>
|
||||
<NodeDetailsLabels rows={table.rows}
|
||||
matches={nodeMatches.get('metadata')} />
|
||||
matches={nodeMatches.get('tables')} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ describe('SearchUtils', () => {
|
||||
const nodes = nodeSets.someNodes;
|
||||
const matches = fun(nodes, {query: 'Row Value 1'});
|
||||
expect(matches.size).toEqual(1);
|
||||
expect(matches.getIn(['n2', 'metadata', 'row1']).text).toBe('Row Value 1');
|
||||
expect(matches.getIn(['n2', 'tables', 'row1']).text).toBe('Row Value 1');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ export function searchTopology(nodes, { prefix, query, metric, comp, value }) {
|
||||
tables.forEach((table) => {
|
||||
if (table.get('rows')) {
|
||||
table.get('rows').forEach(field => {
|
||||
const keyPath = [nodeId, 'metadata', field.get('id')];
|
||||
const keyPath = [nodeId, 'tables', field.get('id')];
|
||||
nodeMatches = findNodeMatch(nodeMatches, keyPath, field.get('value'),
|
||||
query, prefix, field.get('label'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user