Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Show alert if there is error in either Run or Check tab

天舟42d71d679b62
diff --git a/frontend/src/components/IssueStagePanel.vue b/frontend/src/components/IssueStagePanel.vue
index aaeeb8a023..e1269f3f57 100644
--- a/frontend/src/components/IssueStagePanel.vue
+++ b/frontend/src/components/IssueStagePanel.vue
@@ -22,7 +22,7 @@
</div>
<div class="mb-2">
<BBTabFilter
- :tabItemList="tabItemList"
+ :tabItemList="tabItemList(task)"
:selectedIndex="state.selectedIndex"
@select-index="
(index) => {
@@ -77,12 +77,32 @@ export default {
(curStage, _) => {}
);
- const tabItemList = computed((): BBTabFilterItem[] => {
+ const tabItemList = (task: Task): BBTabFilterItem[] => {
+ let showRunAlert = false;
+ let showCheckAlert = false;
+
+ for (const run of task.taskRunList) {
+ if (run.status == "FAILED") {
+ showRunAlert = true;
+ break;
+ }
+ }
+ for (const run of task.taskCheckRunList) {
+ for (const result of run.result.resultList) {
+ if (result.status == "ERROR") {
+ showCheckAlert = true;
+ break;
+ }
+ }
+ if (showCheckAlert) {
+ break;
+ }
+ }
return [
- { title: "Run", alert: false },
- { title: "Check", alert: false },
+ { title: "Run", alert: showRunAlert },
+ { title: "Check", alert: showCheckAlert },
];
- });
+ };
const activeTask = computed((): Task => {
return activeTaskInStage(props.stage);