Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d95d20135 |
@@ -9,15 +9,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes tableEmptyFadeIn {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.scroll-table {
|
.scroll-table {
|
||||||
.ant-table {
|
.ant-table {
|
||||||
.ant-table-container {
|
.ant-table-container {
|
||||||
@@ -27,27 +18,5 @@
|
|||||||
scrollbar-color: var(--color-scrollbar-thumb) transparent;
|
scrollbar-color: var(--color-scrollbar-thumb) transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reserve a stable block for the empty/loading state so the first-load
|
|
||||||
// spinner and the empty result occupy the same height as eventual data —
|
|
||||||
// this removes the layout jump when entering the page. Scoped to
|
|
||||||
// `.ant-table-content` so it only targets x-scroll tables (whose empty
|
|
||||||
// row lives here) and leaves fixed-height `scroll.y` tables untouched.
|
|
||||||
// Height must match the `minHeight` passed to <NoResult> in
|
|
||||||
// use-no-resource-result.
|
|
||||||
.ant-table-content {
|
|
||||||
.ant-table-placeholder {
|
|
||||||
> .ant-table-cell {
|
|
||||||
height: calc(100vh - 300px);
|
|
||||||
}
|
|
||||||
|
|
||||||
// NoResult renders nothing while loading and mounts an <Empty> only
|
|
||||||
// once the request settles, so this fires exactly when the empty
|
|
||||||
// state appears — a seamless fade-in instead of a hard pop.
|
|
||||||
.ant-empty {
|
|
||||||
animation: tableEmptyFadeIn 0.3s ease-in-out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -232,7 +232,6 @@ const APIKeys: React.FC = () => {
|
|||||||
></FilterBar>
|
></FilterBar>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
@@ -395,7 +395,6 @@ const Clusters: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<SealTable
|
<SealTable
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
emptyMinHeight="calc(100vh - 300px)"
|
|
||||||
loadChildren={getWorkerPoolList}
|
loadChildren={getWorkerPoolList}
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
expandedRowKeys={expandedRowKeys}
|
expandedRowKeys={expandedRowKeys}
|
||||||
|
|||||||
@@ -200,7 +200,6 @@ const Credentials: React.FC = () => {
|
|||||||
|
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
tableLayout="fixed"
|
tableLayout="fixed"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
|
|||||||
@@ -362,7 +362,6 @@ const GPUService: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ const GPUServicePublicKeys: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ const GPUServiceStorageTypes: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ const GPUServiceStorage: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
@@ -613,7 +613,6 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
></PageTools>
|
></PageTools>
|
||||||
<SealTable
|
<SealTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
emptyMinHeight="calc(100vh - 300px)"
|
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ const MaasProvider: React.FC = () => {
|
|||||||
></FilterBar>
|
></FilterBar>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
tableLayout="fixed"
|
tableLayout="fixed"
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
|
|||||||
@@ -364,7 +364,6 @@ const ModelRoutes: React.FC = () => {
|
|||||||
>
|
>
|
||||||
<SealTable
|
<SealTable
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
emptyMinHeight="calc(100vh - 300px)"
|
|
||||||
loadChildren={loadChildrenData}
|
loadChildren={loadChildrenData}
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
expandedRowKeys={expandedRowKeys}
|
expandedRowKeys={expandedRowKeys}
|
||||||
|
|||||||
@@ -123,14 +123,14 @@ const GPUList: React.FC<GPUListProps> = ({ clusterId, source }) => {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
showSorterTooltip={false}
|
showSorterTooltip={false}
|
||||||
scroll={{ x: 'max-content' }}
|
tableLayout={'auto'}
|
||||||
className={'scroll-table'}
|
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
loading={{
|
loading={{
|
||||||
spinning: dataSource.loading,
|
spinning: dataSource.loading,
|
||||||
size: 'middle'
|
size: 'middle'
|
||||||
}}
|
}}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
scroll={{ x: 900 }}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={{
|
pagination={{
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
|
|||||||
@@ -340,7 +340,6 @@ const ModelFiles = () => {
|
|||||||
></FilterBar>
|
></FilterBar>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
tableLayout="fixed"
|
tableLayout="fixed"
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ const Workers: React.FC<WorkersProps> = ({ clusterId, source }) => {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
sortDirections={TABLE_SORT_DIRECTIONS}
|
sortDirections={TABLE_SORT_DIRECTIONS}
|
||||||
showSorterTooltip={false}
|
showSorterTooltip={false}
|
||||||
scroll={{ x: 'max-content' }}
|
tableLayout={'auto'}
|
||||||
className={'scroll-table'}
|
className={'scroll-table'}
|
||||||
dataSource={dataSource.dataList}
|
dataSource={dataSource.dataList}
|
||||||
loading={{
|
loading={{
|
||||||
@@ -311,6 +311,7 @@ const Workers: React.FC<WorkersProps> = ({ clusterId, source }) => {
|
|||||||
size: 'middle'
|
size: 'middle'
|
||||||
}}
|
}}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
scroll={{ x: 900 }}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
rowSelection={source === 'clusterDetail' ? undefined : rowSelection}
|
rowSelection={source === 'clusterDetail' ? undefined : rowSelection}
|
||||||
pagination={{
|
pagination={{
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ const Users: React.FC = () => {
|
|||||||
></FilterBar>
|
></FilterBar>
|
||||||
<ConfigProvider renderEmpty={renderEmpty}>
|
<ConfigProvider renderEmpty={renderEmpty}>
|
||||||
<Table
|
<Table
|
||||||
className={'scroll-table'}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataList}
|
dataSource={dataList}
|
||||||
rowSelection={rowSelection}
|
rowSelection={rowSelection}
|
||||||
|
|||||||
Reference in New Issue
Block a user