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
43 changes: 24 additions & 19 deletions react/src/components/DeploymentConfigurationSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ import DeploymentRevisionHistoryTab from './DeploymentRevisionHistoryTab';
import DeploymentSettingModal from './DeploymentSettingModal';
import DeploymentTagChips from './DeploymentTagChips';
import ErrorBoundaryWithNullFallback from './ErrorBoundaryWithNullFallback';
import {
CheckOutlined,
CloseOutlined,
EditOutlined,
LoadingOutlined,
PlusOutlined,
} from '@ant-design/icons';
import { EditOutlined, LoadingOutlined, PlusOutlined } from '@ant-design/icons';
import { useToggle } from 'ahooks';
import {
Alert,
Expand All @@ -33,7 +27,10 @@ import {
BAICard,
BAIFetchKeyButton,
BAIFlex,
BAIId,
BAIText,
BAIUnmountAfterClose,
BooleanTag,
INITIAL_FETCH_KEY,
filterOutEmpty,
toLocalId,
Expand Down Expand Up @@ -71,9 +68,13 @@ const DeploymentOverviewContent: React.FC<{
const deploymentItems = filterOutEmpty([
{
key: 'name',
label: t('deployment.Name'),
label: t('deployment.NameAndID'),
children: deployment?.metadata.name ? (
<Typography.Text copyable>{deployment.metadata.name}</Typography.Text>
<>
<BAIText copyable>{deployment.metadata.name}</BAIText>
&nbsp;(
<BAIId globalId={deployment.id} />)
Comment thread
yomybaby marked this conversation as resolved.
</>
Comment thread
yomybaby marked this conversation as resolved.
) : (
renderFallback()
),
Expand Down Expand Up @@ -102,12 +103,21 @@ const DeploymentOverviewContent: React.FC<{
{
key: 'open-to-public',
label: t('deployment.OpenToPublic'),
children: deployment?.networkAccess.openToPublic ? (
<CheckOutlined />
) : (
<CloseOutlined />
children: (
<BooleanTag
value={deployment?.networkAccess.openToPublic}
trueLabel={t('button.Yes')}
falseLabel={t('button.No')}
fallback={renderFallback()}
/>
),
},
{
key: 'desired-replicas',
label: t('deployment.DesiredReplicas'),
children:
deployment?.replicaState?.desiredReplicaCount ?? renderFallback(),
},
{
key: 'tags',
label: t('deployment.Tags'),
Expand All @@ -118,12 +128,6 @@ const DeploymentOverviewContent: React.FC<{
/>
),
},
{
key: 'desired-replicas',
label: t('deployment.DesiredReplicas'),
children:
deployment?.replicaState?.desiredReplicaCount ?? renderFallback(),
},
]);

return (
Expand Down Expand Up @@ -292,6 +296,7 @@ const DeploymentConfigurationCards: React.FC<{
graphql`
query DeploymentConfigurationSectionQuery($deploymentId: ID!) {
deployment(id: $deploymentId) {
id
Comment thread
yomybaby marked this conversation as resolved.
...DeploymentSettingModal_deployment
metadata {
name
Expand Down
24 changes: 14 additions & 10 deletions react/src/components/DeploymentSettingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,6 @@ const DeploymentSettingModal: React.FC<DeploymentSettingModalProps> = ({
>
<Input placeholder={t('deployment.NamePlaceholder')} />
</Form.Item>
<Form.Item name="tags" label={t('deployment.Tags')}>
<Select
mode="tags"
placeholder={t('deployment.TagsPlaceholder')}
tokenSeparators={[',', '\n']}
notFoundContent={null}
/>
</Form.Item>
<Form.Item
name="replicaCount"
label={t('deployment.DesiredReplicas')}
Expand All @@ -256,8 +248,20 @@ const DeploymentSettingModal: React.FC<DeploymentSettingModalProps> = ({
>
<InputNumber min={1} style={{ width: '100%' }} />
</Form.Item>
<Form.Item name="openToPublic" valuePropName="checked">
<Checkbox>{t('deployment.OpenToPublic')}</Checkbox>
<Form.Item name="tags" label={t('deployment.Tags')}>
<Select
mode="tags"
placeholder={t('deployment.TagsPlaceholder')}
tokenSeparators={[',', '\n']}
notFoundContent={null}
/>
</Form.Item>
<Form.Item
name="openToPublic"
valuePropName="checked"
label={t('deployment.OpenToPublic')}
>
<Checkbox>{t('deployment.Public')}</Checkbox>
</Form.Item>
</Form>
</BAIModal>
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Einhängeziel für Modellordner",
"ModelVersion": "Modellname",
"Name": "Name",
"NameAndID": "Name (ID)",
"NamePlaceholder": "Bereitstellungsname eingeben",
"NameRequired": "Bereitstellungsname ist erforderlich.",
"NewDeployment": "Neue Bereitstellung",
Expand All @@ -964,6 +965,7 @@
"Overview": "Übersicht",
"Owner": "Eigentümer",
"Project": "Projekt",
"Public": "Öffentlich",
"QuickDeploy": "Bereitstellen",
"QuickDeployDetailed": "Konfigurieren und bereitstellen...",
"ReadinessStatus": "Bereitschaftsstatus",
Expand Down Expand Up @@ -1459,6 +1461,7 @@
"Folder": "Ordner",
"Folders": "Ordner",
"General": "Allgemein",
"ID": "ID",
"Image": "Bild",
"InProgress": "In Arbeit",
"Inactive": "Inaktiv",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Προορισμός τοποθέτησης για φάκελο μοντέλου",
"ModelVersion": "Όνομα μοντέλου",
"Name": "Όνομα",
"NameAndID": "Όνομα (ID)",
"NamePlaceholder": "Εισάγετε όνομα ανάπτυξης",
"NameRequired": "Το όνομα ανάπτυξης είναι απαραίτητο.",
"NewDeployment": "Νέα ανάπτυξη",
Expand All @@ -964,6 +965,7 @@
"Overview": "Επισκόπηση",
"Owner": "Ιδιοκτήτης",
"Project": "Έργο",
"Public": "Δημόσιο",
"QuickDeploy": "Ανάπτυξη",
"QuickDeployDetailed": "Διαμόρφωση και ανάπτυξη...",
"ReadinessStatus": "Κατάσταση Readiness",
Expand Down Expand Up @@ -1457,6 +1459,7 @@
"Folder": "Φάκελος",
"Folders": "Φάκελοι",
"General": "Γενικά",
"ID": "ID",
"Image": "Εικόνα",
"InProgress": "Σε εξέλιξη",
"Inactive": "Αδρανής",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@
"ModelMountDestination": "Mount Destination For Model Folder",
"ModelVersion": "Model Name",
"Name": "Name",
"NameAndID": "Name (ID)",
"NamePlaceholder": "Enter a deployment name",
"NameRequired": "Deployment name is required.",
"NewDeployment": "New Deployment",
Expand All @@ -966,6 +967,7 @@
"Overview": "Overview",
"Owner": "Owner",
"Project": "Project",
"Public": "Public",
"QuickDeploy": "Deploy",
"QuickDeployDetailed": "Configure and deploy",
"ReadinessStatus": "Readiness Status",
Expand Down Expand Up @@ -1459,6 +1461,7 @@
"Folder": "Folder",
"Folders": "Folders",
"General": "General",
"ID": "ID",
"Image": "Image",
"InProgress": "In progress",
"Inactive": "Inactive",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Destino de montaje para la carpeta del modelo",
"ModelVersion": "Nombre del modelo",
"Name": "Nombre",
"NameAndID": "Nombre (ID)",
"NamePlaceholder": "Ingrese un nombre de despliegue",
"NameRequired": "El nombre del despliegue es obligatorio.",
"NewDeployment": "Nuevo despliegue",
Expand All @@ -964,6 +965,7 @@
"Overview": "Resumen",
"Owner": "Propietario",
"Project": "Proyecto",
"Public": "Público",
"QuickDeploy": "Desplegar",
"QuickDeployDetailed": "Configurar y desplegar...",
"ReadinessStatus": "Estado de Readiness",
Expand Down Expand Up @@ -1457,6 +1459,7 @@
"Folder": "Carpeta",
"Folders": "Carpetas",
"General": "General",
"ID": "ID",
"Image": "Imagen",
"InProgress": "En curso",
"Inactive": "Inactivo",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Mallikansion liitäntäkohde",
"ModelVersion": "Mallin nimi",
"Name": "Nimi",
"NameAndID": "Nimi (ID)",
"NamePlaceholder": "Anna käyttöönoton nimi",
"NameRequired": "Käyttöönoton nimi vaaditaan.",
"NewDeployment": "Uusi käyttöönotto",
Expand All @@ -964,6 +965,7 @@
"Overview": "Yleiskatsaus",
"Owner": "Omistaja",
"Project": "Projekti",
"Public": "Julkinen",
"QuickDeploy": "Ota käyttöön",
"QuickDeployDetailed": "Määritä ja ota käyttöön...",
"ReadinessStatus": "Readiness-tila",
Expand Down Expand Up @@ -1457,6 +1459,7 @@
"Folder": "Kansio",
"Folders": "Kansiot",
"General": "Yleistä",
"ID": "ID",
"Image": "Kuva",
"InProgress": "Käynnissä",
"Inactive": "Passiivinen",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Destination de montage pour le dossier du modèle",
"ModelVersion": "Nom du modèle",
"Name": "Nom",
"NameAndID": "Nom (ID)",
"NamePlaceholder": "Saisir un nom de déploiement",
"NameRequired": "Le nom du déploiement est obligatoire.",
"NewDeployment": "Nouveau déploiement",
Expand All @@ -964,6 +965,7 @@
"Overview": "Aperçu",
"Owner": "Propriétaire",
"Project": "Projet",
"Public": "Public",
"QuickDeploy": "Déployer",
"QuickDeployDetailed": "Configurer et déployer...",
"ReadinessStatus": "État Readiness",
Expand Down Expand Up @@ -1458,6 +1460,7 @@
"Folder": "Dossier",
"Folders": "Dossiers",
"General": "Général",
"ID": "ID",
"Image": "Image",
"InProgress": "En cours",
"Inactive": "Inactif",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Tujuan Mount untuk Folder Model",
"ModelVersion": "Nama Model",
"Name": "Nama",
"NameAndID": "Nama (ID)",
"NamePlaceholder": "Masukkan nama penerapan",
"NameRequired": "Nama penerapan wajib diisi.",
"NewDeployment": "Penerapan Baru",
Expand All @@ -964,6 +965,7 @@
"Overview": "Ikhtisar",
"Owner": "Pemilik",
"Project": "Proyek",
"Public": "Publik",
"QuickDeploy": "Terapkan",
"QuickDeployDetailed": "Konfigurasi dan terapkan...",
"ReadinessStatus": "Status Readiness",
Expand Down Expand Up @@ -1460,6 +1462,7 @@
"Folder": "Folder",
"Folders": "Folder",
"General": "Umum",
"ID": "ID",
"Image": "Gambar",
"InProgress": "Sedang Berlangsung",
"Inactive": "Tidak aktif",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Destinazione mount per cartella modello",
"ModelVersion": "Nome modello",
"Name": "Nome",
"NameAndID": "Nome (ID)",
"NamePlaceholder": "Inserisci un nome distribuzione",
"NameRequired": "Il nome della distribuzione è obbligatorio.",
"NewDeployment": "Nuova distribuzione",
Expand All @@ -964,6 +965,7 @@
"Overview": "Panoramica",
"Owner": "Proprietario",
"Project": "Progetto",
"Public": "Pubblico",
"QuickDeploy": "Distribuisci",
"QuickDeployDetailed": "Configura e distribuisci...",
"ReadinessStatus": "Stato Readiness",
Expand Down Expand Up @@ -1457,6 +1459,7 @@
"Folder": "Cartella",
"Folders": "cartelle",
"General": "Generale",
"ID": "ID",
"Image": "Immagine",
"InProgress": "In corso",
"Inactive": "Inattivo",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "モデルフォルダーのマウント先",
"ModelVersion": "モデル名",
"Name": "名前",
"NameAndID": "名前 (ID)",
"NamePlaceholder": "デプロイ名を入力",
"NameRequired": "デプロイ名は必須です。",
"NewDeployment": "新規デプロイ",
Expand All @@ -964,6 +965,7 @@
"Overview": "概要",
"Owner": "オーナー",
"Project": "プロジェクト",
"Public": "公開",
"QuickDeploy": "デプロイ",
"QuickDeployDetailed": "設定してデプロイ...",
"ReadinessStatus": "Readiness 状態",
Expand Down Expand Up @@ -1459,6 +1461,7 @@
"Folder": "フォルダ",
"Folders": "フォルダー",
"General": "一般",
"ID": "ID",
"Image": "画像",
"InProgress": "進行中",
"Inactive": "非アクティブ",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@
"ModelMountDestination": "모델 폴더 마운트 대상",
"ModelVersion": "모델 이름",
"Name": "이름",
"NameAndID": "이름 (ID)",
"NamePlaceholder": "배포 이름을 입력하세요",
"NameRequired": "배포 이름은 필수입니다.",
"NewDeployment": "새 배포",
Expand All @@ -965,6 +966,7 @@
"Overview": "개요",
"Owner": "소유자",
"Project": "프로젝트",
"Public": "공개",
"QuickDeploy": "배포",
"QuickDeployDetailed": "구성 및 배포...",
"ReadinessStatus": "준비 상태 (Readiness)",
Expand Down Expand Up @@ -1460,6 +1462,7 @@
"Folder": "폴더",
"Folders": "폴더",
"General": "일반",
"ID": "ID",
"Image": "이미지",
"InProgress": "진행중",
"Inactive": "비활성",
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@
"ModelMountDestination": "Загварын хавтасны маунтын зорилтот хавтас",
"ModelVersion": "Загварын нэр",
"Name": "Нэр",
"NameAndID": "Нэр (ID)",
"NamePlaceholder": "Байршуулалтын нэр оруулна уу",
"NameRequired": "Байршуулалтын нэр шаардлагатай.",
"NewDeployment": "Шинэ байршуулалт",
Expand All @@ -964,6 +965,7 @@
"Overview": "Ерөнхий мэдэгдэл",
"Owner": "Эзэмшигч",
"Project": "Төсөл",
"Public": "Нийтийн",
"QuickDeploy": "Байршуулах",
"QuickDeployDetailed": "Тохиргоо хийж байршуулах...",
"ReadinessStatus": "Readiness төлөв",
Expand Down Expand Up @@ -1458,6 +1460,7 @@
"Folder": "Хавтас",
"Folders": "Фолдерууд",
"General": "Генерал",
"ID": "ID",
"Image": "Зураг",
"InProgress": "Ажиллаж байна",
"Inactive": "Идэвхгүй",
Expand Down
Loading
Loading