Skip to content
Draft
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: 30 additions & 13 deletions react/src/components/BAIComputeSessionNodeNotificationItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import SessionActionButtons, {
PrimaryAppOption,
} from './ComputeSessionNodeItems/SessionActionButtons';
import SessionStatusTag from './ComputeSessionNodeItems/SessionStatusTag';
import QuestionIconWithTooltip from './QuestionIconWithTooltip';
import { useUpdateEffect } from 'ahooks';
import { Switch, theme } from 'antd';
import { BAIFlex, BAILink, BAINotificationItem, BAIText } from 'backend.ai-ui';
import dayjs from 'dayjs';
import React, { useEffect, useState } from 'react';
Expand Down Expand Up @@ -35,6 +37,7 @@ const BAIComputeSessionNodeNotificationItem: React.FC<
const { closeNotification } = useSetBAINotification();
const { t } = useTranslation();
const navigate = useNavigate();
const { token } = theme.useToken();
const node = useFragment(
graphql`
fragment BAIComputeSessionNodeNotificationItemFragment on ComputeSessionNode {
Expand Down Expand Up @@ -98,19 +101,33 @@ const BAIComputeSessionNodeNotificationItem: React.FC<
</BAIText>
}
description={
<BAIFlex justify="between">
<SessionStatusTag
sessionFrgmt={node || null}
showQueuePosition={false}
showTooltip={false}
/>
<SessionActionButtons
compact
size="small"
sessionFrgmt={node || null}
hiddenButtonKeys={['containerCommit']}
primaryAppOption={primaryAppOption}
/>
<BAIFlex direction="column" align="stretch" gap="xs">
<BAIFlex justify="between">
<SessionStatusTag
sessionFrgmt={node || null}
showQueuePosition={false}
showTooltip={false}
/>
<SessionActionButtons
compact
size="small"
sessionFrgmt={node || null}
hiddenButtonKeys={['containerCommit']}
primaryAppOption={primaryAppOption}
/>
</BAIFlex>
<BAIFlex
style={{
alignSelf: 'stretch',
}}
gap={'xs'}
>
<Switch size="small" /> {t('notification.RunAppOnSessionStart')}
<QuestionIconWithTooltip
title={t('notification.RunAppOnSessionStartTooltip')}
zIndex={(token.Notification?.zIndexPopup || 2050) + 1}
/>
</BAIFlex>
</BAIFlex>
}
footer={
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "Initialisieren...",
"NoNotification": "Keine Benachrichtigung.",
"Notifications": "Benachrichtigungen",
"RunAppOnSessionStart": "App automatisch starten",
"RunAppOnSessionStartTooltip": "Startet die App in einer laufenden Sitzung",
"SeeDetail": "Siehe Detail",
"SuccessfullyUpdated": "Erfolgreich aktualisiert",
"Visit": "Besuch"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,8 @@
"Initializing": "Αρχικοποίηση ...",
"NoNotification": "Καμία ειδοποίηση.",
"Notifications": "Ειδοποιήσεις",
"RunAppOnSessionStart": "Αυτόματη εκκίνηση εφαρμογής",
"RunAppOnSessionStartTooltip": "Εκκινεί την εφαρμογή όταν η συνεδρία είναι ενεργή",
"SeeDetail": "Δείτε Λεπτομέρεια",
"SuccessfullyUpdated": "Ενημερώθηκε με επιτυχία",
"Visit": "Επίσκεψη"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,8 @@
"Initializing": "Initializing...",
"NoNotification": "No Notification.",
"Notifications": "Notifications",
"RunAppOnSessionStart": "Auto-launch app",
"RunAppOnSessionStartTooltip": "Launches app on session running",
"SeeDetail": "See Detail",
"SuccessfullyUpdated": "Successfully Updated",
"Visit": "Visit"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "Inicializando...",
"NoNotification": "Sin notificación.",
"Notifications": "Notificaciones",
"RunAppOnSessionStart": "Iniciar la aplicación automáticamente",
"RunAppOnSessionStartTooltip": "Inicia la aplicación cuando la sesión esté en ejecución.",
"SeeDetail": "Ver detalle",
"SuccessfullyUpdated": "Actualizado con éxito",
"Visit": "Visite"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "Aloitetaan...",
"NoNotification": "Ei ilmoitusta.",
"Notifications": "Ilmoitukset",
"RunAppOnSessionStart": "Käynnistä sovellus automaattisesti",
"RunAppOnSessionStartTooltip": "Käynnistää sovelluksen käynnissä olevassa istunnossa.",
"SeeDetail": "Katso lisätietoja",
"SuccessfullyUpdated": "Päivitetty onnistuneesti",
"Visit": "Käy osoitteessa"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "Initialisation...",
"NoNotification": "Aucune notification.",
"Notifications": "Notifications",
"RunAppOnSessionStart": "Lancer automatiquement l'application",
"RunAppOnSessionStartTooltip": "Lance l'application dans la session en cours",
"SeeDetail": "Voir le détail",
"SuccessfullyUpdated": "Mise à jour réussie",
"Visit": "Visite"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@
"Initializing": "Inisialisasi...",
"NoNotification": "Tidak Ada Pemberitahuan.",
"Notifications": "Pemberitahuan",
"RunAppOnSessionStart": "Mulai aplikasi secara otomatis",
"RunAppOnSessionStartTooltip": "Meluncurkan aplikasi pada sesi yang sedang berjalan",
"SeeDetail": "Lihat Detail",
"SuccessfullyUpdated": "Berhasil Diperbarui",
"Visit": "Kunjungi"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@
"Initializing": "Inizializzazione in corso...",
"NoNotification": "Nessuna notifica.",
"Notifications": "Notifiche",
"RunAppOnSessionStart": "Avvia automaticamente l'app",
"RunAppOnSessionStartTooltip": "Avvia l'app nella sessione in esecuzione",
"SeeDetail": "Vedi dettaglio",
"SuccessfullyUpdated": "Aggiornato con successo",
"Visit": "Visitare"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "初期化中...",
"NoNotification": "通知はありません。",
"Notifications": "通知",
"RunAppOnSessionStart": "アプリの自動起動",
"RunAppOnSessionStartTooltip": "セッション実行時にアプリを起動する",
"SeeDetail": "詳細を見る",
"SuccessfullyUpdated": "正常に更新されました",
"Visit": "訪問"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,8 @@
"Initializing": "초기화 중...",
"NoNotification": "알림이 없습니다.",
"Notifications": "알림",
"RunAppOnSessionStart": "앱 자동실행",
"RunAppOnSessionStartTooltip": "세션이 RUNNING 상태가 되며 앱을 자동으로 시작합니다.",
"SeeDetail": "상세보기",
"SuccessfullyUpdated": "수정되었습니다.",
"Visit": "방문"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/mn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@
"Initializing": "Эхлүүлж байна ...",
"NoNotification": "Мэдэгдэл байхгүй.",
"Notifications": "Мэдэгдэл",
"RunAppOnSessionStart": "Аппыг автоматаар эхлүүлэх",
"RunAppOnSessionStartTooltip": "Сесс ажиллаж байх үед апп эхлүүлнэ",
"SeeDetail": "Дэлгэрэнгүйг үзнэ үү",
"SuccessfullyUpdated": "Амжилттай шинэчлэгдсэн",
"Visit": "Айлчлах"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/ms.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "Memulakan ...",
"NoNotification": "Tiada Pemberitahuan.",
"Notifications": "Pemberitahuan",
"RunAppOnSessionStart": "Lancarkan aplikasi secara automatik",
"RunAppOnSessionStartTooltip": "Melancarkan aplikasi pada sesi yang sedang berjalan",
"SeeDetail": "Lihat Perincian",
"SuccessfullyUpdated": "Berjaya Dikemas kini",
"Visit": "Lawati"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "Inicjowanie...",
"NoNotification": "Brak powiadomienia.",
"Notifications": "Powiadomienia",
"RunAppOnSessionStart": "Automatyczne uruchamianie aplikacji",
"RunAppOnSessionStartTooltip": "Uruchamia aplikację w działającej sesji",
"SeeDetail": "Zobacz detale",
"SuccessfullyUpdated": "Pomyślnie zaktualizowano",
"Visit": "Wizyta"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "Inicializando ...",
"NoNotification": "Nenhuma notificação.",
"Notifications": "Notificações",
"RunAppOnSessionStart": "Abrir aplicativo automaticamente",
"RunAppOnSessionStartTooltip": "Inicia o aplicativo na sessão em execução",
"SeeDetail": "Veja detalhes",
"SuccessfullyUpdated": "Atualizado com sucesso",
"Visit": "Visita"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "Inicializando ...",
"NoNotification": "Nenhuma notificação.",
"Notifications": "Notificações",
"RunAppOnSessionStart": "Iniciar aplicativo automaticamente",
"RunAppOnSessionStartTooltip": "Inicia a aplicação quando a sessão estiver em execução.",
"SeeDetail": "Veja detalhes",
"SuccessfullyUpdated": "Atualizado com sucesso",
"Visit": "Visita"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "Инициализация ...",
"NoNotification": "Нет уведомлений.",
"Notifications": "Уведомления",
"RunAppOnSessionStart": "Автозапуск приложения",
"RunAppOnSessionStartTooltip": "Запускает приложение в запущенной сессии",
"SeeDetail": "См детали",
"SuccessfullyUpdated": "Успешно обновлено",
"Visit": "Посещение"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,8 @@
"Initializing": "กำลังเริ่มต้น...",
"NoNotification": "ไม่มีการแจ้งเตือน",
"Notifications": "การแจ้งเตือน",
"RunAppOnSessionStart": "เปิดแอปอัตโนมัติ",
"RunAppOnSessionStartTooltip": "เปิดแอปในเซสชันที่กำลังทำงาน",
"SeeDetail": "ดูรายละเอียด",
"SuccessfullyUpdated": "อัปเดตสำเร็จแล้ว",
"Visit": "เยี่ยมชม"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "Başlatılıyor...",
"NoNotification": "Bildirim yok.",
"Notifications": "Bildirimler",
"RunAppOnSessionStart": "Uygulamayı otomatik başlat",
"RunAppOnSessionStartTooltip": "Çalışan oturumda uygulamayı başlatır",
"SeeDetail": "Ayrıntıları gör",
"SuccessfullyUpdated": "Başarıyla güncellendi",
"Visit": "Ziyaret etmek"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "Đang khởi tạo ...",
"NoNotification": "Không có thông báo.",
"Notifications": "Thông báo",
"RunAppOnSessionStart": "Tự động khởi chạy ứng dụng",
"RunAppOnSessionStartTooltip": "Khởi chạy ứng dụng trên phiên đang hoạt động",
"SeeDetail": "Xem chi tiết",
"SuccessfullyUpdated": "Cập nhật thành công",
"Visit": "Chuyến thăm"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@
"Initializing": "正在初始化...",
"NoNotification": "无通知。",
"Notifications": "通知",
"RunAppOnSessionStart": "自动启动应用",
"RunAppOnSessionStartTooltip": "在会话运行时启动应用",
"SeeDetail": "查看详情",
"SuccessfullyUpdated": "成功更新",
"Visit": "访问"
Expand Down
2 changes: 2 additions & 0 deletions resources/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@
"Initializing": "正在初始化...",
"NoNotification": "無通知。",
"Notifications": "通知",
"RunAppOnSessionStart": "自動啟動應用程式",
"RunAppOnSessionStartTooltip": "在執行中的工作階段上啟動應用程式",
"SeeDetail": "查看詳情",
"SuccessfullyUpdated": "成功更新",
"Visit": "訪問"
Expand Down
Loading