Skip to content

Commit 74e6e76

Browse files
Aleksy Lisowskipiotrczarnas
Aleksy Lisowski
authored andcommitted
Merged PR 2617: styling layout fixes (after sorting) on table list page
styling layout fixes (after sorting) on table list page
2 parents 21be303 + 01c98cc commit 74e6e76

File tree

5 files changed

+33
-21
lines changed

5 files changed

+33
-21
lines changed

dqops/src/main/frontend/src/components/Connection/ConnectionView/ConnectionTables.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ export default function ConnectionTables() {
1919
const [tables, setTables] = useState<TableListModel[]>([]);
2020
const [filters, setFilters] = useState<any>({
2121
page: 1,
22-
limit: 50,
23-
checkType: checkTypes
22+
pageSize: 50,
23+
checkType:
24+
checkTypes == CheckTypes.SOURCES ? CheckTypes.MONITORING : checkTypes
2425
});
25-
const [table, setTable] = useState('');
26-
const [schema, setSchema] = useState('');
26+
const [table, setTable] = useState<string>();
27+
const [schema, setSchema] = useState<string>();
2728
const [labels, setLabels] = useState<TLabel[]>([]);
2829

2930
const onChangeFilters = (obj: Partial<any>) => {
@@ -47,7 +48,8 @@ export default function ConnectionTables() {
4748
};
4849

4950
const getTables = async (labels: string[] = []) => {
50-
const addPrefix = (str: string) => {
51+
const addPrefix = (str?: string) => {
52+
if (!str) return undefined;
5153
return str.includes('*') || str.length === 0 ? str : '*' + str + '*';
5254
};
5355
return SearchApiClient.findTables(

dqops/src/main/frontend/src/components/TableList/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export default function index({
194194

195195
<table className="overflow-x-auto">
196196
<thead>
197-
<tr>
197+
<tr className="mb-2">
198198
{headerItems.map(
199199
(item) =>
200200
item?.label &&
@@ -214,7 +214,7 @@ export default function index({
214214
</tbody>
215215
</table>
216216
</div>
217-
<div className="px-4 mb-50 mt-2">
217+
<div className="px-4 mb-50">
218218
<Pagination
219219
page={filters.page || 1}
220220
pageSize={filters.pageSize || 50}

dqops/src/main/frontend/src/pages/Schema/SchemaTableItem.tsx

+14-10
Original file line numberDiff line numberDiff line change
@@ -111,32 +111,32 @@ export default function SchemaTableItem({
111111
};
112112

113113
return (
114-
<tr className="text-sm h-10">
114+
<tr className="text-sm">
115115
{(!checkTypes || !connection || !schema) && (
116116
<>
117117
{!connection && (
118-
<td>
118+
<td className="content-start pt-2">
119119
<div className="flex items-start">
120120
<Button
121-
className="px-4 underline cursor-pointer text-sm"
121+
className="px-4 underline cursor-pointer text-sm py-0"
122122
label={item.connection_name}
123123
onClick={() => goToConnection(item)}
124124
/>
125125
</div>
126126
</td>
127127
)}
128-
<td>
128+
<td className="content-start pt-2">
129129
<Button
130-
className="px-4 underline cursor-pointer text-sm"
130+
className="px-4 underline cursor-pointer text-sm py-0"
131131
label={item.schema}
132132
onClick={() => goToSchema(item)}
133133
/>
134134
</td>
135135
</>
136136
)}
137-
<td>
137+
<td className="content-start pt-2">
138138
<Button
139-
className="px-4 underline cursor-pointer text-sm"
139+
className="px-4 underline cursor-pointer text-sm py-0"
140140
label={item.target?.table_name}
141141
onClick={() => goToTable(item)}
142142
/>
@@ -151,12 +151,16 @@ export default function SchemaTableItem({
151151
/>
152152
) : null}
153153
</td>
154-
<td className="px-4 text-sm">{item?.stage}</td>
155-
<td className="px-4 text-sm">{getLabelsOverview(item?.labels ?? [])}</td>
154+
<td className="px-4 text-sm content-start pt-2">{item?.stage}</td>
155+
<td className="px-4 text-sm content-start pt-2">
156+
{getLabelsOverview(item?.labels ?? [])}
157+
</td>
156158
{item?.data_quality_status?.dimensions ? (
157159
<SchemaTableItemDimensions item={item} dimensionKeys={dimensionKeys} />
158160
) : (
159-
<SvgIcon name="hourglass" className="w-4 h-4" />
161+
<td className="content-start pt-2">
162+
<SvgIcon name="hourglass" className="w-4 h-4" />
163+
</td>
160164
)}
161165
</tr>
162166
);

dqops/src/main/frontend/src/pages/Schema/SchemaTableItemDimensions.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function SchemaTableItemDimensions({
4444
return (
4545
<>
4646
{' '}
47-
<td className="pl-4">
47+
<td className="pl-4 content-start pt-2">
4848
<div
4949
className={clsx(
5050
'w-13 h-6 text-center flex items-center justify-center',
@@ -78,7 +78,10 @@ export default function SchemaTableItemDimensions({
7878
}
7979
);
8080
return (
81-
<td key={`Dimensionindex${dimType}`} className="pl-4">
81+
<td
82+
key={`Dimensionindex${dimType}`}
83+
className="pl-4 content-start pt-2"
84+
>
8285
<Tooltip
8386
content={renderSecondLevelTooltip(
8487
(item.data_quality_status?.dimensions ?? {})?.[
@@ -106,7 +109,10 @@ export default function SchemaTableItemDimensions({
106109
).map((dimensionKey: string | undefined, dimIndex) => {
107110
if (dimensionKey) {
108111
return (
109-
<td key={`DimensionTooltipindex${dimIndex}`} className="pl-4">
112+
<td
113+
key={`DimensionTooltipindex${dimIndex}`}
114+
className="pl-4 content-start pt-2"
115+
>
110116
<Tooltip
111117
content={renderSecondLevelTooltip(
112118
(item.data_quality_status?.dimensions ?? {})?.[

dqops/src/main/frontend/src/pages/Schema/SchemaTables.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const SchemaTables = () => {
5656
filters.page,
5757
filters.pageSize,
5858
filter,
59-
checkTypes === CheckTypes.SOURCES ? CheckTypes.PROFILING : checkTypes
59+
checkTypes === CheckTypes.SOURCES ? CheckTypes.MONITORING : checkTypes
6060
).then((res) => {
6161
const arr: TTableWithSchema[] = [];
6262
res.data.forEach((item) => {

0 commit comments

Comments
 (0)