bfg-common 1.5.500 → 1.5.502

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 (126) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/img/icons/icons-sprite-dark-2.svg +2 -2
  3. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-dark-4.svg +10 -9
  5. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  6. package/assets/img/icons/icons-sprite-light-2.svg +3 -3
  7. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  8. package/assets/img/icons/icons-sprite-light-4.svg +10 -9
  9. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  10. package/assets/localization/local_be.json +4 -0
  11. package/assets/localization/local_en.json +5 -1
  12. package/assets/localization/local_hy.json +4 -0
  13. package/assets/localization/local_kk.json +4 -0
  14. package/assets/localization/local_ru.json +4 -0
  15. package/assets/localization/local_zh.json +4 -0
  16. package/components/atoms/TheIcon3.vue +50 -50
  17. package/components/atoms/collapse/CollapseNav.vue +170 -170
  18. package/components/atoms/perPage/PerPage.vue +58 -58
  19. package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
  20. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  21. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  22. package/components/common/backup/storage/actions/add/Add.vue +251 -251
  23. package/components/common/backup/storage/actions/add/lib/utils.ts +62 -62
  24. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  25. package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
  26. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  27. package/components/common/diagramMain/port/Port.vue +580 -580
  28. package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
  29. package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
  30. package/components/common/pages/backups/Backups.vue +54 -61
  31. package/components/common/pages/backups/BackupsOld.vue +80 -0
  32. package/components/common/pages/backups/DetailView.vue +52 -52
  33. package/components/common/pages/backups/backupsNew/BackupsNew.vue +355 -0
  34. package/components/common/pages/backups/backupsNew/contextMenuView/ContextMenuView.vue +101 -0
  35. package/components/common/pages/backups/backupsNew/contextMenuView/lib/config/contextMenuItems.ts +29 -0
  36. package/components/common/pages/backups/backupsNew/lib/models/interfaces.ts +12 -0
  37. package/components/common/pages/backups/backupsNew/lib/utils/contextMenu.ts +29 -0
  38. package/components/common/pages/backups/backupsNew/lib/utils/details.ts +30 -0
  39. package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
  40. package/components/common/pages/backups/modals/Modals.vue +243 -243
  41. package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -29
  42. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  43. package/components/common/pages/backups/modals/createBackup/datastores/tableView/TableView.vue +95 -95
  44. package/components/common/pages/backups/modals/createBackup/general/General.vue +141 -141
  45. package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +12 -12
  46. package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
  47. package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
  48. package/components/common/pages/backups/modals/restore/disks/Disks.vue +27 -27
  49. package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/table.ts +117 -117
  50. package/components/common/pages/backups/modals/restore/name/Name.vue +166 -166
  51. package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
  52. package/components/common/pages/backups/modals/restore/networks/Networks.vue +67 -67
  53. package/components/common/pages/backups/modals/restore/networks/table/Table.vue +214 -214
  54. package/components/common/pages/backups/modals/restore/types/lib/config/typeOptions.ts +25 -25
  55. package/components/common/pages/backups/tools/Tools.vue +75 -75
  56. package/components/common/pages/backups/tools/lib/config/tabs.ts +37 -36
  57. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  58. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  59. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  60. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  61. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  62. package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
  63. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  64. package/components/common/select/radio/RadioGroup.vue +137 -137
  65. package/components/common/spiceConsole/Drawer.vue +392 -392
  66. package/components/common/spiceConsole/SpiceConsole.vue +184 -184
  67. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  68. package/components/common/tools/Actions.vue +207 -207
  69. package/components/common/treeView/TreeView.vue +52 -52
  70. package/components/common/vm/actions/add/Add.vue +889 -889
  71. package/components/common/vm/actions/add/New.vue +691 -691
  72. package/components/common/vm/actions/add/Old.vue +410 -410
  73. package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +85 -85
  74. package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
  75. package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
  76. package/components/common/vm/actions/clone/Clone.vue +861 -861
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +368 -368
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  80. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  81. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +99 -99
  82. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  83. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  84. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  85. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  86. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  87. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  88. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
  89. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  90. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  91. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  92. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  93. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +143 -143
  94. package/components/common/vm/actions/common/select/computeResource/New.vue +184 -184
  95. package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +131 -131
  96. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  97. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  98. package/components/common/vm/actions/common/select/name/Name.vue +176 -176
  99. package/components/common/vm/actions/common/select/name/New.vue +221 -221
  100. package/components/common/vm/actions/common/select/name/Old.vue +121 -121
  101. package/components/common/vm/actions/common/select/name/lib/models/interfaces.ts +4 -4
  102. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  103. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  104. package/components/common/vm/actions/common/select/storage/new/New.vue +320 -320
  105. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  106. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  107. package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
  108. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  109. package/components/common/vm/actions/register/Register.vue +283 -283
  110. package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
  111. package/components/common/wizards/datastore/add/Add.vue +228 -228
  112. package/components/common/wizards/datastore/add/lib/utils.ts +93 -93
  113. package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
  114. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  115. package/composables/useAppVersion.ts +21 -21
  116. package/composables/useLocal.ts +6 -6
  117. package/composables/useLocalCommon.ts +39 -39
  118. package/package.json +2 -2
  119. package/plugins/date.ts +233 -233
  120. package/plugins/panelStates.ts +70 -70
  121. package/plugins/text.ts +59 -59
  122. package/public/spice-console/lib/images/bitmap.js +203 -203
  123. package/public/spice-console/network/spicechannel.js +440 -440
  124. package/public/spice-console/run.js +210 -210
  125. package/store/main/mutations.ts +7 -7
  126. package/store/main/state.ts +7 -7
@@ -1,79 +1,79 @@
1
- <template>
2
- <Teleport to="body">
3
- <common-layout-the-header-help-menu-about-new
4
- v-if="isNewView"
5
- :title="title"
6
- :subtitle="subtitle"
7
- :about-heading-text="aboutHeadingText"
8
- :about-desc-one="aboutDesc1"
9
- :about-desc-second="aboutDesc2"
10
- :project-name="props.projectName"
11
- :url="companyWebSitePath"
12
- @hide="emits('hide')"
13
- />
14
-
15
- <common-layout-the-header-help-menu-about-old
16
- v-else
17
- :title="title"
18
- :subtitle="subtitle"
19
- :about-heading-text="aboutHeadingText"
20
- :about-desc-one="aboutDesc1"
21
- :about-desc-second="aboutDesc2"
22
- :project-name="props.projectName"
23
- :url="companyWebSitePath"
24
- @hide="emits('hide')"
25
- />
26
- </Teleport>
27
- </template>
28
-
29
- <script lang="ts" setup>
30
- import type { UI_I_Localization } from '~/lib/models/interfaces'
31
-
32
- const props = defineProps<{
33
- version: string
34
- projectName: string
35
- }>()
36
- const emits = defineEmits<{
37
- (event: 'hide'): void
38
- }>()
39
-
40
- const localization = computed<UI_I_Localization>(() => useLocal())
41
- const { $store }: any = useNuxtApp()
42
- const config = useRuntimeConfig()
43
-
44
- const companyName = computed<string>(
45
- () => config.public[`COMPANY_NAME_${useEnvLanguage()}`]
46
- )
47
- const brandName = computed<string>(
48
- () => config.public[`TRADEMARK_${useEnvLanguage()}`]
49
- )
50
-
51
- const companyWebSitePath = ref<string>(config.public.SUPPORT_SITE)
52
-
53
- const title = computed<string>(() => `${brandName.value}® ${props.projectName}`)
54
- const subtitle = computed<string>(() =>
55
- localization.value.layout.aboutWebClientVersion
56
- .replace('{0}', props.projectName)
57
- .replace('{1}', props.version)
58
- )
59
-
60
- const aboutHeadingText = computed<string>(() =>
61
- localization.value.layout.aboutHeading.replace(
62
- '{companyName}',
63
- companyName.value
64
- ).replace(
65
- '{year}',
66
- new Date().getFullYear() + ''
67
- )
68
- )
69
-
70
- const aboutDesc = computed<string[]>(() =>
71
- localization.value.layout.aboutDesc
72
- .replaceAll('{companyName}', companyName.value)
73
- .replaceAll('{trademark}', brandName.value).split('{url}')
74
- )
75
- const aboutDesc1 = computed<string>(() => aboutDesc.value[0])
76
- const aboutDesc2 = computed<string>(() => aboutDesc.value[1])
77
-
78
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
79
- </script>
1
+ <template>
2
+ <Teleport to="body">
3
+ <common-layout-the-header-help-menu-about-new
4
+ v-if="isNewView"
5
+ :title="title"
6
+ :subtitle="subtitle"
7
+ :about-heading-text="aboutHeadingText"
8
+ :about-desc-one="aboutDesc1"
9
+ :about-desc-second="aboutDesc2"
10
+ :project-name="props.projectName"
11
+ :url="companyWebSitePath"
12
+ @hide="emits('hide')"
13
+ />
14
+
15
+ <common-layout-the-header-help-menu-about-old
16
+ v-else
17
+ :title="title"
18
+ :subtitle="subtitle"
19
+ :about-heading-text="aboutHeadingText"
20
+ :about-desc-one="aboutDesc1"
21
+ :about-desc-second="aboutDesc2"
22
+ :project-name="props.projectName"
23
+ :url="companyWebSitePath"
24
+ @hide="emits('hide')"
25
+ />
26
+ </Teleport>
27
+ </template>
28
+
29
+ <script lang="ts" setup>
30
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
31
+
32
+ const props = defineProps<{
33
+ version: string
34
+ projectName: string
35
+ }>()
36
+ const emits = defineEmits<{
37
+ (event: 'hide'): void
38
+ }>()
39
+
40
+ const localization = computed<UI_I_Localization>(() => useLocal())
41
+ const { $store }: any = useNuxtApp()
42
+ const config = useRuntimeConfig()
43
+
44
+ const companyName = computed<string>(
45
+ () => config.public[`COMPANY_NAME_${useEnvLanguage()}`]
46
+ )
47
+ const brandName = computed<string>(
48
+ () => config.public[`TRADEMARK_${useEnvLanguage()}`]
49
+ )
50
+
51
+ const companyWebSitePath = ref<string>(config.public.SUPPORT_SITE)
52
+
53
+ const title = computed<string>(() => `${brandName.value}® ${props.projectName}`)
54
+ const subtitle = computed<string>(() =>
55
+ localization.value.layout.aboutWebClientVersion
56
+ .replace('{0}', props.projectName)
57
+ .replace('{1}', props.version)
58
+ )
59
+
60
+ const aboutHeadingText = computed<string>(() =>
61
+ localization.value.layout.aboutHeading.replace(
62
+ '{companyName}',
63
+ companyName.value
64
+ ).replace(
65
+ '{year}',
66
+ new Date().getFullYear() + ''
67
+ )
68
+ )
69
+
70
+ const aboutDesc = computed<string[]>(() =>
71
+ localization.value.layout.aboutDesc
72
+ .replaceAll('{companyName}', companyName.value)
73
+ .replaceAll('{trademark}', brandName.value).split('{url}')
74
+ )
75
+ const aboutDesc1 = computed<string>(() => aboutDesc.value[0])
76
+ const aboutDesc2 = computed<string>(() => aboutDesc.value[1])
77
+
78
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
79
+ </script>
@@ -1,79 +1,79 @@
1
- <template>
2
- <Teleport to="body">
3
- <atoms-modal :title="props.title" show width="864px" test-id="about-modal">
4
- <template #modalHeader>
5
- <div class="flex-align-center">
6
- <h3 class="modal-title">{{ brandName }}® {{ props.projectName }}</h3>
7
- <span class="separator" />
8
- <h4 class="secondary-title">
9
- {{ props.subtitle }}
10
- </h4>
11
- </div>
12
- <button id="about-modal-button-close" class="close">
13
- <atoms-the-icon
14
- data-id="about-modal-button-close-icon"
15
- class="close-icon"
16
- name="close"
17
- @click="() => emits('hide')"
18
- />
19
- </button>
20
- </template>
21
-
22
- <template #modalBody>
23
- <div class="about-vsphere-dialog-legal-section">
24
- <p>{{ props.aboutHeadingText }}</p>
25
- <p>{{ localization.layout.aboutSubtitle }}</p>
26
- </div>
27
-
28
- <div class="about-vsphere-dialog-legal-section description">
29
- {{ props.aboutDescOne }}<a
30
- id="about-description-link"
31
- :href="url"
32
- data-id="about-description-link"
33
- target="_blank"
34
- >{{ props.url }}</a
35
- >{{ props.aboutDescSecond }}
36
- </div>
37
- </template>
38
-
39
- <template #modalFooter>
40
- <span></span>
41
- </template>
42
- </atoms-modal>
43
- </Teleport>
44
- </template>
45
-
46
- <script lang="ts" setup>
47
- import type { UI_I_Localization } from '~/lib/models/interfaces'
48
-
49
- const props = defineProps<{
50
- title: string
51
- subtitle: string
52
- aboutHeadingText: string
53
- aboutDescOne: string
54
- aboutDescSecond: string
55
- projectName: string
56
- url: string
57
- }>()
58
- const emits = defineEmits<{
59
- (event: 'hide'): void
60
- }>()
61
-
62
- const localization = computed<UI_I_Localization>(() => useLocal())
63
- const config = useRuntimeConfig()
64
-
65
- const brandName = computed<string>(
66
- () => config.public[`TRADEMARK_${useEnvLanguage()}`]
67
- )
68
- </script>
69
-
70
- <style lang="scss" scoped>
71
- .modal-title {
72
- color: var(--main-color-mode);
73
- }
74
- .description {
75
- padding-top: 10px;
76
- font-size: 13px;
77
- line-height: 19px;
78
- }
79
- </style>
1
+ <template>
2
+ <Teleport to="body">
3
+ <atoms-modal :title="props.title" show width="864px" test-id="about-modal">
4
+ <template #modalHeader>
5
+ <div class="flex-align-center">
6
+ <h3 class="modal-title">{{ brandName }}® {{ props.projectName }}</h3>
7
+ <span class="separator" />
8
+ <h4 class="secondary-title">
9
+ {{ props.subtitle }}
10
+ </h4>
11
+ </div>
12
+ <button id="about-modal-button-close" class="close">
13
+ <atoms-the-icon
14
+ data-id="about-modal-button-close-icon"
15
+ class="close-icon"
16
+ name="close"
17
+ @click="() => emits('hide')"
18
+ />
19
+ </button>
20
+ </template>
21
+
22
+ <template #modalBody>
23
+ <div class="about-vsphere-dialog-legal-section">
24
+ <p>{{ props.aboutHeadingText }}</p>
25
+ <p>{{ localization.layout.aboutSubtitle }}</p>
26
+ </div>
27
+
28
+ <div class="about-vsphere-dialog-legal-section description">
29
+ {{ props.aboutDescOne }}<a
30
+ id="about-description-link"
31
+ :href="url"
32
+ data-id="about-description-link"
33
+ target="_blank"
34
+ >{{ props.url }}</a
35
+ >{{ props.aboutDescSecond }}
36
+ </div>
37
+ </template>
38
+
39
+ <template #modalFooter>
40
+ <span></span>
41
+ </template>
42
+ </atoms-modal>
43
+ </Teleport>
44
+ </template>
45
+
46
+ <script lang="ts" setup>
47
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
48
+
49
+ const props = defineProps<{
50
+ title: string
51
+ subtitle: string
52
+ aboutHeadingText: string
53
+ aboutDescOne: string
54
+ aboutDescSecond: string
55
+ projectName: string
56
+ url: string
57
+ }>()
58
+ const emits = defineEmits<{
59
+ (event: 'hide'): void
60
+ }>()
61
+
62
+ const localization = computed<UI_I_Localization>(() => useLocal())
63
+ const config = useRuntimeConfig()
64
+
65
+ const brandName = computed<string>(
66
+ () => config.public[`TRADEMARK_${useEnvLanguage()}`]
67
+ )
68
+ </script>
69
+
70
+ <style lang="scss" scoped>
71
+ .modal-title {
72
+ color: var(--main-color-mode);
73
+ }
74
+ .description {
75
+ padding-top: 10px;
76
+ font-size: 13px;
77
+ line-height: 19px;
78
+ }
79
+ </style>
@@ -1,53 +1,45 @@
1
1
  <template>
2
- <div class="main-content-backups h-full overflow-hidden">
3
- <common-pages-backups-tools
4
- :project="props.project"
5
- :backups-count="backupsTree.length"
6
- :backups-loading="backupsLoading"
7
- :selected-node="selectedNode"
8
- :target-type="typeFromRoute"
9
- @select="onShowModal"
10
- />
11
-
12
- <atoms-loader-pre-loader
13
- v-show="backupsLoading"
14
- id="loader"
15
- :show="true"
16
- class="backups-loading w-full h-full flex items-center justify-center"
17
- test-id="backups-tree-spinner"
18
- />
19
- <div class="fill-parent w-full h-full">
20
- <div v-if="backupsTree.length" class="backup-view mt-1 flex w-full">
21
- <common-tree-view
22
- :loading="backupsLoading"
23
- :nodes="backupsTree"
24
- @select-node="onSelectNode"
25
- @show-nodes="onShowNodes"
26
- />
27
- <common-pages-backups-detail-view :detail="detailData" />
28
- </div>
29
- <div v-else class="empty-block flex justify-center items-center w-full">
30
- {{ localization.common.noBackupAvailable }}
31
- </div>
32
- </div>
33
- </div>
2
+ <common-pages-backups-backups-new
3
+ v-if="isNewView"
4
+ :backups-tree="props.backupsTree"
5
+ :backups-loading="props.backupsLoading"
6
+ :type-from-route="typeFromRoute"
7
+ :detail-data="detailData"
8
+ :create-backup-permission="createBackupPermission"
9
+ :restore-backup-permission="restoreBackupPermission"
10
+ :delete-backup-permission="deleteBackupPermission"
11
+ :delete-all-permission="deleteAllPermission"
12
+ @set-action="emits('set-action', $event)"
13
+ @select-node="onSelectNode"
14
+ @show-nodes="onShowNodes"
15
+ />
16
+ <common-pages-backups-old
17
+ v-else
18
+ :backups-tree="props.backupsTree"
19
+ :backups-loading="props.backupsLoading"
20
+ :selected-node="props.selectedNode"
21
+ :type-from-route="typeFromRoute"
22
+ :detail-data="detailData"
23
+ :create-backup-permission="createBackupPermission"
24
+ :restore-backup-permission="restoreBackupPermission"
25
+ :delete-backup-permission="deleteBackupPermission"
26
+ :delete-all-permission="deleteAllPermission"
27
+ @set-action="emits('set-action', $event)"
28
+ @select-node="onSelectNode"
29
+ @show-nodes="onShowNodes"
30
+ />
34
31
  </template>
35
32
 
36
33
  <script setup lang="ts">
37
34
  import type { UI_T_Project } from '~/lib/models/types'
38
- import type { UI_I_Localization } from '~/lib/models/interfaces'
39
35
  import type {
40
36
  UI_T_TargetType,
41
37
  UI_T_BackupActionType,
42
38
  } from '~/components/common/pages/backups/lib/models/types'
43
- import type {
44
- UI_I_Backup,
45
- UI_I_BackupsTreeNode,
46
- } from '~/components/common/pages/backups/lib/models/interfaces'
39
+ import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
47
40
 
48
41
  const props = defineProps<{
49
42
  project: UI_T_Project
50
- backups: UI_I_Backup[]
51
43
  backupsTree: UI_I_BackupsTreeNode[]
52
44
  backupsLoading: boolean
53
45
  selectedNode: UI_I_BackupsTreeNode | null
@@ -58,45 +50,46 @@ const emits = defineEmits<{
58
50
  (event: 'set-action', value: UI_T_BackupActionType): void
59
51
  }>()
60
52
 
61
- const localization = computed<UI_I_Localization>(() => useLocal())
62
- const { $recursion }: any = useNuxtApp()
53
+ const { $recursion, $store }: any = useNuxtApp()
54
+
55
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
63
56
 
64
57
  const typeFromRoute = computed<UI_T_TargetType>(
65
58
  () => useRoute().params.type.toString() as UI_T_TargetType
66
59
  )
67
60
 
61
+ const createBackupPermission = computed<string>(() =>
62
+ props.project === 'sphere' ? 'VirtualMachines.CreateBackup' : ''
63
+ )
64
+
65
+ const restoreBackupPermission = computed<string>(() =>
66
+ props.project === 'sphere' ? 'VirtualMachines.RestoreBackup' : ''
67
+ )
68
+
69
+ const deleteBackupPermission = computed<string>(() =>
70
+ props.project === 'sphere' ? 'VirtualMachines.DeleteBackup' : ''
71
+ )
72
+
73
+ const deleteAllPermission = computed<string>(() =>
74
+ props.project === 'sphere' ? 'VirtualMachines.DeleteBackups' : ''
75
+ )
76
+
68
77
  const detailData = computed<UI_I_BackupsTreeNode | null>(() => {
69
78
  const node =
70
79
  $recursion.find(props.backupsTree, true, 'isActive', 'nodes') || null
71
80
  return node?.type === 'backup' ? node : null
72
81
  })
73
82
 
83
+ const onShowNodes = (id: string | number): void => {
84
+ emits('show-nodes', id)
85
+ }
86
+
74
87
  const onSelectNode = (item: UI_I_BackupsTreeNode): void => {
75
88
  emits('select-node', item.id)
76
89
  if (item.type === 'group') {
77
90
  onShowNodes(item.id.toString())
78
91
  }
79
92
  }
80
- const onShowNodes = (id: string | number): void => {
81
- emits('show-nodes', id)
82
- }
83
-
84
- const onShowModal = (action: UI_T_BackupActionType): void => {
85
- emits('set-action', action)
86
- }
87
93
  </script>
88
94
 
89
- <style scoped lang="scss">
90
- .main-content-backups {
91
- padding: 10px 5px 10px 0;
92
-
93
- .fill-parent {
94
- overflow: visible;
95
-
96
- .backup-view {
97
- // TODO fix
98
- height: calc(90% - 24px);
99
- }
100
- }
101
- }
102
- </style>
95
+ <style scoped lang="scss"></style>
@@ -0,0 +1,80 @@
1
+ <template>
2
+ <div class="main-content-backups h-full overflow-hidden">
3
+ <common-pages-backups-tools
4
+ :backups-count="props.backupsTree.length"
5
+ :backups-loading="props.backupsLoading"
6
+ :selected-node="props.selectedNode"
7
+ :target-type="props.typeFromRoute"
8
+ :create-backup-permission="props.createBackupPermission"
9
+ :restore-backup-permission="props.restoreBackupPermission"
10
+ :delete-backup-permission="props.deleteBackupPermission"
11
+ :delete-all-permission="props.deleteAllPermission"
12
+ @select="emits('set-action', $event)"
13
+ />
14
+
15
+ <atoms-loader-pre-loader
16
+ v-show="props.backupsLoading"
17
+ id="loader"
18
+ class="backups-loading w-full h-full flex items-center justify-center"
19
+ test-id="backups-tree-spinner"
20
+ show
21
+ />
22
+ <div class="fill-parent w-full h-full">
23
+ <div v-if="props.backupsTree.length" class="backup-view mt-1 flex w-full">
24
+ <common-tree-view
25
+ :loading="props.backupsLoading"
26
+ :nodes="props.backupsTree"
27
+ @select-node="emits('select-node', $event)"
28
+ @show-nodes="emits('show-nodes', $event)"
29
+ />
30
+ <common-pages-backups-detail-view :detail="props.detailData" />
31
+ </div>
32
+ <div v-else class="empty-block flex justify-center items-center w-full">
33
+ {{ localization.common.noBackupAvailable }}
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
41
+ import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
42
+ import type {
43
+ UI_T_TargetType,
44
+ UI_T_BackupActionType,
45
+ } from '~/components/common/pages/backups/lib/models/types'
46
+
47
+ const props = defineProps<{
48
+ backupsTree: UI_I_BackupsTreeNode[]
49
+ backupsLoading: boolean
50
+ selectedNode: UI_I_BackupsTreeNode | null
51
+ typeFromRoute: UI_T_TargetType
52
+ detailData: UI_I_BackupsTreeNode | null
53
+ createBackupPermission: string
54
+ restoreBackupPermission: string
55
+ deleteBackupPermission: string
56
+ deleteAllPermission: string
57
+ }>()
58
+ const emits = defineEmits<{
59
+ (event: 'show-nodes', value: string | number): void
60
+ (event: 'set-action', value: UI_T_BackupActionType): void
61
+ (event: 'select-node', value: UI_I_BackupsTreeNode): void
62
+ }>()
63
+
64
+ const localization = computed<UI_I_Localization>(() => useLocal())
65
+ </script>
66
+
67
+ <style scoped lang="scss">
68
+ .main-content-backups {
69
+ padding: 10px 5px 10px 0;
70
+
71
+ .fill-parent {
72
+ overflow: visible;
73
+
74
+ .backup-view {
75
+ // TODO fix
76
+ height: calc(90% - 24px);
77
+ }
78
+ }
79
+ }
80
+ </style>
@@ -1,52 +1,52 @@
1
- <template>
2
- <div class="detail-view overflow-auto py-0 px-6">
3
- <table v-if="detailData" class="table table-noborder">
4
- <tbody>
5
- <tr>
6
- <td class="left">{{ localization.common.name }}</td>
7
- <td class="left backup-name-label">{{ detailData.name }}</td>
8
- </tr>
9
- <tr>
10
- <td class="left">{{ localization.common.description }}</td>
11
- <td class="left backup-name-label">{{ detailData.description }}</td>
12
- </tr>
13
- <tr>
14
- <td class="left">{{ localization.common.timestamp }}</td>
15
- <td class="left backup-name-label">{{ detailData.timestamp }}</td>
16
- </tr>
17
- </tbody>
18
- </table>
19
- </div>
20
- </template>
21
-
22
- <script setup lang="ts">
23
- import type { UI_I_Localization } from '~/lib/models/interfaces'
24
- import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
25
-
26
- const props = defineProps<{
27
- detail: UI_I_BackupsTreeNode | null
28
- }>()
29
-
30
- const localization = computed<UI_I_Localization>(() => useLocal())
31
-
32
- const detailData = ref<UI_I_BackupsTreeNode | null>(null)
33
- watch(
34
- () => props.detail,
35
- (newValue) => {
36
- detailData.value = newValue
37
- },
38
- { immediate: true, deep: true }
39
- )
40
- </script>
41
-
42
- <style scoped lang="scss">
43
- .detail-view {
44
- width: 50%;
45
-
46
- .table {
47
- .left:not(.backup-name-label) {
48
- width: 320px;
49
- }
50
- }
51
- }
52
- </style>
1
+ <template>
2
+ <div class="detail-view overflow-auto py-0 px-6">
3
+ <table v-if="detailData" class="table table-noborder">
4
+ <tbody>
5
+ <tr>
6
+ <td class="left">{{ localization.common.name }}</td>
7
+ <td class="left backup-name-label">{{ detailData.name }}</td>
8
+ </tr>
9
+ <tr>
10
+ <td class="left">{{ localization.common.description }}</td>
11
+ <td class="left backup-name-label">{{ detailData.description }}</td>
12
+ </tr>
13
+ <tr>
14
+ <td class="left">{{ localization.common.timestamp }}</td>
15
+ <td class="left backup-name-label">{{ detailData.timestamp }}</td>
16
+ </tr>
17
+ </tbody>
18
+ </table>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
24
+ import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
25
+
26
+ const props = defineProps<{
27
+ detail: UI_I_BackupsTreeNode | null
28
+ }>()
29
+
30
+ const localization = computed<UI_I_Localization>(() => useLocal())
31
+
32
+ const detailData = ref<UI_I_BackupsTreeNode | null>(null)
33
+ watch(
34
+ () => props.detail,
35
+ (newValue) => {
36
+ detailData.value = newValue
37
+ },
38
+ { immediate: true, deep: true }
39
+ )
40
+ </script>
41
+
42
+ <style scoped lang="scss">
43
+ .detail-view {
44
+ width: 50%;
45
+
46
+ .table {
47
+ .left:not(.backup-name-label) {
48
+ width: 320px;
49
+ }
50
+ }
51
+ }
52
+ </style>