Skip to content

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

chore: use `NEllipsis` in task run log detail cell (#13627)

boojack51e37ad7b04c
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue
index e8dfb1f7ad..49d38e942a 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/AffectedRowsCell.vue
@@ -1,23 +1,17 @@
<template>
- <div class="text-sm">
- <div v-if="!isNaN(affectedRows)">
- {{
- $t("issue.task-run.task-run-log.affected-rows-n", { n: affectedRows })
- }}
- </div>
- <div v-else class="text-control-placeholder">-</div>
- </div>
+ <span v-if="!isNaN(affectedRows)">
+ {{ $t("issue.task-run.task-run-log.affected-rows-n", { n: affectedRows }) }}
+ </span>
+ <span v-else class="text-control-placeholder">-</span>
</template>
<script setup lang="ts">
import { computed } from "vue";
import { TaskRunLogEntry_Type } from "@/types/proto/v1/rollout_service";
-import type { Sheet } from "@/types/proto/v1/sheet_service";
import type { FlattenLogEntry } from "../common";
const props = defineProps<{
entry: FlattenLogEntry;
- sheet?: Sheet;
}>();
const affectedRows = computed(() => {
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DatabaseSyncCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DatabaseSyncCell.vue
index 40f0725891..0124156367 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DatabaseSyncCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DatabaseSyncCell.vue
@@ -1,19 +1,15 @@
<template>
- <div class="text-sm">
- <div v-if="error" class="text-error">{{ error }}</div>
- <div v-else class="text-control-placeholder">-</div>
- </div>
+ <span v-if="error" class="text-error">{{ error }}</span>
+ <span v-else class="text-control-placeholder">-</span>
</template>
<script setup lang="ts">
import { computed } from "vue";
import { TaskRunLogEntry_Type } from "@/types/proto/v1/rollout_service";
-import type { Sheet } from "@/types/proto/v1/sheet_service";
import type { FlattenLogEntry } from "../common";
const props = defineProps<{
entry: FlattenLogEntry;
- sheet?: Sheet;
}>();
const error = computed(() => {
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue
index 9c764e2f81..7465cd039c 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/DetailCell.vue
@@ -1,16 +1,19 @@
<template>
- <AffectedRowsCell v-if="view === 'AFFECTED_ROWS'" v-bind="props" />
- <ErrorCell v-if="view === 'ERROR'" v-bind="props" />
- <StatusUpdateCell v-if="view === 'STATUS_UPDATE'" v-bind="props" />
- <TransactionControlCell
- v-if="view === 'TRANSACTION_CONTROL'"
- v-bind="props"
- />
- <DatabaseSyncCell v-if="view === 'DATABASE_SYNC'" v-bind="props" />
- <div v-if="view === 'N/A'" class="text-control-placeholder">-</div>
+ <NEllipsis expand-trigger="click" line-clamp="2" :tooltip="false">
+ <AffectedRowsCell v-if="view === 'AFFECTED_ROWS'" v-bind="props" />
+ <ErrorCell v-if="view === 'ERROR'" v-bind="props" />
+ <StatusUpdateCell v-if="view === 'STATUS_UPDATE'" v-bind="props" />
+ <TransactionControlCell
+ v-if="view === 'TRANSACTION_CONTROL'"
+ v-bind="props"
+ />
+ <DatabaseSyncCell v-if="view === 'DATABASE_SYNC'" v-bind="props" />
+ <span v-if="view === 'N/A'">-</span>
+ </NEllipsis>
</template>
<script setup lang="ts">
+import { NEllipsis } from "naive-ui";
import { computed } from "vue";
import { TaskRunLogEntry_Type } from "@/types/proto/v1/rollout_service";
import type { Sheet } from "@/types/proto/v1/sheet_service";
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/ErrorCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/ErrorCell.vue
index 57181c0623..06610e05af 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/ErrorCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/ErrorCell.vue
@@ -1,8 +1,6 @@
<template>
- <div class="text-sm">
- <div v-if="error" class="text-error">{{ error }}</div>
- <div v-else class="text-control-placeholder">-</div>
- </div>
+ <span v-if="error" class="text-error">{{ error }}</span>
+ <span v-else class="text-control-placeholder">-</span>
</template>
<script setup lang="ts">
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/StatusUpdateCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/StatusUpdateCell.vue
index d5274324b2..3f659d5e67 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/StatusUpdateCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/StatusUpdateCell.vue
@@ -1,8 +1,6 @@
<template>
- <div class="text-sm">
- <div v-if="status">{{ status }}</div>
- <div v-else class="text-control-placeholder">-</div>
- </div>
+ <span v-if="status">{{ status }}</span>
+ <span v-else class="text-control-placeholder">-</span>
</template>
<script setup lang="ts">
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/TransactionControlCell.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/TransactionControlCell.vue
index f39071c1f7..3422eedbee 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/TransactionControlCell.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/DetailCell/TransactionControlCell.vue
@@ -1,9 +1,7 @@
<template>
- <div class="text-sm">
- <div v-if="text">{{ text }}</div>
- <div v-else-if="error" class="text-error">{{ error }}</div>
- <div v-else class="text-control-placeholder">-</div>
- </div>
+ <span v-if="text">{{ text }}</span>
+ <span v-else-if="error" class="text-error">{{ error }}</span>
+ <span v-else class="text-control-placeholder">-</span>
</template>
<script setup lang="ts">
@@ -12,12 +10,10 @@ import {
TaskRunLogEntry_TransactionControl_Type,
TaskRunLogEntry_Type,
} from "@/types/proto/v1/rollout_service";
-import type { Sheet } from "@/types/proto/v1/sheet_service";
import type { FlattenLogEntry } from "../common";
const props = defineProps<{
entry: FlattenLogEntry;
- sheet?: Sheet;
}>();
const text = computed(() => {
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue
index 4e299f492d..00478e5c6b 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunLogTable/TaskRunLogTable.vue
@@ -165,7 +165,11 @@ const columns = computed(() => {
width: "40%",
rowSpan: detailCellRowSpan,
render: (entry) => {
- return <DetailCell entry={entry} sheet={sheet.value} />;
+ return (
+ <div class="flex flex-row justify-start items-center">
+ <DetailCell entry={entry} sheet={sheet.value} />
+ </div>
+ );
},
},
{
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
index d78bf87ab2..4c7ec385f2 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunTable.vue
@@ -78,47 +78,56 @@ const columnList = computed((): DataTableColumn<ComposedTaskRun>[] => {
key: "status",
title: "",
width: 30,
- render: (taskRun: ComposedTaskRun) => {
- return <TaskRunStatusIcon status={taskRun.status} />;
- },
+ render: (taskRun: ComposedTaskRun) => (
+ <TaskRunStatusIcon status={taskRun.status} />
+ ),
},
{
key: "comment",
title: t("task.comment"),
width: "60%",
- className: "flex flex-row items-center",
+ className: "",
minWidth: 140,
resizable: true,
- render: (taskRun: ComposedTaskRun) => {
- return <TaskRunComment taskRun={taskRun} />;
- },
+ render: (taskRun: ComposedTaskRun) => (
+ <div class="flex flex-row justify-start items-center">
+ <TaskRunComment taskRun={taskRun} />
+ </div>
+ ),
},
{
key: "detail",
title: () => t("common.detail"),
width: "20%",
+ className: "",
minWidth: 100,
resizable: true,
render: (taskRun) => {
const entry = getFlattenLogEntry(taskRun);
- return entry ? <DetailCell entry={entry} sheet={sheet.value} /> : "-";
+ return entry ? (
+ <div class="flex flex-row justify-start items-center">
+ <DetailCell entry={entry} sheet={sheet.value} />
+ </div>
+ ) : (
+ "-"
+ );
},
},
{
key: "createTime",
title: t("task.created"),
width: 100,
- render: (taskRun: ComposedTaskRun) => {
- return <HumanizeDate date={taskRun.createTime} />;
- },
+ render: (taskRun: ComposedTaskRun) => (
+ <HumanizeDate date={taskRun.createTime} />
+ ),
},
{
key: "startTime",
title: t("task.started"),
width: 100,
- render: (taskRun: ComposedTaskRun) => {
- return <HumanizeDate date={taskRun.startTime} />;
- },
+ render: (taskRun: ComposedTaskRun) => (
+ <HumanizeDate date={taskRun.startTime} />
+ ),
},
{
key: "executionDuration",
@@ -132,17 +141,15 @@ const columnList = computed((): DataTableColumn<ComposedTaskRun>[] => {
key: "actions",
title: "",
width: 60,
- render: (taskRun: ComposedTaskRun) => {
- return (
- <NButton
- v-if={shouldShowDetailButton(taskRun)}
- size="tiny"
- onClick={() => showDetail(taskRun)}
- >
- {t("common.detail")}
- </NButton>
- );
- },
+ render: (taskRun: ComposedTaskRun) => (
+ <NButton
+ v-if={shouldShowDetailButton(taskRun)}
+ size="tiny"
+ onClick={() => showDetail(taskRun)}
+ >
+ {t("common.detail")}
+ </NButton>
+ ),
},
];
});