Skip to content

Commit f144ce6

Browse files
Dv 3371 (#14)
* dv-3371 * dv-3371
1 parent 9b96e8e commit f144ce6

File tree

4 files changed

+41
-33
lines changed

4 files changed

+41
-33
lines changed

apps/dv-admin/src/utils/constants/settings/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const OPTIONS_LEVEL_LOGS: IUiSelectOptions[] = [
7373
{ value: "debug", label: "debug" },
7474
{ value: "info", label: "info" },
7575
{ value: "warn", label: "warn" },
76-
{ value: "panic", label: "panic" },
77-
{ value: "fatal", label: "fatal" },
7876
{ value: "error", label: "error" },
77+
{ value: "fatal", label: "fatal" },
78+
{ value: "panic", label: "panic" },
7979
]

apps/dv-admin/src/views/settings/logs/LogsView.vue

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { computed, onMounted, ref } from "vue";
33
import Breadcrumbs from "@dv-admin/components/ui/breadcrumbs/Breadcrumbs.vue";
4-
import { UiInput, UiSelect, UiSkeleton, UiTabs, UiTabsItem } from "@dv.net/ui-kit";
4+
import { UiCopyText, UiInput, UiSelect, UiSkeleton, UiTabs, UiTabsItem } from "@dv.net/ui-kit";
55
import { getApiLogsLast, getApiLogsLastProcessing } from "@dv-admin/services/api/monitors.ts";
66
import type { ILogsResponse } from "@dv-admin/utils/types/api/apiGo.ts";
77
import ShowStatus from "@dv-admin/components/ui/showStatus/ShowStatus.vue";
@@ -109,9 +109,9 @@
109109
</div>
110110
<block-section mode="grey-border" padding="lg">
111111
<div class="header">
112-
<span class="header__item">{{ $t('Date') }}</span>
113-
<span class="header__item">{{ $t('Message') }}</span>
114112
<span class="header__item">{{ $t('Level') }}</span>
113+
<span class="header__item">{{ $t('Message') }}</span>
114+
<span class="header__item">{{ $t('Date') }}</span>
115115
</div>
116116
<div v-if="isLoading" class="logs">
117117
<ui-skeleton
@@ -124,13 +124,16 @@
124124
<div v-else>
125125
<div v-if="filteredLogs.length" class="logs">
126126
<div class="logs__row" v-for="(item, index) in filteredLogs" :key="index">
127-
<div class="logs__time">{{ formatDate(item.time) }}</div>
128-
<div class="logs__message">{{ item.message }}</div>
129127
<show-status
130128
:mode="item.level in LEVEL_LOGS ? LEVEL_LOGS[item.level] : 'neutral'"
131129
:text="item.level"
132130
w-full
133131
/>
132+
<div class="logs__message">
133+
<p class="logs__message-text">{{ item.message }}</p>
134+
<ui-copy-text :copied-text="item.message" color-icon="#6b6d80" size-icon="sm" />
135+
</div>
136+
<div class="logs__time">{{ formatDate(item.time) }}</div>
134137
</div>
135138
</div>
136139
<not-found-message v-else />
@@ -184,7 +187,7 @@
184187
display: grid;
185188
gap: 20px;
186189
padding: 0 16px 12px;
187-
grid-template-columns: 140px 1fr 100px;
190+
grid-template-columns: 100px 1fr 140px;
188191
&__item {
189192
color: $secondary;
190193
font-size: 14px;
@@ -211,7 +214,7 @@
211214
}
212215
&__row {
213216
display: grid;
214-
grid-template-columns: 140px 1fr 100px;
217+
grid-template-columns: 100px 1fr 140px;
215218
align-items: center;
216219
gap: 20px;
217220
padding: 12px 16px;
@@ -226,11 +229,16 @@
226229
font-weight: 300;
227230
}
228231
&__message {
229-
max-height: 128px;
230-
font-weight: 400;
231-
overflow-y: auto;
232-
font-size: 14px;
233-
word-break: break-word;
232+
display: flex;
233+
align-items: center;
234+
gap: 8px;
235+
&-text {
236+
max-height: 128px;
237+
font-weight: 400;
238+
overflow-y: auto;
239+
font-size: 14px;
240+
word-break: break-word;
241+
}
234242
}
235243
}
236244
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
2-
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3-
<path d="M12.9635 23.8903C19.5945 23.8903 24.97 18.5865 24.97 12.0439C24.97 5.50132 19.5945 0.19751 12.9635 0.19751C6.33252 0.19751 0.957031 5.50132 0.957031 12.0439C0.957031 18.5865 6.33252 23.8903 12.9635 23.8903Z" fill="#231F20"/>
4-
<path d="M15.4441 13.9706L14.682 13.8298C14.6625 13.8266 14.643 13.8234 14.6268 13.8202L13.9652 13.7434C13.8387 13.7274 13.7122 13.7434 13.5922 13.7818L13.5112 13.8106C13.4755 13.8234 13.4398 13.8426 13.4106 13.8682L11.7695 15.241C11.7209 15.2826 11.6593 15.305 11.5944 15.305H10.8776L10.9198 15.1386L12.0193 14.1498L11.9479 14.0698L10.6928 15.2154C10.6312 15.273 10.5468 15.305 10.4625 15.305H9.70683C9.65169 15.305 9.62899 15.2378 9.67115 15.2026L11.0495 14.0986L11.0041 14.0218L9.3598 15.2154C9.26899 15.2794 9.16196 15.3146 9.05169 15.3114L8.21818 15.2986V15.1386C8.21818 15.001 8.29278 14.8762 8.41602 14.809L11.7598 12.9882L10.2776 12.7482L8.58142 12.3098C8.28629 12.233 8.03656 12.0442 7.88737 11.7818L7.80629 11.6378H8.60737L9.29169 11.7946H9.29818L10.2485 11.9546L10.5176 11.993L10.4074 11.8266L9.71332 11.6826L9.24953 11.6026C9.24953 11.6026 8.72413 11.5194 8.67872 11.513C8.64305 11.5098 8.13386 11.481 7.91656 11.4682C7.85169 11.465 7.78683 11.4522 7.72196 11.4362L7.51115 11.3754C7.45278 11.3594 7.39115 11.3466 7.32953 11.337C7.1771 11.3178 6.87548 11.2826 6.82359 11.2666C6.7198 11.241 6.4798 11.0874 6.45061 11.0746C6.39548 11.0522 6.08413 10.7738 6.0744 10.7514C6.06467 10.729 6.05494 10.5082 6.05494 10.5082L6.21386 10.5178C6.36305 10.5242 6.50899 10.5498 6.65169 10.5914C6.83007 10.6426 7.0571 10.7066 7.07332 10.7034C7.1025 10.697 7.85494 10.841 7.87115 10.841C7.88737 10.841 8.66575 10.9786 8.68521 10.985C8.70467 10.9914 9.02899 11.0618 9.02899 11.0618C9.02899 11.0618 9.0225 10.9626 9.00305 10.9562C8.98359 10.9498 8.38034 10.7866 8.24413 10.7642C8.10791 10.7418 7.48845 10.6458 7.42034 10.617C7.35223 10.5882 6.80737 10.5018 6.70034 10.4762C6.59332 10.4506 6.12305 10.393 5.98683 10.3866C5.85061 10.3802 5.3998 10.3162 5.35115 10.2874C5.30251 10.2586 4.60845 10.089 4.56953 10.0666C4.53061 10.0442 4.04413 9.67939 4.02791 9.65699C4.01169 9.63459 4.00196 9.43619 4.01169 9.41699C4.02142 9.39779 4.55656 9.39459 4.57278 9.41699C4.58899 9.43939 5.51656 9.60579 5.54575 9.61859C5.57494 9.63139 6.65169 9.80739 6.65169 9.80739C6.65169 9.80739 7.57278 10.0122 7.60196 10.0122C7.63115 10.0122 9.0744 10.2938 9.0744 10.2938C9.0744 10.2938 9.76196 10.3962 9.95332 10.457C10.0571 10.4922 10.6928 10.681 10.6928 10.681L13.0733 12.0026L14.8247 13.017C14.9187 13.0714 15.003 13.1386 15.0776 13.2186L15.3047 13.4618C15.3695 13.529 15.4085 13.6154 15.4214 13.7082L15.4539 13.9642L15.4441 13.9706Z" fill="#EAAC08"/>
5-
<path d="M13.3496 12.0318L14.3356 12.6334C14.4491 12.7006 14.5788 12.739 14.7118 12.739H15.7269C15.7626 12.739 15.795 12.739 15.8307 12.7294C16.0253 12.691 16.7096 12.5566 16.7875 12.5374C16.8783 12.515 17.8059 12.1534 17.874 12.1086C17.9421 12.0638 18.3896 11.5774 18.3896 11.5774L18.2534 11.4654C18.2534 11.4654 17.2448 11.6574 17.1767 11.6798C17.1086 11.7022 16.1907 11.8718 16.1129 11.8718C16.035 11.8718 15.701 11.9294 15.701 11.9294L15.6491 11.8334L16.0902 11.7598C16.0902 11.7598 17.4329 11.4846 17.5788 11.4654C17.6307 11.459 18.4707 11.331 18.5064 11.331C18.5421 11.331 19.1583 11.251 19.2167 11.2286C19.275 11.2062 19.8361 10.9566 19.9042 10.9118C19.9723 10.867 20.1215 10.5854 20.1215 10.5854H19.6188C19.5572 10.5854 19.4956 10.595 19.4372 10.611L18.9929 10.7326L18.8891 10.7582L18.0718 10.9246L18.0264 10.931L17.2513 11.0398L16.8653 11.0974L16.8588 10.9502L17.2448 10.8926C17.3291 10.8766 17.5302 10.8478 17.6145 10.8382C17.6696 10.8318 17.8026 10.8094 17.9323 10.787C18.0102 10.7742 18.4026 10.7102 18.4383 10.7006C18.474 10.691 19.0091 10.5438 19.0091 10.5438C19.0091 10.5438 19.434 10.4638 19.4664 10.4638C19.4988 10.4638 20.1767 10.3966 20.2091 10.3966H20.3648C20.5594 10.3966 20.7507 10.3614 20.9291 10.2974L21.1399 10.2206C21.1399 10.2206 21.1496 10.2174 21.1561 10.2142L21.4123 10.067C21.5486 9.98699 21.6686 9.88459 21.7659 9.76299L21.9605 9.51979C21.9605 9.51979 21.5713 9.41419 21.5032 9.43979C21.435 9.46539 20.4167 9.62219 20.4167 9.62219L18.5972 9.98379C18.5972 9.98379 17.1086 10.323 17.0761 10.323C17.0534 10.323 16.5313 10.4062 16.1583 10.467C15.9118 10.5054 15.6718 10.5886 15.4545 10.7102L13.3594 11.8718C13.2913 11.9102 13.288 12.0062 13.3561 12.0446L13.3496 12.0318Z" fill="#EAAC08"/>
6-
<rect x="15.5" y="14.5" width="9" height="9" rx="4.5" stroke="white"/>
7-
<circle cx="20" cy="19" r="4" fill="#F3BA2C"/>
8-
<path d="M20.5263 20.7623V21.3604L19.9917 21.6668L19.4724 21.3604V20.7623L19.9917 21.0687L20.5263 20.7623ZM17.666 18.6937L18.1854 19.0002V20.0258L19.0797 20.5473V21.1454L17.666 20.3323V18.6937ZM22.3175 18.6937V20.3347L20.8886 21.1478V20.5497L21.7829 20.0283V19.0002L22.3175 18.6937ZM20.8861 17.8806L21.4206 18.1871V18.7851L20.5263 19.3066V20.3496L20.0069 20.656L19.4876 20.3496V19.3066L18.5603 18.7851V18.1871L19.0949 17.8806L19.9892 18.4021L20.8861 17.8806ZM18.5629 19.2152L19.0822 19.5216V20.1197L18.5629 19.8133V19.2152ZM21.4206 19.2152V19.8133L20.9013 20.1197V19.5216L21.4206 19.2152ZM18.1854 17.3591L18.7199 17.6656L18.1854 17.972V18.5701L17.666 18.2637V17.6656L18.1854 17.3591ZM21.7981 17.3591L22.3327 17.6656V18.2637L21.7981 18.5701V17.972L21.2788 17.6656L21.7981 17.3591ZM19.9917 17.3591L20.5263 17.6656L19.9917 17.9745L19.4724 17.6681L19.9917 17.3591ZM19.9917 16.3335L21.4206 17.1466L20.9013 17.4531L20.0069 16.9316L19.0949 17.4531L18.5781 17.1466L19.9917 16.3335Z" fill="white"/>
2+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3+
<path d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z" fill="#231F20"/>
4+
<path d="M14.4441 13.9706L13.682 13.8298C13.6625 13.8266 13.643 13.8234 13.6268 13.8202L12.9652 13.7434C12.8387 13.7274 12.7122 13.7434 12.5922 13.7818L12.5112 13.8106C12.4755 13.8234 12.4398 13.8426 12.4106 13.8682L10.7695 15.241C10.7209 15.2826 10.6593 15.305 10.5944 15.305H9.87764L9.9198 15.1386L11.0193 14.1498L10.9479 14.0698L9.69277 15.2154C9.63115 15.273 9.54683 15.305 9.4625 15.305H8.70683C8.65169 15.305 8.62899 15.2378 8.67115 15.2026L10.0495 14.0986L10.0041 14.0218L8.3598 15.2154C8.26899 15.2794 8.16196 15.3146 8.05169 15.3114L7.21818 15.2986V15.1386C7.21818 15.001 7.29278 14.8762 7.41602 14.809L10.7598 12.9882L9.27764 12.7482L7.58142 12.3098C7.28629 12.233 7.03656 12.0442 6.88737 11.7818L6.80629 11.6378H7.60737L8.29169 11.7946H8.29818L9.24845 11.9546L9.51764 11.993L9.40737 11.8266L8.71332 11.6826L8.24953 11.6026C8.24953 11.6026 7.72413 11.5194 7.67872 11.513C7.64305 11.5098 7.13386 11.481 6.91656 11.4682C6.85169 11.465 6.78683 11.4522 6.72196 11.4362L6.51115 11.3754C6.45278 11.3594 6.39115 11.3466 6.32953 11.337C6.1771 11.3178 5.87548 11.2826 5.82359 11.2666C5.7198 11.241 5.4798 11.0874 5.45061 11.0746C5.39548 11.0522 5.08413 10.7738 5.0744 10.7514C5.06467 10.729 5.05494 10.5082 5.05494 10.5082L5.21386 10.5178C5.36305 10.5242 5.50899 10.5498 5.65169 10.5914C5.83007 10.6426 6.0571 10.7066 6.07332 10.7034C6.1025 10.697 6.85494 10.841 6.87115 10.841C6.88737 10.841 7.66575 10.9786 7.68521 10.985C7.70467 10.9914 8.02899 11.0618 8.02899 11.0618C8.02899 11.0618 8.0225 10.9626 8.00305 10.9562C7.98359 10.9498 7.38034 10.7866 7.24413 10.7642C7.10791 10.7418 6.48845 10.6458 6.42034 10.617C6.35223 10.5882 5.80737 10.5018 5.70034 10.4762C5.59332 10.4506 5.12305 10.393 4.98683 10.3866C4.85061 10.3802 4.3998 10.3162 4.35115 10.2874C4.30251 10.2586 3.60845 10.089 3.56953 10.0666C3.53061 10.0442 3.04413 9.67939 3.02791 9.65699C3.01169 9.63459 3.00196 9.43619 3.01169 9.41699C3.02142 9.39779 3.55656 9.39459 3.57278 9.41699C3.58899 9.43939 4.51656 9.60579 4.54575 9.61859C4.57494 9.63139 5.65169 9.80739 5.65169 9.80739C5.65169 9.80739 6.57278 10.0122 6.60196 10.0122C6.63115 10.0122 8.0744 10.2938 8.0744 10.2938C8.0744 10.2938 8.76196 10.3962 8.95332 10.457C9.0571 10.4922 9.69277 10.681 9.69277 10.681L12.0733 12.0026L13.8247 13.017C13.9187 13.0714 14.003 13.1386 14.0776 13.2186L14.3047 13.4618C14.3695 13.529 14.4085 13.6154 14.4214 13.7082L14.4539 13.9642L14.4441 13.9706Z" fill="#EAAC08"/>
5+
<path d="M12.3496 12.0318L13.3356 12.6334C13.4491 12.7006 13.5788 12.739 13.7118 12.739H14.7269C14.7626 12.739 14.795 12.739 14.8307 12.7294C15.0253 12.691 15.7096 12.5566 15.7875 12.5374C15.8783 12.515 16.8059 12.1534 16.874 12.1086C16.9421 12.0638 17.3896 11.5774 17.3896 11.5774L17.2534 11.4654C17.2534 11.4654 16.2448 11.6574 16.1767 11.6798C16.1086 11.7022 15.1907 11.8718 15.1129 11.8718C15.035 11.8718 14.701 11.9294 14.701 11.9294L14.6491 11.8334L15.0902 11.7598C15.0902 11.7598 16.4329 11.4846 16.5788 11.4654C16.6307 11.459 17.4707 11.331 17.5064 11.331C17.5421 11.331 18.1583 11.251 18.2167 11.2286C18.275 11.2062 18.8361 10.9566 18.9042 10.9118C18.9723 10.867 19.1215 10.5854 19.1215 10.5854H18.6188C18.5572 10.5854 18.4956 10.595 18.4372 10.611L17.9929 10.7326L17.8891 10.7582L17.0718 10.9246L17.0264 10.931L16.2513 11.0398L15.8653 11.0974L15.8588 10.9502L16.2448 10.8926C16.3291 10.8766 16.5302 10.8478 16.6145 10.8382C16.6696 10.8318 16.8026 10.8094 16.9323 10.787C17.0102 10.7742 17.4026 10.7102 17.4383 10.7006C17.474 10.691 18.0091 10.5438 18.0091 10.5438C18.0091 10.5438 18.434 10.4638 18.4664 10.4638C18.4988 10.4638 19.1767 10.3966 19.2091 10.3966H19.3648C19.5594 10.3966 19.7507 10.3614 19.9291 10.2974L20.1399 10.2206C20.1399 10.2206 20.1496 10.2174 20.1561 10.2142L20.4123 10.067C20.5486 9.98699 20.6686 9.88459 20.7659 9.76299L20.9605 9.51979C20.9605 9.51979 20.5713 9.41419 20.5032 9.43979C20.435 9.46539 19.4167 9.62219 19.4167 9.62219L17.5972 9.98379C17.5972 9.98379 16.1086 10.323 16.0761 10.323C16.0534 10.323 15.5313 10.4062 15.1583 10.467C14.9118 10.5054 14.6718 10.5886 14.4545 10.7102L12.3594 11.8718C12.2913 11.9102 12.288 12.0062 12.3561 12.0446L12.3496 12.0318Z" fill="#EAAC08"/>
6+
<rect x="14.5" y="14.5" width="9" height="9" rx="4.5" stroke="white"/>
7+
<circle cx="19" cy="19" r="4" fill="#F3BA2C"/>
8+
<path d="M19.5263 20.7623V21.3604L18.9917 21.6668L18.4724 21.3604V20.7623L18.9917 21.0687L19.5263 20.7623ZM16.666 18.6937L17.1854 19.0002V20.0258L18.0797 20.5473V21.1454L16.666 20.3323V18.6937ZM21.3175 18.6937V20.3347L19.8886 21.1478V20.5497L20.7829 20.0283V19.0002L21.3175 18.6937ZM19.8861 17.8806L20.4206 18.1871V18.7851L19.5263 19.3066V20.3496L19.0069 20.656L18.4876 20.3496V19.3066L17.5603 18.7851V18.1871L18.0949 17.8806L18.9892 18.4021L19.8861 17.8806ZM17.5629 19.2152L18.0822 19.5216V20.1197L17.5629 19.8133V19.2152ZM20.4206 19.2152V19.8133L19.9013 20.1197V19.5216L20.4206 19.2152ZM17.1854 17.3591L17.7199 17.6656L17.1854 17.972V18.5701L16.666 18.2637V17.6656L17.1854 17.3591ZM20.7981 17.3591L21.3327 17.6656V18.2637L20.7981 18.5701V17.972L20.2788 17.6656L20.7981 17.3591ZM18.9917 17.3591L19.5263 17.6656L18.9917 17.9745L18.4724 17.6681L18.9917 17.3591ZM18.9917 16.3335L20.4206 17.1466L19.9013 17.4531L19.0069 16.9316L18.0949 17.4531L17.5781 17.1466L18.9917 16.3335Z" fill="white"/>
99
</svg>
1010
</template>

0 commit comments

Comments
 (0)