Repository: aurora Updated Branches: refs/heads/master 875a3126b -> 8c331b8b5
Search entire job name for query string on JobList Reviewed at https://reviews.apache.org/r/63339/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/8c331b8b Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/8c331b8b Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/8c331b8b Branch: refs/heads/master Commit: 8c331b8b5190bd425db3900bcf2c361470ee4d0f Parents: 875a312 Author: David McLaughlin <[email protected]> Authored: Thu Oct 26 15:19:22 2017 -0700 Committer: David McLaughlin <[email protected]> Committed: Thu Oct 26 15:19:22 2017 -0700 ---------------------------------------------------------------------- ui/src/main/js/components/JobList.js | 2 +- ui/src/main/js/components/__tests__/JobList-test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/8c331b8b/ui/src/main/js/components/JobList.js ---------------------------------------------------------------------- diff --git a/ui/src/main/js/components/JobList.js b/ui/src/main/js/components/JobList.js index bb7f488..9905295 100644 --- a/ui/src/main/js/components/JobList.js +++ b/ui/src/main/js/components/JobList.js @@ -11,7 +11,7 @@ import { TASK_COUNTS } from 'utils/Job'; export function searchJob(job, query) { const taskConfig = job.job.taskConfig; const jobType = taskConfig.isService ? 'service' : job.job.cronSchedule ? 'cron' : 'adhoc'; - return (job.job.key.name.startsWith(query) || + return (job.job.key.name.includes(query) || taskConfig.tier.startsWith(query) || job.job.key.environment.startsWith(query) || jobType.startsWith(query)); http://git-wip-us.apache.org/repos/asf/aurora/blob/8c331b8b/ui/src/main/js/components/__tests__/JobList-test.js ---------------------------------------------------------------------- diff --git a/ui/src/main/js/components/__tests__/JobList-test.js b/ui/src/main/js/components/__tests__/JobList-test.js index deda6fe..77351ca 100644 --- a/ui/src/main/js/components/__tests__/JobList-test.js +++ b/ui/src/main/js/components/__tests__/JobList-test.js @@ -36,6 +36,7 @@ describe('searchJob', () => { expect(searchJob(job, '___notfound__')).toBe(false); expect(searchJob(job, 'zzz')).toBe(true); expect(searchJob(job, 'yyy')).toBe(true); + expect(searchJob(job, 'y-n')).toBe(true); }); it('Should match jobs by tier', () => {
