Skip to content

Commit

Permalink
[SIEM] hide siem data on empty string or _all (#47166) (#47219)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Oct 8, 2019
1 parent 14bde81 commit a92e64f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,21 @@ export const createSourceStatusResolvers = (libs: {
} => ({
SourceStatus: {
async indicesExist(source, args, { req }) {
if (
args.defaultIndex.length === 1 &&
(args.defaultIndex[0] === '' || args.defaultIndex[0] === '_all')
) {
return false;
}
return libs.sourceStatus.hasIndices(req, args.defaultIndex);
},
async indexFields(source, args, { req }) {
if (
args.defaultIndex.length === 1 &&
(args.defaultIndex[0] === '' || args.defaultIndex[0] === '_all')
) {
return [];
}
return libs.fields.getFields(req, args.defaultIndex);
},
},
Expand Down

0 comments on commit a92e64f

Please sign in to comment.