Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react/src/components/Chat/EndpointSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const EndpointSelect: React.FC<EndpointSelectProps> = ({
}
/>
{showInfoButton ? (
<Tooltip title={t('general.NavigateToDetailPage')}>
<Tooltip title={t('deployment.GoToDetailPage')}>
<Button
icon={<InfoIcon />}
disabled={!controllableValue}
Expand Down
33 changes: 33 additions & 0 deletions react/src/components/DeploymentConfigurationSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
import { DeploymentConfigurationSectionQuery } from '../__generated__/DeploymentConfigurationSectionQuery.graphql';
import type { DeploymentRevisionDetail_revision$key } from '../__generated__/DeploymentRevisionDetail_revision.graphql';
import { useSuspendedBackendaiClient, useWebUINavigate } from '../hooks';
import DeploymentAddRevisionModal from './DeploymentAddRevisionModal';
import DeploymentRevisionDetail from './DeploymentRevisionDetail';
import DeploymentRevisionDetailDrawer from './DeploymentRevisionDetailDrawer';
Expand Down Expand Up @@ -35,9 +36,11 @@ import {
BAIUnmountAfterClose,
INITIAL_FETCH_KEY,
filterOutEmpty,
toLocalId,
useFetchKey,
useInterval,
} from 'backend.ai-ui';
import { BotMessageSquareIcon } from 'lucide-react';
import { parseAsStringLiteral, useQueryState } from 'nuqs';
import React, { Suspense, useState, useTransition } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -261,6 +264,9 @@ const DeploymentConfigurationCards: React.FC<{
'use memo';
const { t } = useTranslation();
const { token } = theme.useToken();
const webuiNavigate = useWebUINavigate();
const baiClient = useSuspendedBackendaiClient();
const isChatBlocked = !!baiClient?._config?.blockList?.includes('chat');

const [activeRevisionTab, setActiveRevisionTab] = useQueryState(
'revisionTab',
Expand Down Expand Up @@ -291,6 +297,7 @@ const DeploymentConfigurationCards: React.FC<{
name
projectId
domainName
status
projectV2 @since(version: "26.4.3") {
basicInfo {
name
Expand Down Expand Up @@ -332,6 +339,7 @@ const DeploymentConfigurationCards: React.FC<{
const deployingRevision = deployment?.deployingRevision;
const isDeployingDifferentRevision =
!!deployingRevision && deployingRevision.id !== currentRevision?.id;
const isDeploymentReady = deployment?.metadata.status === 'READY';

// While a different revision is being applied, poll so the UI moves off
// the "applying" state once the deployment finishes rolling out. We don't
Expand All @@ -341,6 +349,31 @@ const DeploymentConfigurationCards: React.FC<{

return (
<>
{isDeploymentReady && !hasNoRevision && (
<Alert
type="success"
showIcon
title={t('deployment.DeploymentReady')}
action={
Comment thread
yomybaby marked this conversation as resolved.
!isChatBlocked && (
<Button
type="primary"
icon={<BotMessageSquareIcon size={token.fontSizeLG} />}
onClick={() => {
webuiNavigate({
pathname: '/chat',
search: new URLSearchParams({
endpointId: toLocalId(deploymentId),
}).toString(),
});
}}
>
{t('deployment.StartChatTest')}
</Button>
)
}
/>
Comment thread
yomybaby marked this conversation as resolved.
)}
{hasNoRevision && (
<Alert
type="info"
Expand Down
8 changes: 4 additions & 4 deletions react/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export const mainLayoutChildRoutes: RouteObject[] = [
// FR-2664 — New Deployment UI routes. Replaces the legacy /serving
// routes (see fallback redirects below).
path: '/deployments',
handle: { labelKey: 'webui.menu.Serving' },
handle: { labelKey: 'webui.menu.Deployments' },
children: [
{
path: '',
Expand All @@ -287,7 +287,7 @@ export const mainLayoutChildRoutes: RouteObject[] = [
useSuspendedBackendaiClient();
return (
<Suspense
fallback={<BAICard title={t('webui.menu.Serving')} loading />}
fallback={<BAICard title={t('webui.menu.Deployments')} loading />}
>
<DeploymentListPage />
</Suspense>
Expand All @@ -296,7 +296,7 @@ export const mainLayoutChildRoutes: RouteObject[] = [
},
{
path: ':deploymentId',
handle: { labelKey: 'modelService.RoutingInfo' },
handle: { labelKey: 'webui.menu.DeploymentDetail' },
element: (
<Suspense fallback={<Skeleton active />}>
<DeploymentDetailPage />
Expand All @@ -309,7 +309,7 @@ export const mainLayoutChildRoutes: RouteObject[] = [
// FR-2664 — Legacy /serving fallback. Transient redirect; remove once
// all internal links + external references have been migrated.
path: '/serving',
handle: { labelKey: 'webui.menu.Serving' },
handle: { labelKey: 'webui.menu.Deployments' },
children: [
{
path: '',
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Bereitstellungsdetail",
"DeploymentId": "Bereitstellungs-ID",
"DeploymentName": "Bereitstellungsname",
"DeploymentReady": "Bereitstellung ist bereit",
"DeploymentUpdated": "Bereitstellung wurde aktualisiert.",
"Deployments": "Bereitstellungen",
"DesiredReplicas": "Gewünschte Replikate",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Bereitstellung konnte nicht gelöscht werden.",
"FailedToRollback": "Rollback zur ausgewählten Revision ist fehlgeschlagen.",
"FailedToUpdateDeployment": "Bereitstellung konnte nicht aktualisiert werden.",
"GoToDetailPage": "Bereitstellungsdetails anzeigen",
"HealthStatus": "Gesundheitsstatus",
"HealthySummary": "{{healthy}} / {{total}} Gesund",
"Image": "Image",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "Läuft",
"RuntimeVariant": "Laufzeit",
"SessionId": "Sitzungs-ID",
"StartChatTest": "Im Chat testen",
"Tags": "Tags",
"TagsPlaceholder": "Tags eingeben, durch Kommas getrennt",
"TrafficRatio": "Datenverkehrsanteil",
Expand Down Expand Up @@ -3375,6 +3378,7 @@
"Data": "Daten",
"Data&Model": "Daten",
"Data&Storage": "Datenspeicher",
"DeploymentDetail": "Details",
"Deployments": "Bereitstellungen",
"Diagnostics": "Diagnose",
"DisMatchUserEmail": "Die E-Mail-Adresse des Benutzers stimmt nicht überein",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Λεπτομέρειες ανάπτυξης",
"DeploymentId": "ID ανάπτυξης",
"DeploymentName": "Όνομα ανάπτυξης",
"DeploymentReady": "Η ανάπτυξη είναι έτοιμη",
"DeploymentUpdated": "Η ανάπτυξη ενημερώθηκε.",
"Deployments": "Αναπτύξεις",
"DesiredReplicas": "Επιθυμητά αντίγραφα",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Αποτυχία διαγραφής ανάπτυξης.",
"FailedToRollback": "Αποτυχία επαναφοράς στην επιλεγμένη Revision.",
"FailedToUpdateDeployment": "Αποτυχία ενημέρωσης ανάπτυξης.",
"GoToDetailPage": "Προβολή λεπτομερειών ανάπτυξης",
"HealthStatus": "Κατάσταση υγείας",
"HealthySummary": "{{healthy}} / {{total}} Υγιή",
"Image": "Image",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "Σε εκτέλεση",
"RuntimeVariant": "Χρόνος εκτέλεσης",
"SessionId": "ID συνεδρίας",
"StartChatTest": "Δοκιμή στη συνομιλία",
"Tags": "Ετικέτες",
"TagsPlaceholder": "Εισαγάγετε ετικέτες, χωρισμένες με κόμματα",
"TrafficRatio": "Αναλογία κίνησης",
Expand Down Expand Up @@ -3373,6 +3376,7 @@
"Data": "Δεδομένα",
"Data&Model": "Δεδομένα",
"Data&Storage": "Αποθήκευση δεδομένων",
"DeploymentDetail": "Λεπτομέρεια",
"Deployments": "Αναπτύξεις",
"Diagnostics": "Διαγνωστικά",
"DisMatchUserEmail": "Το email χρήστη δεν ταιριάζει",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,7 @@
"DeploymentDetail": "Deployment Detail",
"DeploymentId": "Deployment ID",
"DeploymentName": "Deployment Name",
"DeploymentReady": "Deployment is ready",
"DeploymentUpdated": "Deployment has been updated.",
"Deployments": "Deployments",
"DesiredReplicas": "Desired Replicas",
Expand All @@ -940,6 +941,7 @@
"FailedToDeleteDeployment": "Failed to delete deployment.",
"FailedToRollback": "Failed to rollback to the selected revision.",
"FailedToUpdateDeployment": "Failed to update deployment.",
"GoToDetailPage": "View Deployment Details",
"HealthStatus": "Health Status",
"HealthySummary": "{{healthy}} / {{total}} Healthy",
"Image": "Image",
Expand Down Expand Up @@ -987,6 +989,7 @@
"Running": "Running",
"RuntimeVariant": "Runtime",
"SessionId": "Session ID",
"StartChatTest": "Test in Chat",
"Tags": "Tags",
"TagsPlaceholder": "Enter tags, separated by commas",
"TrafficRatio": "Traffic Ratio",
Expand Down Expand Up @@ -3384,6 +3387,7 @@
"Data": "Data",
"Data&Model": "Data & Model",
"Data&Storage": "Data & Storage",
"DeploymentDetail": "Detail",
"Deployments": "Deployments",
"Diagnostics": "Diagnostics",
"DisMatchUserEmail": "User email does not match",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Detalle del despliegue",
"DeploymentId": "ID de despliegue",
"DeploymentName": "Nombre del despliegue",
"DeploymentReady": "El despliegue está listo",
"DeploymentUpdated": "El despliegue ha sido actualizado.",
"Deployments": "Despliegues",
"DesiredReplicas": "Réplicas deseadas",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Error al eliminar el despliegue.",
"FailedToRollback": "Error al revertir a la Revision seleccionada.",
"FailedToUpdateDeployment": "Error al actualizar el despliegue.",
"GoToDetailPage": "Ver detalles del despliegue",
"HealthStatus": "Estado de salud",
"HealthySummary": "{{healthy}} / {{total}} Saludables",
"Image": "Imagen",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "En ejecución",
"RuntimeVariant": "Tiempo de ejecución",
"SessionId": "ID de sesión",
"StartChatTest": "Probar en el chat",
"Tags": "Etiquetas",
"TagsPlaceholder": "Ingrese etiquetas, separadas por comas",
"TrafficRatio": "Proporción de tráfico",
Expand Down Expand Up @@ -3373,6 +3376,7 @@
"Data": "Datos",
"Data&Model": "Datos",
"Data&Storage": "Datos y almacenamiento",
"DeploymentDetail": "Detalle",
"Deployments": "Despliegues",
"Diagnostics": "Diagnósticos",
"DisMatchUserEmail": "El correo electrónico del usuario no coincide",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Käyttöönoton tiedot",
"DeploymentId": "Käyttöönoton ID",
"DeploymentName": "Käyttöönoton nimi",
"DeploymentReady": "Käyttöönotto on valmis",
"DeploymentUpdated": "Käyttöönotto on päivitetty.",
"Deployments": "Käyttöönotot",
"DesiredReplicas": "Halutut replikat",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Käyttöönoton poistaminen epäonnistui.",
"FailedToRollback": "Palautus valittuun Revision epäonnistui.",
"FailedToUpdateDeployment": "Käyttöönoton päivittäminen epäonnistui.",
"GoToDetailPage": "Näytä käyttöönoton tiedot",
"HealthStatus": "Terveystila",
"HealthySummary": "{{healthy}} / {{total}} terveenä",
"Image": "Image",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "Käynnissä",
"RuntimeVariant": "Suoritusaika",
"SessionId": "Istunnon ID",
"StartChatTest": "Testaa chatissa",
"Tags": "Tunnisteet",
"TagsPlaceholder": "Syötä tunnisteet, pilkuilla erotettuna",
"TrafficRatio": "Liikennesuhde",
Expand Down Expand Up @@ -3373,6 +3376,7 @@
"Data": "Tiedot",
"Data&Model": "Data",
"Data&Storage": "Data & varastointi",
"DeploymentDetail": "Tiedot",
"Deployments": "Käyttöönotot",
"Diagnostics": "Diagnostiikka",
"DisMatchUserEmail": "Käyttäjän sähköpostiosoite ei täsmää",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Détail du déploiement",
"DeploymentId": "ID de déploiement",
"DeploymentName": "Nom du déploiement",
"DeploymentReady": "Le déploiement est prêt",
"DeploymentUpdated": "Le déploiement a été mis à jour.",
"Deployments": "Déploiements",
"DesiredReplicas": "Répliques souhaitées",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Échec de la suppression du déploiement.",
"FailedToRollback": "Échec du retour à la Revision sélectionnée.",
"FailedToUpdateDeployment": "Échec de la mise à jour du déploiement.",
"GoToDetailPage": "Voir les détails du déploiement",
"HealthStatus": "État de santé",
"HealthySummary": "{{healthy}} / {{total}} en bonne santé",
"Image": "Image",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "En cours d'exécution",
"RuntimeVariant": "Runtime",
"SessionId": "ID de session",
"StartChatTest": "Tester dans le chat",
"Tags": "Étiquettes",
"TagsPlaceholder": "Saisir des étiquettes, séparées par des virgules",
"TrafficRatio": "Rapport de trafic",
Expand Down Expand Up @@ -3376,6 +3379,7 @@
"Data": "Données",
"Data&Model": "Données",
"Data&Storage": "Stockage de données",
"DeploymentDetail": "Détail",
"Deployments": "Déploiements",
"Diagnostics": "Diagnostics",
"DisMatchUserEmail": "L'e-mail de l'utilisateur ne correspond pas",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Detail Penerapan",
"DeploymentId": "ID Penerapan",
"DeploymentName": "Nama Penerapan",
"DeploymentReady": "Penerapan siap digunakan",
"DeploymentUpdated": "Penerapan telah diperbarui.",
"Deployments": "Penerapan",
"DesiredReplicas": "Replika yang Diinginkan",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Gagal menghapus penerapan.",
"FailedToRollback": "Gagal kembali ke Revision yang dipilih.",
"FailedToUpdateDeployment": "Gagal memperbarui penerapan.",
"GoToDetailPage": "Lihat detail penyebaran",
"HealthStatus": "Status Kesehatan",
"HealthySummary": "{{healthy}} / {{total}} Sehat",
"Image": "Image",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "Berjalan",
"RuntimeVariant": "Runtime",
"SessionId": "ID Sesi",
"StartChatTest": "Uji di Obrolan",
"Tags": "Tag",
"TagsPlaceholder": "Masukkan tag, dipisahkan dengan koma",
"TrafficRatio": "Rasio Lalu Lintas",
Expand Down Expand Up @@ -3377,6 +3380,7 @@
"Data": "Data",
"Data&Model": "Data",
"Data&Storage": "Data & Penyimpanan",
"DeploymentDetail": "Rincian",
"Deployments": "Penerapan",
"Diagnostics": "Diagnostik",
"DisMatchUserEmail": "Email Pengguna tidak cocok",
Expand Down
4 changes: 4 additions & 0 deletions resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"DeploymentDetail": "Dettaglio distribuzione",
"DeploymentId": "ID distribuzione",
"DeploymentName": "Nome distribuzione",
"DeploymentReady": "La distribuzione è pronta",
"DeploymentUpdated": "La distribuzione è stata aggiornata.",
"Deployments": "Distribuzioni",
"DesiredReplicas": "Repliche desiderate",
Expand All @@ -938,6 +939,7 @@
"FailedToDeleteDeployment": "Eliminazione della distribuzione non riuscita.",
"FailedToRollback": "Ripristino alla Revision selezionata non riuscito.",
"FailedToUpdateDeployment": "Aggiornamento della distribuzione non riuscito.",
"GoToDetailPage": "Visualizza i dettagli della distribuzione",
"HealthStatus": "Stato di salute",
"HealthySummary": "{{healthy}} / {{total}} in buona salute",
"Image": "Image",
Expand Down Expand Up @@ -985,6 +987,7 @@
"Running": "In esecuzione",
"RuntimeVariant": "Runtime",
"SessionId": "ID sessione",
"StartChatTest": "Prova in chat",
"Tags": "Tag",
"TagsPlaceholder": "Inserisci i tag, separati da virgole",
"TrafficRatio": "Rapporto traffico",
Expand Down Expand Up @@ -3373,6 +3376,7 @@
"Data": "Dati",
"Data&Model": "Dati",
"Data&Storage": "Archivio dati",
"DeploymentDetail": "Dettaglio",
"Deployments": "Distribuzioni",
"Diagnostics": "Diagnostica",
"DisMatchUserEmail": "L'e-mail dell'utente non corrisponde",
Expand Down
Loading
Loading