bfg-common 1.4.369 → 1.4.370

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.
@@ -8,6 +8,7 @@
8
8
  v-model="selectedSourceNetwork"
9
9
  :key="uniqueKey"
10
10
  :networks="dataNetwork"
11
+ :source-networks="sourceNetworks"
11
12
  :type="tableType"
12
13
  @select-network="onSelectNetwork"
13
14
  />
@@ -45,10 +46,13 @@
45
46
 
46
47
  <script lang="ts" setup>
47
48
  import type { UI_I_Localization } from '~/lib/models/interfaces'
49
+ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
48
50
  import type { UI_I_SelectNetworksFormLocal } from '~/components/common/wizards/vm/migrate/select/network/lib/models/interfaces'
49
51
 
50
52
  const model = defineModel<UI_I_SelectNetworksFormLocal>({ required: true })
53
+
51
54
  const localization = computed<UI_I_Localization>(() => useLocal())
55
+ const { $store }: any = useNuxtApp()
52
56
 
53
57
  const selectedSourceNetwork = ref<string | null>(null)
54
58
  const uniqueKey = ref<number>(0)
@@ -79,6 +83,25 @@ const networkDetailsHeadline = computed<string>(() =>
79
83
  )
80
84
  )
81
85
 
86
+ // TODO эти данные бутут приходить из апи все надо поменять
87
+ const sourceNetworks = computed<UI_I_NetworkTableItem[]>(() => [
88
+ {
89
+ id: 1,
90
+ name: 'VM Network 1',
91
+ net_bridge: 'VM Network 1',
92
+ },
93
+ {
94
+ id: 2,
95
+ name: 'VM-VLAN105',
96
+ net_bridge: 'VM-VLAN105',
97
+ },
98
+ {
99
+ id: 3,
100
+ name: 'VM Network 2',
101
+ net_bridge: 'VM Network 2',
102
+ },
103
+ ])
104
+
82
105
  const dataNetwork = computed(() => {
83
106
  // TODO надо потом все поменять когда будет заприсы
84
107
  return [
@@ -26,10 +26,10 @@
26
26
  @click.stop
27
27
  >
28
28
  <option
29
- v-for="option in item.data.option"
30
- :key="option"
31
- :value="option"
32
- :label="option"
29
+ v-for="(option, key) in item.data.option"
30
+ :key="key"
31
+ :value="option.value"
32
+ :label="option.text"
33
33
  />
34
34
  </select>
35
35
  </span>
@@ -38,7 +38,7 @@
38
38
 
39
39
  <common-vm-actions-common-customize-hardware-virtual-hardware-new-network-location
40
40
  :location-modal-is-show="isShowSelectNetworkModal"
41
- :networks-table="props.networks"
41
+ :networks-table="props.sourceNetworks"
42
42
  @hide="onHideLocationModal"
43
43
  @select="onSelectLocation"
44
44
  />
@@ -59,6 +59,7 @@ import * as advancedTable from '~/components/common/wizards/vm/migrate/select/ne
59
59
 
60
60
  const props = defineProps<{
61
61
  networks: UI_T_MigrateSelectNetwork[]
62
+ sourceNetworks: UI_I_NetworkTableItem[]
62
63
  type: 'basic' | 'advanced'
63
64
  }>()
64
65
  const emits = defineEmits<{
@@ -44,8 +44,8 @@ export const bodyItems = (
44
44
  sourceNetwork: network.source_network,
45
45
  disabled: false,
46
46
  value: network.destination_network.find(
47
- (item: string) => item === network.source_network
48
- ),
47
+ (item) => item.value === network.source_network
48
+ ).text,
49
49
  option: network.destination_network,
50
50
  }
51
51
 
@@ -42,8 +42,8 @@ export const bodyItems = (
42
42
  sourceNetwork: network.source_network,
43
43
  disabled: false,
44
44
  value: network.destination_network.find(
45
- (item) => item === network.source_network
46
- ),
45
+ (item) => item.value === network.source_network
46
+ ).text,
47
47
  option: network.destination_network,
48
48
  }
49
49
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.369",
4
+ "version": "1.4.370",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",