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: hide issue buttons in standalone mode (#9795)
boojack0dfee9d5bc23
diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vueindex c462fb56b1..d81a62743f 100644--- a/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue+++ b/frontend/src/components/IssueV1/components/ActivitySection/Activity/ActionCreator.vue@@ -1,11 +1,13 @@<template>- <router-link+ <component+ :is="isLink ? 'router-link' : 'span'"v-if="userEmail !== SYSTEM_BOT_EMAIL"- :to="`/users/${userEmail}`"- class="font-medium text-main whitespace-nowrap hover:underline"- exact-active-class=""- >{{ user?.title }}</router-link+ v-bind="bindings"+ class="font-medium text-main whitespace-nowrap"+ :class="[isLink && 'hover:underline']">+ {{ user?.title }}+ </component><div v-else class="inline-flex items-center"><span class="font-medium text-main whitespace-nowrap">{{ user?.title }}@@ -20,7 +22,7 @@<script lang="ts" setup>import { computed } from "vue";-import { useUserStore } from "@/store";+import { usePageMode, useUserStore } from "@/store";import { SYSTEM_BOT_EMAIL } from "@/types";import { LogEntity } from "@/types/proto/v1/logging_service";import { extractUserResourceName } from "@/utils";@@ -29,6 +31,8 @@ const props = defineProps<{activity: LogEntity;}>();+const pageMode = usePageMode();+const userEmail = computed(() => {return extractUserResourceName(props.activity.creator);});@@ -36,4 +40,22 @@ const userEmail = computed(() => {const user = computed(() => {return useUserStore().getUserByEmail(userEmail.value);});++const isLink = computed(() => {+ return pageMode.value === "BUNDLED";+});++const bindings = computed(() => {+ if (isLink.value) {+ return {+ to: `/users/${userEmail.value}`,+ activeClass: "",+ exactActiveClass: "",+ onClick: (e: MouseEvent) => {+ e.stopPropagation();+ },+ };+ }+ return {};+});</script>diff --git a/frontend/src/components/IssueV1/components/ActivitySection/ActivitySection.vue b/frontend/src/components/IssueV1/components/ActivitySection/ActivitySection.vueindex e6d4c4088b..6c0475e929 100644--- a/frontend/src/components/IssueV1/components/ActivitySection/ActivitySection.vue+++ b/frontend/src/components/IssueV1/components/ActivitySection/ActivitySection.vue@@ -5,7 +5,9 @@{{ $t("common.activity") }}</span>- <Subscribers />+ <HideInStandaloneMode>+ <Subscribers />+ </HideInStandaloneMode></div><ActivityList />diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vueindex 6943edcb85..d923746de6 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/review/IssueReviewButtonGroup.vue@@ -1,13 +1,15 @@<template><div class="flex items-stretch gap-x-3">- <ReviewActionButton- v-for="action in issueReviewActionList"- :key="action"- :action="action"- @perform-action="- (action) => events.emit('perform-issue-review-action', { action })- "- />+ <template v-if="showIssueReviewActions">+ <ReviewActionButton+ v-for="action in issueReviewActionList"+ :key="action"+ :action="action"+ @perform-action="+ (action) => events.emit('perform-issue-review-action', { action })+ "+ />+ </template><IssueStatusActionButtonGroup:display-mode="displayMode"@@ -28,17 +30,19 @@ import {taskRolloutActionDisplayName,useIssueContext,} from "@/components/IssueV1";-import { useCurrentUserV1 } from "@/store";+import { useCurrentUserV1, usePageMode } from "@/store";import {IssueStatus,Issue_Approver_Status,} from "@/types/proto/v1/issue_service";import { extractUserResourceName, hasWorkspacePermissionV1 } from "@/utils";+import { customTheme } from "@/utils/customTheme";import { ExtraActionOption, IssueStatusActionButtonGroup } from "../common";import ReviewActionButton from "./ReviewActionButton.vue";const { t } = useI18n();const currentUser = useCurrentUserV1();+const pageMode = usePageMode();const { issue, phase, reviewContext, events, activeTask, activeStage } =useIssueContext();const { ready, status, done } = reviewContext;@@ -136,6 +140,10 @@ const forceRolloutActionList = computed((): ExtraActionOption[] => {return [...taskExtraActionOptions, ...stageExtraActionOptions];});+const showIssueReviewActions = computed(() => {+ return !(pageMode.value === "STANDALONE" && customTheme.value === "lixiang");+});+const displayMode = computed(() => {if (forceRolloutActionList.value.length > 0) return "DROPDOWN";return issueReviewActionList.value.length > 0 ? "DROPDOWN" : "BUTTON";diff --git a/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue b/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vueindex eea942a216..03de2153e9 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/HeaderSection.vue@@ -17,14 +17,11 @@<Actions /></div>- <div class="w-full border-t mt-2 mb-4" />-<div- class="flex flex-col md:flex-row md:items-stretch md:justify-between gap-2 px-4"+ class="w-full flex flex-col border-t mt-2 pt-6 md:flex-row md:items-stretch md:justify-between gap-2 px-4"><div class="flex-1 flex flex-col gap-x-2"><VCSInfo />-<RollbackFromTips /></div>@@ -38,6 +35,7 @@<script lang="ts" setup>import { computed } from "vue";+import { usePageMode } from "@/store";import { Task_Status } from "@/types/proto/v1/rollout_service";import { activeTaskInRollout, isDatabaseRelatedIssue } from "@/utils";import { useIssueContext } from "../../logic";@@ -50,6 +48,7 @@ import Title from "./Title.vue";import VCSInfo from "./VCSInfo.vue";const { isCreating, issue } = useIssueContext();+const pageMode = usePageMode();const issueTaskStatus = computed(() => {// For grant request issue, we always show the status as "NOT_STARTED" as task status.@@ -61,6 +60,6 @@ const issueTaskStatus = computed(() => {});const shouldShowAssignee = computed(() => {- return isDatabaseRelatedIssue(issue.value);+ return pageMode.value === "BUNDLED" && isDatabaseRelatedIssue(issue.value);});</script>diff --git a/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vue b/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vueindex 3fc54d373a..34a61d2e59 100644--- a/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vue+++ b/frontend/src/components/IssueV1/components/StageSection/StageInfo/DatabaseInfo.vue@@ -3,7 +3,7 @@<InstanceV1Name:instance="coreDatabaseInfo.instanceEntity":plain="true"- text-class="hover:underline"+ :link="link"><templatev-if="@@ -16,7 +16,8 @@:environment="database.instanceEntity.environmentEntity":plain="true":show-icon="false"- text-class="hover:underline text-control-light"+ :link="link"+ text-class="text-control-light"/></template></InstanceV1Name>@@ -31,14 +32,11 @@:environment="database.effectiveEnvironmentEntity":plain="true":show-icon="false"- text-class="hover:underline text-control-light"+ :link="link"+ text-class="text-control-light"/>- <DatabaseV1Name- :database="database"- :plain="true"- class="hover:underline"- />+ <DatabaseV1Name :database="database" :plain="true" :link="link" /></template><span v-else>{{ coreDatabaseInfo.databaseName }}@@ -76,6 +74,15 @@ import { Task_Status, Task_Type } from "@/types/proto/v1/rollout_service";type DatabaseCreationStatus = "EXISTED" | "PENDING_CREATE" | "CREATED";+withDefaults(+ defineProps<{+ link?: boolean;+ }>(),+ {+ link: true,+ }+);+const { issue, selectedTask } = useIssueContext();const pageMode = usePageMode();diff --git a/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageInfo.vue b/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageInfo.vueindex 52a97028e1..ccd9e37d92 100644--- a/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageInfo.vue+++ b/frontend/src/components/IssueV1/components/StageSection/StageInfo/StageInfo.vue@@ -3,11 +3,14 @@class="flex flex-col lg:flex-row lg:flex-wrap lg:items-center justify-start gap-y-2 gap-x-4 text-sm"><StageSelect />- <DatabaseInfo />+ <DatabaseInfo :link="pageMode === 'BUNDLED'" /></div></template><script setup lang="ts">+import { usePageMode } from "@/store";import DatabaseInfo from "./DatabaseInfo.vue";import StageSelect from "./StageSelect.vue";++const pageMode = usePageMode();</script>diff --git a/frontend/src/components/v2/Model/DatabaseV1Name.vue b/frontend/src/components/v2/Model/DatabaseV1Name.vueindex b92312d07a..f22d12408a 100644--- a/frontend/src/components/v2/Model/DatabaseV1Name.vue+++ b/frontend/src/components/v2/Model/DatabaseV1Name.vue@@ -3,7 +3,7 @@:is="link ? 'router-link' : tag"v-bind="bindings"class="inline-flex items-center gap-x-1"- :class="link && !plain && 'normal-link'"+ :class="[link && !plain && 'normal-link', link && 'hover:underline']"><span v-if="prefix" class="ml-1 text-gray-400">{{ prefix }}</span><span>{{ database.databaseName }}</span>diff --git a/frontend/src/components/v2/Model/EnvironmentV1Name.vue b/frontend/src/components/v2/Model/EnvironmentV1Name.vueindex 2b937b6aa6..c82664490b 100644--- a/frontend/src/components/v2/Model/EnvironmentV1Name.vue+++ b/frontend/src/components/v2/Model/EnvironmentV1Name.vue@@ -3,7 +3,7 @@:is="link ? 'router-link' : tag"v-bind="bindings"class="inline-flex items-center gap-x-1"- :class="link && !plain && 'normal-link'"+ :class="[link && !plain && 'normal-link', link && 'hover:underline']"><span class="line-clamp-1" :class="textClass">{{ environmentV1Name(environment) }}diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Name.vueindex bbe50186ed..1b59092472 100644--- a/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Name.vue@@ -3,7 +3,7 @@:is="link ? 'router-link' : tag"v-bind="bindings"class="inline-flex items-center gap-x-1"- :class="link && !plain && 'normal-link'"+ :class="[link && !plain && 'normal-link', link && 'hover:underline']"><InstanceV1EngineIconv-if="icon && iconPosition === 'prefix'"