Skip to content

Commit 70eeb5f

Browse files
authored
FE/BE: Added schemas version field sorting (#1343)
1 parent 1ac238e commit 70eeb5f

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

api/src/main/java/io/kafbat/ui/controller/SchemasController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ private Comparator<SubjectWithCompatibilityLevel> getComparatorForSchema(
294294
case ID -> Comparator.comparing(SubjectWithCompatibilityLevel::getId);
295295
case TYPE -> Comparator.comparing(SubjectWithCompatibilityLevel::getSchemaType);
296296
case COMPATIBILITY -> Comparator.comparing(SubjectWithCompatibilityLevel::getCompatibility);
297+
case VERSION -> Comparator.nullsLast(Comparator.comparing(SubjectWithCompatibilityLevel::getVersion));
297298
default -> defaultComparator;
298299
};
299300
}

contract-typespec/api/schemas.tsp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,5 @@ enum SchemaColumnsToSort {
181181
ID,
182182
TYPE,
183183
COMPATIBILITY,
184+
VERSION
184185
}

contract/src/main/resources/swagger/kafbat-ui-api.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,6 +2701,7 @@ components:
27012701
- ID
27022702
- TYPE
27032703
- COMPATIBILITY
2704+
- VERSION
27042705

27052706
ConnectorColumnsToSort:
27062707
type: string

frontend/src/components/Schemas/List/List.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,7 @@ const List: React.FC = () => {
6363
},
6464
{ header: 'Id', accessorKey: 'id', size: 120 },
6565
{ header: 'Type', accessorKey: 'schemaType', size: 120 },
66-
{
67-
header: 'Version',
68-
accessorKey: 'version',
69-
size: 120,
70-
enableSorting: false,
71-
},
66+
{ header: 'Version', accessorKey: 'version', size: 120 },
7267
{
7368
header: 'Compatibility',
7469
accessorKey: 'compatibilityLevel',

0 commit comments

Comments
 (0)