chore: Round Robin scheduler message
@@ -11,16 +11,16 @@ import { V1SchedulerTypeToLabel } from 'constants/states';
import { useStore } from 'contexts/Store';
import { paths } from 'routes/utils';
import { getJobQStats } from 'services/api';
-import { V1GetJobQueueStatsResponse, V1RPQueueStat } from 'services/api-ts-sdk';
+import { V1GetJobQueueStatsResponse, V1RPQueueStat, V1SchedulerType } from 'services/api-ts-sdk';
import Icon from 'shared/components/Icon/Icon';
+import Message, { MessageType } from 'shared/components/Message';
import usePolling from 'shared/hooks/usePolling';
import { clone } from 'shared/utils/data';
import { ErrorLevel, ErrorType } from 'shared/utils/error';
import { camelCaseToSentence } from 'shared/utils/string';
import { floatToPercent } from 'shared/utils/string';
import { ShirtSize } from 'themes';
-import { ResourceState } from 'types';
-import { JobState } from 'types';
+import { JobState, ResourceState } from 'types';
import { getSlotContainerStates } from 'utils/cluster';
import handleError from 'utils/error';
@@ -135,6 +135,7 @@ const ResourcepoolDetail: React.FC = () => {
}, [pool]);
if (!pool) return <div />;
+
return (
<Page className={css.poolDetailPage}>
<Section>
@@ -158,6 +159,16 @@ const ResourcepoolDetail: React.FC = () => {
/>
</Section>
<Section>
+ {pool.schedulerType === V1SchedulerType.ROUNDROBIN ? (
+ <Page className={css.poolDetailPage}>
+ <Section>
+ <Message
+ title="Resource Pool is unavailable for Round Robin schedulers."
+ type={MessageType.Empty}
+ />
+ </Section>
+ </Page>
+ ) : (
<Tabs
activeKey={tabKey}
className="no-padding"
@@ -176,6 +187,7 @@ const ResourcepoolDetail: React.FC = () => {
{renderPoolConfig()}
</TabPane>
</Tabs>
+ )}
</Section>
</Page>
);
