Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message in notifications and truncate container image text #251

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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