Skip to content

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

chore: tweak release detail page (#14260)

boojackda47205cfd75
diff --git a/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue b/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue
index 890ef22259..78facbd9f9 100644
--- a/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue
+++ b/frontend/src/components/Release/ReleaseDetail/BasicInfo.vue
@@ -12,11 +12,15 @@
</div>
<div
v-if="vcsSource && vcsSource?.vcsType !== VCSType.VCS_TYPE_UNSPECIFIED"
- class="flex flex-row items-center"
+ class="flex flex-row items-center gap-1"
>
- <VCSIcon custom-class="h-5" :type="vcsSource.vcsType" />
+ <VCSIcon custom-class="h-4" :type="vcsSource.vcsType" />
<EllipsisText>
- <a :href="vcsSource.pullRequestUrl" target="_blank" class="normal-link">
+ <a
+ :href="vcsSource.pullRequestUrl"
+ target="_blank"
+ class="normal-link !text-sm"
+ >
{{ beautifyPullRequestUrl(vcsSource.pullRequestUrl) }}
</a>
</EllipsisText>
@@ -40,9 +44,14 @@ const { release } = provideReleaseDetailContext();
const vcsSource = computed(() => release.value.vcsSource);
const beautifyPullRequestUrl = (pullRequestUrl: string) => {
- const parsedUrl = new URL(pullRequestUrl);
- return parsedUrl.pathname.length > 0
- ? parsedUrl.pathname.substring(1)
- : parsedUrl.pathname;
+ // Prevent URL parsing error when pullRequestUrl is invalid.
+ try {
+ const parsedUrl = new URL(pullRequestUrl);
+ return parsedUrl.pathname.length > 0
+ ? parsedUrl.pathname.substring(1)
+ : parsedUrl.pathname;
+ } catch {
+ return pullRequestUrl;
+ }
};
</script>
diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
index 7d3629de36..063820e911 100644
--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
@@ -63,17 +63,13 @@
>
{{ $t("release.allow-out-of-order") }}
</NCheckbox>
- <NButton @click.prevent="handleCancelClick">
- <template v-if="state.currentStep === 1" #icon>
- <Undo2Icon class="w-4 h-auto" />
- </template>
+ <NButton quaternary @click.prevent="handleCancelClick">
{{
state.currentStep === 0
? $t("common.cancel")
: $t("common.back")
}}
</NButton>
-
<ErrorTipsButton
style="--n-padding: 0 10px"
:errors="nextButtonErrors"
@@ -92,7 +88,6 @@
</template>
<script lang="ts" setup>
-import { Undo2Icon } from "lucide-vue-next";
import { NButton, NCheckbox } from "naive-ui";
import { computed, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue
index 6d63c44ab6..0e62352355 100644
--- a/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue
+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue
@@ -6,8 +6,14 @@
<div
v-for="spec in flattenSpecList"
:key="spec.id"
- class="max-w-52 flex flex-row items-center flex-wrap gap-1 border px-2 py-1 rounded-md"
+ class="max-w-52 flex flex-row items-center flex-wrap border px-2 py-1 rounded-md"
>
+ <DatabaseView
+ class="text-sm"
+ :database="databaseForPlanSpec(spec)"
+ :link="false"
+ :show-not-found="true"
+ />
<div class="w-full truncate space-x-1">
<NTag round :size="'small'">
{{ specReleaseVersion(spec) }}
@@ -18,12 +24,6 @@
}}
</span>
</div>
- <DatabaseView
- class="text-sm"
- :database="databaseForPlanSpec(spec)"
- :link="false"
- :show-not-found="true"
- />
</div>
<p v-if="flattenSpecList.length === 0" class="text-gray-400 italic">
{{ $t("release.no-tasks-to-apply.self") }}
@@ -99,9 +99,14 @@
</td>
<td>
<div class="flex flex-row items-center gap-2">
- <span v-for="file in temp.files" :key="file">
+ <NTag
+ v-for="file in temp.files"
+ :key="file"
+ round
+ :size="'small'"
+ >
{{ getFileByName(file)?.version }}
- </span>
+ </NTag>
</div>
</td>
</tr>
diff --git a/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue b/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
index d8c193abc9..250956f419 100644
--- a/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
+++ b/frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
@@ -6,9 +6,7 @@
:row-props="rowProps"
:striped="true"
:row-key="(file) => file.id"
- @update:checked-row-keys="
- (val) => onRowSelected(val as string[])
- "
+ @update:checked-row-keys="(val) => onRowSelected(val as string[])"
/>
</template>
@@ -66,18 +64,14 @@ const columnList = computed(() => {
title: t("database.revision.filename"),
width: 128,
ellipsis: true,
- render: (file) => {
- return file.path || "-";
- },
+ render: (file) => file.path || "-",
},
{
key: "statement-size",
title: t("common.statement-size"),
width: 128,
ellipsis: true,
- render: (file) => {
- return bytesToString(file.statementSize.toNumber());
- },
+ render: (file) => bytesToString(file.statementSize.toNumber()),
},
{
key: "statement",