Skip to content

Commit 816b172

Browse files
committed
feat(FR-2833): show deployment ID and use BooleanTag for public access (#7285)
Resolves #7284 ([FR-2833](https://lablup.atlassian.net/browse/FR-2833)) ## Summary - Display deployment global ID via `BAIId` next to the deployment name in the overview, with the name shown via copyable `BAIText`. - Replace `CheckOutlined`/`CloseOutlined` icons with `BooleanTag` for the OpenToPublic field for a consistent, color-coded boolean indicator. - Reorder overview fields so DesiredReplicas appears before Tags, matching the modal order. - In `DeploymentSettingModal`, reorder fields (Name → Replicas → Tags → OpenToPublic) and give the OpenToPublic form item a proper label with a localized "Public" checkbox text. - Add `general.ID` and `deployment.Public` i18n keys across all 22 supported languages. ## Test plan - [ ] Open a deployment detail page; verify the overview shows the deployment name (copyable) followed by its global ID. - [ ] Verify OpenToPublic renders as a `BooleanTag` instead of an icon. - [ ] Verify field order in the overview: Name (ID) → Project → Domain → EndpointUrl → OpenToPublic → DesiredReplicas → Tags. - [ ] Open the deployment Setting modal; verify field order: Name → Replicas → Tags → OpenToPublic with a "Public" label/checkbox. - [ ] Verify both new i18n keys render in English and Korean (and at least one other language). [FR-2833]: https://lablup.atlassian.net/browse/FR-2833?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 6507cd9 commit 816b172

23 files changed

Lines changed: 75 additions & 29 deletions

react/src/components/DeploymentConfigurationSection.tsx

Lines changed: 19 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.Name')} (${t('general.ID')})`,
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,16 @@ 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 value={deployment?.networkAccess.openToPublic ?? false} />
109108
),
110109
},
110+
{
111+
key: 'desired-replicas',
112+
label: t('deployment.DesiredReplicas'),
113+
children:
114+
deployment?.replicaState?.desiredReplicaCount ?? renderFallback(),
115+
},
111116
{
112117
key: 'tags',
113118
label: t('deployment.Tags'),
@@ -118,12 +123,6 @@ const DeploymentOverviewContent: React.FC<{
118123
/>
119124
),
120125
},
121-
{
122-
key: 'desired-replicas',
123-
label: t('deployment.DesiredReplicas'),
124-
children:
125-
deployment?.replicaState?.desiredReplicaCount ?? renderFallback(),
126-
},
127126
]);
128127

129128
return (
@@ -292,6 +291,7 @@ const DeploymentConfigurationCards: React.FC<{
292291
graphql`
293292
query DeploymentConfigurationSectionQuery($deploymentId: ID!) {
294293
deployment(id: $deploymentId) {
294+
id
295295
...DeploymentSettingModal_deployment
296296
metadata {
297297
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Übersicht",
965965
"Owner": "Eigentümer",
966966
"Project": "Projekt",
967+
"Public": "Öffentlich",
967968
"QuickDeploy": "Bereitstellen",
968969
"QuickDeployDetailed": "Konfigurieren und bereitstellen...",
969970
"ReadinessStatus": "Bereitschaftsstatus",
@@ -1459,6 +1460,7 @@
14591460
"Folder": "Ordner",
14601461
"Folders": "Ordner",
14611462
"General": "Allgemein",
1463+
"ID": "ID",
14621464
"Image": "Bild",
14631465
"InProgress": "In Arbeit",
14641466
"Inactive": "Inaktiv",

resources/i18n/el.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Επισκόπηση",
965965
"Owner": "Ιδιοκτήτης",
966966
"Project": "Έργο",
967+
"Public": "Δημόσιο",
967968
"QuickDeploy": "Ανάπτυξη",
968969
"QuickDeployDetailed": "Διαμόρφωση και ανάπτυξη...",
969970
"ReadinessStatus": "Κατάσταση Readiness",
@@ -1457,6 +1458,7 @@
14571458
"Folder": "Φάκελος",
14581459
"Folders": "Φάκελοι",
14591460
"General": "Γενικά",
1461+
"ID": "ID",
14601462
"Image": "Εικόνα",
14611463
"InProgress": "Σε εξέλιξη",
14621464
"Inactive": "Αδρανής",

resources/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@
966966
"Overview": "Overview",
967967
"Owner": "Owner",
968968
"Project": "Project",
969+
"Public": "Public",
969970
"QuickDeploy": "Deploy",
970971
"QuickDeployDetailed": "Configure and deploy",
971972
"ReadinessStatus": "Readiness Status",
@@ -1459,6 +1460,7 @@
14591460
"Folder": "Folder",
14601461
"Folders": "Folders",
14611462
"General": "General",
1463+
"ID": "ID",
14621464
"Image": "Image",
14631465
"InProgress": "In progress",
14641466
"Inactive": "Inactive",

resources/i18n/es.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Resumen",
965965
"Owner": "Propietario",
966966
"Project": "Proyecto",
967+
"Public": "Público",
967968
"QuickDeploy": "Desplegar",
968969
"QuickDeployDetailed": "Configurar y desplegar...",
969970
"ReadinessStatus": "Estado de Readiness",
@@ -1457,6 +1458,7 @@
14571458
"Folder": "Carpeta",
14581459
"Folders": "Carpetas",
14591460
"General": "General",
1461+
"ID": "ID",
14601462
"Image": "Imagen",
14611463
"InProgress": "En curso",
14621464
"Inactive": "Inactivo",

resources/i18n/fi.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Yleiskatsaus",
965965
"Owner": "Omistaja",
966966
"Project": "Projekti",
967+
"Public": "Julkinen",
967968
"QuickDeploy": "Ota käyttöön",
968969
"QuickDeployDetailed": "Määritä ja ota käyttöön...",
969970
"ReadinessStatus": "Readiness-tila",
@@ -1457,6 +1458,7 @@
14571458
"Folder": "Kansio",
14581459
"Folders": "Kansiot",
14591460
"General": "Yleistä",
1461+
"ID": "ID",
14601462
"Image": "Kuva",
14611463
"InProgress": "Käynnissä",
14621464
"Inactive": "Passiivinen",

resources/i18n/fr.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Aperçu",
965965
"Owner": "Propriétaire",
966966
"Project": "Projet",
967+
"Public": "Public",
967968
"QuickDeploy": "Déployer",
968969
"QuickDeployDetailed": "Configurer et déployer...",
969970
"ReadinessStatus": "État Readiness",
@@ -1458,6 +1459,7 @@
14581459
"Folder": "Dossier",
14591460
"Folders": "Dossiers",
14601461
"General": "Général",
1462+
"ID": "ID",
14611463
"Image": "Image",
14621464
"InProgress": "En cours",
14631465
"Inactive": "Inactif",

resources/i18n/id.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Ikhtisar",
965965
"Owner": "Pemilik",
966966
"Project": "Proyek",
967+
"Public": "Publik",
967968
"QuickDeploy": "Terapkan",
968969
"QuickDeployDetailed": "Konfigurasi dan terapkan...",
969970
"ReadinessStatus": "Status Readiness",
@@ -1460,6 +1461,7 @@
14601461
"Folder": "Folder",
14611462
"Folders": "Folder",
14621463
"General": "Umum",
1464+
"ID": "ID",
14631465
"Image": "Gambar",
14641466
"InProgress": "Sedang Berlangsung",
14651467
"Inactive": "Tidak aktif",

resources/i18n/it.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,7 @@
964964
"Overview": "Panoramica",
965965
"Owner": "Proprietario",
966966
"Project": "Progetto",
967+
"Public": "Pubblico",
967968
"QuickDeploy": "Distribuisci",
968969
"QuickDeployDetailed": "Configura e distribuisci...",
969970
"ReadinessStatus": "Stato Readiness",
@@ -1457,6 +1458,7 @@
14571458
"Folder": "Cartella",
14581459
"Folders": "cartelle",
14591460
"General": "Generale",
1461+
"ID": "ID",
14601462
"Image": "Immagine",
14611463
"InProgress": "In corso",
14621464
"Inactive": "Inattivo",

0 commit comments

Comments
 (0)