-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add datanode list, and skip check to welcome step
- Loading branch information
Showing
4 changed files
with
106 additions
and
37 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
53 changes: 53 additions & 0 deletions
53
graylog2-web-interface/src/components/datanode/migrations/MigrationDatanodeList.tsx
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,53 @@ | ||
import * as React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import type { DataNodeResponse } from 'components/datanode/hooks/useDataNodes'; | ||
import { Icon, Spinner } from 'components/common'; | ||
import { Alert, Table } from 'components/bootstrap'; | ||
import { DocumentationLink } from 'components/support'; | ||
|
||
type Props = { | ||
dataNodes: DataNodeResponse, | ||
} | ||
const StyledIcon = styled(Icon)` | ||
margin-right: 0.5em; | ||
`; | ||
|
||
const MigrationDatanodeList = ({ dataNodes } : Props) => ( | ||
<div> | ||
{(!dataNodes || dataNodes?.elements.length === 0) ? ( | ||
<> | ||
<p><StyledIcon name="info-circle" />There are no data nodes found.</p> | ||
<Alert bsStyle="warning" title="No data nodes found"> | ||
Please start at least a datanode to continue the migration process. You can find more information on how to start a data nodes in our <DocumentationLink page="graylog-data-node" text="documentation" />. | ||
</Alert> | ||
<p><Spinner text="Looking for data nodes..." /></p> | ||
</> | ||
) : ( | ||
<> | ||
<h4>Datanodes found:</h4> | ||
<br /> | ||
<Table bordered condensed striped hover> | ||
<thead> | ||
<tr> | ||
<th>Hostname</th> | ||
<th>Transport address</th> | ||
<th>status</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{dataNodes.elements.map((datanode) => ( | ||
<tr> | ||
<td>{datanode.hostname}</td> | ||
<td>{datanode.transport_address}</td> | ||
<td>{datanode.status}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</Table> | ||
</> | ||
)} | ||
</div> | ||
); | ||
|
||
export default MigrationDatanodeList; |
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