bfg-common 1.5.199 → 1.5.201
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.
- package/CODE_STYLE.md +109 -109
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/atoms/tabs/VerticalTabs.vue +105 -105
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/context/lib/models/interfaces.ts +31 -31
- package/components/common/context/recursion/RecursionNew.vue +238 -238
- package/components/common/diagramMain/DiagramMain.vue +897 -897
- package/components/common/diagramMain/Header.vue +214 -214
- package/components/common/graph/GraphOld.vue +50 -50
- package/components/common/graph/graphNew/GraphNew.vue +194 -194
- package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +112 -112
- package/components/common/monitor/advanced/graphView/GraphView.vue +145 -178
- package/components/common/monitor/advanced/graphView/GraphViewOld.vue +56 -56
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +1040 -1040
- package/components/common/monitor/overview/OverviewOld.vue +139 -139
- package/components/common/pages/home/headline/Headline.vue +45 -45
- package/components/common/pages/home/headline/HeadlineOld.vue +42 -42
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/Widgets.vue +49 -49
- package/components/common/pages/home/widgets/WidgetsNew.vue +86 -86
- package/components/common/pages/home/widgets/WidgetsOld.vue +34 -34
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/Vms.vue +26 -26
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/packages/Packages.vue +208 -208
- package/components/common/pages/shortcuts/block/BlockOld.vue +68 -68
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/recursionTree/RecursionTree.vue +223 -223
- package/components/common/select/button/ButtonDropdown.vue +108 -108
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +72 -72
- package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
- package/components/common/vm/actions/add/folderTreeView/Old.vue +50 -50
- package/components/common/vm/actions/add/lib/config/steps.ts +263 -263
- package/components/common/vm/actions/clone/lib/config/steps.ts +291 -291
- package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +116 -116
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +337 -337
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +480 -480
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +319 -319
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +219 -219
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +100 -100
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +232 -232
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +168 -168
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +78 -78
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaOld.vue +50 -50
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +2 -17
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +190 -190
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/ModelNew.vue +237 -237
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +288 -304
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +375 -382
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +289 -289
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +151 -151
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationNew.vue +73 -73
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationOld.vue +83 -83
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +94 -94
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +205 -205
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +66 -66
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +62 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +76 -76
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +84 -84
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/OtherNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevicesNew.vue +40 -40
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +106 -106
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +81 -81
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +67 -67
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +149 -149
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +128 -128
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +39 -39
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
- package/components/common/vm/actions/common/lib/utils/capabilities.ts +52 -52
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +134 -134
- package/components/common/vm/actions/common/select/computeResource/treeView/New.vue +44 -44
- package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +118 -118
- package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
- package/components/common/vm/actions/common/select/createType/New.vue +84 -84
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/name/Name.vue +167 -167
- package/components/common/vm/actions/common/select/os/New.vue +122 -122
- package/components/common/vm/actions/common/select/os/Old.vue +152 -152
- package/components/common/vm/actions/common/select/os/Os.vue +139 -139
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +220 -220
- package/components/common/wizards/vm/migrate/lib/config/steps.ts +157 -157
- package/components/common/wizards/vm/migrate/lib/validations.ts +68 -68
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/TableView.vue +137 -137
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable.ts +91 -91
- package/composables/productNameLocal.ts +30 -30
- package/composables/useAppVersion.ts +21 -21
- package/package.json +2 -2
- package/plugins/date.ts +233 -233
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +383 -383
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +64 -64
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<form id="view-form" class="compact">
|
|
3
|
-
<div class="description">
|
|
4
|
-
{{ props.description }}
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<div class="flex-align-center" :title="localization.common.inDevelopment">
|
|
8
|
-
<label for="view">{{ localization.common.newView }}</label>
|
|
9
|
-
<input
|
|
10
|
-
id="view"
|
|
11
|
-
v-model="newViewLocal"
|
|
12
|
-
:disabled="isDisabled"
|
|
13
|
-
type="checkbox"
|
|
14
|
-
class="switch"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
</form>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
-
|
|
23
|
-
const props = defineProps<{
|
|
24
|
-
description: string
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
-
|
|
29
|
-
const newViewLocal = defineModel<boolean>()
|
|
30
|
-
|
|
31
|
-
const isDisabled = ref<boolean>(true)
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
window.tools = new Proxy(
|
|
34
|
-
{},
|
|
35
|
-
{
|
|
36
|
-
set: function (_obj, prop, value): boolean {
|
|
37
|
-
if (prop === 'isDev') isDisabled.value = !value
|
|
38
|
-
return true
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<style lang="scss" scoped>
|
|
45
|
-
.description {
|
|
46
|
-
margin-bottom: 10px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
label {
|
|
50
|
-
margin-right: 6px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
input[type='checkbox'] {
|
|
54
|
-
--active: var(--checkbox-value-active-color);
|
|
55
|
-
--active-inner: var(--checkbox-mark-color);
|
|
56
|
-
--border: var(--checkbox-mark-color);
|
|
57
|
-
--background: var(--checkbox-mark-background-color);
|
|
58
|
-
-webkit-appearance: none;
|
|
59
|
-
-moz-appearance: none;
|
|
60
|
-
height: 20px;
|
|
61
|
-
outline: none;
|
|
62
|
-
display: inline-block;
|
|
63
|
-
vertical-align: top;
|
|
64
|
-
position: relative;
|
|
65
|
-
margin: 0;
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
border: 1px solid var(--bc, var(--border));
|
|
68
|
-
background: var(--b, var(--background));
|
|
69
|
-
transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
|
|
70
|
-
&:after {
|
|
71
|
-
content: '';
|
|
72
|
-
display: block;
|
|
73
|
-
left: 0;
|
|
74
|
-
top: 0;
|
|
75
|
-
position: absolute;
|
|
76
|
-
transition: transform var(--d-t, 0.3s) var(--d-t-e, ease),
|
|
77
|
-
opacity var(--d-o, 0.2s);
|
|
78
|
-
}
|
|
79
|
-
&:checked {
|
|
80
|
-
--b: var(--active);
|
|
81
|
-
--bc: var(--active);
|
|
82
|
-
--d-o: 0.3s;
|
|
83
|
-
--d-t: 0.6s;
|
|
84
|
-
--d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
input[type='checkbox'] {
|
|
88
|
-
&.switch {
|
|
89
|
-
width: 35px;
|
|
90
|
-
border-radius: 11px;
|
|
91
|
-
&:after {
|
|
92
|
-
left: 2px;
|
|
93
|
-
top: 2px;
|
|
94
|
-
bottom: 2px;
|
|
95
|
-
border-radius: 50%;
|
|
96
|
-
width: 14px;
|
|
97
|
-
height: 14px;
|
|
98
|
-
border: 1px solid var(--bc, var(--border));
|
|
99
|
-
background: var(--ab, var(--border));
|
|
100
|
-
transform: translateX(var(--x, 0));
|
|
101
|
-
}
|
|
102
|
-
&:checked {
|
|
103
|
-
--ab: var(--active-inner);
|
|
104
|
-
--x: 14px;
|
|
105
|
-
}
|
|
106
|
-
&:disabled {
|
|
107
|
-
cursor: not-allowed;
|
|
108
|
-
opacity: 0.5;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<form id="view-form" class="compact">
|
|
3
|
+
<div class="description">
|
|
4
|
+
{{ props.description }}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div class="flex-align-center" :title="localization.common.inDevelopment">
|
|
8
|
+
<label for="view">{{ localization.common.newView }}</label>
|
|
9
|
+
<input
|
|
10
|
+
id="view"
|
|
11
|
+
v-model="newViewLocal"
|
|
12
|
+
:disabled="isDisabled"
|
|
13
|
+
type="checkbox"
|
|
14
|
+
class="switch"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</form>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
description: string
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
+
|
|
29
|
+
const newViewLocal = defineModel<boolean>()
|
|
30
|
+
|
|
31
|
+
const isDisabled = ref<boolean>(true)
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
window.tools = new Proxy(
|
|
34
|
+
{},
|
|
35
|
+
{
|
|
36
|
+
set: function (_obj, prop, value): boolean {
|
|
37
|
+
if (prop === 'isDev') isDisabled.value = !value
|
|
38
|
+
return true
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss" scoped>
|
|
45
|
+
.description {
|
|
46
|
+
margin-bottom: 10px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
label {
|
|
50
|
+
margin-right: 6px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
input[type='checkbox'] {
|
|
54
|
+
--active: var(--checkbox-value-active-color);
|
|
55
|
+
--active-inner: var(--checkbox-mark-color);
|
|
56
|
+
--border: var(--checkbox-mark-color);
|
|
57
|
+
--background: var(--checkbox-mark-background-color);
|
|
58
|
+
-webkit-appearance: none;
|
|
59
|
+
-moz-appearance: none;
|
|
60
|
+
height: 20px;
|
|
61
|
+
outline: none;
|
|
62
|
+
display: inline-block;
|
|
63
|
+
vertical-align: top;
|
|
64
|
+
position: relative;
|
|
65
|
+
margin: 0;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
border: 1px solid var(--bc, var(--border));
|
|
68
|
+
background: var(--b, var(--background));
|
|
69
|
+
transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
|
|
70
|
+
&:after {
|
|
71
|
+
content: '';
|
|
72
|
+
display: block;
|
|
73
|
+
left: 0;
|
|
74
|
+
top: 0;
|
|
75
|
+
position: absolute;
|
|
76
|
+
transition: transform var(--d-t, 0.3s) var(--d-t-e, ease),
|
|
77
|
+
opacity var(--d-o, 0.2s);
|
|
78
|
+
}
|
|
79
|
+
&:checked {
|
|
80
|
+
--b: var(--active);
|
|
81
|
+
--bc: var(--active);
|
|
82
|
+
--d-o: 0.3s;
|
|
83
|
+
--d-t: 0.6s;
|
|
84
|
+
--d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
input[type='checkbox'] {
|
|
88
|
+
&.switch {
|
|
89
|
+
width: 35px;
|
|
90
|
+
border-radius: 11px;
|
|
91
|
+
&:after {
|
|
92
|
+
left: 2px;
|
|
93
|
+
top: 2px;
|
|
94
|
+
bottom: 2px;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
width: 14px;
|
|
97
|
+
height: 14px;
|
|
98
|
+
border: 1px solid var(--bc, var(--border));
|
|
99
|
+
background: var(--ab, var(--border));
|
|
100
|
+
transform: translateX(var(--x, 0));
|
|
101
|
+
}
|
|
102
|
+
&:checked {
|
|
103
|
+
--ab: var(--active-inner);
|
|
104
|
+
--x: 14px;
|
|
105
|
+
}
|
|
106
|
+
&:disabled {
|
|
107
|
+
cursor: not-allowed;
|
|
108
|
+
opacity: 0.5;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
@@ -1,178 +1,145 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="chartsView">
|
|
3
|
-
<common-monitor-advanced-graph-view-new
|
|
4
|
-
v-if="isNewView"
|
|
5
|
-
:loading="props.loading"
|
|
6
|
-
:is-loading="isLoading"
|
|
7
|
-
:chart-data="chartData"
|
|
8
|
-
:chart="chart"
|
|
9
|
-
:chart-helper="chartHelper"
|
|
10
|
-
:export-type="props.export"
|
|
11
|
-
:selected-row="props.selectedRow"
|
|
12
|
-
/>
|
|
13
|
-
<common-monitor-advanced-graph-view-old
|
|
14
|
-
v-else
|
|
15
|
-
:loading="props.loading"
|
|
16
|
-
:is-loading="isLoading"
|
|
17
|
-
:chart-data="chartData"
|
|
18
|
-
:chart="chart"
|
|
19
|
-
:chart-helper="chartHelper"
|
|
20
|
-
:export-type="props.export"
|
|
21
|
-
:selected-row="props.selectedRow"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script setup lang="ts">
|
|
27
|
-
import type {
|
|
28
|
-
I_LineGraph,
|
|
29
|
-
I_SeriesLine,
|
|
30
|
-
} from 'bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
31
|
-
import { useDebounceFn, useElementSize } from '@vueuse/core'
|
|
32
|
-
import { graphDataFunc } from 'bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
|
|
33
|
-
import { format } from 'date-fns'
|
|
34
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
-
|
|
36
|
-
const props = defineProps<{
|
|
37
|
-
loading: boolean
|
|
38
|
-
data: I_SeriesLine | null
|
|
39
|
-
export: string
|
|
40
|
-
selectedRow: number[]
|
|
41
|
-
darkMode: boolean
|
|
42
|
-
language: string
|
|
43
|
-
selectedChartType: string
|
|
44
|
-
}>()
|
|
45
|
-
const emits = defineEmits<{
|
|
46
|
-
(event: 'open-advanced-page'): void
|
|
47
|
-
}>()
|
|
48
|
-
|
|
49
|
-
const { $store, $formattedDatetime, $getDateFormat }: any = useNuxtApp()
|
|
50
|
-
|
|
51
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
52
|
-
|
|
53
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
54
|
-
|
|
55
|
-
const isLoading = ref<boolean>(true)
|
|
56
|
-
|
|
57
|
-
const chartData = ref<I_LineGraph | null>(null)
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
newValue
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
{ immediate: true }
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
watch(width, (newValue) => {
|
|
150
|
-
if (newValue) startChart()
|
|
151
|
-
|
|
152
|
-
if (!chart.value?.isResizing) return
|
|
153
|
-
|
|
154
|
-
chart.value.setSize(1, chart.chartHeight)
|
|
155
|
-
|
|
156
|
-
if (isFullScreen.value) {
|
|
157
|
-
chart.value.setSize(window.innerWidth, chart.chartHeight)
|
|
158
|
-
return
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
setTimeout(() => {
|
|
162
|
-
chart.value.setSize(newValue, chart.chartHeight)
|
|
163
|
-
}, 1000)
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
const exportType = ref<string>('')
|
|
167
|
-
watch(
|
|
168
|
-
() => props.export,
|
|
169
|
-
(newValue) => {
|
|
170
|
-
if (!newValue) return
|
|
171
|
-
|
|
172
|
-
exportType.value = newValue
|
|
173
|
-
},
|
|
174
|
-
{ immediate: true }
|
|
175
|
-
)
|
|
176
|
-
</script>
|
|
177
|
-
|
|
178
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="chartsView">
|
|
3
|
+
<common-monitor-advanced-graph-view-new
|
|
4
|
+
v-if="isNewView"
|
|
5
|
+
:loading="props.loading"
|
|
6
|
+
:is-loading="isLoading"
|
|
7
|
+
:chart-data="chartData"
|
|
8
|
+
:chart="chart"
|
|
9
|
+
:chart-helper="chartHelper"
|
|
10
|
+
:export-type="props.export"
|
|
11
|
+
:selected-row="props.selectedRow"
|
|
12
|
+
/>
|
|
13
|
+
<common-monitor-advanced-graph-view-old
|
|
14
|
+
v-else
|
|
15
|
+
:loading="props.loading"
|
|
16
|
+
:is-loading="isLoading"
|
|
17
|
+
:chart-data="chartData"
|
|
18
|
+
:chart="chart"
|
|
19
|
+
:chart-helper="chartHelper"
|
|
20
|
+
:export-type="props.export"
|
|
21
|
+
:selected-row="props.selectedRow"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import type {
|
|
28
|
+
I_LineGraph,
|
|
29
|
+
I_SeriesLine,
|
|
30
|
+
} from 'bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
31
|
+
import { useDebounceFn, useElementSize } from '@vueuse/core'
|
|
32
|
+
import { graphDataFunc } from 'bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
|
|
33
|
+
import { format } from 'date-fns'
|
|
34
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
+
|
|
36
|
+
const props = defineProps<{
|
|
37
|
+
loading: boolean
|
|
38
|
+
data: I_SeriesLine | null
|
|
39
|
+
export: string
|
|
40
|
+
selectedRow: number[]
|
|
41
|
+
darkMode: boolean
|
|
42
|
+
language: string
|
|
43
|
+
selectedChartType: string
|
|
44
|
+
}>()
|
|
45
|
+
const emits = defineEmits<{
|
|
46
|
+
(event: 'open-advanced-page'): void
|
|
47
|
+
}>()
|
|
48
|
+
|
|
49
|
+
const { $store, $formattedDatetime, $getDateFormat }: any = useNuxtApp()
|
|
50
|
+
|
|
51
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
52
|
+
|
|
53
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
54
|
+
|
|
55
|
+
const isLoading = ref<boolean>(true)
|
|
56
|
+
|
|
57
|
+
const chartData = ref<I_LineGraph | null>(null)
|
|
58
|
+
|
|
59
|
+
const chart = ref<any>(null)
|
|
60
|
+
const chartHelper = ref<number>(0)
|
|
61
|
+
|
|
62
|
+
const chartCallback = (newValue: any): void => {
|
|
63
|
+
newValue && (chart.value = newValue)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const newTabCallback = (newValue: boolean): void => {
|
|
67
|
+
newValue && emits('open-advanced-page')
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
watch(
|
|
71
|
+
chart,
|
|
72
|
+
(newValue) => {
|
|
73
|
+
isLoading.value = !newValue?.hasLoaded
|
|
74
|
+
},
|
|
75
|
+
{ immediate: true, deep: true }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
let dateFormat = ''
|
|
79
|
+
|
|
80
|
+
const chartsView = ref(null)
|
|
81
|
+
const { width } = useElementSize(chartsView)
|
|
82
|
+
|
|
83
|
+
const startChart = useDebounceFn(() => {
|
|
84
|
+
if (!props.data || !width.value) return
|
|
85
|
+
|
|
86
|
+
chartData.value = graphDataFunc({
|
|
87
|
+
fullScreenCallBack: () => ({}),
|
|
88
|
+
format,
|
|
89
|
+
graphData: props.data,
|
|
90
|
+
isDarkMode: props.darkMode,
|
|
91
|
+
localization: localization.value,
|
|
92
|
+
disabledTitle: isNewView.value,
|
|
93
|
+
disabledExportButton: !isNewView.value,
|
|
94
|
+
disabledLegends: false,
|
|
95
|
+
graphType: props.selectedChartType,
|
|
96
|
+
width: Math.floor(width.value),
|
|
97
|
+
chartCallBack: chartCallback,
|
|
98
|
+
formattedDatetime: $formattedDatetime,
|
|
99
|
+
formatDate: dateFormat,
|
|
100
|
+
isNewView: isNewView.value,
|
|
101
|
+
isShowLinkNewWindow: true,
|
|
102
|
+
newTabCallBack: newTabCallback,
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
chartHelper.value++
|
|
106
|
+
}, 1000)
|
|
107
|
+
|
|
108
|
+
watch(
|
|
109
|
+
() => props.data,
|
|
110
|
+
(newValue) => {
|
|
111
|
+
if (!newValue) {
|
|
112
|
+
isLoading.value = true
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
startChart()
|
|
117
|
+
},
|
|
118
|
+
{ immediate: true }
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
watch(
|
|
122
|
+
() => props.darkMode,
|
|
123
|
+
() => {
|
|
124
|
+
startChart()
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
watch(
|
|
129
|
+
() => props.language,
|
|
130
|
+
() => {
|
|
131
|
+
dateFormat = $getDateFormat(props.language)
|
|
132
|
+
startChart()
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
watch(
|
|
137
|
+
() => props.selectedChartType,
|
|
138
|
+
() => {
|
|
139
|
+
startChart()
|
|
140
|
+
},
|
|
141
|
+
{ immediate: true }
|
|
142
|
+
)
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style scoped lang="scss"></style>
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="advanced-graph-container">
|
|
3
|
-
<div v-if="props.isLoading" class="graphic-loader-block">
|
|
4
|
-
<div class="spinner"></div>
|
|
5
|
-
<p>{{ localization.inventoryMonitor.retrievingData }}...</p>
|
|
6
|
-
</div>
|
|
7
|
-
<template v-if="!props.loading && props.chartData">
|
|
8
|
-
<common-graph
|
|
9
|
-
:chart="props.chart"
|
|
10
|
-
:data="props.chartData"
|
|
11
|
-
:update="props.chartHelper"
|
|
12
|
-
:export-type="props.exportType"
|
|
13
|
-
:selected-row="props.selectedRow"
|
|
14
|
-
/>
|
|
15
|
-
</template>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
import type { I_LineGraph } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
21
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
-
|
|
23
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
24
|
-
|
|
25
|
-
const props = defineProps<{
|
|
26
|
-
loading: boolean
|
|
27
|
-
isLoading: boolean
|
|
28
|
-
chartData: I_LineGraph | null
|
|
29
|
-
chart: any
|
|
30
|
-
chartHelper: number
|
|
31
|
-
exportType: string
|
|
32
|
-
selectedRow: number[]
|
|
33
|
-
}>()
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style scoped lang="scss">
|
|
37
|
-
.advanced-graph-container {
|
|
38
|
-
position: relative;
|
|
39
|
-
min-height: 400px;
|
|
40
|
-
|
|
41
|
-
.graphic-loader-block {
|
|
42
|
-
background-color: var(--loader-bg-color);
|
|
43
|
-
height: 100%;
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: 0;
|
|
50
|
-
left: 0;
|
|
51
|
-
right: 0;
|
|
52
|
-
bottom: 0;
|
|
53
|
-
z-index: var(--z-fixed);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="advanced-graph-container">
|
|
3
|
+
<div v-if="props.isLoading" class="graphic-loader-block">
|
|
4
|
+
<div class="spinner"></div>
|
|
5
|
+
<p>{{ localization.inventoryMonitor.retrievingData }}...</p>
|
|
6
|
+
</div>
|
|
7
|
+
<template v-if="!props.loading && props.chartData">
|
|
8
|
+
<common-graph
|
|
9
|
+
:chart="props.chart"
|
|
10
|
+
:data="props.chartData"
|
|
11
|
+
:update="props.chartHelper"
|
|
12
|
+
:export-type="props.exportType"
|
|
13
|
+
:selected-row="props.selectedRow"
|
|
14
|
+
/>
|
|
15
|
+
</template>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import type { I_LineGraph } from '~/node_modules/bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
21
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
+
|
|
23
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
24
|
+
|
|
25
|
+
const props = defineProps<{
|
|
26
|
+
loading: boolean
|
|
27
|
+
isLoading: boolean
|
|
28
|
+
chartData: I_LineGraph | null
|
|
29
|
+
chart: any
|
|
30
|
+
chartHelper: number
|
|
31
|
+
exportType: string
|
|
32
|
+
selectedRow: number[]
|
|
33
|
+
}>()
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style scoped lang="scss">
|
|
37
|
+
.advanced-graph-container {
|
|
38
|
+
position: relative;
|
|
39
|
+
min-height: 400px;
|
|
40
|
+
|
|
41
|
+
.graphic-loader-block {
|
|
42
|
+
background-color: var(--loader-bg-color);
|
|
43
|
+
height: 100%;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
bottom: 0;
|
|
53
|
+
z-index: var(--z-fixed);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
</style>
|