]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.scss
57b8e48de9cd6de1def089c19786806b4efbb257
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / datatable / table / table.component.scss
1 @use './src/styles/vendor/variables' as vv;
2 @use './src/styles/defaults/mixins';
3
4 @mixin row-details-icon {
5 color: vv.$gray-900;
6 font-family: 'ForkAwesome', sans-serif;
7 font-size: 1rem;
8 line-height: 1;
9 }
10
11 .dataTables_wrapper {
12 margin-bottom: 25px;
13 // after bootstrap 8.0 the details table started to
14 // have an issue where the columns keep expanding to
15 // infinity.
16 // https://github.com/ceph/ceph/pull/40618#pullrequestreview-629010639
17 // making the max-width to 99.9% solves the issue as a temporary fix
18 // until we get a conclusive fix, this needs to be kept.
19 max-width: 99.9%;
20
21 .separator {
22 border-left: 1px solid vv.$datatable-divider-color;
23 display: inline-block;
24 height: 30px;
25 margin-left: 5px;
26 padding-left: 5px;
27 vertical-align: middle;
28 }
29
30 .widget-toolbar {
31 border-left: 1px solid vv.$datatable-divider-color;
32 float: right;
33 padding: 0 8px;
34
35 .form-check {
36 padding-left: 0;
37 }
38 }
39
40 .dataTables_length > input {
41 line-height: 25px;
42 text-align: right;
43 }
44 }
45
46 .dataTables_header {
47 background-color: vv.$gray-100;
48 border: 1px solid vv.$gray-400;
49 border-bottom: 0;
50 padding: 5px;
51 position: relative;
52
53 .cd-datatable-actions {
54 float: left;
55 }
56
57 .form-group {
58 padding-left: 8px;
59 }
60
61 .input-group {
62 border-left: 1px solid vv.$datatable-divider-color;
63 float: right;
64 max-width: 250px;
65 padding-left: 8px;
66 padding-right: 8px;
67 width: 40%;
68
69 .form-control {
70 height: 30px;
71 }
72 }
73
74 .input-group.dataTables_paginate {
75 min-width: 85px;
76 padding-right: 8px;
77 width: 8%;
78 }
79
80 .filter-chips {
81 float: right;
82 padding: 0 8px;
83
84 .badge-remove {
85 color: vv.$white;
86 }
87 }
88 }
89
90 ::ng-deep cd-table .cd-datatable {
91 border: 1px solid vv.$gray-400;
92 margin-bottom: 0;
93 max-width: none !important;
94
95 .progress-linear {
96 display: block;
97 height: 5px;
98 margin: 0;
99 padding: 0;
100 position: relative;
101 width: 100%;
102
103 .container {
104 background-color: vv.$primary;
105
106 .bar {
107 background-color: vv.$primary;
108 height: 100%;
109 left: 0;
110 overflow: hidden;
111 position: absolute;
112 width: 100%;
113 }
114
115 .bar::before {
116 animation: progress-loading 3s linear infinite;
117 background-color: vv.$primary;
118 content: '';
119 display: block;
120 height: 100%;
121 left: -200px;
122 position: absolute;
123 width: 200px;
124 }
125 }
126 }
127
128 .datatable-header {
129 background-clip: padding-box;
130 background-color: vv.$gray-100;
131 background-image: linear-gradient(to bottom, vv.$gray-100 0, vv.$gray-200 100%);
132 background-repeat: repeat-x;
133 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffededed', GradientType=0);
134
135 .sort-asc,
136 .sort-desc {
137 color: vv.$primary;
138 }
139
140 .datatable-header-cell {
141 @include mixins.table-cell;
142
143 font-weight: bold;
144 text-align: left;
145
146 .datatable-header-cell-label {
147 &::after {
148 font-family: ForkAwesome;
149 font-weight: 400;
150 height: 9px;
151 left: 10px;
152 line-height: 12px;
153 position: relative;
154 vertical-align: baseline;
155 width: 12px;
156 }
157 }
158
159 &.sortable {
160 .datatable-header-cell-label::after {
161 content: ' \f0dc';
162 }
163
164 &.sort-active {
165 &.sort-asc .datatable-header-cell-label::after {
166 content: ' \f160';
167 }
168
169 &.sort-desc .datatable-header-cell-label::after {
170 content: ' \f161';
171 }
172 }
173 }
174
175 &:first-child {
176 border-left: 0;
177 }
178 }
179 }
180
181 .datatable-body {
182 margin-bottom: -6px;
183
184 .empty-row {
185 background-color: lighten(vv.$primary, 45%);
186 font-style: italic;
187 font-weight: bold;
188 padding-bottom: 5px;
189 padding-top: 5px;
190 text-align: center;
191 }
192
193 .datatable-body-row {
194 &.clickable:hover .datatable-row-group {
195 background-color: lighten(vv.$primary, 45%);
196 transition-duration: 0.3s;
197 transition-property: background;
198 transition-timing-function: linear;
199 }
200
201 &.datatable-row-even {
202 background-color: vv.$white;
203 }
204
205 &.datatable-row-odd {
206 background-color: vv.$gray-100;
207 }
208
209 &.active,
210 &.active:hover {
211 background-color: lighten(vv.$primary, 35%);
212 }
213
214 .datatable-body-cell {
215 @include mixins.table-cell;
216
217 &:first-child {
218 border-left: 0;
219 }
220
221 .datatable-body-cell-label {
222 display: block;
223 height: 100%;
224 }
225 }
226 }
227
228 .datatable-row-detail {
229 border-bottom: 2px solid vv.$gray-400;
230 overflow-y: visible !important;
231 padding: 20px;
232 }
233
234 .expand-collapse-icon {
235 display: block;
236 height: 100%;
237 text-align: center;
238
239 &:hover {
240 text-decoration: none;
241 }
242 }
243
244 .expand-collapse-icon-right::before {
245 @include row-details-icon;
246 content: '\f105';
247 }
248
249 .expand-collapse-icon-down::before {
250 @include row-details-icon;
251 content: '\f107';
252 }
253 }
254
255 .datatable-footer {
256 .selected-count,
257 .page-count {
258 font-style: italic;
259 min-height: 2rem;
260 padding-left: 0.3rem;
261 padding-top: 0.3rem;
262 }
263 }
264
265 .cd-datatable-checkbox {
266 text-align: center;
267 }
268 }
269
270 @keyframes progress-loading {
271 from {
272 left: -200px;
273 width: 15%;
274 }
275
276 50% {
277 width: 30%;
278 }
279
280 70% {
281 width: 70%;
282 }
283
284 80% {
285 left: 50%;
286 }
287
288 95% {
289 left: 120%;
290 }
291
292 to {
293 left: 100%;
294 }
295 }