Skip to content

Commit

Permalink
fix typos and minor bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 committed Sep 11, 2023
1 parent 0d94a73 commit b860caa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const AccelerationHeader = () => {
<EuiSpacer size="s" />
<EuiText size="s" color="subdued">
Manage acceleration indices from external data connections.{' '}
<EuiLink external={true} href={OPENSEARCH_ACC_DOCUMENTATION_URL} target="blank">
<EuiLink external={true} href={OPENSEARCH_ACC_DOCUMENTATION_URL} target="_blank">
Learn more
</EuiLink>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const AccelerationIndices = ({ dataSource }: AccelerationIndicesProps) =>
<EuiPage>
<EuiPageBody component="div">
<AccelerationHeader />
<EuiPageContent data-test-subj="manageAccelerationIndices">
<EuiPageContent data-test-subj="manage-acceleration-indices">
<AccelerationManagement />
</EuiPageContent>
</EuiPageBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ import {
} from '@elastic/eui';
import _ from 'lodash';

interface AccelrationIndicesRecordType {
interface AccelerationIndicesRecordType {
indexName: string;
accelerationType: string;
}

export const ManagementTable = () => {
const [accelrationIndicesRecords, setAccelrationIndicesRecords] = useState<
AccelrationIndicesRecordType[]
const [accelerationIndicesRecords, setAccelerationIndicesRecords] = useState<
AccelerationIndicesRecordType[]
>([]);

useEffect(() => {
setAccelrationIndicesRecords([
setAccelerationIndicesRecords([
{
indexName: 'Sample-skipping-index',
accelerationType: 'Skipping Index',
Expand All @@ -40,13 +40,13 @@ export const ManagementTable = () => {
]);
}, []);

const tableColumns = [
const tableColumns: Array<EuiTableFieldDataColumnType<AccelerationIndicesRecordType>> = [
{
field: 'indexName',
name: 'Index Name',
sortable: true,
truncateText: true,
render: (value, record: AccelrationIndicesRecordType) => (
render: (value, record: AccelerationIndicesRecordType) => (
<EuiText>{_.truncate(record.indexName, { length: 100 })}</EuiText>
),
},
Expand All @@ -73,7 +73,7 @@ export const ManagementTable = () => {
/>
),
},
] as Array<EuiTableFieldDataColumnType<any>>;
];

const search = {
box: {
Expand All @@ -85,7 +85,7 @@ export const ManagementTable = () => {
field: 'accelerationType',
name: 'Type',
multiSelect: 'or',
options: accelrationIndicesRecords.map((AccelerationIndexRecord) => ({
options: accelerationIndicesRecords.map((AccelerationIndexRecord) => ({
value: AccelerationIndexRecord.accelerationType,
name: AccelerationIndexRecord.accelerationType,
view: AccelerationIndexRecord.accelerationType,
Expand All @@ -98,13 +98,13 @@ export const ManagementTable = () => {
<>
<EuiSpacer size="s" />
<EuiInMemoryTable
items={accelrationIndicesRecords}
items={accelerationIndicesRecords}
itemId="id"
columns={tableColumns}
tableLayout="auto"
pagination={{
initialPageSize: 10,
pageSizeOptions: [5, 10, 15],
initialPageSize: 20,
pageSizeOptions: [10, 20, 50],
}}
search={search}
allowNeutralSort={false}
Expand Down

0 comments on commit b860caa

Please sign in to comment.