Skip to content

Commit

Permalink
Merge branch 'main' into EVEREST-107-fix-tiltfile
Browse files Browse the repository at this point in the history
  • Loading branch information
percona-robot authored Feb 26, 2025
2 parents 7b12c5f + c7165d7 commit 6f458e4
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 19 deletions.
40 changes: 21 additions & 19 deletions ui/apps/everest/src/hooks/api/db-clusters/useDbClusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,27 @@ export const DB_CLUSTERS_QUERY_KEY = 'dbClusters';
export const dbClustersQuerySelect = ({
items,
}: GetDbClusterPayload): DbCluster[] =>
items.map(({ ...props }) => ({
...props,
spec: {
...props.spec,
...(props.spec?.backup?.schedules && {
backup: {
...props.spec.backup,
schedules: props.spec.backup.schedules.map((schedule) => ({
...schedule,
schedule: cronConverter(
schedule.schedule,
'UTC',
Intl.DateTimeFormat().resolvedOptions().timeZone
),
})),
},
}),
},
}));
items
.map(({ ...props }) => ({
...props,
spec: {
...props.spec,
...(props.spec?.backup?.schedules && {
backup: {
...props.spec.backup,
schedules: props.spec.backup.schedules.map((schedule) => ({
...schedule,
schedule: cronConverter(
schedule.schedule,
'UTC',
Intl.DateTimeFormat().resolvedOptions().timeZone
),
})),
},
}),
},
}))
.sort((a, b) => a.metadata.name.localeCompare(b.metadata.name));

export const useDbClusters = (
namespace: string,
Expand Down
1 change: 1 addition & 0 deletions ui/apps/everest/src/hooks/api/namespaces/useNamespaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const useNamespaces = (
useQuery<GetNamespacesPayload, unknown, string[]>({
queryKey: [NAMESPACES_QUERY_KEY],
queryFn: getNamespacesFn,
select: (namespaces) => namespaces.sort((a, b) => a.localeCompare(b)),
...options,
});

Expand Down
1 change: 1 addition & 0 deletions ui/apps/everest/src/pages/databases/DbClusterView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const DbClusterView = () => {
<Stack direction="column" alignItems="center">
<Box sx={{ width: '100%' }}>
<Table
getRowId={(row) => row.databaseName}
tableName="dbClusterView"
emptyState={
namespaces.length > 0 ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export const BackupsList = () => {
</Typography>
)}
<Table
getRowId={(row) => row.name}
tableName="backupList"
noDataMessage={Messages.noData}
data={backups}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const BackupsDetails = ({
loading={loading}
>
<Table
getRowId={(row) => row.name}
muiTopToolbarProps={{ sx: { display: 'none' } }}
muiTableHeadCellProps={{ sx: { display: 'none' } }}
initialState={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const Components = () => {

return (
<Table
getRowId={(row) => row.name}
initialState={{
sorting: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const ExpandedRow = ({ row }: { row: MRT_Row<DBClusterComponent> }) => {
}}
>
<Table
getRowId={(row) => row.name}
state={{ isLoading: false }}
tableName={`${name}-containers`}
columns={columns}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const Restores = () => {
<Alert severity="error">{DbDetailsMessages.pitrError}</Alert>
)}
<Table
getRowId={(row) => row.name}
state={{ isLoading: loadingRestores }}
tableName={`${dbClusterName}-restore`}
columns={columns}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export const MonitoringEndpoints = () => {
return (
<>
<Table
getRowId={(row) => row.name}
tableName="monitoringEndpoints"
hideExpandAllIcon
data={tableData}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ const ClusterStatusTable = ({
return (
<>
<Table
getRowId={(row) => row.name}
tableName={`${namespace}-upgrade-pending-actions`}
noDataMessage="No pending actions"
columns={columns}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const Namespaces = () => {
return (
<>
<Table
getRowId={(row) => row.name}
tableName="namespaces"
noDataMessage={Messages.noDataMessage}
emptyState={<EmptyStateNamespaces />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const StorageLocations = () => {
return (
<>
<Table
getRowId={(row) => row.name}
tableName="storageLocations"
noDataMessage={Messages.noData}
hideExpandAllIcon
Expand Down

0 comments on commit 6f458e4

Please sign in to comment.