Skip to content

Commit

Permalink
Remove unused task
Browse files Browse the repository at this point in the history
  • Loading branch information
backspace committed Apr 23, 2021
1 parent 5097053 commit 53927cb
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions ui/app/components/global-search/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,40 +56,6 @@ export default class GlobalSearchControl extends Component {
document.removeEventListener('keydown', this._keyDownHandler);
}

@task(function*(string) {
try {
set(this, 'searchString', string);

const jobs = yield this.dataCaches.fetch('job');
const nodes = yield this.dataCaches.fetch('node');

set(this, 'jobs', jobs.toArray());
set(this, 'nodes', nodes.toArray());

const jobResults = this.jobSearch.listSearched.slice(0, MAXIMUM_RESULTS);

const mergedNodeListSearched = this.nodeIdSearch.listSearched
.concat(this.nodeNameSearch.listSearched)
.uniq();
const nodeResults = mergedNodeListSearched.slice(0, MAXIMUM_RESULTS);

return [
{
groupName: resultsGroupLabel('Jobs', jobResults, this.jobSearch.listSearched),
options: jobResults,
},
{
groupName: resultsGroupLabel('Clients', nodeResults, mergedNodeListSearched),
options: nodeResults,
},
];
} catch (e) {
// eslint-disable-next-line
console.log('exception searching', e);
}
})
searchOld;

@task(function*(string) {
const searchResponse = yield this.token.authorizedRequest('/v1/search/fuzzy', {
method: 'POST',
Expand Down

0 comments on commit 53927cb

Please sign in to comment.