Skip to content

Commit

Permalink
[MD][IP]Update button position & Add UT & Add skip option (opensearch…
Browse files Browse the repository at this point in the history
…-project#2195)

* Add UT - index pattern related

Signed-off-by: Kristen Tian <[email protected]>

* Update button position

Signed-off-by: Kristen Tian <[email protected]>

* Add skip option to allow use default os data source

Signed-off-by: Kristen Tian <[email protected]>

Signed-off-by: Kristen Tian <[email protected]>
  • Loading branch information
kristenTian committed Sep 12, 2022
1 parent 583cb40 commit 97a65a0
Show file tree
Hide file tree
Showing 7 changed files with 844 additions and 36 deletions.
16 changes: 14 additions & 2 deletions src/fixtures/stubbed_saved_object_index_pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import stubbedLogstashFields from './logstash_fields';

const mockLogstashFields = stubbedLogstashFields();

export function stubbedSavedObjectIndexPattern(id: string | null = null) {
return {
export function stubbedSavedObjectIndexPattern(id: string | null = null, withDataSource?: false) {
const indexPattern: any = {
id,
type: 'index-pattern',
attributes: {
Expand All @@ -45,4 +45,16 @@ export function stubbedSavedObjectIndexPattern(id: string | null = null) {
},
version: '2',
};

if (withDataSource) {
indexPattern.reference = [
{
id: 'id',
name: 'name',
type: 'data-source',
},
];
}

return indexPattern;
}
Loading

0 comments on commit 97a65a0

Please sign in to comment.