-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…4549) (#115650) * Handle deletes (#114545) * [App Search] Wired up organic results on Curation Suggestions view (#114717) * [App Search] Added a History tab to the Automated Curation detail view (#115090) * Check platinum license (#114549)
- Loading branch information
1 parent
128afbb
commit c13cbe8
Showing
14 changed files
with
539 additions
and
818 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...rise_search/public/applications/app_search/components/curations/curation/history.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { shallow } from 'enzyme'; | ||
|
||
import { EntSearchLogStream } from '../../../../shared/log_stream'; | ||
|
||
import { History } from './history'; | ||
|
||
describe('History', () => { | ||
it('renders', () => { | ||
const wrapper = shallow(<History engineName="foo" query="some text" />); | ||
expect(wrapper.find(EntSearchLogStream).prop('query')).toEqual( | ||
'appsearch.search_relevance_suggestions.query: some text and event.kind: event and event.dataset: search-relevance-suggestions and appsearch.search_relevance_suggestions.engine: foo and event.action: curation_suggestion' | ||
); | ||
}); | ||
}); |
57 changes: 57 additions & 0 deletions
57
...nterprise_search/public/applications/app_search/components/curations/curation/history.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { EntSearchLogStream } from '../../../../shared/log_stream'; | ||
import { DataPanel } from '../../data_panel'; | ||
|
||
interface Props { | ||
query: string; | ||
engineName: string; | ||
} | ||
|
||
export const History: React.FC<Props> = ({ query, engineName }) => { | ||
const filters = [ | ||
`appsearch.search_relevance_suggestions.query: ${query}`, | ||
'event.kind: event', | ||
'event.dataset: search-relevance-suggestions', | ||
`appsearch.search_relevance_suggestions.engine: ${engineName}`, | ||
'event.action: curation_suggestion', | ||
]; | ||
|
||
return ( | ||
<DataPanel | ||
iconType="tableDensityNormal" | ||
title={ | ||
<h2> | ||
{i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.engine.curation.detail.historyTableTitle', | ||
{ | ||
defaultMessage: 'Automated curation changes', | ||
} | ||
)} | ||
</h2> | ||
} | ||
subtitle={i18n.translate( | ||
'xpack.enterpriseSearch.appSearch.engine.curation.detail.historyTableDescription', | ||
{ | ||
defaultMessage: 'A detailed log of recent changes to your automated curation.', | ||
} | ||
)} | ||
hasBorder | ||
> | ||
<EntSearchLogStream | ||
hoursAgo={720} | ||
query={filters.join(' and ')} | ||
columns={[{ type: 'timestamp' }, { type: 'message' }]} | ||
/> | ||
</DataPanel> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.