-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
145 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* | ||
* Copyright (c) [2022] SUSE LLC | ||
* | ||
* All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of version 2 of the GNU General Public License as published | ||
* by the Free Software Foundation. | ||
* | ||
* 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 GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, contact SUSE LLC. | ||
* | ||
* To contact SUSE LLC about this file by physical or electronic mail, you may | ||
* find current contact information at www.suse.com. | ||
*/ | ||
|
||
import React, { useState } from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
import { | ||
Button, | ||
Toolbar, ToolbarItem, ToolbarContent, | ||
Label | ||
} from "@patternfly/react-core"; | ||
import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; | ||
|
||
import { Title as PageTitle, MainActions } from "~/components/layout"; | ||
import { Section, Popup } from "~/components/core"; | ||
|
||
export default function IscsiPage() { | ||
const navigate = useNavigate(); | ||
const [discovering, setDiscovering] = useState(false); | ||
|
||
const Content = () => { | ||
return ( | ||
<> | ||
<Section | ||
title="Initiator" | ||
iconName="settings" | ||
> | ||
<div className="split"> | ||
<Label isCompact>a-name-given-by-YaST-or-iBFT</Label> <Button variant="plain" isInline>Link to change or to iBFT table</Button> | ||
</div> | ||
</Section> | ||
|
||
<Section | ||
title="Targets" | ||
iconName="lan" | ||
> | ||
<Toolbar> | ||
<ToolbarContent> | ||
<ToolbarItem> | ||
<Button onClick={() => setDiscovering(true)}>Discover</Button> | ||
</ToolbarItem> | ||
</ToolbarContent> | ||
</Toolbar> | ||
<TableComposable | ||
gridBreakPoint="" | ||
variant="compact" | ||
borders={false} | ||
> | ||
<Thead> | ||
<Tr> | ||
<Th>Name</Th> | ||
<Th>Portal</Th> | ||
<Th>Interface</Th> | ||
<Th>iBFT</Th> | ||
<Th>Status</Th> | ||
<Th /> | ||
</Tr> | ||
</Thead> | ||
<Tbody> | ||
<Tr> | ||
<Td>iqn.2022-12.com.example:3c2a23b093852f4fee0d</Td> | ||
<Td>192.168.122.41:3260</Td> | ||
<Td>default</Td> | ||
<Td>false</Td> | ||
<Td>Connected on boot</Td> | ||
<Td> | ||
<Button variant="plain" isInline>Log out</Button> | <Button variant="plain" isInline>Change Start-up</Button> | ||
</Td> | ||
</Tr> | ||
<Tr> | ||
<Td>iqn.2022-12.com.example:3c2a23b093852f4fee0d</Td> | ||
<Td>192.168.122.41:3260</Td> | ||
<Td>default</Td> | ||
<Td>false</Td> | ||
<Td>Not connected</Td> | ||
<Td> | ||
<Button variant="plain" isInline>Log in</Button> | <Button variant="plain" isInline>Delete</Button> | ||
</Td> | ||
</Tr> | ||
</Tbody> | ||
</TableComposable> | ||
</Section> | ||
|
||
<Popup isOpen={discovering}> | ||
Cosas del discovering | ||
|
||
<Popup.Actions> | ||
<Popup.Confirm /> | ||
<Popup.Cancel onClick={() => setDiscovering(false)} /> | ||
</Popup.Actions> | ||
</Popup> | ||
</> | ||
); | ||
}; | ||
|
||
return ( | ||
<> | ||
<PageTitle>Storage iSCSI</PageTitle> | ||
<MainActions> | ||
<Button isLarge variant="primary" form="storage-config" onClick={() => navigate("/")}> | ||
Accept | ||
</Button> | ||
</MainActions> | ||
|
||
<Content /> | ||
</> | ||
); | ||
} |
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