-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
3650830
commit c129eb1
Showing
14 changed files
with
142 additions
and
17 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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
frontend/packages/manager/src/components/groups/AddGroupModal.jsx
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,48 @@ | ||
import React, { useState, useRef } from 'react'; | ||
import Button from '@splunk/react-ui/Button'; | ||
import ControlGroup from '@splunk/react-ui/ControlGroup'; | ||
import Modal from '@splunk/react-ui/Modal'; | ||
import P from '@splunk/react-ui/Paragraph'; | ||
import Select from '@splunk/react-ui/Select'; | ||
import Multiselect from '@splunk/react-ui/Multiselect'; | ||
import Text from '@splunk/react-ui/Text'; | ||
|
||
function AddGroupModal() { | ||
const modalToggle = useRef(null); | ||
|
||
const [open, setOpen] = useState(false); | ||
|
||
const handleRequestOpen = () => { | ||
setOpen(true); | ||
}; | ||
|
||
const handleRequestClose = () => { | ||
setOpen(false); | ||
modalToggle?.current?.focus(); // Must return focus to the invoking element when the modal closes | ||
}; | ||
|
||
const handleRequestSubmit = () => { | ||
setOpen(false); | ||
modalToggle?.current?.focus(); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<Button onClick={handleRequestOpen} ref={modalToggle} label="Click me" /> | ||
<Modal onRequestClose={handleRequestClose} open={open} style={{ width: '600px' }}> | ||
<Modal.Header title="Add a new group" onRequestClose={handleRequestClose} /> | ||
<Modal.Body> | ||
<ControlGroup label="Group Name"> | ||
<Text /> | ||
</ControlGroup> | ||
</Modal.Body> | ||
<Modal.Footer> | ||
<Button appearance="secondary" onClick={handleRequestClose} label="Cancel" /> | ||
<Button appearance="primary" onClick={handleRequestSubmit} label="Submit" /> | ||
</Modal.Footer> | ||
</Modal> | ||
</div> | ||
); | ||
} | ||
|
||
export default AddGroupModal; |
Empty file.
37 changes: 37 additions & 0 deletions
37
frontend/packages/manager/src/components/groups/GroupsList.jsx
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,37 @@ | ||
import React, { useState } from 'react'; | ||
import Accordion from '@splunk/react-ui/Accordion'; | ||
import P from '@splunk/react-ui/Paragraph'; | ||
import { lorem } from '@splunk/react-ui/fixtures/text'; | ||
|
||
const DUMMY_HOSTS = [{address: 0.0.0.0, port: 161, }]; | ||
|
||
function Controlled() { | ||
const [openPanelId, setOpenPanelId] = useState(2); | ||
|
||
const handleChange = (e, { panelId: panelValue }) => { | ||
setOpenPanelId(panelValue); | ||
}; | ||
|
||
return ( | ||
<Accordion openPanelId={openPanelId} onChange={handleChange}> | ||
<Accordion.Panel panelId={1} title="Panel 1"> | ||
<P> | ||
{lorem} | ||
{lorem} | ||
{lorem} | ||
</P> | ||
</Accordion.Panel> | ||
<Accordion.Panel panelId={2} title="Panel 2"> | ||
<P>{lorem}</P> | ||
</Accordion.Panel> | ||
<Accordion.Panel panelId={3} title="Panel 3"> | ||
<P> | ||
{lorem} | ||
{lorem} | ||
</P> | ||
</Accordion.Panel> | ||
</Accordion> | ||
); | ||
} | ||
|
||
export default Controlled; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import AddGroupModal from "../components/groups/AddGroupModal" | ||
|
||
function GroupsPage() { | ||
return ( | ||
<AddGroupModal /> | ||
); | ||
} | ||
|
||
export default GroupsPage; |
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,14 @@ | ||
import React from 'react'; | ||
import InventoryList from "../components/InventoryList" | ||
import InventoryModal from "../components/InventoryModal" | ||
|
||
function InventoryPage() { | ||
return ( | ||
<div> | ||
<InventoryModal /> | ||
<InventoryList /> | ||
</div> | ||
); | ||
} | ||
|
||
export default InventoryPage; |
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,14 @@ | ||
import React from 'react'; | ||
import ProfilePanel from "../components/profiles/ProfilePanel" | ||
import ProfilesModal from "../components/profiles/ProfilesModal" | ||
|
||
function ProfilesPage(){ | ||
return ( | ||
<div> | ||
<ProfilesModal /> | ||
<ProfilePanel /> | ||
</div> | ||
); | ||
} | ||
|
||
export default ProfilesPage; |