@liujitcn/kratos-admin-system 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package/declarations/src/components/LogTable.vue.d.ts +2 -0
- package/dist/package/declarations/src/components/log.d.ts +2 -0
- package/dist/package/src/components/LogTable.vue +14 -3
- package/dist/package/src/components/log.ts +6 -2
- package/dist/package/src/views/ai/chat/components/ChatPanel.vue +2 -9
- package/dist/package/src/views/base/api/index.vue +0 -2
- package/dist/package/src/views/base/api-log/index.vue +6 -5
- package/dist/package/src/views/base/area/index.vue +0 -2
- package/dist/package/src/views/base/backup-management/archive-config/index.vue +1 -1
- package/dist/package/src/views/base/backup-management/archive-record/index.vue +7 -6
- package/dist/package/src/views/base/backup-management/archive-restore/index.vue +2 -1
- package/dist/package/src/views/base/backup-management/backup-config/index.vue +1 -1
- package/dist/package/src/views/base/backup-management/backup-record/index.vue +4 -3
- package/dist/package/src/views/base/backup-management/backup-restore/index.vue +2 -1
- package/dist/package/src/views/base/config/index.vue +2 -4
- package/dist/package/src/views/base/data-access-log/index.vue +6 -5
- package/dist/package/src/views/base/dept/index.vue +4 -5
- package/dist/package/src/views/base/dict/index.vue +2 -4
- package/dist/package/src/views/base/dict/item.vue +2 -4
- package/dist/package/src/views/base/file/index.vue +3 -5
- package/dist/package/src/views/base/job/index.vue +2 -4
- package/dist/package/src/views/base/job/log.vue +4 -4
- package/dist/package/src/views/base/language/index.vue +3 -5
- package/dist/package/src/views/base/login-log/index.vue +5 -4
- package/dist/package/src/views/base/login-policy/index.vue +0 -2
- package/dist/package/src/views/base/menu/index.vue +3 -5
- package/dist/package/src/views/base/message/index.vue +8 -9
- package/dist/package/src/views/base/message-category/index.vue +1 -3
- package/dist/package/src/views/base/migration/index.vue +2 -14
- package/dist/package/src/views/base/oauth-client/index.vue +1 -2
- package/dist/package/src/views/base/online-session/index.vue +9 -3
- package/dist/package/src/views/base/operation-log/index.vue +6 -5
- package/dist/package/src/views/base/permission-log/index.vue +4 -3
- package/dist/package/src/views/base/policy-evaluation-log/index.vue +5 -4
- package/dist/package/src/views/base/post/index.vue +3 -4
- package/dist/package/src/views/base/redact-output-policy/index.vue +1 -1
- package/dist/package/src/views/base/redact-rule/index.vue +0 -2
- package/dist/package/src/views/base/redact-storage-policy/index.vue +1 -1
- package/dist/package/src/views/base/role/index.vue +3 -4
- package/dist/package/src/views/base/tenant/index.vue +2 -4
- package/dist/package/src/views/base/user/index.vue +3 -4
- package/dist/package/src/views/message/inbox/index.vue +0 -2
- package/dist/package/src/views/profile/components/base.vue +2 -1
- package/dist/package/src/views/profile/components/login-log.vue +2 -2
- package/dist/package/src/views/profile/components/session.vue +8 -1
- package/dist/package/src/views/tool/cache/index.vue +8 -11
- package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +3 -3
- package/dist/package/src/views/tool/code-gen/preview/index.vue +0 -2
- package/dist/package/src/views/tool/code-gen/table/index.vue +1 -3
- package/dist/package/src/views/tool/ops-monitoring/index.vue +4 -4
- package/dist/package/src/views/tool/runtime-log/index.vue +2 -13
- package/package.json +3 -3
|
@@ -313,7 +313,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
313
313
|
prop: "meta.title",
|
|
314
314
|
label: t("system.base.menu.field.name"),
|
|
315
315
|
minWidth: 220,
|
|
316
|
-
align: "
|
|
316
|
+
align: "right",
|
|
317
317
|
search: { el: "input", key: "title" },
|
|
318
318
|
showOverflowTooltip: false,
|
|
319
319
|
render: scope => renderMenuTitleCell(scope as unknown as RenderScope<BaseMenu>)
|
|
@@ -352,13 +352,11 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
352
352
|
width: 100,
|
|
353
353
|
render: scope => renderHiddenCell(scope as unknown as RenderScope<BaseMenu>)
|
|
354
354
|
},
|
|
355
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
356
|
-
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180 },
|
|
355
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
356
|
+
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180, align: "center" },
|
|
357
357
|
{
|
|
358
358
|
prop: "operation",
|
|
359
359
|
label: t("common.field.action"),
|
|
360
|
-
width: 220,
|
|
361
|
-
fixed: "right",
|
|
362
360
|
cellType: "actions",
|
|
363
361
|
actions: [
|
|
364
362
|
{
|
|
@@ -104,25 +104,25 @@
|
|
|
104
104
|
}}</el-descriptions-item>
|
|
105
105
|
</el-descriptions>
|
|
106
106
|
<el-table :data="detail.data.dispatches" style="margin-top: 16px" size="small">
|
|
107
|
-
<el-table-column prop="id" label="ID" width="90" />
|
|
107
|
+
<el-table-column prop="id" label="ID" width="90" align="right" />
|
|
108
108
|
<el-table-column prop="audience_type" :label="t('system.base.message.field.audience_type')" width="120">
|
|
109
109
|
<template #default="scope">{{ optionLabel(audienceOptions, scope.row.audience_type) }}</template>
|
|
110
110
|
</el-table-column>
|
|
111
|
-
<el-table-column prop="audience_id" :label="t('system.base.message.field.audience_id')" width="110" />
|
|
111
|
+
<el-table-column prop="audience_id" :label="t('system.base.message.field.audience_id')" width="110" align="right" />
|
|
112
112
|
<el-table-column prop="include_children" :label="t('system.base.message.field.include_children')" width="120">
|
|
113
113
|
<template #default="scope">{{ scope.row.include_children ? t("common.value.yes") : t("common.value.no") }}</template>
|
|
114
114
|
</el-table-column>
|
|
115
115
|
<el-table-column prop="status" :label="t('common.field.status')" width="120" />
|
|
116
|
-
<el-table-column prop="matched_total" :label="t('system.base.message.field.matched_total')" width="110" />
|
|
117
|
-
<el-table-column prop="inserted_total" :label="t('system.base.message.field.inserted_total')" width="110" />
|
|
118
|
-
<el-table-column prop="attempt_count" :label="t('system.base.message.field.attempt_count')" width="90" />
|
|
116
|
+
<el-table-column prop="matched_total" :label="t('system.base.message.field.matched_total')" width="110" align="right" />
|
|
117
|
+
<el-table-column prop="inserted_total" :label="t('system.base.message.field.inserted_total')" width="110" align="right" />
|
|
118
|
+
<el-table-column prop="attempt_count" :label="t('system.base.message.field.attempt_count')" width="90" align="right" />
|
|
119
119
|
<el-table-column
|
|
120
120
|
prop="last_error"
|
|
121
121
|
:label="t('system.base.message.field.last_error')"
|
|
122
122
|
min-width="220"
|
|
123
123
|
show-overflow-tooltip
|
|
124
124
|
/>
|
|
125
|
-
<el-table-column :label="t('common.field.operation')"
|
|
125
|
+
<el-table-column :label="t('common.field.operation')">
|
|
126
126
|
<template #default="scope">
|
|
127
127
|
<el-button
|
|
128
128
|
v-if="scope.row.status === MessageDispatchStatus.MESSAGE_DISPATCH_STATUS_FAILED && BUTTONS['base:message:retry']"
|
|
@@ -364,6 +364,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
364
364
|
prop: "tenant_id",
|
|
365
365
|
label: t("common.field.tenant"),
|
|
366
366
|
minWidth: 120,
|
|
367
|
+
align: "left",
|
|
367
368
|
search: { el: "select" },
|
|
368
369
|
enum: requestTenantOptions
|
|
369
370
|
}
|
|
@@ -419,13 +420,11 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
419
420
|
render: scope => optionLabel(statusOptions.value, (scope.row as BaseMessage).status)
|
|
420
421
|
},
|
|
421
422
|
{ prop: "delivered_total", label: t("system.base.message.field.delivered_total"), width: 100, align: "right" },
|
|
422
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
423
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
423
424
|
{
|
|
424
425
|
prop: "operation",
|
|
425
426
|
label: t("common.field.operation"),
|
|
426
|
-
width: 380,
|
|
427
427
|
className: "message-operation-column",
|
|
428
|
-
fixed: "right",
|
|
429
428
|
cellType: "actions",
|
|
430
429
|
actions: [
|
|
431
430
|
{
|
|
@@ -234,12 +234,10 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
234
234
|
beforeChange: scope => handleSetStatus(scope.row as BaseMessageCategory)
|
|
235
235
|
}
|
|
236
236
|
},
|
|
237
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
237
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
238
238
|
{
|
|
239
239
|
prop: "operation",
|
|
240
240
|
label: t("common.field.operation"),
|
|
241
|
-
width: 180,
|
|
242
|
-
fixed: "right",
|
|
243
241
|
cellType: "actions",
|
|
244
242
|
actions: [
|
|
245
243
|
{
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<div class="migration-list-item__data-source">
|
|
58
58
|
{{ history.module || t("system.base.migration.value.default_module") }} · {{ history.data_source || "default" }}
|
|
59
59
|
</div>
|
|
60
|
-
<time :datetime="history.created_at">{{
|
|
60
|
+
<time :datetime="history.created_at">{{ formatDateTime(history.created_at) }}</time>
|
|
61
61
|
</button>
|
|
62
62
|
</div>
|
|
63
63
|
|
|
@@ -160,6 +160,7 @@ import type {
|
|
|
160
160
|
PageBaseMigrationRequest
|
|
161
161
|
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_migration";
|
|
162
162
|
import { getCurrentLocale, t } from "@liujitcn/kratos-admin-core";
|
|
163
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
163
164
|
|
|
164
165
|
defineOptions({
|
|
165
166
|
name: "BaseMigration",
|
|
@@ -296,19 +297,6 @@ async function copySql(sql: string) {
|
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
|
|
299
|
-
/**
|
|
300
|
-
* 格式化列表日期。
|
|
301
|
-
*/
|
|
302
|
-
function formatDate(value: string) {
|
|
303
|
-
if (!value) return "--";
|
|
304
|
-
const date = new Date(value.replace(" ", "T"));
|
|
305
|
-
if (Number.isNaN(date.getTime())) return value;
|
|
306
|
-
return new Intl.DateTimeFormat(getCurrentLocale(), {
|
|
307
|
-
year: "numeric",
|
|
308
|
-
month: "short",
|
|
309
|
-
day: "numeric"
|
|
310
|
-
}).format(date);
|
|
311
|
-
}
|
|
312
300
|
|
|
313
301
|
onMounted(() => {
|
|
314
302
|
loadMigrationHistory();
|
|
@@ -190,6 +190,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
190
190
|
prop: "tenant_id",
|
|
191
191
|
label: t("common.field.tenant"),
|
|
192
192
|
minWidth: 130,
|
|
193
|
+
align: "left",
|
|
193
194
|
search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
|
|
194
195
|
enum: requestTenantOptions,
|
|
195
196
|
render: scope =>
|
|
@@ -235,8 +236,6 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
235
236
|
{
|
|
236
237
|
prop: "operation",
|
|
237
238
|
label: t("common.field.operation"),
|
|
238
|
-
width: 280,
|
|
239
|
-
fixed: "right",
|
|
240
239
|
cellType: "actions",
|
|
241
240
|
actions: [
|
|
242
241
|
{
|
|
@@ -20,6 +20,7 @@ import { DEFAULT_TENANT_CODE } from "@liujitcn/kratos-admin-core/tenant";
|
|
|
20
20
|
import { useUserStore } from "@liujitcn/kratos-admin-core/stores/runtime";
|
|
21
21
|
import { useAuthButtons } from "@liujitcn/kratos-admin-core/auth";
|
|
22
22
|
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
23
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
23
24
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
24
25
|
import { defBaseTenantService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_tenant";
|
|
25
26
|
import { defBaseSessionService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_session";
|
|
@@ -37,6 +38,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
37
38
|
prop: "tenant_code",
|
|
38
39
|
label: t("common.field.tenant"),
|
|
39
40
|
minWidth: 130,
|
|
41
|
+
align: "left",
|
|
40
42
|
search: isDefaultTenant.value ? { el: "select", props: { filterable: true }, order: 1 } : undefined,
|
|
41
43
|
enum: requestSessionTenantOptions
|
|
42
44
|
},
|
|
@@ -49,12 +51,16 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
49
51
|
{ prop: "client_ip", label: t("system.base.online_session.field.client_ip"), minWidth: 140 },
|
|
50
52
|
{ prop: "device", label: t("system.base.online_session.field.device"), minWidth: 180 },
|
|
51
53
|
{ prop: "user_agent", label: t("system.base.online_session.field.user_agent"), minWidth: 220 },
|
|
52
|
-
{
|
|
54
|
+
{
|
|
55
|
+
prop: "issued_at",
|
|
56
|
+
label: t("system.base.online_session.field.issued_at"),
|
|
57
|
+
minWidth: 180,
|
|
58
|
+
align: "center",
|
|
59
|
+
render: scope => formatDateTime((scope.row as BaseSession).issued_at)
|
|
60
|
+
},
|
|
53
61
|
{
|
|
54
62
|
prop: "operation",
|
|
55
63
|
label: t("common.field.operation"),
|
|
56
|
-
width: 100,
|
|
57
|
-
fixed: "right",
|
|
58
64
|
cellType: "actions",
|
|
59
65
|
actions: [
|
|
60
66
|
{
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { computed, ref } from "vue";
|
|
7
7
|
import type { ColumnProps } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
8
8
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
9
|
+
import { formatLogDateTime } from "@liujitcn/kratos-admin-system/components/log";
|
|
9
10
|
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
10
11
|
import LogTable, { type LogTableConfig } from "@liujitcn/kratos-admin-system/components/LogTable.vue";
|
|
11
12
|
import { logDateSearch, logDetailColumn, logEnumLabel, createLogEnumOptions, requestLogTrace } from "@liujitcn/kratos-admin-system/components/log";
|
|
@@ -36,12 +37,12 @@ const actionOptions = computed(() => createLogEnumOptions([
|
|
|
36
37
|
]));
|
|
37
38
|
const columns = computed<ColumnProps[]>(() => [
|
|
38
39
|
{ prop: "resource_type", label: t("system.base.log.field.resource_type"), minWidth: 150, search: { el: "input" } },
|
|
39
|
-
{ prop: "resource_id", label: t("system.base.log.field.resource_id"), minWidth: 120 },
|
|
40
|
+
{ prop: "resource_id", label: t("system.base.log.field.resource_id"), minWidth: 120, align: "left" },
|
|
40
41
|
{ prop: "resource_name", label: t("system.base.log.field.resource_name"), minWidth: 160 },
|
|
41
42
|
{ prop: "action", label: t("system.base.log.field.action"), minWidth: 110, search: { el: "select", enum: actionOptions.value }, render: scope => logEnumLabel(actionOptions.value, (scope.row as BaseOperationLog).action) },
|
|
42
43
|
{ prop: "result", label: t("system.base.log.field.result"), minWidth: 110, search: { el: "select", enum: resultOptions.value }, render: scope => logEnumLabel(resultOptions.value, (scope.row as BaseOperationLog).result) },
|
|
43
44
|
{ prop: "user_name", label: t("system.base.log.field.user_name"), minWidth: 130 },
|
|
44
|
-
{ prop: "occurred_at", label: t("system.base.log.field.occurred_at"), minWidth: 190, search: logDateSearch(t) },
|
|
45
|
+
{ prop: "occurred_at", label: t("system.base.log.field.occurred_at"), minWidth: 190, align: "center", search: logDateSearch(t) },
|
|
45
46
|
logDetailColumn(t("common.action.view"), id => page.value?.handleOpenDialog(id))
|
|
46
47
|
]);
|
|
47
48
|
|
|
@@ -57,7 +58,7 @@ const config = computed<LogTableConfig>(() => ({
|
|
|
57
58
|
{ key: "user_id", label: t("system.base.log.field.user_id") },
|
|
58
59
|
{ key: "user_name", label: t("system.base.log.field.user_name") },
|
|
59
60
|
{ key: "resource_type", label: t("system.base.log.field.resource_type") },
|
|
60
|
-
{ key: "resource_id", label: t("system.base.log.field.resource_id") },
|
|
61
|
+
{ key: "resource_id", label: t("system.base.log.field.resource_id"), align: "left" },
|
|
61
62
|
{ key: "resource_name", label: t("system.base.log.field.resource_name") },
|
|
62
63
|
{ key: "action", label: t("system.base.log.field.action"), enum: actionOptions.value },
|
|
63
64
|
{ key: "result", label: t("system.base.log.field.result"), enum: resultOptions.value },
|
|
@@ -68,8 +69,8 @@ const config = computed<LogTableConfig>(() => ({
|
|
|
68
69
|
{ key: "reason", label: t("system.base.log.field.reason"), span: 2 },
|
|
69
70
|
{ key: "request_id", label: t("system.base.log.field.request_id") },
|
|
70
71
|
{ key: "trace_id", label: t("system.base.log.field.trace_id") },
|
|
71
|
-
{ key: "occurred_at", label: t("system.base.log.field.occurred_at") },
|
|
72
|
-
{ key: "created_at", label: t("system.base.log.field.created_at") }
|
|
72
|
+
{ key: "occurred_at", format: formatLogDateTime, label: t("system.base.log.field.occurred_at") },
|
|
73
|
+
{ key: "created_at", format: formatLogDateTime, label: t("system.base.log.field.created_at") }
|
|
73
74
|
],
|
|
74
75
|
request: requestTable,
|
|
75
76
|
get: getDetail
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { computed, ref } from "vue";
|
|
7
7
|
import type { ColumnProps } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
8
8
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
9
|
+
import { formatLogDateTime } from "@liujitcn/kratos-admin-system/components/log";
|
|
9
10
|
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
10
11
|
import LogTable, { type LogTableConfig } from "@liujitcn/kratos-admin-system/components/LogTable.vue";
|
|
11
12
|
import { logDateSearch, logDetailColumn, logEnumLabel, createLogEnumOptions, requestLogTrace } from "@liujitcn/kratos-admin-system/components/log";
|
|
@@ -46,7 +47,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
46
47
|
{ prop: "action", label: t("system.base.log.field.action"), minWidth: 110, search: { el: "select", enum: actionOptions.value }, render: scope => logEnumLabel(actionOptions.value, (scope.row as BasePermissionLog).action) },
|
|
47
48
|
{ prop: "result", label: t("system.base.log.field.result"), minWidth: 110, search: { el: "select", enum: resultOptions.value }, render: scope => logEnumLabel(resultOptions.value, (scope.row as BasePermissionLog).result) },
|
|
48
49
|
{ prop: "user_name", label: t("system.base.log.field.user_name"), minWidth: 130 },
|
|
49
|
-
{ prop: "occurred_at", label: t("system.base.log.field.occurred_at"), minWidth: 190, search: logDateSearch(t) },
|
|
50
|
+
{ prop: "occurred_at", label: t("system.base.log.field.occurred_at"), minWidth: 190, align: "center", search: logDateSearch(t) },
|
|
50
51
|
logDetailColumn(t("common.action.view"), id => page.value?.handleOpenDialog(id))
|
|
51
52
|
]);
|
|
52
53
|
|
|
@@ -72,8 +73,8 @@ const config = computed<LogTableConfig>(() => ({
|
|
|
72
73
|
{ key: "reason", label: t("system.base.log.field.reason"), span: 2 },
|
|
73
74
|
{ key: "request_id", label: t("system.base.log.field.request_id") },
|
|
74
75
|
{ key: "trace_id", label: t("system.base.log.field.trace_id") },
|
|
75
|
-
{ key: "occurred_at", label: t("system.base.log.field.occurred_at") },
|
|
76
|
-
{ key: "created_at", label: t("system.base.log.field.created_at") }
|
|
76
|
+
{ key: "occurred_at", format: formatLogDateTime, label: t("system.base.log.field.occurred_at") },
|
|
77
|
+
{ key: "created_at", format: formatLogDateTime, label: t("system.base.log.field.created_at") }
|
|
77
78
|
],
|
|
78
79
|
request: requestTable,
|
|
79
80
|
get: getDetail
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { computed, ref } from "vue";
|
|
7
7
|
import type { ColumnProps } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
8
8
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
9
|
+
import { formatLogDateTime } from "@liujitcn/kratos-admin-system/components/log";
|
|
9
10
|
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
10
11
|
import LogTable, { type LogTableConfig } from "@liujitcn/kratos-admin-system/components/LogTable.vue";
|
|
11
12
|
import {
|
|
@@ -42,8 +43,8 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
42
43
|
{ prop: "engine", label: t("system.base.log.field.engine"), minWidth: 100 },
|
|
43
44
|
{ prop: "evaluation_type", label: t("system.base.log.field.evaluation_type"), minWidth: 160, search: { el: "select", enum: evaluationTypeOptions.value }, render: scope => logEnumLabel(evaluationTypeOptions.value, (scope.row as BasePolicyEvaluationLog).evaluation_type) },
|
|
44
45
|
{ prop: "decision", label: t("system.base.log.field.decision"), minWidth: 110, search: { el: "select", enum: decisionOptions.value }, render: scope => logEnumLabel(decisionOptions.value, (scope.row as BasePolicyEvaluationLog).decision) },
|
|
45
|
-
{ prop: "duration_ms", label: t("system.base.log.field.duration_ms"), minWidth: 110 },
|
|
46
|
-
{ prop: "occurred_at", label: t("system.base.log.field.occurred_at"), minWidth: 190, search: logDateSearch(t) },
|
|
46
|
+
{ prop: "duration_ms", label: t("system.base.log.field.duration_ms"), minWidth: 110, align: "right" },
|
|
47
|
+
{ prop: "occurred_at", label: t("system.base.log.field.occurred_at"), minWidth: 190, align: "center", search: logDateSearch(t) },
|
|
47
48
|
logDetailColumn(t("common.action.view"), id => page.value?.handleOpenDialog(id))
|
|
48
49
|
]);
|
|
49
50
|
|
|
@@ -75,8 +76,8 @@ const config = computed<LogTableConfig>(() => ({
|
|
|
75
76
|
{ key: "client_ip", label: t("system.base.log.field.client_ip") },
|
|
76
77
|
{ key: "request_id", label: t("system.base.log.field.request_id") },
|
|
77
78
|
{ key: "trace_id", label: t("system.base.log.field.trace_id") },
|
|
78
|
-
{ key: "occurred_at", label: t("system.base.log.field.occurred_at") },
|
|
79
|
-
{ key: "created_at", label: t("system.base.log.field.created_at") }
|
|
79
|
+
{ key: "occurred_at", format: formatLogDateTime, label: t("system.base.log.field.occurred_at") },
|
|
80
|
+
{ key: "created_at", format: formatLogDateTime, label: t("system.base.log.field.created_at") }
|
|
80
81
|
],
|
|
81
82
|
request: requestTable,
|
|
82
83
|
get: getDetail
|
|
@@ -185,6 +185,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
185
185
|
prop: "tenant_id",
|
|
186
186
|
label: t("common.field.tenant"),
|
|
187
187
|
minWidth: 140,
|
|
188
|
+
align: "left",
|
|
188
189
|
showOverflowTooltip: true,
|
|
189
190
|
search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
|
|
190
191
|
enum: requestTenantOptions
|
|
@@ -210,13 +211,11 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
210
211
|
}
|
|
211
212
|
},
|
|
212
213
|
{ prop: "remark", label: t("common.field.remark"), minWidth: 160 },
|
|
213
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
214
|
-
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180 },
|
|
214
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
215
|
+
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180, align: "center" },
|
|
215
216
|
{
|
|
216
217
|
prop: "operation",
|
|
217
218
|
label: t("common.field.operation"),
|
|
218
|
-
width: 180,
|
|
219
|
-
fixed: "right",
|
|
220
219
|
cellType: "actions",
|
|
221
220
|
actions: [
|
|
222
221
|
{
|
|
@@ -245,7 +245,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
245
245
|
{ prop: "mode", label: t("system.base.redact_output_policy.field.mode"), width: 110, enum: modeEnums.value, isFilterEnum: true },
|
|
246
246
|
{ prop: "rule_name", label: t("system.base.redact_output_policy.field.rule"), width: 150 },
|
|
247
247
|
{ prop: "status", label: t("common.field.status"), width: 100, cellType: "status", statusProps: { activeValue: Status.STATUS_ENABLE, inactiveValue: Status.STATUS_DISABLE, activeText: t("common.status.enabled"), inactiveText: t("common.status.disabled"), disabled: () => !BUTTONS.value["base:redact-output-policy:status"], beforeChange: scope => changeStatus(scope.row as BaseRedactOutputPolicy) } },
|
|
248
|
-
{ prop: "actions", label: t("common.field.operation"),
|
|
248
|
+
{ prop: "actions", label: t("common.field.operation"), cellType: "actions", actions: [{ label: t("common.action.edit"), type: "primary", link: true, icon: EditPen, hidden: () => !BUTTONS.value["base:redact-output-policy:update"], onClick: scope => openDialog((scope.row as BaseRedactOutputPolicy).id) }, { label: t("common.action.delete"), type: "danger", link: true, icon: Delete, hidden: () => !BUTTONS.value["base:redact-output-policy:delete"], onClick: scope => deleteItems(scope.row as BaseRedactOutputPolicy) }] }
|
|
249
249
|
]);
|
|
250
250
|
const headerActions = computed<HeaderActionProps[]>(() => [{ label: t("common.action.create"), type: "success", icon: CirclePlus, hidden: () => !BUTTONS.value["base:redact-output-policy:create"], onClick: () => openDialog() }, { label: t("common.action.delete"), type: "danger", icon: Delete, hidden: () => !BUTTONS.value["base:redact-output-policy:delete"], disabled: scope => !scope.selectedList.length, onClick: scope => deleteItems(scope.selectedList as BaseRedactOutputPolicy[]) }]);
|
|
251
251
|
|
|
@@ -189,8 +189,6 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
189
189
|
{
|
|
190
190
|
prop: "actions",
|
|
191
191
|
label: t("common.field.operation"),
|
|
192
|
-
width: 100,
|
|
193
|
-
fixed: "right",
|
|
194
192
|
cellType: "actions",
|
|
195
193
|
actions: [{ label: t("common.action.edit"), type: "primary", link: true, icon: EditPen, hidden: () => !BUTTONS.value["base:redact-rule:update"], onClick: scope => openDialog((scope.row as BaseRedactRule).id) }]
|
|
196
194
|
}
|
|
@@ -208,7 +208,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
208
208
|
{ prop: "column_name", label: t("system.base.redact_storage_policy.field.column_name"), minWidth: 150, search: { el: "input" } },
|
|
209
209
|
{ prop: "rule_name", label: t("system.base.redact_storage_policy.field.rule"), minWidth: 150 },
|
|
210
210
|
{ prop: "status", label: t("common.field.status"), width: 100, cellType: "status", statusProps: { activeValue: Status.STATUS_ENABLE, inactiveValue: Status.STATUS_DISABLE, activeText: t("common.status.enabled"), inactiveText: t("common.status.disabled"), disabled: () => !BUTTONS.value["base:redact-storage-policy:status"], beforeChange: scope => changeStatus(scope.row as BaseRedactStoragePolicy) } },
|
|
211
|
-
{ prop: "actions", label: t("common.field.operation"),
|
|
211
|
+
{ prop: "actions", label: t("common.field.operation"), cellType: "actions", actions: [{ label: t("common.action.edit"), type: "primary", link: true, icon: EditPen, hidden: () => !BUTTONS.value["base:redact-storage-policy:update"], onClick: scope => openDialog((scope.row as BaseRedactStoragePolicy).id) }, { label: t("common.action.delete"), type: "danger", link: true, icon: Delete, hidden: () => !BUTTONS.value["base:redact-storage-policy:delete"], onClick: scope => deleteItems(scope.row as BaseRedactStoragePolicy) }] }
|
|
212
212
|
]);
|
|
213
213
|
const headerActions = computed<HeaderActionProps[]>(() => [{ label: t("common.action.create"), type: "success", icon: CirclePlus, hidden: () => !BUTTONS.value["base:redact-storage-policy:create"], onClick: () => openDialog() }, { label: t("common.action.delete"), type: "danger", icon: Delete, hidden: () => !BUTTONS.value["base:redact-storage-policy:delete"], disabled: scope => !scope.selectedList.length, onClick: scope => deleteItems(scope.selectedList as BaseRedactStoragePolicy[]) }]);
|
|
214
214
|
|
|
@@ -308,6 +308,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
308
308
|
prop: "tenant_id",
|
|
309
309
|
label: t("common.field.tenant"),
|
|
310
310
|
minWidth: 140,
|
|
311
|
+
align: "left",
|
|
311
312
|
showOverflowTooltip: true,
|
|
312
313
|
search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
|
|
313
314
|
enum: requestTenantOptions
|
|
@@ -339,13 +340,11 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
339
340
|
beforeChange: scope => handleBeforeSetStatus(scope.row as BaseRole)
|
|
340
341
|
}
|
|
341
342
|
},
|
|
342
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
343
|
-
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180 },
|
|
343
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
344
|
+
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180, align: "center" },
|
|
344
345
|
{
|
|
345
346
|
prop: "operation",
|
|
346
347
|
label: t("common.field.action"),
|
|
347
|
-
width: 280,
|
|
348
|
-
fixed: "right",
|
|
349
348
|
cellType: "actions",
|
|
350
349
|
actions: [
|
|
351
350
|
{
|
|
@@ -182,13 +182,11 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
182
182
|
beforeChange: scope => handleBeforeSetStatus(scope.row as BaseTenant)
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
186
|
-
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180 },
|
|
185
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
186
|
+
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180, align: "center" },
|
|
187
187
|
{
|
|
188
188
|
prop: "operation",
|
|
189
189
|
label: t("common.field.operation"),
|
|
190
|
-
width: 150,
|
|
191
|
-
fixed: "right",
|
|
192
190
|
cellType: "actions",
|
|
193
191
|
actions: [
|
|
194
192
|
{
|
|
@@ -470,6 +470,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
470
470
|
prop: "tenant_id",
|
|
471
471
|
label: t("common.field.tenant"),
|
|
472
472
|
minWidth: 140,
|
|
473
|
+
align: "left",
|
|
473
474
|
showOverflowTooltip: true,
|
|
474
475
|
search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
|
|
475
476
|
enum: requestTenantOptions
|
|
@@ -516,13 +517,11 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
516
517
|
}
|
|
517
518
|
},
|
|
518
519
|
{ prop: "remark", label: t("common.field.remark"), minWidth: 160 },
|
|
519
|
-
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
520
|
-
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180 },
|
|
520
|
+
{ prop: "created_at", align: "center", label: t("common.field.created_at"), minWidth: 180 },
|
|
521
|
+
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180, align: "center" },
|
|
521
522
|
{
|
|
522
523
|
prop: "operation",
|
|
523
524
|
label: t("common.field.action"),
|
|
524
|
-
width: 260,
|
|
525
|
-
fixed: "right",
|
|
526
525
|
cellType: "actions",
|
|
527
526
|
actions: [
|
|
528
527
|
{
|
|
@@ -121,8 +121,6 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
121
121
|
{
|
|
122
122
|
prop: "operation",
|
|
123
123
|
label: t("common.field.operation"),
|
|
124
|
-
width: 250,
|
|
125
|
-
fixed: "right",
|
|
126
124
|
cellType: "actions",
|
|
127
125
|
actions: [
|
|
128
126
|
{ label: t("common.action.view"), link: true, icon: View, onClick: scope => openDetail(scope.row as Notification) },
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
<div class="detail-item detail-item--wide">
|
|
66
66
|
<span class="detail-label">{{ t("common.field.created_at") }}</span>
|
|
67
|
-
<span class="detail-value">{{ profile.created_at
|
|
67
|
+
<span class="detail-value">{{ formatDateTime(profile.created_at) }}</span>
|
|
68
68
|
</div>
|
|
69
69
|
</div>
|
|
70
70
|
</div>
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
<script setup lang="ts">
|
|
92
92
|
import { computed, reactive, ref, watch } from "vue";
|
|
93
93
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
94
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
94
95
|
import { defProfileAuthService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/auth";
|
|
95
96
|
import type { UserProfileForm } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/auth";
|
|
96
97
|
import { BaseUserIDType } from "@liujitcn/kratos-admin-system/rpc/system/common/v1/common";
|
|
@@ -44,7 +44,7 @@ const resultOptions = computed<Array<[number, string]>>(() => [
|
|
|
44
44
|
[BaseLogResult.BASE_LOG_RESULT_ERROR, t("system.base.log.result.error")]
|
|
45
45
|
]);
|
|
46
46
|
const columns = computed<ColumnProps[]>(() => [
|
|
47
|
-
{ prop: "occurred_at", label: t("system.profile.login_log.field.occurred_at"), minWidth: 180 },
|
|
47
|
+
{ prop: "occurred_at", label: t("system.profile.login_log.field.occurred_at"), minWidth: 180, align: "center" },
|
|
48
48
|
{
|
|
49
49
|
prop: "login_type",
|
|
50
50
|
label: t("system.profile.login_log.field.login_type"),
|
|
@@ -58,7 +58,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
58
58
|
render: scope => enumLabel(resultOptions.value, (scope.row as BaseLoginLog).result)
|
|
59
59
|
},
|
|
60
60
|
{ prop: "client_ip", label: t("system.profile.login_log.field.client_ip"), minWidth: 140 },
|
|
61
|
-
{ prop: "device_id", label: t("system.profile.login_log.field.device_id"), minWidth: 160 },
|
|
61
|
+
{ prop: "device_id", label: t("system.profile.login_log.field.device_id"), minWidth: 160, align: "right" },
|
|
62
62
|
{ prop: "reason", label: t("system.profile.login_log.field.reason"), minWidth: 180 }
|
|
63
63
|
]);
|
|
64
64
|
|
|
@@ -30,6 +30,7 @@ import type { ColumnProps, ProTableInstance } from "@liujitcn/kratos-admin-core/
|
|
|
30
30
|
import { useRouter } from "vue-router";
|
|
31
31
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
32
32
|
import { LOGIN_URL } from "@liujitcn/kratos-admin-core/config";
|
|
33
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
33
34
|
import { useUserStore } from "@liujitcn/kratos-admin-core/stores/runtime";
|
|
34
35
|
import { defBaseSessionService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_session";
|
|
35
36
|
import type { BaseSession } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_session";
|
|
@@ -52,7 +53,13 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
52
53
|
},
|
|
53
54
|
{ prop: "client_ip", label: t("system.profile.session.field.client_ip"), minWidth: 140 },
|
|
54
55
|
{ prop: "device", label: t("system.profile.session.field.device"), minWidth: 200 },
|
|
55
|
-
{
|
|
56
|
+
{
|
|
57
|
+
prop: "issued_at",
|
|
58
|
+
label: t("system.profile.session.field.issued_at"),
|
|
59
|
+
minWidth: 180,
|
|
60
|
+
align: "center",
|
|
61
|
+
render: scope => formatDateTime((scope.row as BaseSession).issued_at)
|
|
62
|
+
},
|
|
56
63
|
{
|
|
57
64
|
prop: "expires_in",
|
|
58
65
|
label: t("system.profile.session.field.expires_in"),
|
|
@@ -46,6 +46,7 @@ import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
|
|
|
46
46
|
import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
|
|
47
47
|
import type { ColumnProps, ProTableInstance } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
48
48
|
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
49
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
49
50
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
50
51
|
import RichTextPreview from "@liujitcn/kratos-admin-core/components/RichTextPreview/index.vue";
|
|
51
52
|
import { defCacheService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/cache";
|
|
@@ -114,31 +115,33 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
114
115
|
prop: "ttl_seconds",
|
|
115
116
|
label: t("system.cache.field.ttl"),
|
|
116
117
|
width: 130,
|
|
118
|
+
align: "right",
|
|
117
119
|
render: scope => formatTtl((scope.row as CacheEntry).ttl_seconds)
|
|
118
120
|
},
|
|
119
121
|
{
|
|
120
122
|
prop: "expires_at",
|
|
121
123
|
label: t("system.cache.field.expires_at"),
|
|
122
124
|
minWidth: 185,
|
|
123
|
-
|
|
125
|
+
align: "center",
|
|
126
|
+
render: scope => formatDateTime(scope.row.expires_at)
|
|
124
127
|
},
|
|
125
128
|
{
|
|
126
129
|
prop: "created_at",
|
|
127
130
|
label: t("system.cache.field.created_at"),
|
|
128
131
|
minWidth: 185,
|
|
129
|
-
|
|
132
|
+
align: "center",
|
|
133
|
+
render: scope => formatDateTime(scope.row.created_at)
|
|
130
134
|
},
|
|
131
135
|
{
|
|
132
136
|
prop: "updated_at",
|
|
137
|
+
align: "center",
|
|
133
138
|
label: t("system.cache.field.updated_at"),
|
|
134
139
|
minWidth: 185,
|
|
135
|
-
render: scope =>
|
|
140
|
+
render: scope => formatDateTime(scope.row.updated_at)
|
|
136
141
|
},
|
|
137
142
|
{
|
|
138
143
|
prop: "operation",
|
|
139
144
|
label: t("common.field.operation"),
|
|
140
|
-
width: 90,
|
|
141
|
-
fixed: "right",
|
|
142
145
|
cellType: "actions",
|
|
143
146
|
actions: [
|
|
144
147
|
{
|
|
@@ -237,12 +240,6 @@ function formatTtl(ttl: number) {
|
|
|
237
240
|
return `${Math.floor(ttl / 3600)}h ${Math.floor((ttl % 3600) / 60)}m`;
|
|
238
241
|
}
|
|
239
242
|
|
|
240
|
-
/** 格式化时间字段。 */
|
|
241
|
-
function formatDate(value: string) {
|
|
242
|
-
if (!value) return "-";
|
|
243
|
-
const date = new Date(value);
|
|
244
|
-
return Number.isNaN(date.getTime()) ? value : date.toLocaleString();
|
|
245
|
-
}
|
|
246
243
|
</script>
|
|
247
244
|
|
|
248
245
|
<style lang="scss" scoped>
|
|
@@ -107,7 +107,8 @@
|
|
|
107
107
|
<script setup lang="ts">
|
|
108
108
|
import { onBeforeUnmount, ref, watch } from "vue";
|
|
109
109
|
import { Check, CircleClose, Clock, CopyDocument, Document, Loading, Minus } from "@element-plus/icons-vue";
|
|
110
|
-
import {
|
|
110
|
+
import { t } from "@liujitcn/kratos-admin-core";
|
|
111
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
111
112
|
import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
|
|
112
113
|
import { defCodeGenService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/code_gen";
|
|
113
114
|
import { subscribeCodeGenProgress, type SseStop } from "../../../../utils/code_gen_sse";
|
|
@@ -236,8 +237,7 @@ function isFinished(status: CodeGenTaskStatus) {
|
|
|
236
237
|
|
|
237
238
|
/** 格式化任务时间。 */
|
|
238
239
|
function formatTime(value: string) {
|
|
239
|
-
|
|
240
|
-
return !value || Number.isNaN(date.getTime()) ? "-" : date.toLocaleString(getCurrentLocale());
|
|
240
|
+
return formatDateTime(value);
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
/** 弹出展示命令输出。 */
|
|
@@ -461,12 +461,10 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
461
461
|
search: { el: "select" }
|
|
462
462
|
},
|
|
463
463
|
{ prop: "remark", label: t("system.code.gen.table.field.remark"), minWidth: 180, showOverflowTooltip: true },
|
|
464
|
-
{ prop: "created_at", label: t("system.code.gen.table.field.created_at"), minWidth: 180 },
|
|
464
|
+
{ prop: "created_at", label: t("system.code.gen.table.field.created_at"), minWidth: 180, align: "center" },
|
|
465
465
|
{
|
|
466
466
|
prop: "operation",
|
|
467
467
|
label: t("common.field.operation"),
|
|
468
|
-
width: 660,
|
|
469
|
-
fixed: "right",
|
|
470
468
|
cellType: "actions",
|
|
471
469
|
actions: [
|
|
472
470
|
{
|
|
@@ -151,10 +151,10 @@
|
|
|
151
151
|
><code class="ops-route">{{ row.route }}</code></template
|
|
152
152
|
>
|
|
153
153
|
</el-table-column>
|
|
154
|
-
<el-table-column prop="qps" label="QPS" width="75" />
|
|
155
|
-
<el-table-column prop="latency" label="P95" width="85" />
|
|
156
|
-
<el-table-column prop="errorRate" :label="t('system.ops_monitoring.error_rate')" width="85" />
|
|
157
|
-
<el-table-column :label="t('system.ops_monitoring.status.label')" width="85" align="
|
|
154
|
+
<el-table-column prop="qps" label="QPS" width="75" align="right" />
|
|
155
|
+
<el-table-column prop="latency" label="P95" width="85" align="right" />
|
|
156
|
+
<el-table-column prop="errorRate" :label="t('system.ops_monitoring.error_rate')" width="85" align="right" />
|
|
157
|
+
<el-table-column :label="t('system.ops_monitoring.status.label')" width="85" align="center">
|
|
158
158
|
<template #default="{ row }"
|
|
159
159
|
><el-tag :type="row.healthy ? 'success' : 'warning'" size="small" effect="plain">{{ row.status }}</el-tag></template
|
|
160
160
|
>
|