-
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.
- Loading branch information
1 parent
436fbb5
commit 5c24019
Showing
48 changed files
with
129 additions
and
125 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
2 changes: 1 addition & 1 deletion
2
src/core_plugins/kibana/public/management/sections/indices/_field_editor.js
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
import getHighlightHtml from './highlight_html'; | ||
import getHighlightRequestProvider from './highlight_request'; | ||
|
||
export default { | ||
getHighlightHtml, | ||
getHighlightRequestProvider | ||
}; | ||
export { getHighlightHtml } from './highlight_html'; | ||
export { getHighlightRequestProvider } from './highlight_request'; |
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// By default, ElasticSearch surrounds matched values in <em></em>. This is not ideal because it is possible that | ||
// the value could contain <em></em> in the value. We define these custom tags that we would never expect to see | ||
// inside a field value. | ||
export default { | ||
export const highlightTags = { | ||
pre: '@kibana-highlighted-field@', | ||
post: '@/kibana-highlighted-field@' | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// These are the html tags that will replace the highlight tags. | ||
export default { | ||
export const htmlTags = { | ||
pre: '<mark>', | ||
post: '</mark>' | ||
}; |
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
8 changes: 3 additions & 5 deletions
8
src/ui/public/index_patterns/__tests__/_get_computed_fields.js
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
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
26 changes: 16 additions & 10 deletions
26
src/ui/public/index_patterns/__tests__/_pattern_to_wildcard.js
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 |
---|---|---|
@@ -1,36 +1,42 @@ | ||
import expect from 'expect.js'; | ||
describe('Index pattern to wildcard', function () { | ||
import { IndexPatternsPatternToWildcardProvider } from 'ui/index_patterns/_pattern_to_wildcard'; | ||
import ngMock from 'ng_mock'; | ||
|
||
const fn = require('ui/index_patterns/_pattern_to_wildcard')(); | ||
describe('Index pattern to wildcard', function () { | ||
let indexPatternToWildcard; | ||
|
||
beforeEach(ngMock.module('kibana')); | ||
beforeEach(ngMock.inject(function (Private) { | ||
indexPatternToWildcard = Private(IndexPatternsPatternToWildcardProvider); | ||
})); | ||
|
||
it('should be a function', function () { | ||
expect(fn).to.be.a(Function); | ||
expect(indexPatternToWildcard).to.be.a(Function); | ||
}); | ||
|
||
it('should parse patterns with a single escaped sequence', function () { | ||
expect(fn('[foo-]YYYY')).to.equal('foo-*'); | ||
expect(indexPatternToWildcard('[foo-]YYYY')).to.equal('foo-*'); | ||
}); | ||
|
||
it('should parse patterns with a multiple escaped sequences', function () { | ||
expect(fn('[foo-]YYYY[-bar]')).to.equal('foo-*-bar'); | ||
expect(fn('[foo-]YYYY[-bar-]MM')).to.equal('foo-*-bar-*'); | ||
expect(indexPatternToWildcard('[foo-]YYYY[-bar]')).to.equal('foo-*-bar'); | ||
expect(indexPatternToWildcard('[foo-]YYYY[-bar-]MM')).to.equal('foo-*-bar-*'); | ||
}); | ||
|
||
it('should handle leading patterns', function () { | ||
expect(fn('YYYY[-foo]')).to.equal('*-foo'); | ||
expect(indexPatternToWildcard('YYYY[-foo]')).to.equal('*-foo'); | ||
}); | ||
|
||
it('should ignore [ when inside an escape', function () { | ||
expect(fn('[f[oo-]YYYY')).to.equal('f[oo-*'); | ||
expect(indexPatternToWildcard('[f[oo-]YYYY')).to.equal('f[oo-*'); | ||
}); | ||
|
||
// Not sure if this behavior is useful, but this is how the code works | ||
it('should add ] to the string when outside the pattern', function () { | ||
expect(fn('[foo-]]YYYY')).to.equal('foo-]*'); | ||
expect(indexPatternToWildcard('[foo-]]YYYY')).to.equal('foo-]*'); | ||
}); | ||
|
||
it('should ignore ] when outside an escape', function () { | ||
expect(fn('[f]oo-]YYYY')).to.equal('f*'); | ||
expect(indexPatternToWildcard('[f]oo-]YYYY')).to.equal('f*'); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.