Skip to content

Commit

Permalink
Fix error message in notifications and truncate container image text
Browse files Browse the repository at this point in the history
  • Loading branch information
ctlnmhl committed Dec 13, 2023
1 parent 126778e commit 5d20220
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
8 changes: 4 additions & 4 deletions api/validate/validate.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions ui/app/src/components/TextWithTooltip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
const props = defineProps<{
text: any
}>();
</script>

<template>
<span class="has-tooltip relative">
<span class="tooltip rounded shadow-lg p-2 bg-gray-500 text-white -mt-10">{{ text }}</span>
<pre class="truncate">{{ text }}</pre>
</span>
</template>
2 changes: 1 addition & 1 deletion ui/app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ app.config.errorHandler = (err, instance, info) => {
group: "top",
type: "error",
title: "Uh oh, something went wrong!",
text: err.toString(),
text: err.message,
}, 4000);
};

Expand Down
3 changes: 2 additions & 1 deletion ui/app/src/views/RunDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { RunLogOutput, Runner } from "../api/common/v1/common.pb";
import RunResult from "../components/RunResult.vue";
import Labels from "../components/Labels.vue";
import TimeWithTooltip from "../components/TimeWithTooltip.vue";
import TextWithTooltip from "../components/TextWithTooltip.vue";
dayjs.extend(relativeTime);
dayjs.extend(duration)
Expand Down Expand Up @@ -92,7 +93,7 @@ const logDecode = (data: string | null) => {
<dl class="grid grid-cols-1 gap-2 my-4">
<div class="col-span-1">
<dt class="text-sm font-medium text-gray-500">Container Image</dt>
<dd class="mt-1 text-sm text-gray-900"><pre>{{ run.testRunConfig?.containerImage }}</pre></dd>
<dd class="mt-1 text-sm text-gray-900"><TextWithTooltip :text="test.runConfig?.containerImage"/></dd>
</div>
<div v-if="run.testRunConfig?.command" class="col-span-1">
<dt class="text-sm font-medium text-gray-500">Command</dt>
Expand Down
3 changes: 2 additions & 1 deletion ui/app/src/views/TestDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { DataService } from "../api/data/v1/data.pb";
import RunSummariesPlot from "../components/RunSummariesPlot.vue";
import Labels from "../components/Labels.vue";
import MatrixLabels from "../components/MatrixLabels.vue";
import TextWithTooltip from "../components/TextWithTooltip.vue";
dayjs.extend(relativeTime);
Expand All @@ -31,7 +32,7 @@ const runSummaries = testData.runSummaries!;
<dl class="grid grid-cols-1 gap-x-2 gap-y-4 mb-4 sm:grid-cols-3">
<div class="col-span-1">
<dt class="text-sm font-medium text-gray-500">Container Image</dt>
<dd class="mt-1 text-sm text-gray-900"><pre>{{ test.runConfig?.containerImage }}</pre></dd>
<dd class="mt-1 text-sm text-gray-900"><TextWithTooltip :text="test.runConfig?.containerImage"/></dd>
</div>
<div v-if="test.runConfig?.command" class="col-span-1">
<dt class="text-sm font-medium text-gray-500">Command</dt>
Expand Down

0 comments on commit 5d20220

Please sign in to comment.