Skip to content

Commit 0a94df5

Browse files
authored
fix: table ui issues (#201)
fix: table ui issues Refs: #185 --------- Signed-off-by: seven <[email protected]>
1 parent 00f07fb commit 0a94df5

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

src/views/manage/components/cluster-state.vue

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const props = defineProps<{ cluster: RawClusterStats | undefined }>();
5959
justify-content: space-around;
6060
6161
.n-card {
62+
margin-top: 10px;
6263
max-width: 300px;
6364
max-height: 300px;
6465
}

src/views/manage/components/index-manage.vue

+18-17
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ const indexTable = computed(() => {
201201
dataIndex: 'aliases',
202202
key: 'aliases',
203203
resizable: true,
204-
ellipsis: { tooltip: true },
205204
render: ({ aliases }: { aliases: Array<ClusterAlias> }) =>
206205
aliases.map(alias =>
207206
h(
@@ -212,6 +211,7 @@ const indexTable = computed(() => {
212211
tertiary: true,
213212
size: 'small',
214213
iconPlacement: 'left',
214+
style: 'margin: 2px',
215215
},
216216
{
217217
default: () => `${alias.alias}`,
@@ -308,7 +308,7 @@ const indexTable = computed(() => {
308308
const templateTable = computed(() => {
309309
const columns = [
310310
{
311-
title: 'Template Name',
311+
title: 'Name',
312312
dataIndex: 'name',
313313
key: 'name',
314314
...filterProps('name'),
@@ -325,24 +325,31 @@ const templateTable = computed(() => {
325325
title: 'Included In',
326326
dataIndex: 'included_in',
327327
key: 'included_in',
328+
resizable: true,
328329
render: ({ included_in }: { included_in: Array<string> }) =>
329-
included_in?.map(included => h(NTag, null, { default: () => included })),
330+
included_in?.map(included =>
331+
h(NTag, { style: 'margin: 2px' }, { default: () => included }),
332+
),
330333
},
331334
{
332335
title: 'Index Patterns',
333336
dataIndex: 'index_patterns',
334337
key: 'index_patterns',
335-
ellipsis: { tooltip: true },
338+
resizable: true,
336339
render: ({ index_patterns }: { index_patterns: Array<string> }) =>
337-
index_patterns?.map(pattern => h(NTag, null, { default: () => pattern })),
340+
index_patterns?.map(pattern =>
341+
h(NTag, { style: 'margin: 2px' }, { default: () => pattern }),
342+
),
338343
},
339344
{
340345
title: 'Composed Of',
341346
dataIndex: 'composed_of',
342347
key: 'composed_of',
343-
ellipsis: { tooltip: true },
348+
resizable: true,
344349
render: ({ composed_of }: { composed_of: Array<string> }) =>
345-
composed_of?.map(composed => h(NTag, null, { default: () => composed })),
350+
composed_of?.map(composed =>
351+
h(NTag, { style: 'margin: 2px' }, { default: () => composed }),
352+
),
346353
},
347354
];
348355
@@ -494,16 +501,6 @@ onMounted(async () => {
494501
width: 500px;
495502
}
496503
497-
:deep(.n-tabs-wrapper) {
498-
.n-tabs-tab-wrapper {
499-
background-color: var(--bg-color);
500-
501-
.n-tabs-tab--active {
502-
background-color: var(--bg-color-secondary);
503-
}
504-
}
505-
}
506-
507504
:deep(.n-tabs-pane-wrapper) {
508505
width: 100%;
509506
height: 100%;
@@ -512,5 +509,9 @@ onMounted(async () => {
512509
:deep(.n-tab-pane) {
513510
padding: 0;
514511
}
512+
513+
:deep(.n-data-table-th__title) {
514+
white-space: nowrap;
515+
}
515516
}
516517
</style>

src/views/manage/components/shard-manage.vue

+4
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ onMounted(async () => {
361361
gap: 10px;
362362
363363
.shard-table-container {
364+
margin-top: 10px;
364365
flex: 1;
365366
height: 0;
366367
display: flex;
@@ -372,6 +373,9 @@ onMounted(async () => {
372373
margin: 5px;
373374
}
374375
}
376+
:deep(.n-data-table-th__title) {
377+
white-space: nowrap;
378+
}
375379
}
376380
377381
.shard-statistic-container {

0 commit comments

Comments
 (0)