@xen-orchestra/web-core 0.49.0 → 0.50.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.
@@ -29,9 +29,10 @@
29
29
  "action:delete": "删除",
30
30
  "action:delete-filter": "删除筛选器",
31
31
  "action:delete-group": "删除群组",
32
- "action:delete-vms": "删除1台虚拟机 | 删除{n}台虚拟机",
32
+ "action:delete-n-vms": "删除1台虚拟机 | 删除{n}台虚拟机",
33
33
  "action:deploy": "部署",
34
34
  "action:deploy-xoa": "部署XOA",
35
+ "action:download-bugtools-archive": "下载 bugtools 压缩包",
35
36
  "action:duplicate": "复制",
36
37
  "action:edit": "编辑",
37
38
  "action:edit-config": "编辑配置",
@@ -150,6 +151,7 @@
150
151
  "backup:full-replication": "全量复制",
151
152
  "backup:incremental": "增量备份",
152
153
  "backup:incremental-replication": "增量复制",
154
+ "backup:last-replication": "最后一次复制",
153
155
  "backup:mirror:full": "镜像全量备份",
154
156
  "backup:mirror:incremental": "镜像增量备份",
155
157
  "backup:pool-metadata": "资源池元数据",
@@ -162,7 +164,7 @@
162
164
  "backups:jobs:issues-ran-without-hitch": "所有备份作业均正常运行。",
163
165
  "backups:jobs:last-seven-days": "近7天",
164
166
  "backups:jobs:no-recent-run": "无近期运行记录",
165
- "backups:jobs:running-good": "运行正常",
167
+ "backups:jobs:running-good": "一切运行正常",
166
168
  "backups:jobs:skipped-runs": "跳过运行,无错误",
167
169
  "backups:jobs:status": "备份作业状态",
168
170
  "backups:vms-protection": "虚拟机保护状态",
@@ -237,6 +239,7 @@
237
239
  "crash-dump-storage-repository": "崩溃转储存储库",
238
240
  "created-by": "创建者",
239
241
  "created-on": "创建时间",
242
+ "creation-date": "创建日期",
240
243
  "cron-pattern": "Cron表达式",
241
244
  "current": "当前",
242
245
  "current-attach": "当前挂载",
@@ -334,6 +337,7 @@
334
337
  "id": "ID",
335
338
  "in-last-three-runs": "最近3次运行",
336
339
  "in-progress": "进行中",
340
+ "included": "已包含",
337
341
  "info": "信息",
338
342
  "infos": "信息",
339
343
  "install-settings": "安装设置",
@@ -364,6 +368,7 @@
364
368
  "job:arg:sr-vdi-required": "存储库/虚拟磁盘为必填项",
365
369
  "job:arg:template-uuid-required": "模板UUID为必填项",
366
370
  "job:arg:username-required": "用户名为必填项",
371
+ "job:delete:in-progress": "删除中.…",
367
372
  "job:create:in-progress": "创建中.…",
368
373
  "job:vm-copy:bad-power-state": "虚拟机必须处于停止状态",
369
374
  "job:vm-copy:in-progress": "复制中.…",
@@ -371,7 +376,6 @@
371
376
  "job:vm-create:incomplete-install-mode": "安装模式不完整",
372
377
  "job:vm-delete:bad-power-state": "虚拟机必须处于停止状态",
373
378
  "job:vm-delete:blocked-operation": "虚拟机删除被阻止",
374
- "job:vm-delete:in-progress": "删除中.…",
375
379
  "job:vm-delete:missing-vm": "无虚拟机可删除",
376
380
  "job:vm-export:in-progress": "导出中.…",
377
381
  "job:vm-export:missing-compression": "必须指定压缩方式",
@@ -426,7 +430,9 @@
426
430
  "last-n-backup-archives": "最后一个备份存档 | 最近 {n} 个备份存档",
427
431
  "last-n-backup-runs": "最近一次备份运行 | 最近 {n} 次备份运行",
428
432
  "last-n-runs": "最近1次运行 | 最近{n}次运行",
433
+ "last-revert": "最后一次还原",
429
434
  "last-run-number": "最近运行 #{n}",
435
+ "last-snapshot": "最后一个快照",
430
436
  "last-week": "上周",
431
437
  "learn-more": "了解更多",
432
438
  "lets-go!": "开始!",
@@ -435,7 +441,7 @@
435
441
  "license-type": "许可证类型",
436
442
  "licensing": "许可",
437
443
  "load-average": "平均负载",
438
- "loading": "加载中.…",
444
+ "loading": "加载中",
439
445
  "loading-hosts": "加载主机中.…",
440
446
  "local": "本地",
441
447
  "locked": "已锁定",
@@ -451,11 +457,13 @@
451
457
  "management-agent-not-detected": "未检测到管理代理",
452
458
  "management-agent-version": "管理代理版本",
453
459
  "management-ip": "管理IP",
460
+ "manual": "说明书",
454
461
  "manufacturer-info": "厂商信息",
455
462
  "master": "主主机",
456
463
  "maximum-cpu-limit": "最大CPU限制",
457
464
  "maximum-dynamic-memory": "最大动态内存",
458
465
  "maximum-static-memory": "最大静态内存",
466
+ "memory": "内存",
459
467
  "memory-usage": "内存使用率",
460
468
  "merge-backups-synchronously": "同步合并备份",
461
469
  "message": "消息",
@@ -551,6 +559,7 @@
551
559
  "no-selected-vm-can-be-exported": "所选虚拟机均无法导出",
552
560
  "no-selected-vm-can-be-migrated": "所选虚拟机均无法迁移",
553
561
  "no-server-detected": "未检测到服务器",
562
+ "no-snapshot-detected": "未检测到快照",
554
563
  "no-storage-repository-detected": "未检测到存储库",
555
564
  "no-task": "无任务",
556
565
  "no-task-detected": "未检测到任务",
@@ -562,6 +571,7 @@
562
571
  "none": "无",
563
572
  "normal": "正常",
564
573
  "not-found": "未找到",
574
+ "not-included": "不包含在内",
565
575
  "not-resident-on": "未驻留于",
566
576
  "not-running": "未运行",
567
577
  "not-yet-available": "信息暂不可用",
@@ -594,6 +604,7 @@
594
604
  "other-properties": "其他属性",
595
605
  "other-settings": "其他设置",
596
606
  "page-not-found": "未找到此页面.…",
607
+ "page-please-wait": "握紧扶手,宇航员!页面即将升空。{newline}我们正在校准推进器、调试系统,很快就好,敬请期待!",
597
608
  "pagination:all": "全部",
598
609
  "partially-connected": "部分连接",
599
610
  "password": "密码",
@@ -611,6 +622,7 @@
611
622
  "pifs": "PIF",
612
623
  "pifs-status": "PIF状态",
613
624
  "please-confirm-to-continue": "此操作不可撤销,确定继续吗?",
625
+ "please-wait": "请稍后",
614
626
  "pool": "资源池",
615
627
  "pool-connection-error-auth-failed": "连接资源池失败,用户名或密码错误。",
616
628
  "pool-connection-error-duplicate": "连接资源池失败,此资源池已连接。",
@@ -738,6 +750,7 @@
738
750
  "skipped": "已跳过",
739
751
  "smart-mode": "智能模式",
740
752
  "snapshot": "快照",
753
+ "snapshot-created-on": "快照创建于",
741
754
  "snapshot-mode": "快照模式",
742
755
  "snapshots": "快照",
743
756
  "sockets-with-cores-per-socket": "{nSockets}个插槽 × {nCores}核/插槽",
@@ -777,6 +790,7 @@
777
790
  "status:suspended": "已挂起",
778
791
  "status:unknown": "未知",
779
792
  "status:unreachable": "不可达",
793
+ "step-n-of": "步骤 {current} / {total}",
780
794
  "storage": "存储",
781
795
  "storage-configuration": "存储配置",
782
796
  "storage-format": "存储格式",
@@ -839,11 +853,13 @@
839
853
  "total-used:": "总已用:",
840
854
  "transfer-size": "传输大小",
841
855
  "translation-tool": "翻译工具",
856
+ "trigger": "触发",
842
857
  "unable-to-connect-to": "无法连接到 {ip}",
843
858
  "unable-to-connect-to-the-pool": "无法连接资源池",
844
859
  "unable-to-connect-to-xo-server": "无法连接到 XO 服务器。",
845
860
  "unknown": "未知",
846
861
  "unlocked": "已解锁",
862
+ "unnamed": "未命名",
847
863
  "unreachable-hosts": "不可达主机",
848
864
  "unreachable-hosts-reload-page": "完成,请刷新页面",
849
865
  "untitled": "未命名",
@@ -852,6 +868,7 @@
852
868
  "used": "已用",
853
869
  "used-for-backup": "用于备份",
854
870
  "used-space": "已用空间",
871
+ "used-space-on-sr": "SR 上的已用空间",
855
872
  "user-config": "用户配置",
856
873
  "username": "用户名",
857
874
  "uuid": "UUID",
@@ -1,6 +1,6 @@
1
1
  import type { AreAllPropertiesOptional, Columns } from '@core/packages/table/types.ts'
2
- import { objectOmit } from '@vueuse/shared'
3
- import { computed, defineComponent, Fragment, h, ref, type Component, type Ref, type VNode } from 'vue'
2
+ import { objectOmit, toReactive } from '@vueuse/shared'
3
+ import { type Component, computed, defineComponent, Fragment, h, ref, type Ref, type VNode } from 'vue'
4
4
 
5
5
  export function defineColumns<TSetupArgs extends any[], TColumns extends Columns>(
6
6
  setup: (...args: TSetupArgs) => TColumns
@@ -85,7 +85,8 @@ export function defineColumns<TSetupArgs extends any[], TColumns extends Columns
85
85
  },
86
86
  },
87
87
  setup(props) {
88
- const bodyCellRenderers = config.body(props.item as TBodyItem) ?? ({} as TBodyRenderers)
88
+ const bodyCellRenderers =
89
+ config.body(toReactive(computed(() => props.item)) as TBodyItem) ?? ({} as TBodyRenderers)
89
90
 
90
91
  return () =>
91
92
  visibleColumnIds.value.map(columnId => {
@@ -0,0 +1,21 @@
1
+ import type { ActionItem } from '@core/components/menu/VtsActionsMenu.vue'
2
+ import VtsActionCell from '@core/components/table/cells/VtsActionCell.vue'
3
+ import { defineColumn } from '@core/packages/table/define-column'
4
+ import type { ButtonIconConfig } from '@core/tables/column-definitions/button-icon-column.ts'
5
+ import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
6
+ import type { HeaderConfig } from '@core/tables/types.ts'
7
+ import { h, toValue } from 'vue'
8
+
9
+ export type { ActionItem }
10
+
11
+ export const useActionColumn = defineColumn((config: HeaderConfig & Partial<ButtonIconConfig>) => ({
12
+ renderHead: () => renderHeadCell(config.headerIcon, config.headerLabel),
13
+ renderBody: (params: { onClick: () => void; actions?: ActionItem[] }) =>
14
+ h(VtsActionCell, {
15
+ buttonIcon: toValue(config.buttonIcon ?? 'fa:eye'),
16
+ buttonAccent: toValue(config.buttonAccent),
17
+ buttonSize: toValue(config.buttonSize),
18
+ actions: params.actions,
19
+ onClick: params.onClick,
20
+ }),
21
+ }))
@@ -7,9 +7,9 @@ import type { IconName } from '@core/icons'
7
7
  import { defineColumn } from '@core/packages/table/define-column'
8
8
  import { renderHeadCell } from '@core/tables/helpers/render-head-cell'
9
9
  import type { HeaderConfig } from '@core/tables/types.ts'
10
- import { h, toValue, type MaybeRefOrGetter } from 'vue'
10
+ import { h, type MaybeRefOrGetter, toValue } from 'vue'
11
11
 
12
- type ButtonIconConfig = {
12
+ export type ButtonIconConfig = {
13
13
  buttonIcon: MaybeRefOrGetter<IconName>
14
14
  buttonSize?: MaybeRefOrGetter<ButtonIconSize>
15
15
  buttonAccent?: MaybeRefOrGetter<ButtonIconAccent>
@@ -6,6 +6,6 @@ import type { HeaderConfig } from '@core/tables/types.ts'
6
6
  import { h } from 'vue'
7
7
 
8
8
  export const useTextColumn = defineColumn((config?: HeaderConfig) => ({
9
- renderHead: () => renderHeadCell(config?.headerIcon, config?.headerLabel),
9
+ renderHead: () => renderHeadCell(config?.headerIcon ?? 'fa:align-left', config?.headerLabel),
10
10
  renderBody: (content: string, props?: TextCellProps) => h(VtsTextCell, props, () => content),
11
11
  }))
@@ -1,9 +1,9 @@
1
1
  import { defineColumns } from '@core/packages/table/define-columns.ts'
2
+ import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
2
3
  import { useLinkColumn } from '@core/tables/column-definitions/link-column.ts'
3
4
  import { useLiteralColumn } from '@core/tables/column-definitions/literal-column.ts'
4
5
  import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
5
6
  import { useProgressBarColumn } from '@core/tables/column-definitions/progress-bar-column.ts'
6
- import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column.ts'
7
7
  import { useTruncatedTextColumn } from '@core/tables/column-definitions/truncated-text-column.ts'
8
8
  import { useI18n } from 'vue-i18n'
9
9
 
@@ -16,6 +16,6 @@ export const useVdiColumns = defineColumns(() => {
16
16
  usedSpace: useProgressBarColumn({ headerLabel: () => t('used-space') }),
17
17
  size: useNumberColumn({ headerLabel: () => t('size') }),
18
18
  format: useLiteralColumn({ headerLabel: () => t('format') }),
19
- selectItem: useSelectItemColumn(),
19
+ actions: useActionColumn({}),
20
20
  }
21
21
  })
@@ -1,8 +1,8 @@
1
1
  import { defineColumns } from '@core/packages/table/define-columns.ts'
2
+ import { useActionColumn } from '@core/tables/column-definitions/action-column.ts'
2
3
  import { useAddressColumn } from '@core/tables/column-definitions/address-column.ts'
3
4
  import { useLinkColumn } from '@core/tables/column-definitions/link-column'
4
5
  import { useNumberColumn } from '@core/tables/column-definitions/number-column.ts'
5
- import { useSelectItemColumn } from '@core/tables/column-definitions/select-item-column'
6
6
  import { useStatusColumn } from '@core/tables/column-definitions/status-column.ts'
7
7
  import { useTextColumn } from '@core/tables/column-definitions/text-column.ts'
8
8
  import { useI18n } from 'vue-i18n'
@@ -18,6 +18,6 @@ export const useVifColumns = defineColumns(() => {
18
18
  macAddresses: useAddressColumn({ headerLabel: () => t('mac-addresses') }),
19
19
  mtu: useNumberColumn({ headerLabel: () => t('mtu') }),
20
20
  lockingMode: useTextColumn({ headerLabel: () => t('locking-mode') }),
21
- selectItem: useSelectItemColumn(),
21
+ actions: useActionColumn({}),
22
22
  }
23
23
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xen-orchestra/web-core",
3
3
  "type": "module",
4
- "version": "0.49.0",
4
+ "version": "0.50.0",
5
5
  "private": false,
6
6
  "exports": {
7
7
  "./*": {
@@ -22,12 +22,12 @@
22
22
  "@vueuse/math": "^13.0.0",
23
23
  "@vueuse/router": "^13.0.0",
24
24
  "@vueuse/shared": "^13.0.0",
25
- "complex-matcher": "^1.1.0",
25
+ "complex-matcher": "^1.1.1",
26
26
  "d3-time-format": "^4.1.0",
27
27
  "echarts": "^5.6.0",
28
28
  "human-format": "^1.2.1",
29
29
  "iterable-backoff": "^0.1.0",
30
- "lodash-es": "^4.17.21",
30
+ "lodash-es": "^4.18.0",
31
31
  "ndjson-readablestream": "^1.3.0",
32
32
  "placement.js": "^1.0.0-beta.5",
33
33
  "simple-icons": "^14.14.0",