Вывести логин пользователя в консоли оператора
В аудите и лимитах основной строкой показывается логин реального пользователя, имя пространства и id — вторично.
This commit is contained in:
@@ -56,6 +56,11 @@ function changesOf(row) {
|
||||
return Array.isArray(row.changes) ? row.changes : []
|
||||
}
|
||||
|
||||
// Вторая строка колонки пользователя: имя пространства, иначе id.
|
||||
function tenantSubline(row) {
|
||||
return row.userName && row.tenantName ? row.tenantName : row.tenantId || '—'
|
||||
}
|
||||
|
||||
function hasFrom(change) {
|
||||
return change.from !== null && change.from !== undefined
|
||||
}
|
||||
@@ -119,9 +124,9 @@ function pretty(json) {
|
||||
<Badge :tone="ACTOR_TONES[row.actorType] || 'neutral'">{{ actorLabel(row.actorType) }}</Badge>
|
||||
</template>
|
||||
<template #cell-tenantId="{ row }">
|
||||
<div v-if="row.tenantName" class="min-w-0">
|
||||
<div class="text-[12px] text-hi truncate">{{ row.tenantName }}</div>
|
||||
<div class="font-mono text-[10.5px] text-low truncate">{{ row.tenantId }}</div>
|
||||
<div v-if="row.userName || row.tenantName" class="min-w-0">
|
||||
<div class="text-[12px] text-hi truncate">{{ row.userName || row.tenantName }}</div>
|
||||
<div class="text-[10.5px] text-low truncate">{{ tenantSubline(row) }}</div>
|
||||
</div>
|
||||
<span v-else class="font-mono text-[11px] text-low">{{ row.tenantId || '—' }}</span>
|
||||
</template>
|
||||
|
||||
@@ -85,8 +85,8 @@ const percentTone = (v) => (v >= 100 ? 'bg-danger/70' : v >= 80 ? 'bg-warn/70' :
|
||||
:empty="$t('operator.net-dannyh-o-limitah')"
|
||||
>
|
||||
<template #cell-name="{ row }">
|
||||
<div class="text-hi truncate">{{ row.name }}</div>
|
||||
<div class="font-mono text-[11px] text-low truncate">{{ row.tenantId }}</div>
|
||||
<div class="text-hi truncate">{{ row.ownerLogin || row.name }}</div>
|
||||
<div class="text-[11px] text-low truncate">{{ row.ownerLogin && row.name ? row.name : row.tenantId }}</div>
|
||||
</template>
|
||||
<template #cell-status="{ row }">
|
||||
<Badge :tone="tenantTone(row.status)" dot>{{ row.status }}</Badge>
|
||||
@@ -121,7 +121,7 @@ const percentTone = (v) => (v >= 100 ? 'bg-danger/70' : v >= 80 ? 'bg-warn/70' :
|
||||
<div class="px-5 pt-4 pb-3 border-b border-white/5">
|
||||
<div class="text-[15px] font-semibold text-hi">{{ $t('operator.limit-ii') }}</div>
|
||||
<div class="text-[12px] text-low mt-0.5">
|
||||
{{ op.limit?.name || $t('operator.tenant') }}<template v-if="op.limit"> · {{ fmtDateTimeCompact(op.limit.periodStart) }}</template>
|
||||
{{ op.limit?.ownerLogin || op.limit?.name || $t('operator.tenant') }}<template v-if="op.limit"> · {{ fmtDateTimeCompact(op.limit.periodStart) }}</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user