From 254a1d15d86be98746415390fc357e2a2f1acf19 Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Tue, 18 May 2021 11:33:26 +0000 Subject: [PATCH] fix: add classNames and data-test attributes to elements for SmartX --- ui/src/main/webapp/components/DeleteModal.jsx | 2 +- ui/src/main/webapp/components/SingleInputComponent.jsx | 2 ++ ui/src/main/webapp/components/table/CustomTableRow.jsx | 9 ++++++--- ui/src/main/webapp/components/table/TableHeader.jsx | 8 ++++++-- .../webapp/pages/Configuration/ConfigurationPage.jsx | 4 ++-- ui/src/main/webapp/pages/Input/InputPageStyle.jsx | 4 ++-- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ui/src/main/webapp/components/DeleteModal.jsx b/ui/src/main/webapp/components/DeleteModal.jsx index a95f45c38..7d11c9c08 100644 --- a/ui/src/main/webapp/components/DeleteModal.jsx +++ b/ui/src/main/webapp/components/DeleteModal.jsx @@ -90,7 +90,7 @@ class DeleteModal extends Component { title={getFormattedMessage(101)} onRequestClose={this.handleRequestClose} /> - + {this.generateErrorMessage()}

{deleteMsg}

diff --git a/ui/src/main/webapp/components/SingleInputComponent.jsx b/ui/src/main/webapp/components/SingleInputComponent.jsx index a47808457..4222a17b4 100755 --- a/ui/src/main/webapp/components/SingleInputComponent.jsx +++ b/ui/src/main/webapp/components/SingleInputComponent.jsx @@ -123,6 +123,7 @@ function SingleInputComponent(props) { <> {createSearchChoice ? ( } onClick={() => handleEditActionClick(selectedRow)} + className="editBtn" /> @@ -65,6 +66,7 @@ function CustomTableRow(props) { appearance="flat" icon={} onClick={() => handleCloneActionClick(selectedRow)} + className="cloneBtn" /> @@ -72,6 +74,7 @@ function CustomTableRow(props) { appearance="destructive" icon={} onClick={() => handleDeleteActionClick(selectedRow)} + className="deleteBtn" /> @@ -106,13 +109,13 @@ function CustomTableRow(props) { if (header.customCell && header.customCell.src) { cellHTML = ( - + {getCustomCell(row, header)} ); } else if (header.field === 'disabled') { cellHTML = ( - + + {headerMapping[header.field] && Object.prototype.hasOwnProperty.call( headerMapping[header.field], diff --git a/ui/src/main/webapp/components/table/TableHeader.jsx b/ui/src/main/webapp/components/table/TableHeader.jsx index 026479d7d..41c3842a0 100755 --- a/ui/src/main/webapp/components/table/TableHeader.jsx +++ b/ui/src/main/webapp/components/table/TableHeader.jsx @@ -50,6 +50,7 @@ function TableHeader({ page, services, totalElement, handleRequestModalOpen }) { return ( { setCurrentPage(0); setPageSize(value); diff --git a/ui/src/main/webapp/pages/Configuration/ConfigurationPage.jsx b/ui/src/main/webapp/pages/Configuration/ConfigurationPage.jsx index a3e6fccdd..ebe0b8b73 100755 --- a/ui/src/main/webapp/pages/Configuration/ConfigurationPage.jsx +++ b/ui/src/main/webapp/pages/Configuration/ConfigurationPage.jsx @@ -94,7 +94,7 @@ function ConfigurationPage() { style={ tab.name !== activeTabId ? { display: 'none' } : { display: 'block' } } - id={`${tab.name}-tab`} + id={`${tab.name}Tab`} > diff --git a/ui/src/main/webapp/pages/Input/InputPageStyle.jsx b/ui/src/main/webapp/pages/Input/InputPageStyle.jsx index 472bcaf48..cdc7080fc 100644 --- a/ui/src/main/webapp/pages/Input/InputPageStyle.jsx +++ b/ui/src/main/webapp/pages/Input/InputPageStyle.jsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { variables } from '@splunk/themes'; export const TitleComponent = styled.div.attrs({ - className: "page-title" + className: 'pageTitle', })` &.page-title { font-size: ${variables.fontSizeXXLarge}; @@ -11,7 +11,7 @@ export const TitleComponent = styled.div.attrs({ `; export const SubTitleComponent = styled.div.attrs({ - className: "page-subtitle" + className: 'pageSubtitle', })` &.page-subtitle { font-size: ${variables.fontSize};