|
@@ -12,87 +12,90 @@
|
|
|
class="p-4 rounded-lg flex items-start font-mono bg-gray-900 dark:bg-gray-800 text-gray-100 dark scroll overflow-auto"
|
|
|
style="max-height: 600px"
|
|
|
>
|
|
|
- <ul class="text-sm flex-1 overflow-auto">
|
|
|
- <li
|
|
|
+ <div class="text-sm flex-1 space-y-1 overflow-auto">
|
|
|
+ <ui-expand
|
|
|
v-for="(item, index) in history"
|
|
|
:key="item.id || index"
|
|
|
- :class="{ 'bg-box-transparent': item.id === state.itemId }"
|
|
|
- class="px-2 py-1 rounded-md hoverable group cursor-default flex items-start"
|
|
|
+ :disabled="!ctxData[item.id]"
|
|
|
+ hide-header-icon
|
|
|
+ class="hoverable rounded-md"
|
|
|
+ active-class="bg-box-transparent"
|
|
|
+ header-class="px-2 w-full text-left focus:ring-0 py-1 rounded-md group cursor-default flex items-start"
|
|
|
@click="state.itemId = item.id"
|
|
|
>
|
|
|
- <span
|
|
|
- :title="t('log.duration')"
|
|
|
- class="w-14 flex-shrink-0 text-overflow text-gray-400"
|
|
|
+ <template #header="{ show }">
|
|
|
+ <span class="w-6">
|
|
|
+ <v-remixicon
|
|
|
+ v-show="ctxData[item.id]"
|
|
|
+ :rotate="show ? 270 : 180"
|
|
|
+ size="20"
|
|
|
+ name="riArrowLeftSLine"
|
|
|
+ class="transition-transform text-gray-400 -ml-1 mr-2"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ :title="`${t('log.duration')}: ${Math.round(
|
|
|
+ item.duration / 1000
|
|
|
+ )}s`"
|
|
|
+ class="w-14 flex-shrink-0 text-overflow text-gray-400"
|
|
|
+ >
|
|
|
+ {{ countDuration(0, item.duration || 0) }}
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ :class="logsType[item.type]?.color"
|
|
|
+ :title="item.type"
|
|
|
+ class="w-2/12 flex-shrink-0 text-overflow"
|
|
|
+ >
|
|
|
+ <v-remixicon
|
|
|
+ :name="logsType[item.type]?.icon"
|
|
|
+ size="18"
|
|
|
+ class="inline-block -mr-1 align-text-top"
|
|
|
+ />
|
|
|
+ {{ item.name }}
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ :title="`${t('common.description')} (${item.description})`"
|
|
|
+ class="ml-2 w-2/12 text-overflow flex-shrink-0"
|
|
|
+ >
|
|
|
+ {{ item.description }}
|
|
|
+ </span>
|
|
|
+ <p
|
|
|
+ :title="item.message"
|
|
|
+ class="text-sm line-clamp ml-2 flex-1 leading-tight text-gray-600 dark:text-gray-200"
|
|
|
+ >
|
|
|
+ {{ item.message }}
|
|
|
+ </p>
|
|
|
+ <router-link
|
|
|
+ v-if="item.logId"
|
|
|
+ v-slot="{ navigate }"
|
|
|
+ :to="{ name: 'logs-details', params: { id: item.logId } }"
|
|
|
+ custom
|
|
|
+ >
|
|
|
+ <v-remixicon
|
|
|
+ title="Open log detail"
|
|
|
+ class="ml-2 text-gray-300 cursor-pointer"
|
|
|
+ size="20"
|
|
|
+ name="riFileTextLine"
|
|
|
+ @click.stop="navigate"
|
|
|
+ />
|
|
|
+ </router-link>
|
|
|
+ <router-link
|
|
|
+ v-show="currentLog.workflowId && item.blockId"
|
|
|
+ :to="`/workflows/${currentLog.workflowId}?blockId=${item.blockId}`"
|
|
|
+ >
|
|
|
+ <v-remixicon
|
|
|
+ name="riExternalLinkLine"
|
|
|
+ size="20"
|
|
|
+ title="Go to block"
|
|
|
+ class="text-gray-300 cursor-pointer ml-2 invisible group-hover:visible"
|
|
|
+ />
|
|
|
+ </router-link>
|
|
|
+ </template>
|
|
|
+ <pre
|
|
|
+ class="px-2 pb-2 text-gray-300 overflow-auto text-sm ml-6 scroll max-h-96"
|
|
|
+ >{{ ctxData[state.itemId] || 'EMPTY' }}</pre
|
|
|
>
|
|
|
- {{ countDuration(0, item.duration || 0) }}
|
|
|
- </span>
|
|
|
- <span
|
|
|
- :class="logsType[item.type]?.color"
|
|
|
- :title="item.type"
|
|
|
- class="w-2/12 flex-shrink-0 text-overflow"
|
|
|
- >
|
|
|
- <v-remixicon
|
|
|
- :name="logsType[item.type]?.icon"
|
|
|
- size="18"
|
|
|
- class="inline-block -mr-1 align-text-top"
|
|
|
- />
|
|
|
- {{ item.name }}
|
|
|
- </span>
|
|
|
- <span
|
|
|
- :title="`${t('common.description')} (${item.description})`"
|
|
|
- class="ml-2 w-2/12 text-overflow flex-shrink-0"
|
|
|
- >
|
|
|
- {{ item.description }}
|
|
|
- </span>
|
|
|
- <p
|
|
|
- :title="item.message"
|
|
|
- class="text-sm line-clamp ml-2 flex-1 leading-tight text-gray-600 dark:text-gray-200"
|
|
|
- >
|
|
|
- {{ item.message }}
|
|
|
- </p>
|
|
|
- <router-link
|
|
|
- v-if="item.logId"
|
|
|
- v-slot="{ navigate }"
|
|
|
- :to="{ name: 'logs-details', params: { id: item.logId } }"
|
|
|
- custom
|
|
|
- >
|
|
|
- <v-remixicon
|
|
|
- title="Open log detail"
|
|
|
- class="ml-2 text-gray-300 cursor-pointer"
|
|
|
- size="20"
|
|
|
- name="riFileTextLine"
|
|
|
- @click.stop="navigate"
|
|
|
- />
|
|
|
- </router-link>
|
|
|
- <router-link
|
|
|
- v-show="currentLog.workflowId && item.blockId"
|
|
|
- :to="`/workflows/${currentLog.workflowId}?blockId=${item.blockId}`"
|
|
|
- >
|
|
|
- <v-remixicon
|
|
|
- name="riExternalLinkLine"
|
|
|
- size="20"
|
|
|
- title="Go to block"
|
|
|
- class="text-gray-300 cursor-pointer ml-2 invisible group-hover:visible"
|
|
|
- />
|
|
|
- </router-link>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <div
|
|
|
- v-if="state.itemId"
|
|
|
- class="w-4/12 ml-4 border-2 border-opacity-60 rounded-lg dark:text-gray-200 text-sm sticky top-4"
|
|
|
- >
|
|
|
- <div class="flex items-center p-2">
|
|
|
- <p class="flex-1">Context Data</p>
|
|
|
- <v-remixicon
|
|
|
- name="riCloseLine"
|
|
|
- class="cursor-pointer"
|
|
|
- size="20"
|
|
|
- @click="state.itemId = ''"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <pre class="px-2 pb-2 overflow-auto scroll max-h-96">{{
|
|
|
- ctxData[state.itemId] || 'EMPTY'
|
|
|
- }}</pre>
|
|
|
+ </ui-expand>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|