@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.
- package/lib/components/card/VtsCardRowKeyValue.vue +1 -1
- package/lib/components/cell-object/VtsCellObject.vue +1 -1
- package/lib/components/cell-text/VtsCellText.vue +1 -1
- package/lib/components/console/VtsActionsConsole.vue +1 -1
- package/lib/components/console/VtsClipboardConsole.vue +1 -1
- package/lib/components/console/VtsLayoutConsole.vue +1 -1
- package/lib/components/console/VtsRemoteConsole.vue +1 -1
- package/lib/components/copy-all-menu-item/VtsCopyAllMenuItem.vue +48 -0
- package/lib/components/copy-button/VtsCopyButton.vue +3 -3
- package/lib/components/delete-button/VtsDeleteButton.vue +1 -1
- package/lib/components/icon/VtsIcon.vue +1 -1
- package/lib/components/input-wrapper/VtsInputWrapper.vue +3 -3
- package/lib/components/key-value-pair/VtsKeyValuePair.vue +1 -1
- package/lib/components/layout/VtsContentSidePanel.vue +2 -2
- package/lib/components/linear-chart/VtsLinearChart.vue +1 -1
- package/lib/components/menu/MenuItem.vue +2 -2
- package/lib/components/menu/MenuList.vue +2 -2
- package/lib/components/menu/MenuSeparator.vue +1 -1
- package/lib/components/modal/VtsActionModal.vue +52 -13
- package/lib/components/modal/VtsBlockedModal.vue +7 -7
- package/lib/components/modal/VtsDeleteModal.vue +20 -15
- package/lib/components/modal/VtsErrorModal.vue +10 -6
- package/lib/components/overlay/VtsOverlayList.vue +2 -2
- package/lib/components/panel/VtsPanel.vue +1 -1
- package/lib/components/panel/VtsSidePanel.vue +3 -3
- package/lib/components/query-builder/VtsQueryBuilder.vue +3 -3
- package/lib/components/query-builder/VtsQueryBuilderButton.vue +17 -11
- package/lib/components/query-builder/VtsQueryBuilderFilter.vue +1 -1
- package/lib/components/query-builder/VtsQueryBuilderGroup.vue +1 -1
- package/lib/components/query-builder/VtsQueryBuilderModal.vue +13 -8
- package/lib/components/query-builder/VtsQueryBuilderRow.vue +1 -1
- package/lib/components/relative-time/VtsRelativeTime.vue +2 -2
- package/lib/components/space-card/VtsSpaceCard.vue +11 -7
- package/lib/components/sr-connection-modal/VtsSrConnectionModal.vue +77 -0
- package/lib/components/stacked-bar-with-legend/VtsStackedBarWithLegend.vue +1 -1
- package/lib/components/state-hero/VtsStateHero.vue +1 -1
- package/lib/components/status/VtsStatus.vue +1 -1
- package/lib/components/tab/TabItem.vue +2 -2
- package/lib/components/tab/TabList.vue +1 -1
- package/lib/components/table/VtsTable.vue +3 -3
- package/lib/components/table/cells/VtsCollapsedListCell.vue +1 -1
- package/lib/components/table/cells/VtsLinkCell.vue +2 -2
- package/lib/components/table/cells/VtsStatusCell.vue +3 -3
- package/lib/components/table/cells/VtsTagCell.vue +2 -2
- package/lib/components/table/cells/VtsTextCell.vue +1 -1
- package/lib/components/tag/VtsTag.vue +1 -1
- package/lib/components/task/VtsQuickTaskButton.vue +1 -1
- package/lib/components/task/VtsQuickTaskTabBar.vue +1 -1
- package/lib/components/tooltip-list/VtsTooltipList.vue +1 -1
- package/lib/components/tree/VtsTreeList.vue +1 -1
- package/lib/components/tree/VtsTreeLoadingItem.vue +1 -1
- package/lib/components/ui/account-menu-button/UiAccountMenuButton.vue +1 -1
- package/lib/components/ui/alarm-item/UiAlarmItem.vue +2 -2
- package/lib/components/ui/alert/UiAlert.vue +1 -1
- package/lib/components/ui/button/UiButton.vue +2 -2
- package/lib/components/ui/button-icon/UiButtonIcon.vue +1 -1
- package/lib/components/ui/card-numbers/UiCardNumbers.vue +1 -1
- package/lib/components/ui/checkbox/UiCheckbox.vue +2 -2
- package/lib/components/ui/chip/UiChip.vue +1 -1
- package/lib/components/ui/counter/UiCounter.vue +1 -1
- package/lib/components/ui/drawer/UiDrawer.vue +37 -54
- package/lib/components/ui/dropdown/UiDropdown.vue +2 -2
- package/lib/components/ui/dropdown-button/UiDropdownButton.vue +1 -1
- package/lib/components/ui/head-bar/UiHeadBar.vue +1 -1
- package/lib/components/ui/info/UiInfo.vue +1 -1
- package/lib/components/ui/input/UiInput.vue +2 -2
- package/lib/components/ui/label/UiLabel.vue +1 -1
- package/lib/components/ui/legend/UiLegend.vue +2 -2
- package/lib/components/ui/legend-title/UiLegendTitle.vue +1 -1
- package/lib/components/ui/link/UiLink.vue +2 -2
- package/lib/components/ui/loader/UiLoader.vue +1 -1
- package/lib/components/ui/modal/UiModal.vue +17 -5
- package/lib/components/ui/object-link/UiObjectLink.vue +1 -1
- package/lib/components/ui/panel-card/UiPanelCard.vue +20 -0
- package/lib/components/ui/progress-bar/UiProgressBar.vue +1 -1
- package/lib/components/ui/query-search-bar/UiQuerySearchBar.vue +2 -2
- package/lib/components/ui/quick-task-panel/UiQuickTaskPanel.vue +1 -1
- package/lib/components/ui/radio-button/UiRadioButton.vue +2 -2
- package/lib/components/ui/stacked-bar/StackedBarSegment.vue +2 -2
- package/lib/components/ui/stacked-bar/UiStackedBar.vue +1 -1
- package/lib/components/ui/tag/UiTag.vue +1 -1
- package/lib/components/ui/task-item/UiTaskItem.vue +1 -1
- package/lib/components/ui/text-area/UiTextarea.vue +1 -1
- package/lib/components/ui/toaster/UiToaster.vue +1 -1
- package/lib/components/ui/toggle/UiToggle.vue +1 -1
- package/lib/components/ui/tooltip/UiTooltip.vue +2 -2
- package/lib/components/ui/tree-item-label/UiTreeItemLabel.vue +40 -16
- package/lib/components/ui/user-link/UiUserLink.vue +1 -1
- package/lib/components/ui/user-logo/UiUserLogo.vue +1 -1
- package/lib/components/{vif-connection-toggle-modal/VtsVifConnectionToggleModal.vue → vif-connection-modal/VtsVifConnectionModal.vue} +15 -10
- package/lib/composables/chart-theme.composable.ts +1 -1
- package/lib/composables/context.composable.ts +1 -1
- package/lib/composables/copy.composable.ts +6 -0
- package/lib/composables/default-tab.composable.ts +1 -1
- package/lib/composables/disabled.composable.ts +1 -1
- package/lib/composables/hide-route-query.composable.ts +1 -1
- package/lib/composables/link-component.composable.ts +1 -1
- package/lib/composables/modals/use-action-modal.ts +11 -0
- package/lib/composables/modals/use-blocked-modal.ts +10 -0
- package/lib/composables/modals/use-delete-modal.ts +11 -0
- package/lib/composables/pagination.composable.ts +2 -2
- package/lib/composables/route-query/types.ts +1 -1
- package/lib/composables/route-query.composable.ts +5 -5
- package/lib/composables/sort-route-query.composable.ts +1 -1
- package/lib/composables/tab-list.composable.ts +1 -1
- package/lib/composables/table/create-base-definition.ts +1 -1
- package/lib/composables/table/create-define-column.ts +6 -6
- package/lib/composables/table/create-sorting-definition.ts +2 -2
- package/lib/composables/table/create-visibility-definition.ts +2 -2
- package/lib/composables/table/type.ts +1 -1
- package/lib/composables/table.composable.ts +4 -4
- package/lib/composables/tree-filter.composable.ts +1 -1
- package/lib/directives/tooltip.directive.ts +2 -2
- package/lib/icons/index.ts +1 -1
- package/lib/locales/cs.json +50 -6
- package/lib/locales/de.json +3 -2
- package/lib/locales/en.json +83 -9
- package/lib/locales/es.json +0 -1
- package/lib/locales/fr.json +87 -13
- package/lib/locales/ko.json +2 -0
- package/lib/locales/nb-NO.json +0 -1
- package/lib/locales/nl.json +130 -3
- package/lib/locales/pt.json +1 -2
- package/lib/locales/sk.json +50 -6
- package/lib/locales/sv.json +0 -2
- package/lib/locales/zh-Hans.json +0 -4
- package/lib/packages/form-select/use-form-select-controller.ts +1 -1
- package/lib/packages/job/define-job.ts +5 -5
- package/lib/packages/job/index.ts +4 -4
- package/lib/packages/job/use-job-store.ts +2 -2
- package/lib/packages/menu/action.ts +1 -1
- package/lib/packages/menu/context.ts +1 -1
- package/lib/packages/menu/index.ts +10 -10
- package/lib/packages/menu/job.ts +3 -3
- package/lib/packages/menu/link.ts +1 -1
- package/lib/packages/menu/router-link.ts +1 -1
- package/lib/packages/menu/toggle-target.ts +1 -1
- package/lib/packages/overlay/README.md +19 -4
- package/lib/packages/overlay/create-event-handler.ts +4 -11
- package/lib/packages/overlay/types.ts +1 -0
- package/lib/packages/overlay/use-overlay-store.ts +5 -0
- package/lib/packages/overlay/use-overlay.ts +25 -10
- package/lib/packages/query-builder/group/build-root-group.ts +1 -1
- package/lib/packages/query-builder/node/handle-comparison-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-glob-pattern-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-group-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-node.ts +8 -8
- package/lib/packages/query-builder/node/handle-null-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-property-group-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-property-node.ts +8 -8
- package/lib/packages/query-builder/node/handle-regexp-node.ts +1 -1
- package/lib/packages/query-builder/node/handle-string-or-number-node.ts +2 -2
- package/lib/packages/query-builder/node/handle-truthy-property-node.ts +1 -1
- package/lib/packages/query-builder/use-query-builder.ts +2 -2
- package/lib/packages/remote-resource/define-remote-resource.ts +56 -27
- package/lib/packages/remote-resource/sse.store.ts +4 -4
- package/lib/packages/threshold/use-threshold.ts +1 -1
- package/lib/packages/tree/branch-definition.ts +2 -2
- package/lib/packages/tree/branch.ts +8 -2
- package/lib/packages/tree/build-nodes.ts +3 -3
- package/lib/packages/tree/define-branch.ts +2 -2
- package/lib/packages/tree/define-leaf.ts +2 -2
- package/lib/packages/tree/define-tree.ts +3 -3
- package/lib/packages/tree/leaf-definition.ts +1 -1
- package/lib/packages/tree/leaf.ts +2 -2
- package/lib/packages/tree/tree-node-base.ts +2 -2
- package/lib/packages/tree/tree-node-definition-base.ts +1 -1
- package/lib/packages/tree/types.ts +6 -6
- package/lib/packages/tree/use-tree.ts +2 -2
- package/lib/stores/panel.store.ts +1 -1
- package/lib/stores/tooltip.store.ts +2 -2
- package/lib/tables/column-definitions/action-column.ts +2 -2
- package/lib/tables/column-definitions/button-column.ts +3 -3
- package/lib/tables/column-definitions/button-icon-column.ts +2 -2
- package/lib/tables/column-definitions/date-column.ts +3 -3
- package/lib/tables/column-definitions/info-column.ts +3 -3
- package/lib/tables/column-definitions/input-column.ts +3 -3
- package/lib/tables/column-definitions/link-column.ts +2 -2
- package/lib/tables/column-definitions/literal-column.ts +3 -3
- package/lib/tables/column-definitions/number-column.ts +2 -2
- package/lib/tables/column-definitions/percent-column.ts +2 -2
- package/lib/tables/column-definitions/progress-bar-column.ts +2 -2
- package/lib/tables/column-definitions/select-column.ts +2 -2
- package/lib/tables/column-definitions/status-column.ts +2 -2
- package/lib/tables/column-definitions/tag-column.ts +3 -3
- package/lib/tables/column-sets/backup-issue-columns.ts +1 -1
- package/lib/tables/column-sets/backup-job-columns.ts +1 -1
- package/lib/tables/column-sets/backup-job-schedule-columns.ts +1 -1
- package/lib/tables/column-sets/backup-log-columns.ts +1 -1
- package/lib/tables/column-sets/host-columns.ts +3 -3
- package/lib/tables/column-sets/network-columns.ts +2 -2
- package/lib/tables/column-sets/pif-columns.ts +2 -2
- package/lib/tables/column-sets/server-columns.ts +1 -1
- package/lib/tables/column-sets/sr-columns.ts +3 -3
- package/lib/tables/column-sets/vdi-columns.ts +2 -0
- package/lib/tables/column-sets/vif-columns.ts +1 -1
- package/lib/tables/column-sets/vif-network-columns.ts +1 -1
- package/lib/tables/column-sets/vm-backup-archive-columns.ts +3 -3
- package/lib/tables/column-sets/vm-backup-run-colums.ts +2 -2
- package/lib/tables/column-sets/vm-columns.ts +1 -1
- package/lib/types/object.type.ts +10 -1
- package/lib/utils/create-subscribable-store-context.util.ts +2 -2
- package/lib/utils/download-bugtools.utils.ts +1 -1
- package/lib/utils/if-else.utils.ts +2 -2
- package/lib/utils/injection-keys.util.ts +0 -2
- package/lib/utils/progress.util.ts +1 -1
- package/lib/utils/to-array.utils.ts +1 -1
- package/package.json +1 -1
- package/lib/components/drawer/VtsDrawer.vue +0 -89
- package/lib/components/drawer/VtsDrawerButton.vue +0 -22
- package/lib/components/drawer/VtsDrawerCancelButton.vue +0 -33
- package/lib/components/drawer/VtsDrawerConfirmButton.vue +0 -32
- package/lib/components/drawer/VtsDrawerList.vue +0 -34
- package/lib/components/modal/VtsModal.vue +0 -82
- package/lib/components/modal/VtsModalButton.vue +0 -35
- package/lib/components/modal/VtsModalCancelButton.vue +0 -37
- package/lib/components/modal/VtsModalConfirmButton.vue +0 -21
- package/lib/components/modal/VtsModalList.vue +0 -34
- package/lib/packages/drawer/DrawerProvider.vue +0 -17
- package/lib/packages/drawer/README.md +0 -189
- package/lib/packages/drawer/create-drawer-opener.ts +0 -119
- package/lib/packages/drawer/drawer.store.ts +0 -22
- package/lib/packages/drawer/types.ts +0 -93
- package/lib/packages/drawer/use-drawer.ts +0 -53
- package/lib/packages/modal/ModalProvider.vue +0 -17
- package/lib/packages/modal/README.md +0 -253
- package/lib/packages/modal/create-modal-opener.ts +0 -106
- package/lib/packages/modal/modal.store.ts +0 -22
- package/lib/packages/modal/types.ts +0 -91
- 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
|
|
|
@@ -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
|
|
|
@@ -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 {
|
|
15
|
-
import {
|
|
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 } =
|
|
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
|
|
|
@@ -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'
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
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
|
-
<
|
|
11
|
-
<
|
|
10
|
+
<VtsOverlayCancelButton @click="emit('cancel')">{{ t('action:go-back') }}</VtsOverlayCancelButton>
|
|
11
|
+
<VtsOverlayConfirmButton>
|
|
12
12
|
{{ modalTexts.action }}
|
|
13
|
-
</
|
|
13
|
+
</VtsOverlayConfirmButton>
|
|
14
14
|
</template>
|
|
15
|
-
</
|
|
15
|
+
</UiModal>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script lang="ts" setup>
|
|
19
|
-
import
|
|
20
|
-
import
|
|
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
|
|
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
|
|
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
|
-
<
|
|
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
|
-
<
|
|
16
|
-
<UiLink :href icon="action:edit" size="medium" @click="emit('
|
|
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
|
-
</
|
|
20
|
+
</UiModal>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script lang="ts" setup>
|
|
24
|
-
import
|
|
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
|
-
|
|
43
|
+
close: []
|
|
44
44
|
}>()
|
|
45
45
|
|
|
46
46
|
const { t } = useI18n()
|
|
@@ -1,36 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
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
|
-
|
|
6
|
+
{{ subject }}
|
|
7
7
|
</span>
|
|
8
8
|
</I18nT>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<template #content>
|
|
12
|
-
|
|
12
|
+
{{ description ?? t('please-confirm-to-continue') }}
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<template #buttons>
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
</
|
|
16
|
+
<VtsOverlayCancelButton @click="emit('cancel')">{{ t('action:go-back') }}</VtsOverlayCancelButton>
|
|
17
|
+
<VtsOverlayConfirmButton>
|
|
18
|
+
{{ confirmLabel }}
|
|
19
|
+
</VtsOverlayConfirmButton>
|
|
20
20
|
</template>
|
|
21
|
-
</
|
|
21
|
+
</UiModal>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script lang="ts" setup>
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
<
|
|
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
|
-
<
|
|
14
|
+
<VtsOverlayConfirmButton>
|
|
15
15
|
{{ t('action:close') }}
|
|
16
|
-
</
|
|
16
|
+
</VtsOverlayConfirmButton>
|
|
17
17
|
</template>
|
|
18
|
-
</
|
|
18
|
+
</UiModal>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script lang="ts" setup>
|
|
22
|
-
import
|
|
23
|
-
import
|
|
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:
|
|
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:
|
|
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 {
|
|
21
|
-
import
|
|
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
|
|
42
|
-
component: import('@core/components/query-builder/VtsQueryBuilderModal.vue'),
|
|
43
|
-
|
|
44
|
-
modelValue:
|
|
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
|
-
|
|
50
|
-
|
|
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
|
|