bfg-common 1.4.368 → 1.4.369

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.
@@ -80,13 +80,19 @@ const networkDetailsHeadline = computed<string>(() =>
80
80
  )
81
81
 
82
82
  const dataNetwork = computed(() => {
83
+ // TODO надо потом все поменять когда будет заприсы
83
84
  return [
84
85
  {
85
86
  vm_name: 'vm-horizon-1',
86
87
  network_adapter: 'Network adapter 1',
87
88
  source_network: 'VM-VLAN105',
88
89
  used_by: '1 VMs / 1 Network adapters',
89
- destination_network: ['VM Network 1', 'VM-VLAN105', 'VM Network 2'],
90
+ destination_network: [
91
+ { text: 'VM Network 1', value: 'VM Network 1' },
92
+ { text: 'VM-VLAN105', value: 'VM-VLAN105' },
93
+ { text: 'VM Network 2', value: 'VM Network 2' },
94
+ { text: `${localization.value.common.browse}...`, value: 'browser' },
95
+ ],
90
96
  },
91
97
  ]
92
98
  })
@@ -22,7 +22,7 @@
22
22
  v-model="item.data.value"
23
23
  data-id="network-select"
24
24
  :disabled="item.data.disabled"
25
- @change="onSelect(item.data)"
25
+ @change="onSelectNetwork(item.data)"
26
26
  @click.stop
27
27
  >
28
28
  <option
@@ -35,6 +35,13 @@
35
35
  </span>
36
36
  </template>
37
37
  </atoms-table-data-grid>
38
+
39
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-network-location
40
+ :location-modal-is-show="isShowSelectNetworkModal"
41
+ :networks-table="props.networks"
42
+ @hide="onHideLocationModal"
43
+ @select="onSelectLocation"
44
+ />
38
45
  </div>
39
46
  </template>
40
47
 
@@ -45,6 +52,7 @@ import type {
45
52
  UI_I_HeadItem,
46
53
  UI_I_BodyItem,
47
54
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
55
+ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
48
56
  import type { UI_T_MigrateSelectNetwork } from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/models/types'
49
57
  import * as basicTable from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/config/basicTable'
50
58
  import * as advancedTable from '~/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable'
@@ -65,6 +73,14 @@ const pagination = ref<UI_I_Pagination>({
65
73
  pageSize: 100,
66
74
  })
67
75
 
76
+ const isShowSelectNetworkModal = ref<boolean>(false)
77
+ const onHideLocationModal = (): void => {
78
+ isShowSelectNetworkModal.value = false
79
+ }
80
+ const onSelectLocation = (_network: UI_I_NetworkTableItem): void => {
81
+ isShowSelectNetworkModal.value = false
82
+ }
83
+
68
84
  const table: any = {
69
85
  basic: basicTable,
70
86
  advanced: advancedTable,
@@ -77,7 +93,12 @@ const bodyItems = computed<UI_I_BodyItem[][]>(() => {
77
93
  return table[props.type].bodyItems(props.networks)
78
94
  })
79
95
 
80
- const onSelect = (data: any): void => {
96
+ const onSelectNetwork = (data: any): void => {
97
+ if (data?.value === 'browser') {
98
+ isShowSelectNetworkModal.value = true
99
+ return
100
+ }
101
+
81
102
  emits('select-network', data)
82
103
  }
83
104
  watch(
@@ -86,7 +107,7 @@ watch(
86
107
  const tableData = bodyItems.value[0]
87
108
  const itemKey = newValue === 'basic' ? 2 : 3
88
109
  const data = tableData[itemKey].data
89
- onSelect(data)
110
+ onSelectNetwork(data)
90
111
  },
91
112
  { deep: true, immediate: true }
92
113
  )
@@ -109,5 +130,4 @@ watch(
109
130
  }
110
131
  }
111
132
  }
112
-
113
133
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.368",
4
+ "version": "1.4.369",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",