fix: center NoResult empty state with minHeight on list pages
This commit is contained in:
@@ -183,6 +183,7 @@ const APIKeys: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -164,6 +164,7 @@ const CommunityBackends: React.FC<{
|
||||
renderItem={renderItem}
|
||||
></BackendCardList>
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -282,6 +282,7 @@ const BackendList = () => {
|
||||
onSelect={handleOnSelect}
|
||||
></BackendCardList>
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -177,6 +177,7 @@ const Benchmark: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={[]}
|
||||
|
||||
@@ -157,6 +157,7 @@ const Credentials: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={[]}
|
||||
|
||||
@@ -271,6 +271,7 @@ const GPUService: React.FC = () => {
|
||||
if (!clusterLoading && !hasK8sCluster) {
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading || clusterLoading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={[]}
|
||||
@@ -294,6 +295,7 @@ const GPUService: React.FC = () => {
|
||||
}
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -110,6 +110,7 @@ const GPUServicePublicKeys: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -104,6 +104,7 @@ const GPUServiceStorageTypes: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -109,6 +109,7 @@ const GPUServiceStorage: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -210,6 +210,7 @@ const GPUServiceTemplates: React.FC = () => {
|
||||
onSelect={handleOnSelect}
|
||||
/>
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -166,6 +166,7 @@ const Catalog: React.FC = () => {
|
||||
isFirst={!dataSource.loadend}
|
||||
></CatalogList>
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -95,6 +95,7 @@ const useNoResourceResult = (props: {
|
||||
|
||||
const noResourceResult = (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={loading}
|
||||
loadend={loadend}
|
||||
dataSource={dataSource}
|
||||
|
||||
@@ -109,6 +109,7 @@ const InstanceView = forwardRef((props, ref) => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -121,6 +121,7 @@ const MaasProvider: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -381,6 +381,7 @@ const ModelRoutes: React.FC = () => {
|
||||
expandable={true}
|
||||
empty={
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -72,6 +72,7 @@ const GPUList: React.FC<GPUListProps> = ({ clusterId, source }) => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -233,6 +233,7 @@ const ModelFiles = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
@@ -141,6 +141,7 @@ const Users: React.FC = () => {
|
||||
if (type !== 'Table') return;
|
||||
return (
|
||||
<NoResult
|
||||
minHeight="calc(100vh - 300px)"
|
||||
loading={dataSource.loading}
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
|
||||
Reference in New Issue
Block a user