Skip to content

Commit 58dcb48

Browse files
fix: fix admin ui
1 parent 10b7f18 commit 58dcb48

File tree

8 files changed

+284
-257
lines changed

8 files changed

+284
-257
lines changed

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-cache/template.twig

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,58 +18,61 @@
1818
></sw-icon>
1919
</sw-button>
2020
</template>
21-
<sw-data-grid
22-
:showSelection="false"
23-
:dataSource="cacheFolders"
24-
:columns="columns"
25-
>
26-
<template #column-name="{ item }">
27-
<sw-label
28-
variant="success"
29-
appearance="pill"
30-
v-if="item.active"
31-
>
32-
{{ $t('frosh-tools.active') }}
33-
</sw-label>
34-
<sw-label
35-
variant="primary"
36-
appearance="pill"
37-
v-if="item.type"
38-
>
39-
{{ item.type }}
40-
</sw-label>
41-
{{ item.name }}
42-
</template>
4321

44-
<template #column-size="{ item }">
45-
<template v-if="item.size < 0">
46-
{{ $t('frosh-tools.unknown') }}
22+
<template #grid>
23+
<sw-data-grid
24+
:showSelection="false"
25+
:dataSource="cacheFolders"
26+
:columns="columns"
27+
>
28+
<template #column-name="{ item }">
29+
<sw-label
30+
variant="success"
31+
appearance="pill"
32+
v-if="item.active"
33+
>
34+
{{ $t('frosh-tools.active') }}
35+
</sw-label>
36+
<sw-label
37+
variant="primary"
38+
appearance="pill"
39+
v-if="item.type"
40+
>
41+
{{ item.type }}
42+
</sw-label>
43+
{{ item.name }}
4744
</template>
4845

49-
<template v-else>
50-
{{ formatSize(item.size) }}
51-
</template>
52-
</template>
46+
<template #column-size="{ item }">
47+
<template v-if="item.size < 0">
48+
{{ $t('frosh-tools.unknown') }}
49+
</template>
5350

54-
<template #column-freeSpace="{ item }">
55-
<template v-if="item.freeSpace < 0">
56-
{{ $t('frosh-tools.unknown') }}
51+
<template v-else>
52+
{{ formatSize(item.size) }}
53+
</template>
5754
</template>
5855

59-
<template v-else>
60-
{{ formatSize(item.freeSpace) }}
56+
<template #column-freeSpace="{ item }">
57+
<template v-if="item.freeSpace < 0">
58+
{{ $t('frosh-tools.unknown') }}
59+
</template>
60+
61+
<template v-else>
62+
{{ formatSize(item.freeSpace) }}
63+
</template>
6164
</template>
62-
</template>
6365

64-
<template #actions="{ item }">
65-
<sw-context-menu-item
66-
variant="danger"
67-
@click="clearCache(item)"
68-
>
69-
{{ $t('frosh-tools.clear') }}
70-
</sw-context-menu-item>
71-
</template>
72-
</sw-data-grid>
66+
<template #actions="{ item }">
67+
<sw-context-menu-item
68+
variant="danger"
69+
@click="clearCache(item)"
70+
>
71+
{{ $t('frosh-tools.clear') }}
72+
</sw-context-menu-item>
73+
</template>
74+
</sw-data-grid>
75+
</template>
7376
</sw-card>
7477
<sw-card
7578
class="frosh-tools-tab-cache__action-card"

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-elasticsearch/template.twig

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,41 @@
5353
></sw-icon>
5454
</sw-button>
5555
</template>
56-
<sw-data-grid
57-
v-if="indices"
58-
:showSelection="false"
59-
:dataSource="indices"
60-
:columns="columns"
61-
>
62-
<template #column-name="{ item }">
63-
<sw-label
64-
variant="primary"
65-
appearance="pill"
66-
v-if="item.aliases.length"
67-
>
68-
{{ $t('frosh-tools.active') }}
69-
</sw-label>
70-
{{ item.name }}
71-
<br/>
72-
</template>
7356

74-
<template #column-indexSize="{ item }">
75-
{{ formatSize(item.indexSize) }}
76-
<br/>
77-
</template>
57+
<template #grid>
58+
<sw-data-grid
59+
v-if="indices"
60+
:showSelection="false"
61+
:dataSource="indices"
62+
:columns="columns"
63+
>
64+
<template #column-name="{ item }">
65+
<sw-label
66+
variant="primary"
67+
appearance="pill"
68+
v-if="item.aliases.length"
69+
>
70+
{{ $t('frosh-tools.active') }}
71+
</sw-label>
72+
{{ item.name }}
73+
<br/>
74+
</template>
75+
76+
<template #column-indexSize="{ item }">
77+
{{ formatSize(item.indexSize) }}
78+
<br/>
79+
</template>
7880

79-
<template #actions="{ item }">
80-
<sw-context-menu-item
81-
variant="danger"
82-
@click="deleteIndex(item.name)"
83-
>
84-
{{ $t('frosh-tools.delete') }}
85-
</sw-context-menu-item>
86-
</template>
87-
</sw-data-grid>
81+
<template #actions="{ item }">
82+
<sw-context-menu-item
83+
variant="danger"
84+
@click="deleteIndex(item.name)"
85+
>
86+
{{ $t('frosh-tools.delete') }}
87+
</sw-context-menu-item>
88+
</template>
89+
</sw-data-grid>
90+
</template>
8891
</sw-card>
8992
<sw-card
9093
:title="$t('frosh-tools.actions')"
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
.frosh-tools-tab-index__health-card {
2-
.sw-card__content {
3-
padding: 0;
1+
.frosh-tools-tab-index {
2+
&__health-card {
3+
.sw-card__content {
4+
padding: 0;
45

5-
.sw-label {
6-
text-align: center;
7-
min-width: 70px;
6+
.sw-label {
7+
text-align: center;
8+
min-width: 70px;
9+
}
810
}
911
}
12+
&__alert-wrapper {
13+
width: 100%;
14+
padding: 24px;
15+
}
1016
}

0 commit comments

Comments
 (0)