Skip to content

Commit

Permalink
Merge pull request #251 from ctlnmhl/ui_fixes
Browse files Browse the repository at this point in the history
Fix error message in notifications and truncate container image text
  • Loading branch information
nanzhong authored Jan 3, 2024
2 parents 126778e + 5d20220 commit 6cc7c4b
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 6cc7c4b

Please sign in to comment.