bfg-common 1.4.476 → 1.4.479

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.
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <common-pages-home-widgets-new
3
+ v-if="isNewView"
4
+ :vms="vms"
5
+ :vms-all="vmsAll"
6
+ :hosts="hosts"
7
+ :hosts-all="hostsAll"
8
+ :alerts="alerts || []"
9
+ :services="services || []"
10
+ ></common-pages-home-widgets-new>
11
+
12
+ <common-pages-home-widgets-old
13
+ v-else
14
+ :vms="vms"
15
+ :vms-all="vmsAll"
16
+ :hosts="hosts"
17
+ :hosts-all="hostsAll"
18
+ :alerts="alerts || []"
19
+ :services="services || []"
20
+ ></common-pages-home-widgets-old>
21
+ </template>
22
+
23
+ <script lang="ts" setup>
24
+ import type {
25
+ UI_I_Alert,
26
+ UI_I_HomeInfo,
27
+ UI_I_Hosts,
28
+ UI_I_Vms,
29
+ UI_I_Service,
30
+ } from '~/components/common/home/lib/models/interfaces'
31
+
32
+ const props = defineProps<{
33
+ homeInfo: UI_I_HomeInfo
34
+ }>()
35
+
36
+ const { $store }: any = useNuxtApp()
37
+
38
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
39
+
40
+ const vms = computed<UI_I_Vms>(() => props.homeInfo.vms || {})
41
+
42
+ const hosts = computed<UI_I_Hosts>(() => props.homeInfo.hosts || {})
43
+ const vmsAll = computed<number>(
44
+ () => vms.value.powered_on + vms.value.powered_off + vms.value.suspended || 0
45
+ )
46
+ const hostsAll = computed<number>(
47
+ () =>
48
+ hosts.value.connected +
49
+ hosts.value.maintenance +
50
+ hosts.value.disconnected || 0
51
+ )
52
+ const alerts = computed<UI_I_Alert[]>(() => props.homeInfo.alerts || 0)
53
+ const services = computed<UI_I_Service[]>(() => props.homeInfo.services || 0)
54
+ </script>
55
+
56
+ <style lang="scss" scoped></style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div class="clr-row">
3
+ <common-pages-home-widgets-vms :vms="vms" :vms-all="vmsAll" />
4
+
5
+ <common-pages-home-widgets-hosts :hosts="hosts" :hosts-all="hostsAll" />
6
+
7
+ <common-pages-home-widgets-warnings :alerts="alerts || []" />
8
+
9
+ <common-pages-home-widgets-services :services="services || []" />
10
+ </div>
11
+ </template>
12
+
13
+ <script lang="ts" setup>
14
+ import type {
15
+ UI_I_Alert,
16
+ UI_I_Hosts,
17
+ UI_I_Vms,
18
+ UI_I_Service,
19
+ } from '~/components/common/home/lib/models/interfaces'
20
+
21
+ const props = defineProps<{
22
+ vms: UI_I_Vms
23
+ hosts: UI_I_Hosts
24
+ vmsAll: number
25
+ hostsAll: number
26
+ alerts: UI_I_Alert[]
27
+ services: UI_I_Service[]
28
+ }>()
29
+ </script>
30
+
31
+ <style lang="scss" scoped></style>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div class="clr-row">
3
+ <common-pages-home-widgets-vms :vms="props.vms" :vms-all="props.vmsAll" />
4
+
5
+ <common-pages-home-widgets-hosts
6
+ :hosts="props.hosts"
7
+ :hosts-all="props.hostsAll"
8
+ />
9
+
10
+ <common-pages-home-widgets-warnings :alerts="props.alerts" />
11
+
12
+ <common-pages-home-widgets-services :services="props.services" />
13
+ </div>
14
+ </template>
15
+
16
+ <script lang="ts" setup>
17
+ import type {
18
+ UI_I_Alert,
19
+ UI_I_Hosts,
20
+ UI_I_Vms,
21
+ UI_I_Service,
22
+ } from '~/components/common/home/lib/models/interfaces'
23
+
24
+ const props = defineProps<{
25
+ vms: UI_I_Vms
26
+ hosts: UI_I_Hosts
27
+ vmsAll: number
28
+ hostsAll: number
29
+ alerts: UI_I_Alert[]
30
+ services: UI_I_Service[]
31
+ }>()
32
+ </script>
33
+
34
+ <style lang="scss" scoped></style>
@@ -6,7 +6,7 @@
6
6
  <common-pages-home-widgets-hosts-old
7
7
  v-else
8
8
  :hosts="props.hosts"
9
- :hostsAll="props.hostsAll"
9
+ :hosts-all="props.hostsAll"
10
10
  ></common-pages-home-widgets-hosts-old>
11
11
  </template>
12
12
 
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <common-pages-home-widgets-services-new
3
+ v-if="isNewView"
4
+ ></common-pages-home-widgets-services-new>
5
+
6
+ <common-pages-home-widgets-services-old
7
+ v-else
8
+ :services="props.services"
9
+ ></common-pages-home-widgets-services-old>
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ import type { UI_I_Service } from '~/components/common/home/lib/models/interfaces'
14
+
15
+ const props = defineProps<{
16
+ services: UI_I_Service[]
17
+ }>()
18
+
19
+ const { $store }: any = useNuxtApp()
20
+
21
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
22
+ </script>
23
+
24
+ <style lang="scss" scoped></style>
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <div></div>
3
+ </template>
4
+
5
+ <script lang="ts" setup>
6
+ </script>
7
+
8
+ <style lang="scss" scoped>
9
+
10
+ </style>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <div class="clr-col-md-6 clr-col-sm-12">
3
+ <div class="entity-status">
4
+ <common-pages-home-card
5
+ :title="localization.common.services"
6
+ :count="props.services.length"
7
+ icon-name="icon-content-libraries"
8
+ class="most-alerts"
9
+ >
10
+ <common-home-services-table :data-table="props.services" />
11
+ </common-pages-home-card>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script lang="ts" setup>
17
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
18
+ import type { UI_I_Service } from '~/components/common/home/lib/models/interfaces'
19
+
20
+ const props = defineProps<{
21
+ services: UI_I_Service[]
22
+ }>()
23
+
24
+ const localization = computed<UI_I_Localization>(() => useLocal())
25
+ </script>
26
+
27
+ <style lang="scss" scoped></style>
@@ -6,7 +6,7 @@
6
6
  <common-pages-home-widgets-vms-old
7
7
  v-else
8
8
  :vms="props.vms"
9
- :vmsAll="props.vmsAll"
9
+ :vms-all="props.vmsAll"
10
10
  ></common-pages-home-widgets-vms-old>
11
11
  </template>
12
12
 
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <common-pages-home-widgets-warnings-new
3
+ v-if="isNewView"
4
+ ></common-pages-home-widgets-warnings-new>
5
+
6
+ <common-pages-home-widgets-warnings-old
7
+ v-else
8
+ :alerts="props.alerts"
9
+ ></common-pages-home-widgets-warnings-old>
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ import type { UI_I_Alert } from '~/components/common/home/lib/models/interfaces'
14
+
15
+ const props = defineProps<{
16
+ alerts: UI_I_Alert[]
17
+ }>()
18
+
19
+ const { $store }: any = useNuxtApp()
20
+
21
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
22
+ </script>
23
+
24
+ <style lang="scss" scoped></style>
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <div></div>
3
+ </template>
4
+
5
+ <script lang="ts" setup>
6
+ </script>
7
+
8
+ <style lang="scss" scoped>
9
+
10
+ </style>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="clr-col-md-6 clr-col-sm-12">
3
+ <div class="entity-status">
4
+ <common-pages-home-card
5
+ :title="localization.home.objectsWithMostAlerts"
6
+ :count="props.alerts.length"
7
+ icon-name="vsphere-icon-datastore"
8
+ class="most-alerts"
9
+ >
10
+ <common-home-alerts-table
11
+ :data-table="props.alerts"
12
+ @select-node-of-tree="emits('select-node-of-tree')"
13
+ />
14
+ </common-pages-home-card>
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <script lang="ts" setup>
20
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
21
+ import type { UI_I_Alert } from '~/components/common/home/lib/models/interfaces'
22
+
23
+ const props = defineProps<{
24
+ alerts: UI_I_Alert[]
25
+ }>()
26
+ const emits = defineEmits<{
27
+ (event: 'select-node-of-tree'): void
28
+ }>()
29
+
30
+ const localization = computed<UI_I_Localization>(() => useLocal())
31
+ </script>
32
+
33
+ <style lang="scss" scoped></style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.476",
4
+ "version": "1.4.479",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",