Skip to content

Commit

Permalink
Merge branch 'main' into 24.03
Browse files Browse the repository at this point in the history
  • Loading branch information
yomybaby committed Jun 3, 2024
2 parents f17d694 + a0b65f5 commit 71e5779
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions react/src/pages/ResourcePolicyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import FlexActivityIndicator from '../components/FlexActivityIndicator';
import KeypairResourcePolicyList from '../components/KeypairResourcePolicyList';
import ProjectResourcePolicyList from '../components/ProjectResourcePolicyList';
import UserResourcePolicyList from '../components/UserResourcePolicyList';
import { useWebUINavigate } from '../hooks';
import { useSuspendedBackendaiClient, useWebUINavigate } from '../hooks';
import { Card } from 'antd';
import React, { Suspense } from 'react';
import { useTranslation } from 'react-i18next';
Expand All @@ -13,8 +13,12 @@ const tabParam = withDefault(StringParam, 'keypair');
interface ResourcePolicyPageProps {}
const ResourcePolicyPage: React.FC<ResourcePolicyPageProps> = () => {
const { t } = useTranslation();
const webUINavigate = useWebUINavigate();
const [curTabKey] = useQueryParam('tab', tabParam);
const webUINavigate = useWebUINavigate();
const baiClient = useSuspendedBackendaiClient();
const supportConfigureUserResourcePolicy = baiClient?.supports(
'configure-user-resource-policy',
);

return (
<Card
Expand All @@ -37,7 +41,7 @@ const ResourcePolicyPage: React.FC<ResourcePolicyPageProps> = () => {
key: 'keypair',
label: t('resourcePolicy.Keypair'),
},
{
supportConfigureUserResourcePolicy && {
key: 'user',
label: t('resourcePolicy.User'),
},
Expand Down
2 changes: 2 additions & 0 deletions src/lib/backend.ai-client-esm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ class Client {
}
if (this.isManagerVersionCompatibleWith('23.09.10')) {
this._features['max-session-count-per-model-session'] = true;
// In versions 23.09.10 and earlier, it is not suitable to create and modify user resource policies.
this._features['configure-user-resource-policy'] = true;
}
if (this.isManagerVersionCompatibleWith('24.03.0')) {
this._features['vfolder-trash-bin'] = true;
Expand Down

0 comments on commit 71e5779

Please sign in to comment.