Skip to content

Commit

Permalink
fix(ui): amend logs scrolling for the last task (#5294)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Oct 3, 2024
1 parent d9ec362 commit 216a083
Show file tree
Hide file tree
Showing 17 changed files with 94 additions and 81 deletions.
130 changes: 65 additions & 65 deletions .github/workflows/generate_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, synchronize]
paths:
- 'ui/src/translations/en.json'
- "ui/src/translations/en.json"
push:
branches:
- develop
Expand All @@ -13,82 +13,82 @@ env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

jobs:
generate:
name: Generate Translations
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: pip install gitpython openai

- name: Generate translations
run: python ui/src/translations/generate_translations.py

commit:
name: Commit directly to PR
runs-on: ubuntu-latest
needs: generate
if: ${{ github.event.pull_request.head.repo.fork == false }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 10
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Set up Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "actions@github.com"
- name: Install dependencies
run: pip install gitpython openai

- name: Check for changes and commit
env:
GH_TOKEN: ${{ github.token }}
run: |
git add ui/src/translations/*.json
if git diff --cached --quiet; then
echo "No changes to commit. Exiting with success."
exit 0
fi
git commit -m "chore(translations): auto generate values for languages other than english"
git push origin ${{ github.head_ref }}
- name: Generate translations
run: python ui/src/translations/generate_translations.py

- name: Set up Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "actions@github.com"
- name: Check for changes and commit
env:
GH_TOKEN: ${{ github.token }}
run: |
git add ui/src/translations/*.json
if git diff --cached --quiet; then
echo "No changes to commit. Exiting with success."
exit 0
fi
git commit -m "chore(translations): auto generate values for languages other than english"
git push origin ${{ github.head_ref }}
pull_request:
name: Open PR for a forked repository
runs-on: ubuntu-latest
needs: generate
if: ${{ github.event.pull_request.head.repo.fork == true }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies
run: pip install gitpython openai

- name: Generate translations
run: python ui/src/translations/generate_translations.py

- name: Set up Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "actions@github.com"
- name: Set up Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "actions@github.com"
- name: Create and push a new branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH_NAME="generated-translations-${{ github.event.pull_request.head.repo.name }}"
- name: Create and push a new branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH_NAME="generated-translations-${{ github.event.pull_request.head.repo.name }}"
git checkout -b $BRANCH_NAME
git add ui/src/translations/*.json
if git diff --cached --quiet; then
echo "No changes to commit. Exiting with success."
exit 0
fi
git commit -m "chore(translations): auto generate values for languages other than english"
git push origin $BRANCH_NAME
git checkout -b $BRANCH_NAME
git add ui/src/translations/*.json
if git diff --cached --quiet; then
echo "No changes to commit. Exiting with success."
exit 0
fi
git commit -m "chore(translations): auto generate values for languages other than english"
git push origin $BRANCH_NAME
2 changes: 1 addition & 1 deletion ui/src/components/executions/ChangeStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@click="visible = !visible"
:disabled="!enabled"
>
<span v-if="component !== 'el-button'">{{ $t('change status') }}</span>
<span v-if="component !== 'el-button'">{{ $t('change_status') }}</span>

<el-dialog v-if="enabled && visible" v-model="visible" :id="uuid" destroy-on-close :append-to-body="true">
<template #header>
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/executions/Gantt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
:target-execution="execution"
:target-flow="flow"
:show-logs="taskTypeByTaskRunId[item.id] !== 'io.kestra.plugin.core.flow.ForEachItem' && taskTypeByTaskRunId[item.id] !== 'io.kestra.core.tasks.flows.ForEachItem'"
class="mh-100"
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/layout/TopNavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
</slot>
</h1>
</div>
<div class="d-flex side gap-2 flex-shrink-0">
<div class="d-flex side gap-2 flex-shrink-0 align-items-center">
<div class="d-none d-lg-flex align-items-center">
<global-search class="trigger-flow-guided-step" />
</div>
<div class="d-none d-lg-flex">
<div class="d-flex side gap-2 flex-shrink-0 align-items-center">
<el-button v-if="shouldDisplayDeleteButton && logs !== undefined && logs.length > 0" @click="deleteLogs()">
<TrashCan class="me-2" />
<span>{{ $t("delete logs") }}</span>
Expand Down
3 changes: 2 additions & 1 deletion ui/src/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "Aktive Slots",
"concurrency": "Nebenläufigkeit",
"open sidebar": "Seitenleiste öffnen",
"close sidebar": "Seitenleiste schließen"
"close sidebar": "Seitenleiste schließen",
"change_status": "Status ändern"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@
"desc_no_limit": "Read more about <a href=\"https://kestra.io/docs/workflow-components/concurrency\" target=\"_blank\">Concurrency Limits</a> in our documentation."
},
"open sidebar": "open sidebar",
"close sidebar": "close sidebar"
"close sidebar": "close sidebar",
"change_status": "Change status"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "Ranuras activas",
"concurrency": "Concurrente",
"open sidebar": "abrir barra lateral",
"close sidebar": "cerrar barra lateral"
"close sidebar": "cerrar barra lateral",
"change_status": "Cambiar estado"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@
"active-slots": "Slots actifs",
"concurrency": "Concurrence",
"open sidebar": "ouvrir la barre latérale",
"close sidebar": "fermer la barre latérale"
"close sidebar": "fermer la barre latérale",
"change_status": "Changer le statut"
}
}
2 changes: 1 addition & 1 deletion ui/src/translations/generate_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def translate_dict(en_dict, target_language):
translated_value = translate_dict(value, target_language)
else:
translated_value = translate_text(value, target_language)
print(f"Translating key '{key}' with value '{value}' from English, to value '{translated_value}' in {target_language}.")
translated_dict[key] = translated_value
return translated_dict

Expand Down Expand Up @@ -160,7 +161,6 @@ def get_keys_to_translate(file_path="ui/src/translations/en.json"):
keys_to_translate = detect_changes(current_en_dict, previous_en_dict)
en_flat = flatten_dict(current_en_dict)
to_translate = {k: en_flat[k] for k in keys_to_translate}
print("Changed data requiring translatation:", to_translate)
return to_translate


Expand Down
3 changes: 2 additions & 1 deletion ui/src/translations/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "सक्रिय स्लॉट्स",
"concurrency": "समानांतरता",
"open sidebar": "साइडबार खोलें",
"close sidebar": "साइडबार बंद करें"
"close sidebar": "साइडबार बंद करें",
"change_status": "स्थिति बदलें"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "Slot attivi",
"concurrency": "Concurrency",
"open sidebar": "apri barra laterale",
"close sidebar": "chiudi barra laterale"
"close sidebar": "chiudi barra laterale",
"change_status": "Cambia stato"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "アクティブスロット",
"concurrency": "並行性",
"open sidebar": "サイドバーを開く",
"close sidebar": "サイドバーを閉じる"
"close sidebar": "サイドバーを閉じる",
"change_status": "ステータスを変更"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "활성 슬롯",
"concurrency": "동시성",
"open sidebar": "사이드바 열기",
"close sidebar": "사이드바 닫기"
"close sidebar": "사이드바 닫기",
"change_status": "상태 변경"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "Aktywne sloty",
"concurrency": "Współbieżność",
"open sidebar": "otwórz pasek boczny",
"close sidebar": "zamknij pasek boczny"
"close sidebar": "zamknij pasek boczny",
"change_status": "Zmień status"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "Slots ativos",
"concurrency": "Concorrência",
"open sidebar": "abrir barra lateral",
"close sidebar": "fechar barra lateral"
"close sidebar": "fechar barra lateral",
"change_status": "Alterar status"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "Активные слоты",
"concurrency": "Конкурентность",
"open sidebar": "открыть боковую панель",
"close sidebar": "закрыть боковую панель"
"close sidebar": "закрыть боковую панель",
"change_status": "Изменить статус"
}
}
3 changes: 2 additions & 1 deletion ui/src/translations/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@
"active-slots": "活动槽位",
"concurrency": "并发",
"open sidebar": "打开侧边栏",
"close sidebar": "关闭侧边栏"
"close sidebar": "关闭侧边栏",
"change_status": "更改状态"
}
}

0 comments on commit 216a083

Please sign in to comment.