-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Index management] Treat indices beginning with a period as regular i…
…ndices (#112990)
- Loading branch information
Showing
13 changed files
with
161 additions
and
72 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...s/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
* 2.0. | ||
*/ | ||
|
||
export const BRANCH = '8.x'; | ||
export const MAJOR_VERSION = '8.0.0'; |
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
86 changes: 46 additions & 40 deletions
86
x-pack/plugins/index_management/__jest__/components/__snapshots__/index_table.test.js.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
27 changes: 27 additions & 0 deletions
27
x-pack/plugins/index_management/public/application/lib/indices.ts
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import SemVer from 'semver/classes/semver'; | ||
import { Index } from '../../../common'; | ||
|
||
const version = '8.0.0'; | ||
const kibanaVersion = new SemVer(version); | ||
|
||
export const isHiddenIndex = (index: Index): boolean => { | ||
if (kibanaVersion.major < 8) { | ||
// In 7.x we consider hidden index all indices whose name start with a dot | ||
return (index.name ?? '').startsWith('.') || index.hidden === true; | ||
} | ||
return index.hidden === true; | ||
}; | ||
|
||
export const isSystemIndex = (index: Index): boolean => { | ||
if (kibanaVersion.major < 8) { | ||
return (index.name ?? '').startsWith('.'); | ||
} | ||
// From 8.0 we won't surface system indices in Index management | ||
return false; | ||
}; |
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.