0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-21 15:48:59 +01:00

fix: move dependency graph button to header actions group and improve UX

- Moved "Dependency Graph" button to the right side of the header next to "Rerun all jobs" button
- Grouped all action buttons (approve, cancel, rerun, graph) in a consistent UI pattern
- Added locale support for "Dependency Graph" button text across all languages
- Fixed button behavior by using 'primary' class instead of 'link-action' to prevent page reloads
- Added conditional display (only shown when run.jobs.length > 1) to avoid confusion when there's only one job
- Improved user experience by ensuring the graph button is only visible when it's actually useful

This change addresses the confusing behavior where clicking the graph button did nothing when there was only one job, and makes the UI more intuitive by placing related actions together in the header.
This commit is contained in:
Semenets V. Pavel 2026-02-18 11:01:44 +03:00
parent f59d768572
commit 0a86d2a2cb
31 changed files with 50 additions and 25 deletions

View File

@ -3268,6 +3268,7 @@
"actions.runs.no_workflows.documentation": "Další informace o Gitea Actions naleznete v <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"%s\">dokumentaci</a>.",
"actions.runs.no_runs": "Pracovní postup zatím nebyl spuštěn.",
"actions.runs.empty_commit_message": "(prázdná zpráva commitu)",
"actions.runs.dependency_graph": "Graf závislostí",
"actions.runs.expire_log_message": "Logy byly vyčištěny, protože byly příliš staré.",
"actions.workflow.disable": "Zakázat pracovní postup",
"actions.workflow.disable_success": "Pracovní postup „%s“ byl úspěšně deaktivován.",

View File

@ -3209,6 +3209,7 @@
"actions.runs.delete.description": "Bist du sicher, dass du diese Workflow-Ausführung dauerhaft löschen möchtest? Diese Aktion kann nicht rückgängig gemacht werden.",
"actions.runs.not_done": "Diese Workflow-Ausführung ist noch nicht abgeschlossen.",
"actions.runs.view_workflow_file": "Workflow-Datei anzeigen",
"actions.runs.dependency_graph": "Abhängigkeitsdiagramm",
"actions.workflow.disable": "Workflow deaktivieren",
"actions.workflow.disable_success": "Workflow '%s' erfolgreich deaktiviert.",
"actions.workflow.enable": "Workflow aktivieren",

View File

@ -2974,6 +2974,7 @@
"actions.runs.no_workflows": "Δεν υπάρχουν ροές εργασίας ακόμα.",
"actions.runs.no_runs": "Η ροή εργασίας δεν έχει τρέξει ακόμα.",
"actions.runs.empty_commit_message": "(κενό μήνυμα υποβολής)",
"actions.runs.dependency_graph": "Γράφημα εξαρτήσεων",
"actions.workflow.disable": "Απενεργοποίηση Ροής Εργασιών",
"actions.workflow.disable_success": "Η ροή εργασίας '%s' απενεργοποιήθηκε επιτυχώς.",
"actions.workflow.enable": "Ενεργοποίηση Ροής Εργασίας",

View File

@ -3694,6 +3694,7 @@
"actions.runs.delete.description": "Are you sure you want to permanently delete this workflow run? This action cannot be undone.",
"actions.runs.not_done": "This workflow run is not done.",
"actions.runs.view_workflow_file": "View workflow file",
"actions.runs.dependency_graph": "Dependency Graph",
"actions.workflow.disable": "Disable Workflow",
"actions.workflow.disable_success": "Workflow '%s' disabled successfully.",
"actions.workflow.enable": "Enable Workflow",

View File

@ -2933,6 +2933,7 @@
"actions.runs.status_no_select": "Todo el estado",
"actions.runs.no_results": "No hay resultados coincidentes.",
"actions.runs.no_runs": "El flujo de trabajo no tiene ejecuciones todavía.",
"actions.runs.dependency_graph": "Gráfico de dependencias",
"actions.workflow.disable": "Desactivar fllujo de trabajo",
"actions.workflow.disable_success": "Flujo de trabajo '%s' deshabilitado correctamente.",
"actions.workflow.enable": "Activar flujo de trabajo",

View File

@ -2228,5 +2228,6 @@
"actions.runners.status.active": "فعال",
"actions.runners.version": "نسخه",
"actions.runs.commit": "کامیت",
"actions.runs.dependency_graph": "نمودار وابستگی",
"git.filemode.symbolic_link": "پیوند نمادین"
}

View File

@ -1474,5 +1474,6 @@
"actions.runners.labels": "Tunnisteet",
"actions.runners.task_list.run": "Suorita",
"actions.runners.task_list.repository": "Repo",
"actions.runners.version": "Versio"
"actions.runners.version": "Versio",
"actions.runs.dependency_graph": "Riippuvuuskaavio"
}

View File

@ -3679,6 +3679,7 @@
"actions.runs.delete.description": "Êtes-vous sûr de vouloir supprimer définitivement cette exécution ? Cette action ne peut pas être annulée.",
"actions.runs.not_done": "Cette exécution du flux de travail nest pas terminée.",
"actions.runs.view_workflow_file": "Voir le fichier du flux de travail",
"actions.runs.dependency_graph": "Graphique des dépendances",
"actions.workflow.disable": "Désactiver le flux de travail",
"actions.workflow.disable_success": "Le flux de travail « %s » a bien été désactivé.",
"actions.workflow.enable": "Activer le flux de travail",

View File

@ -3686,6 +3686,7 @@
"actions.runs.delete.description": "An bhfuil tú cinnte gur mian leat an rith sreabha oibre seo a scriosadh go buan? Ní féidir an gníomh seo a chealú.",
"actions.runs.not_done": "Níl an rith sreabha oibre seo críochnaithe.",
"actions.runs.view_workflow_file": "Féach ar chomhad sreabha oibre",
"actions.runs.dependency_graph": "Graf na nDéanamh",
"actions.workflow.disable": "Díchumasaigh sreabhadh oibre",
"actions.workflow.disable_success": "D'éirigh le sreabhadh oibre '%s' a dhíchumasú.",
"actions.workflow.enable": "Cumasaigh sreabhadh oibre",

View File

@ -1383,5 +1383,6 @@
"actions.runners.task_list.repository": "Tároló",
"actions.runners.status.active": "Aktív",
"actions.runners.version": "Verzió",
"actions.runs.dependency_graph": "Függőségi grafikon",
"git.filemode.symbolic_link": "Szimbolikus hivatkozás"
}

View File

@ -1175,6 +1175,7 @@
"actions.runs.no_workflows.documentation": "Untuk informasi lebih lanjut tentang Gitea Actions, lihat <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"%s\">dokumentasi</a>.",
"actions.runs.no_runs": "Alur kerja belum berjalan.",
"actions.runs.empty_commit_message": "(pesan commit kosong)",
"actions.runs.dependency_graph": "Grafik ketergantungan",
"actions.workflow.disable": "Nonaktifkan Alur Kerja",
"actions.workflow.disable_success": "Alur kerja '%s' berhasil dinonaktifkan.",
"actions.workflow.enable": "Aktifkan Alur Kerja",

View File

@ -1116,5 +1116,6 @@
"actions.runners.task_list.commit": "Framlag",
"actions.runners.status.active": "Virkt",
"actions.runners.version": "Útgáfa",
"actions.runs.commit": "Framlag"
"actions.runs.commit": "Framlag",
"actions.runs.dependency_graph": "Veflínur"
}

View File

@ -2377,5 +2377,6 @@
"actions.runners.task_list.run": "Esegui",
"actions.runners.status.active": "Attivo",
"actions.runners.version": "Versione",
"actions.runs.dependency_graph": "Grafico delle dipendenze",
"git.filemode.symbolic_link": "Link Simbolico"
}

View File

@ -3694,6 +3694,7 @@
"actions.runs.delete.description": "このワークフローを完全に削除してもよろしいですか?この操作は元に戻せません。",
"actions.runs.not_done": "このワークフローの実行は完了していません。",
"actions.runs.view_workflow_file": "ワークフローファイルを表示",
"actions.runs.dependency_graph": "依存関係グラフ",
"actions.workflow.disable": "ワークフローを無効にする",
"actions.workflow.disable_success": "ワークフロー '%s' が無効になりました。",
"actions.workflow.enable": "ワークフローを有効にする",

View File

@ -1346,5 +1346,6 @@
"actions.runners.task_list.commit": "커밋",
"actions.runners.status.active": "사용",
"actions.runners.version": "버전",
"actions.runs.commit": "커밋"
"actions.runs.commit": "커밋",
"actions.runs.dependency_graph": "의존성 그래프"
}

View File

@ -3014,6 +3014,7 @@
"actions.runs.no_workflows": "Vēl nav nevienas darbplūsmas.",
"actions.runs.no_runs": "Darbplūsmai vēl nav nevienas izpildes.",
"actions.runs.empty_commit_message": "(tukšs revīzijas ziņojums)",
"actions.runs.dependency_graph": "Atkarību grafiks",
"actions.workflow.disable": "Atspējot darbplūsmu",
"actions.workflow.disable_success": "Darbplūsma '%s' ir veiksmīgi atspējota.",
"actions.workflow.enable": "Iespējot darbplūsmu",

View File

@ -2093,5 +2093,6 @@
"actions.runners.task_list.run": "Uitvoeren",
"actions.runners.task_list.repository": "Opslagplaats",
"actions.runners.status.active": "Actief",
"actions.runners.version": "Versie"
"actions.runners.version": "Versie",
"actions.runs.dependency_graph": "Afhankelijkheidsdiagram"
}

View File

@ -2110,5 +2110,6 @@
"actions.runners.task_list.repository": "Repozytorium",
"actions.runners.status.active": "Aktywne",
"actions.runners.version": "Wersja",
"actions.runs.dependency_graph": "Wykres zależności",
"git.filemode.symbolic_link": "Dowiązanie symboliczne"
}

View File

@ -3256,6 +3256,7 @@
"actions.runs.no_workflows.documentation": "Para obter mais informações sobre as Ações do Gitea, consulte <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"%s\">a documentação</a>.",
"actions.runs.no_runs": "O workflow ainda não foi executado.",
"actions.runs.empty_commit_message": "(mensagem de commit vazia)",
"actions.runs.dependency_graph": "Gráfico de dependências",
"actions.workflow.disable": "Desabilitar Workflow",
"actions.workflow.disable_success": "Workflow '%s' desativado com sucesso.",
"actions.workflow.enable": "Habilitar Workflow",

View File

@ -3675,6 +3675,7 @@
"actions.runs.delete.description": "Tem a certeza que pretende eliminar permanentemente a execução desta sequência de trabalho? Esta operação não poderá ser desfeita.",
"actions.runs.not_done": "A execução desta sequência de trabalho ainda não terminou.",
"actions.runs.view_workflow_file": "Ver ficheiro da sequência de trabalho",
"actions.runs.dependency_graph": "Gráfico de dependências",
"actions.workflow.disable": "Desabilitar sequência de trabalho",
"actions.workflow.disable_success": "A sequência de trabalho '%s' foi desabilitada com sucesso.",
"actions.workflow.enable": "Habilitar sequência de trabalho",

View File

@ -2955,6 +2955,7 @@
"actions.runs.no_workflows": "Пока нет рабочих процессов.",
"actions.runs.no_runs": "Рабочий поток ещё не запускался.",
"actions.runs.empty_commit_message": "(пустое сообщение коммита)",
"actions.runs.dependency_graph": "Граф зависимостей",
"actions.workflow.disable": "Выключить рабочий поток",
"actions.workflow.disable_success": "Рабочий поток «%s» успешно выключен.",
"actions.workflow.enable": "Включить рабочий поток",

View File

@ -2189,5 +2189,6 @@
"actions.runners.status.active": "ක්රියාකාරී",
"actions.runners.version": "අනුවාදය",
"actions.runs.commit": "කැප",
"actions.runs.dependency_graph": "ආශ්‍රිත ප්‍රස්ථාරය",
"git.filemode.symbolic_link": "සංකේතාත්මක සබැඳිය"
}

View File

@ -1160,5 +1160,6 @@
"actions.runners.task_list.repository": "Repozitár",
"actions.runners.status.unspecified": "Neznámy",
"actions.runners.version": "Verzia",
"actions.runs.dependency_graph": "Graf závislostí",
"git.filemode.symbolic_link": "Symbolický odkaz"
}

View File

@ -1733,5 +1733,6 @@
"actions.runners.task_list.run": "Kör",
"actions.runners.task_list.repository": "Utvecklingskatalog",
"actions.runners.status.active": "Aktiv",
"actions.runs.dependency_graph": "beroendediagram",
"git.filemode.symbolic_link": "Symbolisk länk"
}

View File

@ -3694,6 +3694,7 @@
"actions.runs.delete.description": "Bu iş akışı çalışmasını kalıcı olarak silmek istediğinizden emin misiniz? Bu eylem geri alınamaz.",
"actions.runs.not_done": "Bu iş akışı tamamlanmadı.",
"actions.runs.view_workflow_file": "İş akışı dosyasını görüntüle",
"actions.runs.dependency_graph": "Bağımlılık grafiği",
"actions.workflow.disable": "İş Akışını Devre Dışı Bırak",
"actions.workflow.disable_success": "'%s' iş akışı başarıyla devre dışı bırakıldı.",
"actions.workflow.enable": "İş Akışını Etkinleştir",

View File

@ -3144,6 +3144,7 @@
"actions.runs.delete.description": "Ви впевнені, що хочете остаточно видалити цей робочий процес? Цю дію неможливо скасувати.",
"actions.runs.not_done": "Виконання цього робочого процесу не завершено.",
"actions.runs.view_workflow_file": "Перегляд файлу робочого процесу",
"actions.runs.dependency_graph": "Графік залежностей",
"actions.workflow.disable": "Вимкнути робочий процес",
"actions.workflow.disable_success": "Робочий процес '%s' успішно вимкнено.",
"actions.workflow.enable": "Увімкнути робочий процес",

View File

@ -3694,6 +3694,7 @@
"actions.runs.delete.description": "您确定要永久删除此工作流运行吗?此操作无法撤消。",
"actions.runs.not_done": "此工作流运行尚未完成。",
"actions.runs.view_workflow_file": "查看工作流文件",
"actions.runs.dependency_graph": "依赖关系图",
"actions.workflow.disable": "禁用工作流",
"actions.workflow.disable_success": "工作流「%s」已成功禁用。",
"actions.workflow.enable": "启用工作流",

View File

@ -3262,6 +3262,7 @@
"actions.runs.no_workflows.documentation": "有關 Gitea Actions 的更多資訊,請參閱<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"%s\">文件</a>。",
"actions.runs.no_runs": "工作流程沒有執行過。",
"actions.runs.empty_commit_message": "(空的提交訊息)",
"actions.runs.dependency_graph": "依賴關係圖",
"actions.runs.expire_log_message": "日誌已被清除,因為它們太舊了。",
"actions.workflow.disable": "停用工作流程",
"actions.workflow.disable_success": "已成功停用工作流程「%s」。",

View File

@ -10,6 +10,7 @@
data-locale-runs-scheduled="{{ctx.Locale.Tr "actions.runs.scheduled"}}"
data-locale-runs-commit="{{ctx.Locale.Tr "actions.runs.commit"}}"
data-locale-runs-pushed-by="{{ctx.Locale.Tr "actions.runs.pushed_by"}}"
data-locale-runs-dependency-graph="{{ctx.Locale.Tr "actions.runs.dependency_graph"}}"
data-locale-status-unknown="{{ctx.Locale.Tr "actions.status.unknown"}}"
data-locale-status-waiting="{{ctx.Locale.Tr "actions.status.waiting"}}"
data-locale-status-running="{{ctx.Locale.Tr "actions.status.running"}}"

View File

@ -265,8 +265,8 @@ export default defineComponent({
methods: {
saveLocaleStorageOptions() {
const opts: LocaleStorageOptions = {
autoScroll: this.optionAlwaysAutoScroll,
expandRunning: this.optionAlwaysExpandRunning,
autoScroll: this.optionAlwaysAutoScroll,
expandRunning: this.optionAlwaysExpandRunning,
showSummary: this.showSummary,
actionsLogShowSeconds: this.timeVisible['log-time-seconds'],
actionsLogShowTimestamps: this.timeVisible['log-time-stamp'],
@ -524,15 +524,20 @@ export default defineComponent({
<!-- eslint-disable-next-line vue/no-v-html -->
<h2 class="action-info-summary-title-text" v-html="run.titleHTML"/>
</div>
<button class="ui basic small compact button primary" @click="approveRun()" v-if="run.canApprove">
{{ locale.approve }}
</button>
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
{{ locale.cancel }}
</button>
<button class="ui basic small compact button link-action tw-shrink-0" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
{{ locale.rerun_all }}
</button>
<div class="tw-flex tw-space-x-2">
<button class="ui basic small compact button primary tw-shrink-0" @click="showSummary = !showSummary" :class="{ active: showSummary }" v-if="run.jobs.length > 1">
{{ locale.dependencyGraph }}
</button>
<button class="ui basic small compact button primary" @click="approveRun()" v-if="run.canApprove">
{{ locale.approve }}
</button>
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
{{ locale.cancel }}
</button>
<button class="ui basic small compact button link-action tw-shrink-0" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
{{ locale.rerun_all }}
</button>
</div>
</div>
<div class="action-commit-summary">
<span><a class="muted" :href="run.workflowLink"><b>{{ run.workflowID }}</b></a>:</span>
@ -553,16 +558,6 @@ export default defineComponent({
</div>
<div class="action-view-body">
<div class="action-view-left">
<div class="summary-toggle">
<button
class="ui basic small button"
@click="showSummary = !showSummary"
:class="{ active: showSummary }"
>
<SvgIcon :name="showSummary ? 'octicon-chevron-down' : 'octicon-chevron-right'"/>
Dependency Graph
</button>
</div>
<div class="job-group-section">
<div class="job-brief-list">
<a class="job-brief-item" :href="run.link+'/jobs/'+index" :class="parseInt(jobIndex) === index ? 'selected' : ''" v-for="(job, index) in run.jobs" :key="job.id">

View File

@ -22,6 +22,7 @@ export function initRepositoryActionView() {
scheduled: el.getAttribute('data-locale-runs-scheduled'),
commit: el.getAttribute('data-locale-runs-commit'),
pushedBy: el.getAttribute('data-locale-runs-pushed-by'),
dependencyGraph: el.getAttribute('data-locale-runs-dependency-graph'),
artifactsTitle: el.getAttribute('data-locale-artifacts-title'),
areYouSure: el.getAttribute('data-locale-are-you-sure'),
artifactExpired: el.getAttribute('data-locale-artifact-expired'),