@xen-orchestra/web-core 0.26.1 → 0.28.0
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/lib/components/card/VtsCardRowKeyValue.vue +1 -0
- package/lib/components/cell-object/VtsCellObject.vue +1 -2
- package/lib/components/console/VtsActionsConsole.vue +3 -9
- package/lib/components/copy-button/VtsCopyButton.vue +1 -3
- package/lib/components/dropdown/DropdownTitle.vue +3 -3
- package/lib/components/icon/VtsIcon.vue +32 -76
- package/lib/components/input-wrapper/VtsInputWrapper.vue +2 -2
- package/lib/components/layout/VtsLayoutSidebar.vue +1 -2
- package/lib/components/menu/MenuItem.vue +4 -5
- package/lib/components/menu/MenuTrigger.vue +3 -3
- package/lib/components/object-icon/VtsObjectIcon.vue +2 -2
- package/lib/components/resources/VtsResource.vue +3 -3
- package/lib/components/select/VtsSelect.vue +4 -5
- package/lib/components/table/ColumnTitle.vue +11 -12
- package/lib/components/task/VtsQuickTaskButton.vue +1 -2
- package/lib/components/tree/VtsTreeLoadingItem.vue +3 -3
- package/lib/components/ui/alarm-item/UiAlarmItem.vue +1 -2
- package/lib/components/ui/alert/UiAlert.vue +14 -13
- package/lib/components/ui/button/UiButton.vue +4 -5
- package/lib/components/ui/button-icon/UiButtonIcon.vue +3 -3
- package/lib/components/ui/checkbox/UiCheckbox.vue +2 -9
- package/lib/components/ui/chip/ChipIcon.vue +3 -3
- package/lib/components/ui/chip/ChipRemoveIcon.vue +1 -2
- package/lib/components/ui/chip/UiChip.vue +2 -2
- package/lib/components/ui/circle-progress-bar/UiCircleProgressBar.vue +7 -4
- package/lib/components/ui/collapsible-list/UiCollapsibleList.vue +73 -0
- package/lib/components/ui/donut-chart/UiDonutChart.vue +30 -17
- package/lib/components/ui/dropdown/UiDropdown.vue +5 -7
- package/lib/components/ui/dropdown-button/UiDropdownButton.vue +4 -5
- package/lib/components/ui/head-bar/UiHeadBar.vue +6 -11
- package/lib/components/ui/info/UiInfo.vue +14 -20
- package/lib/components/ui/input/UiInput.vue +6 -7
- package/lib/components/ui/label/UiLabel.vue +3 -3
- package/lib/components/ui/legend/UiLegend.vue +3 -3
- package/lib/components/ui/legend-title/UiLegendTitle.vue +7 -3
- package/lib/components/ui/link/UiLink.vue +4 -5
- package/lib/components/ui/{quoteCode/UiQuoteCode.vue → log-entry-viewer/UiLogEntryViewer.vue} +58 -21
- package/lib/components/ui/object-link/UiObjectLink.vue +4 -4
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +3 -4
- package/lib/components/ui/quick-task-item/UiQuickTaskItem.vue +3 -4
- package/lib/components/ui/radio-button/UiRadioButton.vue +1 -2
- package/lib/components/ui/table-pagination/PaginationButton.vue +2 -25
- package/lib/components/ui/table-pagination/UiTablePagination.vue +56 -95
- package/lib/components/ui/tag/UiTag.vue +3 -3
- package/lib/components/ui/text-area/UiTextarea.vue +2 -2
- package/lib/components/ui/toaster/UiToaster.vue +15 -13
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +4 -5
- package/lib/composables/default-tab.composable.md +42 -0
- package/lib/composables/default-tab.composable.ts +26 -0
- package/lib/composables/link-component.composable.ts +3 -2
- package/lib/composables/pagination.composable.ts +5 -0
- package/lib/i18n.ts +4 -0
- package/lib/icons/fa-icons.ts +48 -2
- package/lib/icons/index.ts +4 -0
- package/lib/icons/legacy-icons.ts +10 -0
- package/lib/icons/object-icons.ts +1 -1
- package/lib/layouts/CoreLayout.vue +1 -2
- package/lib/locales/cs.json +29 -10
- package/lib/locales/de.json +70 -7
- package/lib/locales/en.json +25 -0
- package/lib/locales/es.json +3 -3
- package/lib/locales/fr.json +25 -0
- package/lib/locales/it.json +17 -5
- package/lib/locales/nl.json +28 -10
- package/lib/locales/pt_BR.json +67 -0
- package/lib/locales/sv.json +17 -0
- package/lib/packages/form-select/types.ts +3 -0
- package/lib/packages/form-select/use-form-option-controller.ts +5 -6
- package/lib/packages/form-select/use-form-select-controller.ts +1 -0
- package/lib/packages/form-select/use-form-select.ts +153 -109
- package/lib/packages/icon/DisplayIcon.vue +1 -0
- package/lib/packages/progress/README.md +62 -0
- package/lib/packages/progress/types.ts +19 -0
- package/lib/packages/progress/use-progress-group.ts +68 -0
- package/lib/packages/progress/use-progress.ts +22 -0
- package/lib/packages/remote-resource/README.md +115 -0
- package/lib/packages/remote-resource/define-remote-resource.ts +294 -0
- package/lib/packages/remote-resource/types.ts +28 -0
- package/lib/packages/threshold/README.md +30 -0
- package/lib/packages/threshold/type.ts +3 -0
- package/lib/packages/threshold/use-threshold.ts +19 -0
- package/lib/types/object-icon.type.ts +0 -40
- package/package.json +2 -2
- package/lib/components/icon/NewVtsIcon.vue +0 -49
- package/lib/components/ui/complex-icon/UiComplexIcon.vue +0 -45
- package/lib/components/ui/object-icon/UiObjectIcon.vue +0 -251
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
<!-- VM v2 -->
|
|
2
|
-
<!-- Host v2 -->
|
|
3
|
-
<!-- SR v2 -->
|
|
4
|
-
<!-- Backup Repository v2 -->
|
|
5
|
-
<!-- Network v2 -->
|
|
6
|
-
<template>
|
|
7
|
-
<FontAwesomeLayers :class="[toVariants({ size }), { muted: stateConfig === undefined }]" class="ui-object-icon">
|
|
8
|
-
<VtsIcon :icon="mainIcon" accent="current" />
|
|
9
|
-
<VtsIcon :icon="stateIcon" accent="current" :style="stateIconStyle" class="state" />
|
|
10
|
-
</FontAwesomeLayers>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script generic="TType extends SupportedType" lang="ts" setup>
|
|
14
|
-
import VtsIcon from '@core/components/icon/VtsIcon.vue'
|
|
15
|
-
import type { ObjectIconConfig, SupportedState, SupportedType } from '@core/types/object-icon.type'
|
|
16
|
-
import { toVariants } from '@core/utils/to-variants.util'
|
|
17
|
-
import {
|
|
18
|
-
faCheckCircle,
|
|
19
|
-
faCircleMinus,
|
|
20
|
-
faCircleXmark,
|
|
21
|
-
faDatabase,
|
|
22
|
-
faDisplay,
|
|
23
|
-
faMoon,
|
|
24
|
-
faNetworkWired,
|
|
25
|
-
faPause,
|
|
26
|
-
faPlay,
|
|
27
|
-
faServer,
|
|
28
|
-
faStop,
|
|
29
|
-
faTriangleExclamation,
|
|
30
|
-
faWarehouse,
|
|
31
|
-
} from '@fortawesome/free-solid-svg-icons'
|
|
32
|
-
import { FontAwesomeLayers } from '@fortawesome/vue-fontawesome'
|
|
33
|
-
import { computed } from 'vue'
|
|
34
|
-
|
|
35
|
-
export type ObjectIconSize = 'small' | 'medium' | 'large'
|
|
36
|
-
|
|
37
|
-
const props = withDefaults(
|
|
38
|
-
defineProps<{
|
|
39
|
-
type: TType
|
|
40
|
-
size: ObjectIconSize
|
|
41
|
-
state?: SupportedState<TType> | 'disabled'
|
|
42
|
-
}>(),
|
|
43
|
-
{ state: 'disabled' }
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
const config: ObjectIconConfig = {
|
|
47
|
-
vm: {
|
|
48
|
-
mainIcon: faDisplay,
|
|
49
|
-
states: {
|
|
50
|
-
running: {
|
|
51
|
-
icon: faPlay,
|
|
52
|
-
color: '--color-success-item-base',
|
|
53
|
-
translate: {
|
|
54
|
-
x: [100, 132, 148],
|
|
55
|
-
y: [65, 75, 90],
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
halted: {
|
|
59
|
-
icon: faStop,
|
|
60
|
-
color: '--color-danger-item-base',
|
|
61
|
-
translate: {
|
|
62
|
-
x: [100, 136, 144],
|
|
63
|
-
y: [65, 75, 90],
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
suspended: {
|
|
67
|
-
icon: faMoon,
|
|
68
|
-
color: '--color-info-item-base',
|
|
69
|
-
translate: {
|
|
70
|
-
x: [88, 130, 140],
|
|
71
|
-
y: [65, 75, 90],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
paused: {
|
|
75
|
-
icon: faPause,
|
|
76
|
-
color: '--color-info-item-active',
|
|
77
|
-
translate: {
|
|
78
|
-
x: [110, 154, 170],
|
|
79
|
-
y: [65, 75, 90],
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
host: {
|
|
85
|
-
mainIcon: faServer,
|
|
86
|
-
states: {
|
|
87
|
-
running: {
|
|
88
|
-
icon: faPlay,
|
|
89
|
-
color: '--color-success-item-base',
|
|
90
|
-
translate: {
|
|
91
|
-
x: [82, 122, 136],
|
|
92
|
-
y: [66, 70, 90],
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
halted: {
|
|
96
|
-
icon: faStop,
|
|
97
|
-
color: '--color-danger-item-base',
|
|
98
|
-
translate: {
|
|
99
|
-
x: [90, 122, 134],
|
|
100
|
-
y: [65, 72, 85],
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
maintenance: {
|
|
104
|
-
icon: faTriangleExclamation,
|
|
105
|
-
color: '--color-warning-item-base',
|
|
106
|
-
translate: {
|
|
107
|
-
x: [60, 88, 100],
|
|
108
|
-
y: [68, 72, 82],
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
sr: {
|
|
114
|
-
mainIcon: faDatabase,
|
|
115
|
-
states: {
|
|
116
|
-
connected: {
|
|
117
|
-
icon: faCheckCircle,
|
|
118
|
-
color: '--color-success-item-base',
|
|
119
|
-
translate: {
|
|
120
|
-
x: [60, 90, 100],
|
|
121
|
-
y: [65, 75, 90],
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
'partially-connected': {
|
|
125
|
-
icon: faCircleMinus,
|
|
126
|
-
color: '--color-warning-item-base',
|
|
127
|
-
translate: {
|
|
128
|
-
x: [60, 90, 100],
|
|
129
|
-
y: [65, 75, 90],
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
disconnected: {
|
|
133
|
-
icon: faCircleXmark,
|
|
134
|
-
color: '--color-danger-item-base',
|
|
135
|
-
translate: {
|
|
136
|
-
x: [60, 90, 100],
|
|
137
|
-
y: [65, 75, 90],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
'backup-repository': {
|
|
143
|
-
mainIcon: faWarehouse,
|
|
144
|
-
states: {
|
|
145
|
-
connected: {
|
|
146
|
-
icon: faCheckCircle,
|
|
147
|
-
color: '--color-success-item-base',
|
|
148
|
-
translate: {
|
|
149
|
-
x: [112, 130, 162],
|
|
150
|
-
y: [74, 78, 102],
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
disconnected: {
|
|
154
|
-
icon: faCircleXmark,
|
|
155
|
-
color: '--color-danger-item-base',
|
|
156
|
-
translate: {
|
|
157
|
-
x: [112, 130, 162],
|
|
158
|
-
y: [74, 78, 102],
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
network: {
|
|
164
|
-
mainIcon: faNetworkWired,
|
|
165
|
-
states: {
|
|
166
|
-
connected: {
|
|
167
|
-
icon: faCheckCircle,
|
|
168
|
-
color: '--color-success-item-base',
|
|
169
|
-
translate: {
|
|
170
|
-
x: [84, 110, 128],
|
|
171
|
-
y: [66, 72, 88],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
disconnected: {
|
|
175
|
-
icon: faCircleXmark,
|
|
176
|
-
color: '--color-danger-item-base',
|
|
177
|
-
translate: {
|
|
178
|
-
x: [84, 110, 128],
|
|
179
|
-
y: [66, 72, 88],
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const mainIcon = computed(() => config[props.type].mainIcon)
|
|
187
|
-
const stateConfig = computed(() => (props.state === 'disabled' ? undefined : config[props.type].states[props.state]))
|
|
188
|
-
const stateIcon = computed(() => stateConfig.value?.icon)
|
|
189
|
-
|
|
190
|
-
const stateIconStyle = computed(() => {
|
|
191
|
-
if (stateConfig.value === undefined) {
|
|
192
|
-
return undefined
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
let translateIndex: number
|
|
196
|
-
|
|
197
|
-
if (props.size === 'small') {
|
|
198
|
-
translateIndex = 0
|
|
199
|
-
} else if (props.size === 'large') {
|
|
200
|
-
translateIndex = 2
|
|
201
|
-
} else {
|
|
202
|
-
translateIndex = 1
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
return {
|
|
206
|
-
color: `var(${stateConfig.value.color})`,
|
|
207
|
-
'--state-icon-translate-x': `${stateConfig.value.translate.x[translateIndex]}%`,
|
|
208
|
-
'--state-icon-translate-y': `${stateConfig.value.translate.y[translateIndex]}%`,
|
|
209
|
-
}
|
|
210
|
-
})
|
|
211
|
-
</script>
|
|
212
|
-
|
|
213
|
-
<style lang="postcss" scoped>
|
|
214
|
-
.ui-object-icon {
|
|
215
|
-
flex-shrink: 0;
|
|
216
|
-
|
|
217
|
-
&.muted {
|
|
218
|
-
color: var(--color-neutral-txt-secondary);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.state {
|
|
222
|
-
transform: translate(var(--state-icon-translate-x), var(--state-icon-translate-y));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/* SIZE VARIANTS */
|
|
226
|
-
|
|
227
|
-
&.size--small {
|
|
228
|
-
font-size: 0.8rem;
|
|
229
|
-
|
|
230
|
-
.state {
|
|
231
|
-
font-size: 0.75em;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&.size--medium {
|
|
236
|
-
font-size: 1.6rem;
|
|
237
|
-
|
|
238
|
-
.state {
|
|
239
|
-
font-size: 0.625em;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&.size--large {
|
|
244
|
-
font-size: 2.4rem;
|
|
245
|
-
|
|
246
|
-
.state {
|
|
247
|
-
font-size: 0.5em;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
</style>
|