Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(search): relocate button from dropdown to action column In input page #1148

Merged
merged 23 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
acff825
Fix: add search button in action input page.
rohanm-crest Apr 19, 2024
4c4225d
feat(search button): remove onclick and add to indicator
rohanm-crest Apr 23, 2024
08d64e1
chore(CI): resolve merge conflicts
rohanm-crest Apr 23, 2024
0377c4d
refactor: change inline css to styled component
rohanm-crest Apr 25, 2024
d74a9ab
feat(storybook): add search button in input page component.
rohanm-crest Apr 26, 2024
c0b4bc3
update screenshots
srv-rr-github-token Apr 26, 2024
6a12c54
chore(styling): update the styling for ActionButtonComponent
rohanm-crest Apr 30, 2024
769a7bb
Merge branch 'ADDON-68581-add-search' of github.com:splunk/addonfacto…
rohanm-crest Apr 30, 2024
4251ed2
update screenshots
srv-rr-github-token Apr 30, 2024
25be8c2
Merge branch 'develop' into ADDON-68581-add-search
vtsvetkov-splunk Apr 30, 2024
a7d5a4f
Merge branch 'develop' into ADDON-68581-add-search
rohanm-crest Apr 30, 2024
5340cde
Fix(UI Test): added mock server response for Input page
rohanm-crest May 1, 2024
9d18c5b
Merge branch 'develop' into ADDON-68581-add-search
rohanm-crest May 1, 2024
09465aa
Merge branch 'ADDON-68581-add-search' of github.com:splunk/addonfacto…
rohanm-crest May 1, 2024
e173e1b
update screenshots
srv-rr-github-token May 1, 2024
f6d9f79
feat: added target to the ActionButtonComponent to open it in a new tab.
rohanm-crest May 6, 2024
a8eaabb
Merge branch 'ADDON-68581-add-search' of github.com:splunk/addonfacto…
rohanm-crest May 6, 2024
6f2ccc7
update screenshots
srv-rr-github-token May 6, 2024
74dc453
Merge branch 'develop' into ADDON-68581-add-search
rohanm-crest May 7, 2024
942e15c
chore: resolve merge conflicts
rohanm-crest May 7, 2024
7340150
chore: resolve merge conflicts
rohanm-crest May 7, 2024
30393ab
update screenshots
srv-rr-github-token May 7, 2024
62dbb24
Merge branch 'develop' into ADDON-68581-add-search
soleksy-splunk May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/inputs/Introduction_Output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/inputs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ This is how the global configuration looks like without tabs:
"edit",
"enable",
"delete",
"search",
"clone"
],
"header": [],
Expand Down
2 changes: 1 addition & 1 deletion splunk_add_on_ucc_framework/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@
"type": "array",
"items": {
"type": "string",
"enum": ["edit", "delete", "clone", "enable"]
"enum": ["edit", "delete", "clone", "enable", "search"]
rohanm-crest marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,8 @@
"edit",
"enable",
"delete",
"clone"
"clone",
"search"
],
"header": [
{
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/CheckboxGroup/checkboxGroupMocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"actions": [
"edit",
"delete",
"search",
"clone"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"actions": [
"edit",
"delete",
"search",
"clone"
]
},
Expand Down
16 changes: 16 additions & 0 deletions ui/src/components/table/CustomTableRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Table from '@splunk/react-ui/Table';
import ButtonGroup from '@splunk/react-ui/ButtonGroup';
import Tooltip from '@splunk/react-ui/Tooltip';
import Pencil from '@splunk/react-icons/Pencil';
import Magnifier from '@splunk/react-icons/Magnifier';
import Clone from '@splunk/react-icons/enterprise/Clone';
import Trash from '@splunk/react-icons/enterprise/Trash';
import styled from 'styled-components';
Expand Down Expand Up @@ -73,6 +74,21 @@ function CustomTableRow(props) {
/>
</Tooltip>
)}
{rowActions.includes('search') && (
<Tooltip
content={_(
`Go to search for events associated with ${selectedRow.name}`
)}
>
<ActionButtonComponent
appearance="flat"
icon={<Magnifier screenReaderText={null} size={1} />}
to={`/app/search/search?q=search%20index%3D_internal%20source%3D*${selectedRow.name}*`}
className="searchBtn"
inline={false}
/>
</Tooltip>
)}
{rowActions.includes('delete') && (
<Tooltip content={_('Delete')}>
<ActionButtonComponent
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/table/CustomTableStyle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import WaitSpinner from '@splunk/react-ui/WaitSpinner';
export const ActionButtonComponent = styled(Button)`
margin: 0px 1px;
border: none;
display: flex;
`;

export const WaitSpinnerWrapper = styled(WaitSpinner)`
Expand Down
10 changes: 1 addition & 9 deletions ui/src/components/table/TableExpansionRow.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import DL from '@splunk/react-ui/DefinitionList';
import Table from '@splunk/react-ui/Table';
import Button from '@splunk/react-ui/Button';
import styled from 'styled-components';
import { _ } from '@splunk/ui-utils/i18n';

Expand Down Expand Up @@ -54,14 +53,7 @@ export function getExpansionRow(colSpan, row, moreInfo) {
})}
</>
) : (
<>
<DL termWidth={250}>{getExpansionRowData(row, moreInfo)}</DL>
<Button
to={`/app/search/search?q=search%20index%3D_internal%20source%3D*${row.name}*`}
openInNewContext
label={_(`Show ${row.name} input events`)}
/>
</>
<DL termWidth={250}>{getExpansionRowData(row, moreInfo)}</DL>
)}
</TableCellWrapper>
</Table.Row>
Expand Down
7 changes: 6 additions & 1 deletion ui/src/mocks/server-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export const mockServerResponse = {
create: `/servicesNS/nobody/${MOCKED_TA_NAME}/${MOCKED_TA_INPUT}/_new`,
},
updated: '2023-08-21T11:54:12+00:00',
entry: [],
entry: [
{
name: 'name',
soleksy-splunk marked this conversation as resolved.
Show resolved Hide resolved
content: {},
},
],
messages: [],
};

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ui/src/pages/Configuration/stories/globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"table": {
"actions": ["edit", "delete", "clone"],
"actions": ["edit", "delete","search", "clone"],
"header": [
{
"label": "Name",
Expand Down Expand Up @@ -687,7 +687,7 @@
"title": "Inputs",
"description": "Manage your data inputs",
"table": {
"actions": ["edit", "enable", "delete", "clone"],
"actions": ["edit", "enable", "delete","search", "clone"],
"header": [
{
"label": "Name",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/src/pages/Input/stories/globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
"description": "Manage your data inputs",
"table": {
"actions": [
"edit", "enable", "delete", "clone"
"edit", "enable", "delete","search", "clone"
],
"header": [
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/src/pages/stories/globalConfig/globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@
]
},
"table": {
"actions": ["edit", "enable", "delete", "clone"],
"actions": ["edit", "enable", "delete","search", "clone"],
"header": [
{
"label": "Name",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/types/globalConfig/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const TableSchema = z.object({
})
),
customRow: z.record(z.any()).optional(),
actions: z.array(z.enum(['edit', 'delete', 'clone', 'enable'])),
actions: z.array(z.enum(['edit', 'delete', 'clone', 'enable', 'search'])),
});

// TODO add "required": ["entity", "name", "title"] or required": ["customTab", "name", "title"]
Expand Down
Loading