@xen-orchestra/web-core 0.57.0 → 0.59.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.
Files changed (230) hide show
  1. package/lib/components/card/VtsCardRowKeyValue.vue +1 -1
  2. package/lib/components/cell-object/VtsCellObject.vue +1 -1
  3. package/lib/components/cell-text/VtsCellText.vue +1 -1
  4. package/lib/components/console/VtsActionsConsole.vue +1 -1
  5. package/lib/components/console/VtsClipboardConsole.vue +1 -1
  6. package/lib/components/console/VtsLayoutConsole.vue +1 -1
  7. package/lib/components/console/VtsRemoteConsole.vue +1 -1
  8. package/lib/components/copy-all-menu-item/VtsCopyAllMenuItem.vue +48 -0
  9. package/lib/components/copy-button/VtsCopyButton.vue +3 -3
  10. package/lib/components/delete-button/VtsDeleteButton.vue +1 -1
  11. package/lib/components/icon/VtsIcon.vue +1 -1
  12. package/lib/components/input-wrapper/VtsInputWrapper.vue +3 -3
  13. package/lib/components/key-value-pair/VtsKeyValuePair.vue +1 -1
  14. package/lib/components/layout/VtsContentSidePanel.vue +2 -2
  15. package/lib/components/linear-chart/VtsLinearChart.vue +1 -1
  16. package/lib/components/menu/MenuItem.vue +2 -2
  17. package/lib/components/menu/MenuList.vue +2 -2
  18. package/lib/components/menu/MenuSeparator.vue +1 -1
  19. package/lib/components/modal/VtsActionModal.vue +52 -13
  20. package/lib/components/modal/VtsBlockedModal.vue +7 -7
  21. package/lib/components/modal/VtsDeleteModal.vue +20 -15
  22. package/lib/components/modal/VtsErrorModal.vue +10 -6
  23. package/lib/components/overlay/VtsOverlayList.vue +2 -2
  24. package/lib/components/panel/VtsPanel.vue +1 -1
  25. package/lib/components/panel/VtsSidePanel.vue +3 -3
  26. package/lib/components/query-builder/VtsQueryBuilder.vue +3 -3
  27. package/lib/components/query-builder/VtsQueryBuilderButton.vue +17 -11
  28. package/lib/components/query-builder/VtsQueryBuilderFilter.vue +1 -1
  29. package/lib/components/query-builder/VtsQueryBuilderGroup.vue +1 -1
  30. package/lib/components/query-builder/VtsQueryBuilderModal.vue +13 -8
  31. package/lib/components/query-builder/VtsQueryBuilderRow.vue +1 -1
  32. package/lib/components/relative-time/VtsRelativeTime.vue +2 -2
  33. package/lib/components/space-card/VtsSpaceCard.vue +11 -7
  34. package/lib/components/sr-connection-modal/VtsSrConnectionModal.vue +77 -0
  35. package/lib/components/stacked-bar-with-legend/VtsStackedBarWithLegend.vue +1 -1
  36. package/lib/components/state-hero/VtsStateHero.vue +1 -1
  37. package/lib/components/status/VtsStatus.vue +1 -1
  38. package/lib/components/tab/TabItem.vue +2 -2
  39. package/lib/components/tab/TabList.vue +1 -1
  40. package/lib/components/table/VtsTable.vue +3 -3
  41. package/lib/components/table/cells/VtsCollapsedListCell.vue +1 -1
  42. package/lib/components/table/cells/VtsLinkCell.vue +2 -2
  43. package/lib/components/table/cells/VtsStatusCell.vue +3 -3
  44. package/lib/components/table/cells/VtsTagCell.vue +2 -2
  45. package/lib/components/table/cells/VtsTextCell.vue +1 -1
  46. package/lib/components/tag/VtsTag.vue +1 -1
  47. package/lib/components/task/VtsQuickTaskButton.vue +1 -1
  48. package/lib/components/task/VtsQuickTaskTabBar.vue +1 -1
  49. package/lib/components/tooltip-list/VtsTooltipList.vue +1 -1
  50. package/lib/components/tree/VtsTreeList.vue +1 -1
  51. package/lib/components/tree/VtsTreeLoadingItem.vue +1 -1
  52. package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +1 -1
  53. package/lib/components/ui/alarm-item/UiAlarmItem.vue +2 -2
  54. package/lib/components/ui/alert/UiAlert.vue +1 -1
  55. package/lib/components/ui/button/UiButton.vue +2 -2
  56. package/lib/components/ui/button-icon/UiButtonIcon.vue +1 -1
  57. package/lib/components/ui/card-numbers/UiCardNumbers.vue +1 -1
  58. package/lib/components/ui/checkbox/UiCheckbox.vue +2 -2
  59. package/lib/components/ui/chip/UiChip.vue +1 -1
  60. package/lib/components/ui/counter/UiCounter.vue +1 -1
  61. package/lib/components/ui/drawer/UiDrawer.vue +37 -54
  62. package/lib/components/ui/dropdown/UiDropdown.vue +2 -2
  63. package/lib/components/ui/dropdown-button/UiDropdownButton.vue +1 -1
  64. package/lib/components/ui/head-bar/UiHeadBar.vue +1 -1
  65. package/lib/components/ui/info/UiInfo.vue +1 -1
  66. package/lib/components/ui/input/UiInput.vue +2 -2
  67. package/lib/components/ui/label/UiLabel.vue +1 -1
  68. package/lib/components/ui/legend/UiLegend.vue +2 -2
  69. package/lib/components/ui/legend-title/UiLegendTitle.vue +1 -1
  70. package/lib/components/ui/link/UiLink.vue +2 -2
  71. package/lib/components/ui/loader/UiLoader.vue +1 -1
  72. package/lib/components/ui/modal/UiModal.vue +17 -5
  73. package/lib/components/ui/object-link/UiObjectLink.vue +1 -1
  74. package/lib/components/ui/panel-card/UiPanelCard.vue +20 -0
  75. package/lib/components/ui/progress-bar/UiProgressBar.vue +1 -1
  76. package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +2 -2
  77. package/lib/components/ui/quick-task-panel/UiQuickTaskPanel.vue +1 -1
  78. package/lib/components/ui/radio-button/UiRadioButton.vue +2 -2
  79. package/lib/components/ui/stacked-bar/StackedBarSegment.vue +2 -2
  80. package/lib/components/ui/stacked-bar/UiStackedBar.vue +1 -1
  81. package/lib/components/ui/tag/UiTag.vue +1 -1
  82. package/lib/components/ui/task-item/UiTaskItem.vue +1 -1
  83. package/lib/components/ui/text-area/UiTextarea.vue +1 -1
  84. package/lib/components/ui/toaster/UiToaster.vue +1 -1
  85. package/lib/components/ui/toggle/UiToggle.vue +1 -1
  86. package/lib/components/ui/tooltip/UiTooltip.vue +2 -2
  87. package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +40 -16
  88. package/lib/components/ui/user-link/UiUserLink.vue +1 -1
  89. package/lib/components/ui/user-logo/UiUserLogo.vue +1 -1
  90. package/lib/components/{vif-connection-toggle-modal/VtsVifConnectionToggleModal.vue → vif-connection-modal/VtsVifConnectionModal.vue} +15 -10
  91. package/lib/composables/chart-theme.composable.ts +1 -1
  92. package/lib/composables/context.composable.ts +1 -1
  93. package/lib/composables/copy.composable.ts +6 -0
  94. package/lib/composables/default-tab.composable.ts +1 -1
  95. package/lib/composables/disabled.composable.ts +1 -1
  96. package/lib/composables/hide-route-query.composable.ts +1 -1
  97. package/lib/composables/link-component.composable.ts +1 -1
  98. package/lib/composables/modals/use-action-modal.ts +11 -0
  99. package/lib/composables/modals/use-blocked-modal.ts +10 -0
  100. package/lib/composables/modals/use-delete-modal.ts +11 -0
  101. package/lib/composables/pagination.composable.ts +2 -2
  102. package/lib/composables/route-query/types.ts +1 -1
  103. package/lib/composables/route-query.composable.ts +5 -5
  104. package/lib/composables/sort-route-query.composable.ts +1 -1
  105. package/lib/composables/tab-list.composable.ts +1 -1
  106. package/lib/composables/table/create-base-definition.ts +1 -1
  107. package/lib/composables/table/create-define-column.ts +6 -6
  108. package/lib/composables/table/create-sorting-definition.ts +2 -2
  109. package/lib/composables/table/create-visibility-definition.ts +2 -2
  110. package/lib/composables/table/type.ts +1 -1
  111. package/lib/composables/table.composable.ts +4 -4
  112. package/lib/composables/tree-filter.composable.ts +1 -1
  113. package/lib/directives/tooltip.directive.ts +2 -2
  114. package/lib/icons/index.ts +1 -1
  115. package/lib/locales/cs.json +50 -6
  116. package/lib/locales/de.json +3 -2
  117. package/lib/locales/en.json +83 -9
  118. package/lib/locales/es.json +0 -1
  119. package/lib/locales/fr.json +87 -13
  120. package/lib/locales/ko.json +2 -0
  121. package/lib/locales/nb-NO.json +0 -1
  122. package/lib/locales/nl.json +130 -3
  123. package/lib/locales/pt.json +1 -2
  124. package/lib/locales/sk.json +50 -6
  125. package/lib/locales/sv.json +0 -2
  126. package/lib/locales/zh-Hans.json +0 -4
  127. package/lib/packages/form-select/use-form-select-controller.ts +1 -1
  128. package/lib/packages/job/define-job.ts +5 -5
  129. package/lib/packages/job/index.ts +4 -4
  130. package/lib/packages/job/use-job-store.ts +2 -2
  131. package/lib/packages/menu/action.ts +1 -1
  132. package/lib/packages/menu/context.ts +1 -1
  133. package/lib/packages/menu/index.ts +10 -10
  134. package/lib/packages/menu/job.ts +3 -3
  135. package/lib/packages/menu/link.ts +1 -1
  136. package/lib/packages/menu/router-link.ts +1 -1
  137. package/lib/packages/menu/toggle-target.ts +1 -1
  138. package/lib/packages/overlay/README.md +19 -4
  139. package/lib/packages/overlay/create-event-handler.ts +4 -11
  140. package/lib/packages/overlay/types.ts +1 -0
  141. package/lib/packages/overlay/use-overlay-store.ts +5 -0
  142. package/lib/packages/overlay/use-overlay.ts +25 -10
  143. package/lib/packages/query-builder/group/build-root-group.ts +1 -1
  144. package/lib/packages/query-builder/node/handle-comparison-node.ts +1 -1
  145. package/lib/packages/query-builder/node/handle-glob-pattern-node.ts +1 -1
  146. package/lib/packages/query-builder/node/handle-group-node.ts +2 -2
  147. package/lib/packages/query-builder/node/handle-node.ts +8 -8
  148. package/lib/packages/query-builder/node/handle-null-node.ts +1 -1
  149. package/lib/packages/query-builder/node/handle-property-group-node.ts +2 -2
  150. package/lib/packages/query-builder/node/handle-property-node.ts +8 -8
  151. package/lib/packages/query-builder/node/handle-regexp-node.ts +1 -1
  152. package/lib/packages/query-builder/node/handle-string-or-number-node.ts +2 -2
  153. package/lib/packages/query-builder/node/handle-truthy-property-node.ts +1 -1
  154. package/lib/packages/query-builder/use-query-builder.ts +2 -2
  155. package/lib/packages/remote-resource/define-remote-resource.ts +56 -27
  156. package/lib/packages/remote-resource/sse.store.ts +4 -4
  157. package/lib/packages/threshold/use-threshold.ts +1 -1
  158. package/lib/packages/tree/branch-definition.ts +2 -2
  159. package/lib/packages/tree/branch.ts +8 -2
  160. package/lib/packages/tree/build-nodes.ts +3 -3
  161. package/lib/packages/tree/define-branch.ts +2 -2
  162. package/lib/packages/tree/define-leaf.ts +2 -2
  163. package/lib/packages/tree/define-tree.ts +3 -3
  164. package/lib/packages/tree/leaf-definition.ts +1 -1
  165. package/lib/packages/tree/leaf.ts +2 -2
  166. package/lib/packages/tree/tree-node-base.ts +2 -2
  167. package/lib/packages/tree/tree-node-definition-base.ts +1 -1
  168. package/lib/packages/tree/types.ts +6 -6
  169. package/lib/packages/tree/use-tree.ts +2 -2
  170. package/lib/stores/panel.store.ts +1 -1
  171. package/lib/stores/tooltip.store.ts +2 -2
  172. package/lib/tables/column-definitions/action-column.ts +2 -2
  173. package/lib/tables/column-definitions/button-column.ts +3 -3
  174. package/lib/tables/column-definitions/button-icon-column.ts +2 -2
  175. package/lib/tables/column-definitions/date-column.ts +3 -3
  176. package/lib/tables/column-definitions/info-column.ts +3 -3
  177. package/lib/tables/column-definitions/input-column.ts +3 -3
  178. package/lib/tables/column-definitions/link-column.ts +2 -2
  179. package/lib/tables/column-definitions/literal-column.ts +3 -3
  180. package/lib/tables/column-definitions/number-column.ts +2 -2
  181. package/lib/tables/column-definitions/percent-column.ts +2 -2
  182. package/lib/tables/column-definitions/progress-bar-column.ts +2 -2
  183. package/lib/tables/column-definitions/select-column.ts +2 -2
  184. package/lib/tables/column-definitions/status-column.ts +2 -2
  185. package/lib/tables/column-definitions/tag-column.ts +3 -3
  186. package/lib/tables/column-sets/backup-issue-columns.ts +1 -1
  187. package/lib/tables/column-sets/backup-job-columns.ts +1 -1
  188. package/lib/tables/column-sets/backup-job-schedule-columns.ts +1 -1
  189. package/lib/tables/column-sets/backup-log-columns.ts +1 -1
  190. package/lib/tables/column-sets/host-columns.ts +3 -3
  191. package/lib/tables/column-sets/network-columns.ts +2 -2
  192. package/lib/tables/column-sets/pif-columns.ts +2 -2
  193. package/lib/tables/column-sets/server-columns.ts +1 -1
  194. package/lib/tables/column-sets/sr-columns.ts +3 -3
  195. package/lib/tables/column-sets/vdi-columns.ts +2 -0
  196. package/lib/tables/column-sets/vif-columns.ts +1 -1
  197. package/lib/tables/column-sets/vif-network-columns.ts +1 -1
  198. package/lib/tables/column-sets/vm-backup-archive-columns.ts +3 -3
  199. package/lib/tables/column-sets/vm-backup-run-colums.ts +2 -2
  200. package/lib/tables/column-sets/vm-columns.ts +1 -1
  201. package/lib/types/object.type.ts +10 -1
  202. package/lib/utils/create-subscribable-store-context.util.ts +2 -2
  203. package/lib/utils/download-bugtools.utils.ts +1 -1
  204. package/lib/utils/if-else.utils.ts +2 -2
  205. package/lib/utils/injection-keys.util.ts +0 -2
  206. package/lib/utils/progress.util.ts +1 -1
  207. package/lib/utils/to-array.utils.ts +1 -1
  208. package/package.json +1 -1
  209. package/lib/components/drawer/VtsDrawer.vue +0 -89
  210. package/lib/components/drawer/VtsDrawerButton.vue +0 -22
  211. package/lib/components/drawer/VtsDrawerCancelButton.vue +0 -33
  212. package/lib/components/drawer/VtsDrawerConfirmButton.vue +0 -32
  213. package/lib/components/drawer/VtsDrawerList.vue +0 -34
  214. package/lib/components/modal/VtsModal.vue +0 -82
  215. package/lib/components/modal/VtsModalButton.vue +0 -35
  216. package/lib/components/modal/VtsModalCancelButton.vue +0 -37
  217. package/lib/components/modal/VtsModalConfirmButton.vue +0 -21
  218. package/lib/components/modal/VtsModalList.vue +0 -34
  219. package/lib/packages/drawer/DrawerProvider.vue +0 -17
  220. package/lib/packages/drawer/README.md +0 -189
  221. package/lib/packages/drawer/create-drawer-opener.ts +0 -119
  222. package/lib/packages/drawer/drawer.store.ts +0 -22
  223. package/lib/packages/drawer/types.ts +0 -93
  224. package/lib/packages/drawer/use-drawer.ts +0 -53
  225. package/lib/packages/modal/ModalProvider.vue +0 -17
  226. package/lib/packages/modal/README.md +0 -253
  227. package/lib/packages/modal/create-modal-opener.ts +0 -106
  228. package/lib/packages/modal/modal.store.ts +0 -22
  229. package/lib/packages/modal/types.ts +0 -91
  230. package/lib/packages/modal/use-modal.ts +0 -53
@@ -28,7 +28,7 @@
28
28
 
29
29
  <script lang="ts" setup>
30
30
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
31
- import { vTooltip } from '@core/directives/tooltip.directive'
31
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
32
32
  import { calculateLineCount } from '@core/utils/line-height.util.ts'
33
33
  import { useStyleTag } from '@vueuse/core'
34
34
  import { useToggle } from '@vueuse/shared'
@@ -24,7 +24,7 @@
24
24
 
25
25
  <script lang="ts" setup>
26
26
  import UiButton from '@core/components/ui/button/UiButton.vue'
27
- import { vTooltip } from '@core/directives/tooltip.directive'
27
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
28
28
  import { useClipboard } from '@vueuse/core'
29
29
  import { useI18n } from 'vue-i18n'
30
30
 
@@ -13,7 +13,7 @@
13
13
  </template>
14
14
 
15
15
  <script lang="ts" setup>
16
- import { vTooltip } from '@core/directives/tooltip.directive'
16
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
17
17
 
18
18
  const slots = defineSlots<{
19
19
  default: () => any
@@ -35,7 +35,7 @@
35
35
  <script lang="ts" setup>
36
36
  import UiButton from '@core/components/ui/button/UiButton.vue'
37
37
  import UiCardTitle from '@core/components/ui/card-title/UiCardTitle.vue'
38
- import { useUiStore } from '@core/stores/ui.store'
38
+ import { useUiStore } from '@core/stores/ui.store.ts'
39
39
  import { useActiveElement, useMagicKeys, whenever } from '@vueuse/core'
40
40
  import { logicAnd } from '@vueuse/math'
41
41
  import { computed } from 'vue'
@@ -17,7 +17,7 @@
17
17
  import UiButton from '@core/components/ui/button/UiButton.vue'
18
18
  import UiCardTitle from '@core/components/ui/card-title/UiCardTitle.vue'
19
19
  import UiTextarea from '@core/components/ui/text-area/UiTextarea.vue'
20
- import { vTooltip } from '@core/directives/tooltip.directive'
20
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
21
21
  import { ref } from 'vue'
22
22
  import { useI18n } from 'vue-i18n'
23
23
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import UiCard from '@core/components/ui/card/UiCard.vue'
12
- import { useUiStore } from '@core/stores/ui.store'
12
+ import { useUiStore } from '@core/stores/ui.store.ts'
13
13
 
14
14
  defineSlots<{
15
15
  default(): any
@@ -7,7 +7,7 @@
7
7
 
8
8
  <script lang="ts" setup>
9
9
  import VtsStateHero from '@core/components/state-hero/VtsStateHero.vue'
10
- import { useUiStore } from '@core/stores/ui.store'
10
+ import { useUiStore } from '@core/stores/ui.store.ts'
11
11
  import type NoVncClient from '@novnc/novnc/lib/rfb'
12
12
  import _RFB from '@novnc/novnc/lib/rfb'
13
13
  import { whenever } from '@vueuse/core'
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <MenuList placement="bottom-end">
3
+ <template #trigger="{ open }">
4
+ <UiButtonIcon
5
+ v-tooltip="{
6
+ placement: 'left',
7
+ content: tooltipContent,
8
+ }"
9
+ :icon
10
+ accent="brand"
11
+ size="small"
12
+ :disabled="!isSupported"
13
+ @click="open($event)"
14
+ />
15
+ </template>
16
+ <MenuItem icon="action:copy" @click="copy()">
17
+ {{ t('action:copy-all') }}
18
+ </MenuItem>
19
+ </MenuList>
20
+ </template>
21
+
22
+ <script lang="ts" setup>
23
+ import MenuItem from '@core/components/menu/MenuItem.vue'
24
+ import MenuList from '@core/components/menu/MenuList.vue'
25
+ import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
26
+ import { useCopyToClipboard } from '@core/composables/copy.composable.ts'
27
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
28
+ import { computed } from 'vue'
29
+ import { useI18n } from 'vue-i18n'
30
+
31
+ const { values } = defineProps<{
32
+ values: string[]
33
+ }>()
34
+
35
+ const { t } = useI18n()
36
+
37
+ const { copy, copied, isSupported } = useCopyToClipboard(() => values.join(';\n'))
38
+
39
+ const icon = computed(() => (copied.value ? 'fa:check-circle' : 'action:more-actions'))
40
+
41
+ const tooltipContent = computed(() => {
42
+ if (!isSupported.value) {
43
+ return t('copy-unavailable-http')
44
+ }
45
+
46
+ return copied.value ? t('copied') : t('action:copy-all')
47
+ })
48
+ </script>
@@ -11,8 +11,8 @@
11
11
 
12
12
  <script setup lang="ts">
13
13
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
14
- import { vTooltip } from '@core/directives/tooltip.directive'
15
- import { useClipboard } from '@vueuse/core'
14
+ import { useCopyToClipboard } from '@core/composables/copy.composable.ts'
15
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
16
16
  import { computed } from 'vue'
17
17
  import { useI18n } from 'vue-i18n'
18
18
 
@@ -22,7 +22,7 @@ const { value } = defineProps<{
22
22
 
23
23
  const { t } = useI18n()
24
24
 
25
- const { copy, copied, isSupported } = useClipboard({ source: () => value, legacy: true })
25
+ const { copy, copied, isSupported } = useCopyToClipboard(() => value)
26
26
 
27
27
  const icon = computed(() => (copied.value ? 'fa:check-circle' : 'fa:copy'))
28
28
  </script>
@@ -14,7 +14,7 @@
14
14
 
15
15
  <script setup lang="ts">
16
16
  import UiButton from '@core/components/ui/button/UiButton.vue'
17
- import { vTooltip } from '@core/directives/tooltip.directive'
17
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
18
18
  import { useI18n } from 'vue-i18n'
19
19
 
20
20
  defineProps<{
@@ -5,7 +5,7 @@
5
5
 
6
6
  <script lang="ts" setup>
7
7
  import UiLoader from '@core/components/ui/loader/UiLoader.vue'
8
- import { vTooltip } from '@core/directives/tooltip.directive'
8
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
9
9
  import { type IconName, icons } from '@core/icons'
10
10
  import { DisplayIcon } from '@core/packages/icon'
11
11
  import { toVariants } from '@core/utils/to-variants.util.ts'
@@ -15,9 +15,9 @@ import UiInfo, { type InfoAccent } from '@core/components/ui/info/UiInfo.vue'
15
15
  import UiLabel, { type LabelAccent } from '@core/components/ui/label/UiLabel.vue'
16
16
  import { useRanked } from '@core/composables/ranked.composable.ts'
17
17
  import { useMapper } from '@core/packages/mapper/use-mapper.ts'
18
- import type { MaybeArray } from '@core/types/utility.type'
19
- import { IK_INPUT_WRAPPER_CONTROLLER } from '@core/utils/injection-keys.util'
20
- import { toArray } from '@core/utils/to-array.utils'
18
+ import type { MaybeArray } from '@core/types/utility.type.ts'
19
+ import { IK_INPUT_WRAPPER_CONTROLLER } from '@core/utils/injection-keys.util.ts'
20
+ import { toArray } from '@core/utils/to-array.utils.ts'
21
21
  import { useArrayMap } from '@vueuse/core'
22
22
  import { provide, reactive, useId } from 'vue'
23
23
 
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
 
16
16
  <script lang="ts" setup>
17
- import { vTooltip } from '@core/directives/tooltip.directive'
17
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
18
18
 
19
19
  defineProps<{
20
20
  label?: string
@@ -11,8 +11,8 @@
11
11
  </template>
12
12
 
13
13
  <script setup lang="ts">
14
- import { usePanelStore } from '@core/stores/panel.store'
15
- import { useUiStore } from '@core/stores/ui.store'
14
+ import { usePanelStore } from '@core/stores/panel.store.ts'
15
+ import { useUiStore } from '@core/stores/ui.store.ts'
16
16
  import { computed } from 'vue'
17
17
 
18
18
  const panelStore = usePanelStore()
@@ -3,7 +3,7 @@
3
3
  </template>
4
4
 
5
5
  <script lang="ts" setup>
6
- import type { LinearChartData, ValueFormatter } from '@core/types/chart'
6
+ import type { LinearChartData, ValueFormatter } from '@core/types/chart.ts'
7
7
  import { utcFormat } from 'd3-time-format'
8
8
  import type { EChartsOption } from 'echarts'
9
9
  import { LineChart } from 'echarts/charts'
@@ -35,9 +35,9 @@
35
35
  import VtsIcon from '@core/components/icon/VtsIcon.vue'
36
36
  import MenuList from '@core/components/menu/MenuList.vue'
37
37
  import MenuTrigger from '@core/components/menu/MenuTrigger.vue'
38
- import { useDisabled } from '@core/composables/disabled.composable'
38
+ import { useDisabled } from '@core/composables/disabled.composable.ts'
39
39
  import type { IconName } from '@core/icons'
40
- import { IK_CLOSE_MENU, IK_MENU_HORIZONTAL } from '@core/utils/injection-keys.util'
40
+ import { IK_CLOSE_MENU, IK_MENU_HORIZONTAL } from '@core/utils/injection-keys.util.ts'
41
41
  import { computed, inject, ref } from 'vue'
42
42
 
43
43
  const props = defineProps<{
@@ -15,8 +15,8 @@
15
15
  </template>
16
16
 
17
17
  <script lang="ts" setup>
18
- import { useDisabled } from '@core/composables/disabled.composable'
19
- import { IK_CLOSE_MENU, IK_MENU_HORIZONTAL, IK_MENU_TELEPORTED } from '@core/utils/injection-keys.util'
18
+ import { useDisabled } from '@core/composables/disabled.composable.ts'
19
+ import { IK_CLOSE_MENU, IK_MENU_HORIZONTAL, IK_MENU_TELEPORTED } from '@core/utils/injection-keys.util.ts'
20
20
  import { onClickOutside, unrefElement, whenever } from '@vueuse/core'
21
21
  import placementJs, { type Options } from 'placement.js'
22
22
  import { computed, inject, nextTick, provide, ref, useSlots } from 'vue'
@@ -4,7 +4,7 @@
4
4
  </template>
5
5
 
6
6
  <script lang="ts" setup>
7
- import { IK_MENU_HORIZONTAL } from '@core/utils/injection-keys.util'
7
+ import { IK_MENU_HORIZONTAL } from '@core/utils/injection-keys.util.ts'
8
8
  import { computed, inject } from 'vue'
9
9
 
10
10
  const horizontal = inject(
@@ -1,25 +1,25 @@
1
1
  <template>
2
- <VtsModal :accent :icon dismissible>
2
+ <UiModal :accent :icon @confirm="emit('confirm')" @dismiss="emit('cancel')">
3
3
  <template #title>
4
4
  <span>{{ modalTexts.title }}</span>
5
5
  </template>
6
6
  <template #content>
7
- <span>{{ modalTexts.message }}</span>
7
+ <span v-if="modalTexts.message">{{ modalTexts.message }}</span>
8
8
  </template>
9
9
  <template #buttons>
10
- <VtsModalCancelButton>{{ t('action:go-back') }}</VtsModalCancelButton>
11
- <VtsModalConfirmButton>
10
+ <VtsOverlayCancelButton @click="emit('cancel')">{{ t('action:go-back') }}</VtsOverlayCancelButton>
11
+ <VtsOverlayConfirmButton>
12
12
  {{ modalTexts.action }}
13
- </VtsModalConfirmButton>
13
+ </VtsOverlayConfirmButton>
14
14
  </template>
15
- </VtsModal>
15
+ </UiModal>
16
16
  </template>
17
17
 
18
18
  <script lang="ts" setup>
19
- import VtsModal from '@core/components/modal/VtsModal.vue'
20
- import VtsModalCancelButton from '@core/components/modal/VtsModalCancelButton.vue'
21
- import VtsModalConfirmButton from '@core/components/modal/VtsModalConfirmButton.vue'
19
+ import VtsOverlayCancelButton from '@core/components/overlay/VtsOverlayCancelButton.vue'
20
+ import VtsOverlayConfirmButton from '@core/components/overlay/VtsOverlayConfirmButton.vue'
22
21
  import type { ModalAccent } from '@core/components/ui/modal/UiModal.vue'
22
+ import UiModal from '@core/components/ui/modal/UiModal.vue'
23
23
  import type { IconName } from '@core/icons'
24
24
  import { useMapper } from '@core/packages/mapper/use-mapper.ts'
25
25
  import type { ActionsByObject, HostActions, ObjectType, VmActions } from '@core/types/object.type.ts'
@@ -27,7 +27,7 @@ import { useI18n } from 'vue-i18n'
27
27
 
28
28
  type ActionTexts = {
29
29
  title: string
30
- message: string
30
+ message?: string
31
31
  action: string
32
32
  }
33
33
 
@@ -54,7 +54,12 @@ const { action, object, hostName } = defineProps<
54
54
  }
55
55
  >()
56
56
 
57
- const defaultActionByObject: { [O in ObjectType]: ActionsByObject[O] } = {
57
+ const emit = defineEmits<{
58
+ confirm: []
59
+ cancel: []
60
+ }>()
61
+
62
+ const defaultActionByObject: ActionsByObject = {
58
63
  vm: 'shutdown',
59
64
  host: 'disable',
60
65
  }
@@ -86,15 +91,49 @@ const textMappingsByObject: TextMappingByObject = {
86
91
  },
87
92
  host: {
88
93
  enable: {
89
- title: t('modal:confirm-host-enable', { host: hostName }),
94
+ title: t('modal:confirm-host-enable?', { host: hostName }),
90
95
  message: t('modal:host-enable-message'),
91
96
  action: t('action:enable-host'),
92
97
  },
93
98
  disable: {
94
- title: t('modal:confirm-host-disable', { host: hostName }),
99
+ title: t('modal:confirm-host-disable?', { host: hostName }),
95
100
  message: t('modal:host-disable-message'),
96
101
  action: t('action:disable-host'),
97
102
  },
103
+ shutdown: {
104
+ title: t('modal:confirm-host-shutdown?', { host: hostName }),
105
+ message: t('modal:host-shutdown-message'),
106
+ action: t('action:shutdown-host'),
107
+ },
108
+ start: {
109
+ title: t('modal:confirm-host-start?', { host: hostName }),
110
+ action: t('action:start-host'),
111
+ },
112
+ forget: {
113
+ title: t('modal:confirm-host-forget?', { host: hostName }),
114
+ message: t('modal:host-forget-message'),
115
+ action: t('action:forget-host'),
116
+ },
117
+ 'disable-and-evacuate-vms': {
118
+ title: t('modal:confirm-host-disable-and-evacuate-vms?', { host: hostName }),
119
+ message: t('modal:host-disable-and-evacuate-vms-message'),
120
+ action: t('action:disable-host-and-evacuate-vms'),
121
+ },
122
+ reboot: {
123
+ title: t('modal:confirm-host-reboot?', { host: hostName }),
124
+ message: t('modal:host-reboot-message'),
125
+ action: t('action:reboot-host'),
126
+ },
127
+ 'force-reboot': {
128
+ title: t('modal:confirm-host-force-reboot?', { host: hostName }),
129
+ message: t('modal:host-force-reboot-message'),
130
+ action: t('action:force-reboot-host'),
131
+ },
132
+ 'smart-reboot': {
133
+ title: t('modal:confirm-host-smart-reboot?', { host: hostName }),
134
+ message: t('modal:host-smart-reboot-message'),
135
+ action: t('action:smart-reboot-host'),
136
+ },
98
137
  },
99
138
  }
100
139
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <VtsModal accent="danger" icon="status:danger-picto" dismissible>
2
+ <UiModal accent="danger" icon="status:danger-picto" @dismiss="emit('close')">
3
3
  <template #title>
4
4
  <span>{{ modalTexts.title }}</span>
5
5
  </template>
@@ -12,18 +12,18 @@
12
12
  </template>
13
13
 
14
14
  <template #buttons>
15
- <VtsModalCancelButton>{{ t('action:go-back') }}</VtsModalCancelButton>
16
- <UiLink :href icon="action:edit" size="medium" @click="emit('confirm')">
15
+ <VtsOverlayCancelButton @click="emit('close')">{{ t('action:go-back') }}</VtsOverlayCancelButton>
16
+ <UiLink :href icon="action:edit" size="medium" @click="emit('close')">
17
17
  {{ t('action:edit-config') }}
18
18
  </UiLink>
19
19
  </template>
20
- </VtsModal>
20
+ </UiModal>
21
21
  </template>
22
22
 
23
23
  <script lang="ts" setup>
24
- import VtsModal from '@core/components/modal/VtsModal.vue'
25
- import VtsModalCancelButton from '@core/components/modal/VtsModalCancelButton.vue'
24
+ import VtsOverlayCancelButton from '@core/components/overlay/VtsOverlayCancelButton.vue'
26
25
  import UiLink from '@core/components/ui/link/UiLink.vue'
26
+ import UiModal from '@core/components/ui/modal/UiModal.vue'
27
27
  import { useMapper } from '@core/packages/mapper/use-mapper.ts'
28
28
  import type { VmBlockedOperations } from '@core/types/object.type.ts'
29
29
  import { useI18n } from 'vue-i18n'
@@ -40,7 +40,7 @@ const { blockedOperation } = defineProps<{
40
40
  }>()
41
41
 
42
42
  const emit = defineEmits<{
43
- confirm: []
43
+ close: []
44
44
  }>()
45
45
 
46
46
  const { t } = useI18n()
@@ -1,36 +1,41 @@
1
1
  <template>
2
- <VtsModal accent="warning" icon="status:warning-picto" dismissible>
2
+ <UiModal accent="warning" icon="status:warning-picto" @confirm="emit('confirm')" @dismiss="emit('cancel')">
3
3
  <template #title>
4
4
  <I18nT keypath="confirm-delete" scope="global" tag="div">
5
5
  <span class="n-delete">
6
- <slot name="title" />
6
+ {{ subject }}
7
7
  </span>
8
8
  </I18nT>
9
9
  </template>
10
10
 
11
11
  <template #content>
12
- <slot name="content">{{ t('please-confirm-to-continue') }}</slot>
12
+ {{ description ?? t('please-confirm-to-continue') }}
13
13
  </template>
14
14
 
15
15
  <template #buttons>
16
- <VtsModalCancelButton>{{ t('action:go-back') }}</VtsModalCancelButton>
17
- <VtsModalConfirmButton>
18
- <slot name="confirm" />
19
- </VtsModalConfirmButton>
16
+ <VtsOverlayCancelButton @click="emit('cancel')">{{ t('action:go-back') }}</VtsOverlayCancelButton>
17
+ <VtsOverlayConfirmButton>
18
+ {{ confirmLabel }}
19
+ </VtsOverlayConfirmButton>
20
20
  </template>
21
- </VtsModal>
21
+ </UiModal>
22
22
  </template>
23
23
 
24
24
  <script lang="ts" setup>
25
- import VtsModal from '@core/components/modal/VtsModal.vue'
26
- import VtsModalCancelButton from '@core/components/modal/VtsModalCancelButton.vue'
27
- import VtsModalConfirmButton from '@core/components/modal/VtsModalConfirmButton.vue'
25
+ import VtsOverlayCancelButton from '@core/components/overlay/VtsOverlayCancelButton.vue'
26
+ import VtsOverlayConfirmButton from '@core/components/overlay/VtsOverlayConfirmButton.vue'
27
+ import UiModal from '@core/components/ui/modal/UiModal.vue'
28
28
  import { useI18n } from 'vue-i18n'
29
29
 
30
- defineSlots<{
31
- title(): any
32
- content?(): any
33
- confirm(): any
30
+ const { subject, description, confirmLabel } = defineProps<{
31
+ subject: string
32
+ confirmLabel: string
33
+ description?: string
34
+ }>()
35
+
36
+ const emit = defineEmits<{
37
+ confirm: []
38
+ cancel: []
34
39
  }>()
35
40
 
36
41
  const { t } = useI18n()
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <VtsModal accent="danger" icon="status:danger-picto" dismissible>
2
+ <UiModal accent="danger" icon="status:danger-picto" @dismiss="emit('close')" @confirm="emit('close')">
3
3
  <template #title>
4
4
  {{ title }}
5
5
  </template>
@@ -11,16 +11,16 @@
11
11
  </template>
12
12
 
13
13
  <template #buttons>
14
- <VtsModalConfirmButton>
14
+ <VtsOverlayConfirmButton>
15
15
  {{ t('action:close') }}
16
- </VtsModalConfirmButton>
16
+ </VtsOverlayConfirmButton>
17
17
  </template>
18
- </VtsModal>
18
+ </UiModal>
19
19
  </template>
20
20
 
21
21
  <script lang="ts" setup>
22
- import VtsModal from '@core/components/modal/VtsModal.vue'
23
- import VtsModalConfirmButton from '@core/components/modal/VtsModalConfirmButton.vue'
22
+ import VtsOverlayConfirmButton from '@core/components/overlay/VtsOverlayConfirmButton.vue'
23
+ import UiModal from '@core/components/ui/modal/UiModal.vue'
24
24
  import { useI18n } from 'vue-i18n'
25
25
 
26
26
  defineProps<{
@@ -28,6 +28,10 @@ defineProps<{
28
28
  error?: string
29
29
  }>()
30
30
 
31
+ const emit = defineEmits<{
32
+ close: []
33
+ }>()
34
+
31
35
  defineSlots<{
32
36
  content?(): any
33
37
  }>()
@@ -28,7 +28,7 @@ const overlayStore = useOverlayStore()
28
28
  .backdrop {
29
29
  position: fixed;
30
30
  inset: 0;
31
- z-index: 1011;
31
+ z-index: 1015;
32
32
  background-color: var(--color-opacity-primary);
33
33
  pointer-events: none;
34
34
 
@@ -46,7 +46,7 @@ const overlayStore = useOverlayStore()
46
46
  .overlays {
47
47
  position: fixed;
48
48
  inset: 0;
49
- z-index: 1012;
49
+ z-index: 1016;
50
50
 
51
51
  /* The container only positions the stacked modals; each modal catches its own
52
52
  clicks, so an empty container must let clicks through. */
@@ -35,7 +35,7 @@
35
35
  import MenuList from '@core/components/menu/MenuList.vue'
36
36
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
37
37
  import UiPanel from '@core/components/ui/panel/UiPanel.vue'
38
- import { vTooltip } from '@core/directives/tooltip.directive'
38
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
39
39
  import type { IconName } from '@core/icons'
40
40
  import { computed } from 'vue'
41
41
  import { useI18n } from 'vue-i18n'
@@ -44,9 +44,9 @@
44
44
  import VtsPanel from '@core/components/panel/VtsPanel.vue'
45
45
  import VtsStateHero from '@core/components/state-hero/VtsStateHero.vue'
46
46
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
47
- import { vTooltip } from '@core/directives/tooltip.directive'
48
- import { usePanelStore } from '@core/stores/panel.store'
49
- import { useUiStore } from '@core/stores/ui.store'
47
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
48
+ import { usePanelStore } from '@core/stores/panel.store.ts'
49
+ import { useUiStore } from '@core/stores/ui.store.ts'
50
50
  import { watch } from 'vue'
51
51
  import { useI18n } from 'vue-i18n'
52
52
 
@@ -47,9 +47,9 @@ import VtsQueryBuilderButton from '@core/components/query-builder/VtsQueryBuilde
47
47
  import UiButton from '@core/components/ui/button/UiButton.vue'
48
48
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
49
49
  import UiInput from '@core/components/ui/input/UiInput.vue'
50
- import type { QueryBuilderSchema } from '@core/packages/query-builder/types'
51
- import { useQueryBuilder } from '@core/packages/query-builder/use-query-builder'
52
- import { useUiStore } from '@core/stores/ui.store'
50
+ import type { QueryBuilderSchema } from '@core/packages/query-builder/types.ts'
51
+ import { useQueryBuilder } from '@core/packages/query-builder/use-query-builder.ts'
52
+ import { useUiStore } from '@core/stores/ui.store.ts'
53
53
  import { onMounted, ref, useId, watch } from 'vue'
54
54
  import { useI18n } from 'vue-i18n'
55
55
 
@@ -16,9 +16,10 @@
16
16
  <script setup lang="ts">
17
17
  import UiButton from '@core/components/ui/button/UiButton.vue'
18
18
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
19
- import { vTooltip } from '@core/directives/tooltip.directive'
20
- import { useModal } from '@core/packages/modal/use-modal'
21
- import type { QueryBuilderGroup } from '@core/packages/query-builder/types'
19
+ import { vTooltip } from '@core/directives/tooltip.directive.ts'
20
+ import { KEEP_OVERLAY_OPEN } from '@core/packages/overlay/symbols.ts'
21
+ import { useOverlay } from '@core/packages/overlay/use-overlay.ts'
22
+ import type { QueryBuilderGroup } from '@core/packages/query-builder/types.ts'
22
23
  import { computed } from 'vue'
23
24
  import { useI18n } from 'vue-i18n'
24
25
 
@@ -38,15 +39,20 @@ const tooltip = computed(() => (disabled ? 'Current filter is invalid or too com
38
39
 
39
40
  const { t } = useI18n()
40
41
 
41
- const openModal = useModal(() => ({
42
- component: import('@core/components/query-builder/VtsQueryBuilderModal.vue'),
43
- props: {
44
- modelValue: rootGroup,
45
- 'onUpdate:modelValue': (newRootGroup: QueryBuilderGroup) => {
42
+ const { open } = useOverlay({
43
+ component: () => import('@core/components/query-builder/VtsQueryBuilderModal.vue'),
44
+ events: {
45
+ 'onUpdate:modelValue': newRootGroup => {
46
46
  rootGroup.value = newRootGroup
47
+
48
+ return KEEP_OVERLAY_OPEN
47
49
  },
50
+ onConfirm: () => emit('confirm'),
51
+ onCancel: () => emit('cancel'),
48
52
  },
49
- onConfirm: () => emit('confirm'),
50
- onCancel: () => emit('cancel'),
51
- }))
53
+ })
54
+
55
+ function openModal() {
56
+ return open({ props: { modelValue: rootGroup.value } })
57
+ }
52
58
  </script>
@@ -36,7 +36,7 @@ import UiButton from '@core/components/ui/button/UiButton.vue'
36
36
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
37
37
  import UiInput from '@core/components/ui/input/UiInput.vue'
38
38
  import { useFormSelect } from '@core/packages/form-select'
39
- import type { PropertySchema, OperatorSchema, ValueSchema } from '@core/packages/query-builder/types'
39
+ import type { PropertySchema, OperatorSchema, ValueSchema } from '@core/packages/query-builder/types.ts'
40
40
  import { useUiStore } from '@core/stores/ui.store.ts'
41
41
  import { onMounted, useTemplateRef } from 'vue'
42
42
  import { useI18n } from 'vue-i18n'
@@ -54,7 +54,7 @@ import UiButton from '@core/components/ui/button/UiButton.vue'
54
54
  import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue'
55
55
  import UiCard from '@core/components/ui/card/UiCard.vue'
56
56
  import { useFormSelect } from '@core/packages/form-select'
57
- import type { QueryBuilderGroup } from '@core/packages/query-builder/types'
57
+ import type { QueryBuilderGroup } from '@core/packages/query-builder/types.ts'
58
58
  import { computed } from 'vue'
59
59
  import { useI18n } from 'vue-i18n'
60
60