Skip to content

Commit

Permalink
Remove unused classes
Browse files Browse the repository at this point in the history
  • Loading branch information
backspace committed Apr 23, 2021
1 parent 53927cb commit bddf6ea
Showing 1 changed file with 1 addition and 70 deletions.
71 changes: 1 addition & 70 deletions ui/app/components/global-search/control.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import Component from '@ember/component';
import { classNames } from '@ember-decorators/component';
import { task } from 'ember-concurrency';
import EmberObject, { action, computed, set } from '@ember/object';
import { alias } from '@ember/object/computed';
import { action, set } from '@ember/object';
import { inject as service } from '@ember/service';
import { debounce, run } from '@ember/runloop';
import Searchable from 'nomad-ui/mixins/searchable';
import classic from 'ember-classic-decorator';

const SLASH_KEY = 191;
const MAXIMUM_RESULTS = 10;
Expand All @@ -22,18 +19,6 @@ export default class GlobalSearchControl extends Component {
constructor() {
super(...arguments);
this['data-test-search-parent'] = true;

this.jobSearch = JobSearch.create({
dataSource: this,
});

this.nodeNameSearch = NodeNameSearch.create({
dataSource: this,
});

this.nodeIdSearch = NodeIdSearch.create({
dataSource: this,
});
}

keyDownHandler(e) {
Expand Down Expand Up @@ -235,60 +220,6 @@ export default class GlobalSearchControl extends Component {
}
}

@classic
class JobSearch extends EmberObject.extend(Searchable) {
@computed
get searchProps() {
return ['id', 'name'];
}

@computed
get fuzzySearchProps() {
return ['name'];
}

@alias('dataSource.jobs') listToSearch;
@alias('dataSource.searchString') searchTerm;

fuzzySearchEnabled = true;
includeFuzzySearchMatches = true;
}
@classic
class NodeNameSearch extends EmberObject.extend(Searchable) {
@computed
get searchProps() {
return ['name'];
}

@computed
get fuzzySearchProps() {
return ['name'];
}

@alias('dataSource.nodes') listToSearch;
@alias('dataSource.searchString') searchTerm;

fuzzySearchEnabled = true;
includeFuzzySearchMatches = true;
}

@classic
class NodeIdSearch extends EmberObject.extend(Searchable) {
@computed
get regexSearchProps() {
return ['id'];
}

@alias('dataSource.nodes') listToSearch;
@computed('dataSource.searchString')
get searchTerm() {
return `^${this.get('dataSource.searchString')}`;
}

exactMatchEnabled = false;
regexEnabled = true;
}

function resultsGroupLabel(type, renderedResults, allResults, truncated) {
let countString;

Expand Down

0 comments on commit bddf6ea

Please sign in to comment.