diff --git a/@vates/nbd-client/multi.mjs b/@vates/nbd-client/multi.mjs index 5bea8e50f95..fb0f76e85e9 100644 --- a/@vates/nbd-client/multi.mjs +++ b/@vates/nbd-client/multi.mjs @@ -34,9 +34,8 @@ export default class MultiNbdClient { async connect() { const candidates = [...this.#settings] - const promises = [] const baseOptions = this.#options - const _connect = async () => { + const _connect = async () => { if (candidates.length === 0) { return } @@ -63,11 +62,11 @@ export default class MultiNbdClient { return _connect() } } + // don't connect in parallel since this can lead to race condition + // on distributed systems ( like the NBD server of the XAPI) for (let i = 0; i < this.#nbdConcurrency; i++) { - promises.push(_connect()) + await _connect() } - await Promise.all(promises) - if (this.#clients.length === 0) { throw new Error(`Fail to connect to any Nbd client`) } diff --git a/@vates/nbd-client/package.json b/@vates/nbd-client/package.json index 89b31c243ca..e0d747b0b86 100644 --- a/@vates/nbd-client/package.json +++ b/@vates/nbd-client/package.json @@ -13,7 +13,7 @@ "url": "https://vates.fr" }, "license": "ISC", - "version": "3.1.1", + "version": "3.1.2", "engines": { "node": ">=14.0" }, diff --git a/@xen-orchestra/backups/docs/VM backups/README.md b/@xen-orchestra/backups/docs/VM backups/README.md index 51150dc6633..bd81f8b13ee 100644 --- a/@xen-orchestra/backups/docs/VM backups/README.md +++ b/@xen-orchestra/backups/docs/VM backups/README.md @@ -65,7 +65,7 @@ In case any incoherence is detected, the file is deleted so it will be fully gen - `xo:backup:deltaChainLength` = n (number of delta copies/replicated since a full) - `xo:backup:exported` = 'true' (added at the end of the backup) -### Of created VMs , their associated VDIs and snapshots +### Of created VMs , their associated VDIs and snapshots - `other_config`: - `xo:backup:datetime`: format is UTC %Y%m%dT%H:%M:%SZ diff --git a/@xen-orchestra/backups/package.json b/@xen-orchestra/backups/package.json index fa2f6129ef5..22de23fb562 100644 --- a/@xen-orchestra/backups/package.json +++ b/@xen-orchestra/backups/package.json @@ -25,7 +25,7 @@ "@vates/decorate-with": "^2.1.0", "@vates/disposable": "^0.1.6", "@vates/fuse-vhd": "^2.1.2", - "@vates/nbd-client": "^3.1.1", + "@vates/nbd-client": "^3.1.2", "@vates/parse-duration": "^0.1.1", "@xen-orchestra/async-map": "^0.1.2", "@xen-orchestra/fs": "^4.2.1", diff --git a/@xen-orchestra/defined/README.md b/@xen-orchestra/defined/README.md index 942553f41aa..0a533fb49f6 100644 --- a/@xen-orchestra/defined/README.md +++ b/@xen-orchestra/defined/README.md @@ -21,6 +21,7 @@ npm install --save @xen-orchestra/defined Returns the first non-`undefined` value from a list of arguments, evaluating functions if needed. There is two ways to use this function: + - either with a single array argument: it should return the first non-undefined item - or with multiple arguments: it should return the first non-undefined argument diff --git a/@xen-orchestra/fs/package.json b/@xen-orchestra/fs/package.json index b54cb5d4962..9de7636dcbe 100644 --- a/@xen-orchestra/fs/package.json +++ b/@xen-orchestra/fs/package.json @@ -41,7 +41,7 @@ "proper-lockfile": "^4.1.2", "readable-stream": "^4.1.0", "through2": "^4.0.2", - "xo-remote-parser": "^0.9.2" + "xo-remote-parser": "^0.9.3" }, "devDependencies": { "@babel/cli": "^7.0.0", diff --git a/@xen-orchestra/fs/src/local.js b/@xen-orchestra/fs/src/local.js index 0caefbe1124..d9a76d3ae2d 100644 --- a/@xen-orchestra/fs/src/local.js +++ b/@xen-orchestra/fs/src/local.js @@ -58,7 +58,7 @@ export default class LocalHandler extends RemoteHandlerAbstract { constructor(remote, opts = {}) { super(remote) - this.#addSyncStackTrace = opts.syncStackTraces ?? true ? addSyncStackTrace : dontAddSyncStackTrace + this.#addSyncStackTrace = (opts.syncStackTraces ?? true) ? addSyncStackTrace : dontAddSyncStackTrace this.#retriesOnEagain = { delay: 1e3, retries: 9, diff --git a/@xen-orchestra/lite/package.json b/@xen-orchestra/lite/package.json index 4a461f81aa2..a3e9b519573 100644 --- a/@xen-orchestra/lite/package.json +++ b/@xen-orchestra/lite/package.json @@ -26,7 +26,7 @@ "@types/file-saver": "^2.0.7", "@types/lodash-es": "^4.17.12", "@types/node": "^18.19.7", - "@vitejs/plugin-vue": "^5.0.3", + "@vitejs/plugin-vue": "^5.1.4", "@vue/tsconfig": "^0.5.1", "@vueuse/core": "^10.7.1", "@vueuse/math": "^10.7.1", @@ -38,7 +38,7 @@ "echarts": "^5.4.3", "file-saver": "^2.0.5", "highlight.js": "^11.9.0", - "human-format": "^1.2.0", + "human-format": "^1.2.1", "iterable-backoff": "^0.1.0", "json-rpc-2.0": "^1.7.0", "json5": "^2.2.3", @@ -48,19 +48,19 @@ "marked": "^9.1.5", "minimist": "^1.2.8", "npm-run-all": "^4.1.5", - "pinia": "^2.1.7", + "pinia": "^2.2.6", "placement.js": "^1.0.0-beta.5", "postcss": "^8.4.33", "postcss-color-function": "^4.1.0", "postcss-custom-media": "^10.0.2", "postcss-nested": "^6.0.1", - "typescript": "~5.3.3", - "vite": "^5.0.11", - "vue": "~3.4.13", + "typescript": "~5.6.3", + "vite": "^5.4.10", + "vue": "~3.5.12", "vue-echarts": "^6.6.8", "vue-i18n": "^9.9.0", "vue-router": "^4.4.0", - "vue-tsc": "^1.8.27", + "vue-tsc": "^2.1.10", "zx": "^7.2.3" }, "private": true, diff --git a/@xen-orchestra/lite/src/App.vue b/@xen-orchestra/lite/src/App.vue index 425d2fccc5f..b76eb0e0930 100644 --- a/@xen-orchestra/lite/src/App.vue +++ b/@xen-orchestra/lite/src/App.vue @@ -1,5 +1,5 @@ @@ -24,12 +24,15 @@ import { useChartTheme } from '@/composables/chart-theme.composable' import { useUnreachableHosts } from '@/composables/unreachable-hosts.composable' import { usePoolStore } from '@/stores/xen-api/pool.store' import { useXenApiStore } from '@/stores/xen-api.store' -import TooltipList from '@core/components/tooltip/TooltipList.vue' +import VtsTooltipList from '@core/components/tooltip-list/VtsTooltipList.vue' import { useUiStore } from '@core/stores/ui.store' import { useActiveElement, useMagicKeys, whenever } from '@vueuse/core' import { logicAnd } from '@vueuse/math' import { computed } from 'vue' import { useI18n } from 'vue-i18n' +import { useRoute } from 'vue-router' + +const route = useRoute() const xenApiStore = useXenApiStore() diff --git a/@xen-orchestra/lite/src/components/AppLogin.vue b/@xen-orchestra/lite/src/components/AppLogin.vue index 6e9e161fffa..736d365f0b8 100644 --- a/@xen-orchestra/lite/src/components/AppLogin.vue +++ b/@xen-orchestra/lite/src/components/AppLogin.vue @@ -27,7 +27,7 @@ {{ $t('keep-me-logged') }} - + {{ $t('login') }} @@ -45,7 +45,7 @@ import UiIcon from '@/components/ui/icon/UiIcon.vue' import type { XenApiError } from '@/libs/xen-api/xen-api.types' import { usePageTitleStore } from '@/stores/page-title.store' import { useXenApiStore } from '@/stores/xen-api.store' -import UiButton from '@core/components/button/UiButton.vue' +import UiButton from '@core/components/ui/button/UiButton.vue' import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons' import { useLocalStorage, whenever } from '@vueuse/core' import { storeToRefs } from 'pinia' diff --git a/@xen-orchestra/lite/src/components/AppNavigation.vue b/@xen-orchestra/lite/src/components/AppNavigation.vue index 1140a3df754..5f5dae460fd 100644 --- a/@xen-orchestra/lite/src/components/AppNavigation.vue +++ b/@xen-orchestra/lite/src/components/AppNavigation.vue @@ -1,7 +1,7 @@ @@ -11,12 +11,14 @@ import ComponentStory from '@/components/component-story/ComponentStory.vue' import { prop, iconProp } from '@/libs/story/story-param' import { object } from '@/libs/story/story-widget' -import DonutChart, { type DonutSegment } from '@core/components/donut-chart/DonutChart.vue' +import UiDonutChart, { type DonutSegment } from '@core/components/ui/donut-chart/UiDonutChart.vue' const segments: DonutSegment[] = [ - { value: 16, color: 'success' }, - { value: 22, color: 'warning' }, - { value: 35, color: 'danger' }, - { value: 12, color: 'disabled' }, + { value: 13, accent: 'info' }, + { value: 14, accent: 'neutral' }, + { value: 16, accent: 'success' }, + { value: 22, accent: 'warning' }, + { value: 35, accent: 'danger' }, + { value: 12, accent: 'muted' }, ] diff --git a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.md b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.md similarity index 77% rename from @xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.md rename to @xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.md index f91273e7745..92b69cd9133 100644 --- a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.md +++ b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.md @@ -1,7 +1,7 @@ -`HeadBar` component usage with `ObjectIcon` and `UiButton` components: +`UiHeadBar` component usage with `ObjectIcon` and `UiButton` components: ```vue-template - + Host name - + ``` ```vue-script import UiButton from '@core/components/button/UiButton.vue' -import HeadBar from '@core/components/head-bar/HeadBar.vue' +import UiHeadBar from '@core/components/ui/head-bar/UiHeadBar.vue' import ObjectIcon from '@core/components/icon/ObjectIcon.vue' import { faPlus, faPowerOff } from '@fortawesome/free-solid-svg-icons' ``` diff --git a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.vue b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.vue similarity index 71% rename from @xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.vue rename to @xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.vue index e270149cb9d..fd91aabae6b 100644 --- a/@xen-orchestra/lite/src/stories/web-core/head-bar/head-bar.story.vue +++ b/@xen-orchestra/lite/src/stories/web-core/ui/head-bar/ui-head-bar.story.vue @@ -12,17 +12,17 @@ setting('showStatusSlotDemoContent').widget(boolean()), ]" > - + {{ settings.default }} - + @@ -30,14 +30,14 @@ import ComponentStory from '@/components/component-story/ComponentStory.vue' import { iconProp, setting, slot } from '@/libs/story/story-param' import { boolean } from '@/libs/story/story-widget' -import UiButton from '@core/components/button/UiButton.vue' -import HeadBar from '@core/components/head-bar/HeadBar.vue' -import UiSpinner from '@core/components/UiSpinner.vue' +import UiButton from '@core/components/ui/button/UiButton.vue' +import UiHeadBar from '@core/components/ui/head-bar/UiHeadBar.vue' +import UiLoader from '@core/components/ui/loader/UiLoader.vue' import { faPlus, faPowerOff } from '@fortawesome/free-solid-svg-icons' diff --git a/@xen-orchestra/web-core/lib/components/PowerStateIcon.vue b/@xen-orchestra/web-core/lib/components/PowerStateIcon.vue deleted file mode 100644 index 2384ece5f0a..00000000000 --- a/@xen-orchestra/web-core/lib/components/PowerStateIcon.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/@xen-orchestra/web-core/lib/components/UiTag.vue b/@xen-orchestra/web-core/lib/components/UiTag.vue deleted file mode 100644 index 2d55738f29a..00000000000 --- a/@xen-orchestra/web-core/lib/components/UiTag.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - diff --git a/@xen-orchestra/web-core/lib/components/backdrop/Backdrop.vue b/@xen-orchestra/web-core/lib/components/backdrop/VtsBackdrop.vue similarity index 100% rename from @xen-orchestra/web-core/lib/components/backdrop/Backdrop.vue rename to @xen-orchestra/web-core/lib/components/backdrop/VtsBackdrop.vue diff --git a/@xen-orchestra/web-core/lib/components/backup-item/BackupItem.vue b/@xen-orchestra/web-core/lib/components/backup-item/BackupItem.vue deleted file mode 100644 index 2ab4eeb9829..00000000000 --- a/@xen-orchestra/web-core/lib/components/backup-item/BackupItem.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - diff --git a/@xen-orchestra/web-core/lib/components/backup-item/VtsBackupItem.vue b/@xen-orchestra/web-core/lib/components/backup-item/VtsBackupItem.vue new file mode 100644 index 00000000000..7b1431a867c --- /dev/null +++ b/@xen-orchestra/web-core/lib/components/backup-item/VtsBackupItem.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/@xen-orchestra/web-core/lib/components/backup-state/BackupState.vue b/@xen-orchestra/web-core/lib/components/backup-state/VtsBackupState.vue similarity index 85% rename from @xen-orchestra/web-core/lib/components/backup-state/BackupState.vue rename to @xen-orchestra/web-core/lib/components/backup-state/VtsBackupState.vue index 1b1c7e4556f..1bda32cfa0f 100644 --- a/@xen-orchestra/web-core/lib/components/backup-state/BackupState.vue +++ b/@xen-orchestra/web-core/lib/components/backup-state/VtsBackupState.vue @@ -1,15 +1,15 @@ - diff --git a/@xen-orchestra/web-core/lib/components/button/ButtonGroup.vue b/@xen-orchestra/web-core/lib/components/button-group/VtsButtonGroup.vue similarity index 75% rename from @xen-orchestra/web-core/lib/components/button/ButtonGroup.vue rename to @xen-orchestra/web-core/lib/components/button-group/VtsButtonGroup.vue index c20e17fe80b..9547999524e 100644 --- a/@xen-orchestra/web-core/lib/components/button/ButtonGroup.vue +++ b/@xen-orchestra/web-core/lib/components/button-group/VtsButtonGroup.vue @@ -1,7 +1,8 @@ -