Skip to content

Commit 1f39760

Browse files
committed
feat(FR-1679): add auto refresh to container logs
1 parent 77e1ef1 commit 1f39760

File tree

22 files changed

+30
-0
lines changed

22 files changed

+30
-0
lines changed

react/src/components/ComputeSessionNodeItems/ContainerLogModal.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { downloadBlob } from '../../helper/csv-util';
33
import { useSuspendedBackendaiClient } from '../../hooks';
44
import { useTanQuery } from '../../hooks/reactQueryAlias';
55
import { useMemoWithPrevious } from '../../hooks/useMemoWithPrevious';
6+
import AutoRefreshSwitch from '../AutoRefreshSwitch';
67
import BAISelect from '../BAISelect';
78
import { ReloadOutlined } from '@ant-design/icons';
89
import { LazyLog, ScrollFollow } from '@melloware/react-logviewer';
@@ -217,6 +218,14 @@ const ContainerLogModal: React.FC<ContainerLogModalProps> = ({
217218
onClick={() => refetch()}
218219
/>
219220
</Tooltip>
221+
<AutoRefreshSwitch
222+
interval={5_000}
223+
onRefresh={() => {
224+
refetch();
225+
}}
226+
>
227+
{t('button.AutoRefreshEvery', { seconds: 5 })}
228+
</AutoRefreshSwitch>
220229
</BAIFlex>
221230

222231
<div

resources/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Hinzufügen",
6262
"Apply": "Bewerbung",
63+
"AutoRefreshEvery": "Automatisch alle {{seconds}}s aktualisieren",
6364
"Cancel": "Stornieren",
6465
"Clear": "Löschen",
6566
"ClearLogs": "Protokolle löschen",

resources/i18n/el.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Προσθήκη",
6262
"Apply": "Εφαρμογή",
63+
"AutoRefreshEvery": "Αυτόματη ανανέωση κάθε {{seconds}}s",
6364
"Cancel": "Ματαίωση",
6465
"Clear": "Διαγράφω",
6566
"ClearLogs": "Εκκαθάριση αρχείων καταγραφής",

resources/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"button": {
6464
"Add": "Add",
6565
"Apply": "Apply",
66+
"AutoRefreshEvery": "Auto refresh every {{seconds}}s",
6667
"Cancel": "Cancel",
6768
"Clear": "Clear",
6869
"ClearLogs": "Clear Logs",

resources/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Añadir",
6262
"Apply": "Solicitar",
63+
"AutoRefreshEvery": "Actualizar automáticamente cada {{seconds}}s",
6364
"Cancel": "Cancelar",
6465
"Clear": "Borrar",
6566
"ClearLogs": "Borrar registros",

resources/i18n/fi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Lisää",
6262
"Apply": "Hae",
63+
"AutoRefreshEvery": "Automaattinen päivitys {{seconds}} s välein",
6364
"Cancel": "Peruuta",
6465
"Clear": "Poistaa",
6566
"ClearLogs": "Tyhjennä lokit",

resources/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Ajouter",
6262
"Apply": "Appliquer",
63+
"AutoRefreshEvery": "Rafraîchissement automatique toutes les {{seconds}} s",
6364
"Cancel": "Annuler",
6465
"Clear": "Supprimer",
6566
"ClearLogs": "Effacer les journaux",

resources/i18n/id.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Tambah",
6262
"Apply": "Menerapkan",
63+
"AutoRefreshEvery": "Segarkan otomatis setiap {{seconds}}s",
6364
"Cancel": "Batalkan",
6465
"Clear": "Menghapus",
6566
"ClearLogs": "Hapus Log",

resources/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "Inserisci",
6262
"Apply": "Applicare",
63+
"AutoRefreshEvery": "Aggiornamento automatico ogni {{seconds}}s",
6364
"Cancel": "Annulla",
6465
"Clear": "Eliminare",
6566
"ClearLogs": "Cancella registri",

resources/i18n/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"button": {
6161
"Add": "追加",
6262
"Apply": "応募する",
63+
"AutoRefreshEvery": "{{seconds}}秒ごとに自動更新",
6364
"Cancel": "キャンセル",
6465
"Clear": "消去",
6566
"ClearLogs": "ログをクリアする",

0 commit comments

Comments
 (0)