Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show Elasticsearch/OpenSearch cluster health summary on Indices page (#…
…13024) * Introduce minimal 'IndexerClusterHealth' variant, use in 'IndicesPage'. * Switch 'IndicesPage' to a pure function and TypeScript. The former addresses a Reviewbot warning.
- Loading branch information
Showing
3 changed files
with
95 additions
and
70 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright (C) 2020 Graylog, Inc. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the Server Side Public License, version 1, | ||
* as published by MongoDB, Inc. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* Server Side Public License for more details. | ||
* | ||
* You should have received a copy of the Server Side Public License | ||
* along with this program. If not, see | ||
* <http://www.mongodb.com/licensing/server-side-public-license>. | ||
*/ | ||
import React from 'react'; | ||
|
||
import { LinkContainer } from 'components/common/router'; | ||
import Routes from 'routing/Routes'; | ||
import { Col, Row, Button } from 'components/bootstrap'; | ||
import HideOnCloud from 'util/conditional/HideOnCloud'; | ||
import DocsHelper from 'util/DocsHelper'; | ||
import { DocumentTitle, IfPermitted, PageHeader } from 'components/common'; | ||
import { DocumentationLink } from 'components/support'; | ||
import { IndexSetsComponent } from 'components/indices'; | ||
import { IndexerClusterHealth } from 'components/indexers'; | ||
|
||
const IndicesPage = () => { | ||
const pageHeader = ( | ||
<PageHeader title="Indices & Index Sets"> | ||
<span> | ||
A Graylog stream write messages to an index set, which is a configuration for retention, sharding, and | ||
replication of the stored data. | ||
By configuring index sets, you could, for example, have different retention times for certain streams. | ||
</span> | ||
|
||
<span> | ||
You can learn more about the index model in the{' '} | ||
<DocumentationLink page={DocsHelper.PAGES.INDEX_MODEL} text="documentation" /> | ||
</span> | ||
|
||
<span> | ||
<LinkContainer to={Routes.SYSTEM.INDEX_SETS.CREATE}> | ||
<Button bsStyle="success" bsSize="lg">Create index set</Button> | ||
</LinkContainer> | ||
</span> | ||
</PageHeader> | ||
); | ||
|
||
return ( | ||
<DocumentTitle title="Indices and Index Sets"> | ||
<span> | ||
{pageHeader} | ||
|
||
<HideOnCloud> | ||
<IfPermitted permissions="indexercluster:read"> | ||
<Row className="content"> | ||
<Col md={12}> | ||
<IndexerClusterHealth minimal /> | ||
</Col> | ||
</Row> | ||
</IfPermitted> | ||
</HideOnCloud> | ||
|
||
<Row className="content"> | ||
<Col md={12}> | ||
<IndexSetsComponent /> | ||
</Col> | ||
</Row> | ||
</span> | ||
</DocumentTitle> | ||
); | ||
}; | ||
|
||
export default IndicesPage; |