Skip to content

Commit 1154189

Browse files
authored
feat(FR-2833): show deployment ID and use BooleanTag for public access (#7285)
1 parent 6507cd9 commit 1154189

23 files changed

Lines changed: 101 additions & 29 deletions

react/src/components/DeploymentConfigurationSection.tsx

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ import DeploymentRevisionHistoryTab from './DeploymentRevisionHistoryTab';
1212
import DeploymentSettingModal from './DeploymentSettingModal';
1313
import DeploymentTagChips from './DeploymentTagChips';
1414
import ErrorBoundaryWithNullFallback from './ErrorBoundaryWithNullFallback';
15-
import {
16-
CheckOutlined,
17-
CloseOutlined,
18-
EditOutlined,
19-
LoadingOutlined,
20-
PlusOutlined,
21-
} from '@ant-design/icons';
15+
import { EditOutlined, LoadingOutlined, PlusOutlined } from '@ant-design/icons';
2216
import { useToggle } from 'ahooks';
2317
import {
2418
Alert,
@@ -33,7 +27,10 @@ import {
3327
BAICard,
3428
BAIFetchKeyButton,
3529
BAIFlex,
30+
BAIId,
31+
BAIText,
3632
BAIUnmountAfterClose,
33+
BooleanTag,
3734
INITIAL_FETCH_KEY,
3835
filterOutEmpty,
3936
toLocalId,
@@ -71,9 +68,13 @@ const DeploymentOverviewContent: React.FC<{
7168
const deploymentItems = filterOutEmpty([
7269
{
7370
key: 'name',
74-
label: t('deployment.Name'),
71+
label: t('deployment.NameAndID'),
7572
children: deployment?.metadata.name ? (
76-
<Typography.Text copyable>{deployment.metadata.name}</Typography.Text>
73+
<>
74+
<BAIText copyable>{deployment.metadata.name}</BAIText>
75+
&nbsp;(
76+
<BAIId globalId={deployment.id} />)
77+
</>
7778
) : (
7879
renderFallback()
7980
),
@@ -102,12 +103,21 @@ const DeploymentOverviewContent: React.FC<{
102103
{
103104
key: 'open-to-public',
104105
label: t('deployment.OpenToPublic'),
105-
children: deployment?.networkAccess.openToPublic ? (
106-
<CheckOutlined />
107-
) : (
108-
<CloseOutlined />
106+
children: (
107+
<BooleanTag
108+
value={deployment?.networkAccess.openToPublic}
109+
trueLabel={t('button.Yes')}
110+
falseLabel={t('button.No')}
111+
fallback={renderFallback()}
112+
/>
109113
),
110114
},
115+
{
116+
key: 'desired-replicas',
117+
label: t('deployment.DesiredReplicas'),
118+
children:
119+
deployment?.replicaState?.desiredReplicaCount ?? renderFallback(),
120+
},
111121
{
112122
key: 'tags',
113123
label: t('deployment.Tags'),
@@ -118,12 +128,6 @@ const DeploymentOverviewContent: React.FC<{
118128
/>
119129
),
120130
},
121-
{
122-
key: 'desired-replicas',
123-
label: t('deployment.DesiredReplicas'),
124-
children:
125-
deployment?.replicaState?.desiredReplicaCount ?? renderFallback(),
126-
},
127131
]);
128132

129133
return (
@@ -292,6 +296,7 @@ const DeploymentConfigurationCards: React.FC<{
292296
graphql`
293297
query DeploymentConfigurationSectionQuery($deploymentId: ID!) {
294298
deployment(id: $deploymentId) {
299+
id
295300
...DeploymentSettingModal_deployment
296301
metadata {
297302
name

react/src/components/DeploymentSettingModal.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,6 @@ const DeploymentSettingModal: React.FC<DeploymentSettingModalProps> = ({
236236
>
237237
<Input placeholder={t('deployment.NamePlaceholder')} />
238238
</Form.Item>
239-
<Form.Item name="tags" label={t('deployment.Tags')}>
240-
<Select
241-
mode="tags"
242-
placeholder={t('deployment.TagsPlaceholder')}
243-
tokenSeparators={[',', '\n']}
244-
notFoundContent={null}
245-
/>
246-
</Form.Item>
247239
<Form.Item
248240
name="replicaCount"
249241
label={t('deployment.DesiredReplicas')}
@@ -256,8 +248,20 @@ const DeploymentSettingModal: React.FC<DeploymentSettingModalProps> = ({
256248
>
257249
<InputNumber min={1} style={{ width: '100%' }} />
258250
</Form.Item>
259-
<Form.Item name="openToPublic" valuePropName="checked">
260-
<Checkbox>{t('deployment.OpenToPublic')}</Checkbox>
251+
<Form.Item name="tags" label={t('deployment.Tags')}>
252+
<Select
253+
mode="tags"
254+
placeholder={t('deployment.TagsPlaceholder')}
255+
tokenSeparators={[',', '\n']}
256+
notFoundContent={null}
257+
/>
258+
</Form.Item>
259+
<Form.Item
260+
name="openToPublic"
261+
valuePropName="checked"
262+
label={t('deployment.OpenToPublic')}
263+
>
264+
<Checkbox>{t('deployment.Public')}</Checkbox>
261265
</Form.Item>
262266
</Form>
263267
</BAIModal>

resources/i18n/de.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Einhängeziel für Modellordner",
952952
"ModelVersion": "Modellname",
953953
"Name": "Name",
954+
"NameAndID": "Name (ID)",
954955
"NamePlaceholder": "Bereitstellungsname eingeben",
955956
"NameRequired": "Bereitstellungsname ist erforderlich.",
956957
"NewDeployment": "Neue Bereitstellung",
@@ -964,6 +965,7 @@
964965
"Overview": "Übersicht",
965966
"Owner": "Eigentümer",
966967
"Project": "Projekt",
968+
"Public": "Öffentlich",
967969
"QuickDeploy": "Bereitstellen",
968970
"QuickDeployDetailed": "Konfigurieren und bereitstellen...",
969971
"ReadinessStatus": "Bereitschaftsstatus",
@@ -1459,6 +1461,7 @@
14591461
"Folder": "Ordner",
14601462
"Folders": "Ordner",
14611463
"General": "Allgemein",
1464+
"ID": "ID",
14621465
"Image": "Bild",
14631466
"InProgress": "In Arbeit",
14641467
"Inactive": "Inaktiv",

resources/i18n/el.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Προορισμός τοποθέτησης για φάκελο μοντέλου",
952952
"ModelVersion": "Όνομα μοντέλου",
953953
"Name": "Όνομα",
954+
"NameAndID": "Όνομα (ID)",
954955
"NamePlaceholder": "Εισάγετε όνομα ανάπτυξης",
955956
"NameRequired": "Το όνομα ανάπτυξης είναι απαραίτητο.",
956957
"NewDeployment": "Νέα ανάπτυξη",
@@ -964,6 +965,7 @@
964965
"Overview": "Επισκόπηση",
965966
"Owner": "Ιδιοκτήτης",
966967
"Project": "Έργο",
968+
"Public": "Δημόσιο",
967969
"QuickDeploy": "Ανάπτυξη",
968970
"QuickDeployDetailed": "Διαμόρφωση και ανάπτυξη...",
969971
"ReadinessStatus": "Κατάσταση Readiness",
@@ -1457,6 +1459,7 @@
14571459
"Folder": "Φάκελος",
14581460
"Folders": "Φάκελοι",
14591461
"General": "Γενικά",
1462+
"ID": "ID",
14601463
"Image": "Εικόνα",
14611464
"InProgress": "Σε εξέλιξη",
14621465
"Inactive": "Αδρανής",

resources/i18n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@
953953
"ModelMountDestination": "Mount Destination For Model Folder",
954954
"ModelVersion": "Model Name",
955955
"Name": "Name",
956+
"NameAndID": "Name (ID)",
956957
"NamePlaceholder": "Enter a deployment name",
957958
"NameRequired": "Deployment name is required.",
958959
"NewDeployment": "New Deployment",
@@ -966,6 +967,7 @@
966967
"Overview": "Overview",
967968
"Owner": "Owner",
968969
"Project": "Project",
970+
"Public": "Public",
969971
"QuickDeploy": "Deploy",
970972
"QuickDeployDetailed": "Configure and deploy",
971973
"ReadinessStatus": "Readiness Status",
@@ -1459,6 +1461,7 @@
14591461
"Folder": "Folder",
14601462
"Folders": "Folders",
14611463
"General": "General",
1464+
"ID": "ID",
14621465
"Image": "Image",
14631466
"InProgress": "In progress",
14641467
"Inactive": "Inactive",

resources/i18n/es.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Destino de montaje para la carpeta del modelo",
952952
"ModelVersion": "Nombre del modelo",
953953
"Name": "Nombre",
954+
"NameAndID": "Nombre (ID)",
954955
"NamePlaceholder": "Ingrese un nombre de despliegue",
955956
"NameRequired": "El nombre del despliegue es obligatorio.",
956957
"NewDeployment": "Nuevo despliegue",
@@ -964,6 +965,7 @@
964965
"Overview": "Resumen",
965966
"Owner": "Propietario",
966967
"Project": "Proyecto",
968+
"Public": "Público",
967969
"QuickDeploy": "Desplegar",
968970
"QuickDeployDetailed": "Configurar y desplegar...",
969971
"ReadinessStatus": "Estado de Readiness",
@@ -1457,6 +1459,7 @@
14571459
"Folder": "Carpeta",
14581460
"Folders": "Carpetas",
14591461
"General": "General",
1462+
"ID": "ID",
14601463
"Image": "Imagen",
14611464
"InProgress": "En curso",
14621465
"Inactive": "Inactivo",

resources/i18n/fi.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Mallikansion liitäntäkohde",
952952
"ModelVersion": "Mallin nimi",
953953
"Name": "Nimi",
954+
"NameAndID": "Nimi (ID)",
954955
"NamePlaceholder": "Anna käyttöönoton nimi",
955956
"NameRequired": "Käyttöönoton nimi vaaditaan.",
956957
"NewDeployment": "Uusi käyttöönotto",
@@ -964,6 +965,7 @@
964965
"Overview": "Yleiskatsaus",
965966
"Owner": "Omistaja",
966967
"Project": "Projekti",
968+
"Public": "Julkinen",
967969
"QuickDeploy": "Ota käyttöön",
968970
"QuickDeployDetailed": "Määritä ja ota käyttöön...",
969971
"ReadinessStatus": "Readiness-tila",
@@ -1457,6 +1459,7 @@
14571459
"Folder": "Kansio",
14581460
"Folders": "Kansiot",
14591461
"General": "Yleistä",
1462+
"ID": "ID",
14601463
"Image": "Kuva",
14611464
"InProgress": "Käynnissä",
14621465
"Inactive": "Passiivinen",

resources/i18n/fr.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Destination de montage pour le dossier du modèle",
952952
"ModelVersion": "Nom du modèle",
953953
"Name": "Nom",
954+
"NameAndID": "Nom (ID)",
954955
"NamePlaceholder": "Saisir un nom de déploiement",
955956
"NameRequired": "Le nom du déploiement est obligatoire.",
956957
"NewDeployment": "Nouveau déploiement",
@@ -964,6 +965,7 @@
964965
"Overview": "Aperçu",
965966
"Owner": "Propriétaire",
966967
"Project": "Projet",
968+
"Public": "Public",
967969
"QuickDeploy": "Déployer",
968970
"QuickDeployDetailed": "Configurer et déployer...",
969971
"ReadinessStatus": "État Readiness",
@@ -1458,6 +1460,7 @@
14581460
"Folder": "Dossier",
14591461
"Folders": "Dossiers",
14601462
"General": "Général",
1463+
"ID": "ID",
14611464
"Image": "Image",
14621465
"InProgress": "En cours",
14631466
"Inactive": "Inactif",

resources/i18n/id.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Tujuan Mount untuk Folder Model",
952952
"ModelVersion": "Nama Model",
953953
"Name": "Nama",
954+
"NameAndID": "Nama (ID)",
954955
"NamePlaceholder": "Masukkan nama penerapan",
955956
"NameRequired": "Nama penerapan wajib diisi.",
956957
"NewDeployment": "Penerapan Baru",
@@ -964,6 +965,7 @@
964965
"Overview": "Ikhtisar",
965966
"Owner": "Pemilik",
966967
"Project": "Proyek",
968+
"Public": "Publik",
967969
"QuickDeploy": "Terapkan",
968970
"QuickDeployDetailed": "Konfigurasi dan terapkan...",
969971
"ReadinessStatus": "Status Readiness",
@@ -1460,6 +1462,7 @@
14601462
"Folder": "Folder",
14611463
"Folders": "Folder",
14621464
"General": "Umum",
1465+
"ID": "ID",
14631466
"Image": "Gambar",
14641467
"InProgress": "Sedang Berlangsung",
14651468
"Inactive": "Tidak aktif",

resources/i18n/it.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@
951951
"ModelMountDestination": "Destinazione mount per cartella modello",
952952
"ModelVersion": "Nome modello",
953953
"Name": "Nome",
954+
"NameAndID": "Nome (ID)",
954955
"NamePlaceholder": "Inserisci un nome distribuzione",
955956
"NameRequired": "Il nome della distribuzione è obbligatorio.",
956957
"NewDeployment": "Nuova distribuzione",
@@ -964,6 +965,7 @@
964965
"Overview": "Panoramica",
965966
"Owner": "Proprietario",
966967
"Project": "Progetto",
968+
"Public": "Pubblico",
967969
"QuickDeploy": "Distribuisci",
968970
"QuickDeployDetailed": "Configura e distribuisci...",
969971
"ReadinessStatus": "Stato Readiness",
@@ -1457,6 +1459,7 @@
14571459
"Folder": "Cartella",
14581460
"Folders": "cartelle",
14591461
"General": "Generale",
1462+
"ID": "ID",
14601463
"Image": "Immagine",
14611464
"InProgress": "In corso",
14621465
"Inactive": "Inattivo",

0 commit comments

Comments
 (0)