Skip to content

Commit e63af79

Browse files
committed
feat(FR-1405): version control of deployment features
1 parent 07bcc5a commit e63af79

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

react/src/components/MainLayout/WebUISider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ const WebUISider: React.FC<WebUISiderProps> = (props) => {
179179
key: 'job',
180180
group: 'workload',
181181
},
182-
{
182+
!baiClient.supports('deployment') && {
183183
label: <WebUILink to="/serving">{t('webui.menu.Serving')}</WebUILink>,
184184
icon: <BAIEndpointsIcon style={{ color: token.colorPrimary }} />,
185185
key: 'serving',
186186
group: 'service',
187187
},
188-
{
188+
baiClient.supports('deployment') && {
189189
label: (
190190
<WebUILink to="/deployment">{t('webui.menu.Deployment')}</WebUILink>
191191
),

react/src/pages/DeploymentDetailPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const DeploymentDetailPage: React.FC = () => {
8989
const { deployment } = useLazyLoadQuery<DeploymentDetailPageQuery>(
9090
graphql`
9191
query DeploymentDetailPageQuery($deploymentId: ID!) {
92-
deployment(id: $deploymentId) {
92+
deployment(id: $deploymentId) @since(version: "25.13.0") {
9393
id @required(action: THROW)
9494
metadata {
9595
name

react/src/pages/DeploymentListPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const DeploymentListPage: React.FC = () => {
5353
const deployments = useLazyLoadQuery<DeploymentListPageQuery>(
5454
graphql`
5555
query DeploymentListPageQuery($filter: DeploymentFilter, $first: Int) {
56-
deployments(filter: $filter, first: $first) {
56+
deployments(filter: $filter, first: $first) @since(version: "25.13.0") {
5757
edges {
5858
node {
5959
id

src/lib/backend.ai-client-esm.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,9 @@ class Client {
804804
if (this.isManagerVersionCompatibleWith('25.12.0')) {
805805
this._features['mount-by-id'] = true;
806806
}
807+
if (this.isManagerVersionCompatibleWith('25.13.0')) {
808+
this._features['deployment'] = true;
809+
}
807810
}
808811

809812
/**

0 commit comments

Comments
 (0)