Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add alert to approved issues (#16970)
boojack050a3be19b03
diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vueindex 98d951ea61..8ca8569d38 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue@@ -84,6 +84,7 @@</div></div><div class="ml-3 min-w-0 flex-1">+ <h3 class="sr-only" id="issue-comment-editor"></h3><label for="comment" class="sr-only">{{ $t("issue.add-a-comment") }}</label>diff --git a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vueindex dd806fc2d7..265336604b 100644--- a/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue+++ b/frontend/src/components/IssueV1/components/IssueCommentSection/IssueCommentView/IssueCommentAction.vue@@ -1,5 +1,9 @@<template><div class="ml-3 min-w-0 flex-1">+ <h3+ class="sr-only"+ :id="`${issueCommentNamePrefix}${getProjectIdIssueIdIssueCommentId(issueComment.name).issueCommentId}`"+ ></h3><div class="min-w-0 flex-1 pt-1 flex justify-between"><div class="text-sm text-control-light space-x-1"><ActionCreator@@ -56,7 +60,12 @@<script lang="ts" setup>import HumanizeTs from "@/components/misc/HumanizeTs.vue";-import { IssueCommentType, type ComposedIssueComment } from "@/store";+import {+ getProjectIdIssueIdIssueCommentId,+ issueCommentNamePrefix,+ IssueCommentType,+ type ComposedIssueComment,+} from "@/store";import { useUserStore, extractUserId } from "@/store";import { getTimeForPbTimestampProtoEs, type ComposedIssue } from "@/types";import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vueindex 2624d53f3a..99e201bad2 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueReviewActionPanel.vue@@ -80,19 +80,22 @@<script setup lang="ts">import { create } from "@bufbuild/protobuf";import { NButton, NCheckbox, NInput, NTooltip } from "naive-ui";-import { computed, reactive, ref } from "vue";+import { computed, nextTick, reactive, ref } from "vue";import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";import CommonDrawer from "@/components/IssueV1/components/Panel/CommonDrawer.vue";import { ErrorList } from "@/components/IssueV1/components/common";import { usePlanContextWithIssue } from "@/components/Plan/logic";import RequiredStar from "@/components/RequiredStar.vue";import { issueServiceClientConnect } from "@/grpcweb";+import { PROJECT_V1_ROUTE_ISSUE_DETAIL_V1 } from "@/router/dashboard/projectV1";import {ApproveIssueRequestSchema,RejectIssueRequestSchema,RequestIssueRequestSchema,} from "@/types/proto-es/v1/issue_service_pb";import { PlanCheckRun_Status } from "@/types/proto-es/v1/plan_service_pb";+import { extractIssueUID, extractProjectResourceName } from "@/utils";import type { IssueReviewAction } from "../unified";type LocalState = {@@ -107,6 +110,7 @@ const emit = defineEmits<{}>();const { t } = useI18n();+const router = useRouter();const state = reactive<LocalState>({loading: false,});@@ -231,6 +235,17 @@ const handleConfirm = async () => {events.emit("perform-issue-review-action", { action });} finally {state.loading = false;+ // Redirect to issue comment section.+ nextTick(() => {+ router.push({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,+ params: {+ projectId: extractProjectResourceName(issue.value.name),+ issueId: extractIssueUID(issue.value.name),+ },+ hash: `#issue-comment-editor`,+ });+ });emit("close");}};diff --git a/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/ActivitySection.vue b/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/ActivitySection.vueindex de0495e37f..e0632c6c40 100644--- a/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/ActivitySection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/ActivitySection/ActivitySection.vue@@ -1,14 +1,81 @@<template>- <div class="space-y-4 py-4">- <div class="flex items-center justify-between">+ <div class="space-y-3 py-4">+ <div class="flex items-center justify-between gap-2"><h3 class="text-base font-medium">{{ $t("common.activity") }}</h3></div>+ <!-- Alert about issue approved and waiting for rollout -->+ <NAlert v-if="showApprovedAlert" type="success" :size="'small'" closable>+ <template #icon>+ <ThumbsUpIcon :size="16" />+ </template>+ <router-link+ v-if="showApprovedAlert && rolloutLink"+ :to="rolloutLink"+ class="inline-flex items-center gap-1 hover:opacity-80"+ >+ <span>{{ $t("issue.approval.approved-and-waiting-for-rollout") }}</span>+ <ExternalLinkIcon class="opacity-80" :size="16" />+ </router-link>+ </NAlert><IssueCommentList /></div></template><script setup lang="ts">+import { ThumbsUpIcon, ExternalLinkIcon } from "lucide-vue-next";+import { NAlert } from "naive-ui";+import { computed } from "vue";import IssueCommentList from "@/components/IssueV1/components/IssueCommentSection/IssueCommentList.vue";+import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL } from "@/router/dashboard/projectV1";+import { useCurrentProjectV1 } from "@/store";+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";+import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";+import { extractProjectResourceName } from "@/utils";+import { usePlanContext, useIssueReviewContext } from "../../../logic";++const { rollout, issue } = usePlanContext();+const { project } = useCurrentProjectV1();++// Show alert when issue is approved and rollout hasn't started yet+const showApprovedAlert = computed(() => {+ if (!issue?.value || !rollout?.value) return false;++ // Check if issue is open+ if (issue.value.status !== IssueStatus.OPEN) return false;++ // Check if issue is approved+ const reviewContext = useIssueReviewContext();+ const isApproved = reviewContext.done.value;++ if (!isApproved) return false;++ // Check if rollout has started+ const hasStartedTasks = rollout.value.stages.some((stage) =>+ stage.tasks.some(+ (task) =>+ task.status !== Task_Status.NOT_STARTED &&+ task.status !== Task_Status.STATUS_UNSPECIFIED+ )+ );++ return !hasStartedTasks;+});++// Computed property for rollout link+const rolloutLink = computed(() => {+ if (!rollout?.value) return null;++ const rolloutId = rollout.value.name.split("/").pop();+ if (!rolloutId) return null;++ return {+ name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL,+ params: {+ projectId: extractProjectResourceName(project.value.name),+ rolloutId,+ },+ };+});</script>diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 3f59ae1348..dd27a8685f 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1072,7 +1072,8 @@"rejected-description": "This issue has been rejected by approvers. Please enable force run to proceed.","pending-description": "This issue is waiting for approval. Please enable force run to proceed.","rejected-error": "Issue approval has been rejected. Please enable force run to proceed.",- "pending-error": "Issue approval is pending. Please enable force run to proceed."+ "pending-error": "Issue approval is pending. Please enable force run to proceed.",+ "approved-and-waiting-for-rollout": "This issue has been approved and is ready to rollout."},"new-layout": "New CI/CD Layout"},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 287a892224..2f7f0c396d 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1072,7 +1072,8 @@"rejected-description": "Este problema ha sido rechazado por los aprobadores. Se requiere una implementación forzada para continuar.","pending-description": "Este problema está pendiente de aprobación. Se requiere una implementación forzada para continuar.","rejected-error": "Se ha rechazado la aprobación del problema. Habilite la implementación forzada para continuar.",- "pending-error": "La aprobación del problema está pendiente. Habilite la implementación forzada para continuar."+ "pending-error": "La aprobación del problema está pendiente. Habilite la implementación forzada para continuar.",+ "approved-and-waiting-for-rollout": "Este problema ha sido aprobado y está listo para implementarse."},"new-layout": "Nuevo diseño de CI/CD"},diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex ea99c6875d..7472bde6aa 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1072,7 +1072,8 @@"rejected-description": "この問題は承認者によって拒否されました。続行するには強制ロールアウトが必要です。","pending-description": "この問題は承認待ちです。続行するには強制ロールアウトが必要です。","rejected-error": "問題の承認が拒否されました。続行するには強制ロールアウトを有効にしてください。",- "pending-error": "問題の承認が保留中です。続行するには強制ロールアウトを有効にしてください。"+ "pending-error": "問題の承認が保留中です。続行するには強制ロールアウトを有効にしてください。",+ "approved-and-waiting-for-rollout": "この問題は承認されており、展開する準備ができています。"},"new-layout": "新しいCI/CDレイアウト"},diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 6fad2590b2..3a723805f9 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1072,7 +1072,8 @@"rejected-description": "Vấn đề này đã bị người phê duyệt từ chối. Cần phải triển khai bắt buộc để tiếp tục.","pending-description": "Sự cố này đang chờ phê duyệt. Cần phải triển khai bắt buộc để tiếp tục.","rejected-error": "Đã từ chối phê duyệt vấn đề. Vui lòng bật triển khai bắt buộc để tiếp tục.",- "pending-error": "Đang chờ phê duyệt vấn đề. Vui lòng bật triển khai bắt buộc để tiếp tục."+ "pending-error": "Đang chờ phê duyệt vấn đề. Vui lòng bật triển khai bắt buộc để tiếp tục.",+ "approved-and-waiting-for-rollout": "Phiên bản này đã được chấp thuận và sẵn sàng triển khai."},"new-layout": "Bố cục CI/CD mới"},diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 1439764115..b87498eea9 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1072,7 +1072,8 @@"rejected-description": "此工单已被审批者退回。确认并勾选强制运行才能继续。","pending-description": "此工单正在等待审批。确认并勾选强制运行才能继续。","rejected-error": "此工单已被退回。请确认并勾选强制运行才能继续。",- "pending-error": "此工单正在等待审批。请确认并勾选强制运行才能继续。"+ "pending-error": "此工单正在等待审批。请确认并勾选强制运行才能继续。",+ "approved-and-waiting-for-rollout": "该工单已批准,等待发布。"},"new-layout": "使用新版 CI/CD 页面"},