Skip to content

Commit

Permalink
feat(ui): add the ability to scroll the outputs error log and copy to…
Browse files Browse the repository at this point in the history
… clipboard (#4681)
  • Loading branch information
MilosPaunovic authored and loicmathieu committed Aug 22, 2024
1 parent d48f540 commit 6c98339
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ui/src/components/executions/outputs/Wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@
</el-collapse-item>
</el-collapse>

<el-alert v-if="debugError" type="error" :closable="false">
<el-alert v-if="debugError" type="error" :closable="false" class="overflow-auto">
<p><strong>{{ debugError }}</strong></p>
<pre class="mb-0">{{ debugStackTrace }}</pre>
<div class="my-2">
<CopyToClipboard :text="debugError" label="Copy Error" class="d-inline-block me-2" />
<CopyToClipboard :text="debugStackTrace" label="Copy Stack Trace" class="d-inline-block" />
</div>
<pre class="mb-0" style="overflow: scroll;">{{ debugStackTrace }}</pre>
</el-alert>

<VarValue :value="selectedValue" :execution="execution" />
Expand All @@ -116,6 +120,8 @@

import {apiUrl} from "override/utils/route";

import CopyToClipboard from "../../layout/CopyToClipboard.vue"

import Editor from "../../inputs/Editor.vue";
const debugEditor = ref(null);
const debugExpression = ref("");
Expand Down
11 changes: 10 additions & 1 deletion ui/src/components/layout/CopyToClipboard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<div class="copy-wrapper">
<el-tooltip trigger="click" :content="$t('copied')" placement="left" :auto-close="2000" effect="light">
<el-button text round :icon="ContentCopy" @click="Utils.copy(text)" />
<el-button text round :icon="ContentCopy" @click="Utils.copy(text)">
<span v-if="label">
{{ label }}
</span>
</el-button>
</el-tooltip>
</div>
</template>
Expand All @@ -18,6 +22,11 @@
text: {
type: String,
required: true
},
label: {
type: String,
required: false,
default: undefined
}
}
}
Expand Down

0 comments on commit 6c98339

Please sign in to comment.