bfg-common 1.5.43 → 1.5.45
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/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/scss/common/normalize.scss +339 -339
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +165 -165
- package/components/atoms/dropdown/dropdown/Dropdown.vue +168 -168
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/stack/StackBlock.vue +185 -185
- package/components/atoms/table/dataGrid/DataGrid.vue +1 -1
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +222 -222
- 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/atoms/tooltip/Signpost.vue +227 -227
- package/components/common/accordion/Recursion.vue +222 -222
- package/components/common/browse/BrowseNew.vue +237 -237
- package/components/common/browse/BrowseOld.vue +217 -217
- package/components/common/browse/blocks/contents/Files.vue +37 -37
- package/components/common/browse/blocks/contents/FilesOld.vue +72 -72
- package/components/common/browse/blocks/contents/filesNew/FilesNew.vue +96 -96
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/context/Context.vue +111 -111
- package/components/common/context/lib/models/interfaces.ts +31 -31
- package/components/common/context/recursion/Recursion.vue +87 -87
- package/components/common/context/recursion/RecursionNew.vue +238 -238
- package/components/common/context/recursion/RecursionOld.vue +228 -228
- package/components/common/details/DetailsItem.vue +109 -109
- package/components/common/diagramMain/DiagramMain.vue +897 -897
- package/components/common/diagramMain/Header.vue +214 -214
- package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
- package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +103 -103
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +112 -112
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +336 -336
- package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +311 -311
- package/components/common/modals/unsavedChanges/UnsavedChanges.vue +56 -56
- package/components/common/monitor/overview/OverviewOld.vue +139 -139
- package/components/common/pages/home/StatusContent.vue +49 -49
- 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/licensing/Licensing.vue +128 -0
- package/components/common/pages/licensing/lib/models/interfaces.ts +22 -0
- package/components/common/pages/licensing/lib/utils/validation.ts +29 -0
- package/components/common/pages/licensing/listView/ListView.vue +50 -0
- package/components/common/pages/licensing/listView/lib/config/list.ts +57 -0
- package/components/common/pages/licensing/listView/lib/models/interfaces.ts +5 -0
- package/components/common/pages/licensing/modals/assign/Assign.vue +247 -0
- package/components/common/pages/licensing/modals/assign/lib/config/tabsPannel.ts +17 -0
- package/components/common/pages/licensing/modals/assign/lib/models/interfaces.ts +5 -0
- package/components/common/pages/licensing/modals/assign/lib/utils/error.ts +25 -0
- package/components/common/pages/licensing/modals/assign/new/New.vue +216 -0
- package/components/common/pages/licensing/modals/assign/tableView/TableView.vue +193 -0
- package/components/common/pages/licensing/modals/assign/tableView/lib/config/table.ts +100 -0
- package/components/common/pages/licensing/modals/assign/tableView/lib/config/tableKeys.ts +10 -0
- package/components/common/pages/licensing/modals/assign/tableView/lib/models/interfaces.ts +9 -0
- package/components/common/pages/licensing/modals/assign/tableView/lib/models/types.ts +8 -0
- package/components/common/pages/packages/Packages.vue +208 -208
- package/components/common/pages/shortcuts/block/BlockNew.vue +96 -96
- package/components/common/pages/shortcuts/block/BlockOld.vue +68 -68
- package/components/common/portlets/customAttributes/Portlet.vue +667 -667
- package/components/common/portlets/tag/Portlet.vue +433 -433
- package/components/common/recursionTree/RecursionTree.vue +223 -223
- package/components/common/select/button/ButtonDropdown.vue +108 -108
- package/components/common/spiceConsole/Drawer.vue +370 -370
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/split/horizontal/HorizontalNew.vue +376 -376
- package/components/common/split/horizontal/HorizontalOld.vue +337 -337
- package/components/common/split/vertical/Vertical.vue +160 -160
- package/components/common/tools/Actions.vue +188 -188
- package/components/common/vm/actions/add/Add.vue +774 -774
- package/components/common/vm/actions/add/lib/config/steps.ts +247 -247
- package/components/common/vm/actions/clone/Clone.vue +798 -798
- package/components/common/vm/actions/clone/lib/config/steps.ts +291 -291
- package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +634 -634
- package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +116 -116
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +275 -275
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +274 -274
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +177 -177
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +698 -698
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +410 -410
- 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 +99 -99
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +117 -117
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +232 -232
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +164 -164
- 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 +70 -70
- 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 +338 -338
- 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/limit/Limit.vue +220 -220
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +368 -368
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +232 -232
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +250 -250
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/ModeOld.vue +56 -56
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/SharingNew.vue +44 -44
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +286 -286
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +124 -124
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/LocationOld.vue +134 -134
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/New.vue +63 -63
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +95 -95
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +69 -69
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressOld.vue +83 -83
- 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/DynamicDirectPathIoNew.vue +84 -84
- 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/NvidiaGrid.vue +41 -41
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +81 -81
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +84 -84
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +56 -56
- 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/videoCard/VideoCardNew.vue +104 -104
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +112 -112
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +54 -54
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +102 -102
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +75 -75
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +26 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +57 -57
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/FirmwareNew.vue +42 -42
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +25 -25
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +171 -171
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +50 -50
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +141 -141
- 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 +30 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapNew.vue +39 -39
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +102 -102
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordOld.vue +94 -94
- 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 +38 -38
- 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/createType/CreateType.vue +74 -74
- package/components/common/vm/actions/common/select/storage/Storage.vue +130 -130
- package/components/common/vm/actions/common/select/storage/StorageOld.vue +129 -129
- package/components/common/vm/actions/common/select/template/Template.vue +65 -65
- package/components/common/vm/actions/common/select/template/TemplateTreeView.vue +88 -88
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/datastore/add/lib/config/steps.ts +138 -138
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +60 -60
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +92 -92
- package/components/common/wizards/network/add/steps/SelectConnectionType.vue +105 -105
- package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +220 -220
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/components/common/wizards/vm/migrate/select/network/table/network/Network.vue +150 -150
- package/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable.ts +91 -91
- package/components/common/wizards/vm/migrate/select/priority/Priority.vue +43 -43
- package/composables/productNameLocal.ts +30 -30
- package/composables/useAppVersion.ts +21 -21
- package/package.json +1 -1
- package/plugins/date.ts +233 -233
- package/plugins/directives.ts +24 -24
- 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
@@ -0,0 +1,216 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="form">
|
3
|
+
<atoms-alert
|
4
|
+
v-show="errorMessage.length"
|
5
|
+
status="alert-danger"
|
6
|
+
:items="errorMessage"
|
7
|
+
test-id="name-alert"
|
8
|
+
@remove="errorMessage = []"
|
9
|
+
/>
|
10
|
+
|
11
|
+
<div class="block">
|
12
|
+
<label class="label font-weight-bold" for="new-license-key-input"
|
13
|
+
>{{ licenseKeyText }}
|
14
|
+
</label>
|
15
|
+
<input
|
16
|
+
id="new-license-key-input"
|
17
|
+
v-model.trim="licenseKey"
|
18
|
+
data-id="new-license-key-input"
|
19
|
+
type="text"
|
20
|
+
class="clr-col-lg-5 clr-col-md-5 clr-col-sm-5 clr-col-xs-5"
|
21
|
+
@blur="onValidate"
|
22
|
+
/>
|
23
|
+
<label for="license-upload" class="download-btn btn btn-link btn-sm">
|
24
|
+
<span class="vx-icon-import icon"></span>
|
25
|
+
</label>
|
26
|
+
<input
|
27
|
+
id="license-upload"
|
28
|
+
type="file"
|
29
|
+
class="license-upload"
|
30
|
+
@change="onUploadLicense"
|
31
|
+
/>
|
32
|
+
</div>
|
33
|
+
<div class="block">
|
34
|
+
<label class="label" for="new-license-name-input"
|
35
|
+
>{{ localization.license.licenseName }}
|
36
|
+
</label>
|
37
|
+
<input
|
38
|
+
id="new-license-name-input"
|
39
|
+
v-model="newLicenseLocal.name"
|
40
|
+
data-id="new-license-name-input"
|
41
|
+
type="text"
|
42
|
+
class="clr-col-lg-5 clr-col-md-5 clr-col-sm-5 clr-col-xs-5"
|
43
|
+
disabled
|
44
|
+
/>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div class="block-wrap">
|
48
|
+
<div class="block">
|
49
|
+
<label class="label">{{ localization.common.product }}</label>
|
50
|
+
<span>{{ newLicenseLocal.productName }}</span>
|
51
|
+
</div>
|
52
|
+
<div class="block">
|
53
|
+
<label class="label">{{ localization.common.productFeatures }}</label>
|
54
|
+
<atoms-the-icon
|
55
|
+
v-show="!!newLicenseLocal.features.length"
|
56
|
+
id="features-icon"
|
57
|
+
data-id="features-icon"
|
58
|
+
fill="#0072a3"
|
59
|
+
width="24px"
|
60
|
+
height="24px"
|
61
|
+
name="info-circle"
|
62
|
+
class="pointer"
|
63
|
+
@click.stop="isShowFeatures = !isShowFeatures"
|
64
|
+
/>
|
65
|
+
<Teleport to="body">
|
66
|
+
<atoms-tooltip-signpost
|
67
|
+
v-if="isShowFeatures"
|
68
|
+
elem-id="features-icon"
|
69
|
+
@hide="isShowFeatures = false"
|
70
|
+
>
|
71
|
+
<div class="flex-direction-column">
|
72
|
+
<span v-for="item in newLicenseLocal.features" :key="item">{{
|
73
|
+
item
|
74
|
+
}}</span>
|
75
|
+
</div>
|
76
|
+
</atoms-tooltip-signpost>
|
77
|
+
</Teleport>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
<div class="block-wrap">
|
81
|
+
<div class="block">
|
82
|
+
<label class="label">{{ localization.common.capacity }}</label>
|
83
|
+
<span>{{ newLicenseLocal.capacity }}</span>
|
84
|
+
</div>
|
85
|
+
<div class="block">
|
86
|
+
<label class="label">{{ localization.common.expires }}</label>
|
87
|
+
<span>{{ newLicenseLocal.licenseExpires }}</span>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
<div class="block-wrap">
|
91
|
+
<div class="block">
|
92
|
+
<label class="label">{{ localization.license.limits }}</label>
|
93
|
+
<atoms-the-icon
|
94
|
+
v-show="!!newLicenseLocal.limits.length"
|
95
|
+
id="limits-icon"
|
96
|
+
data-id="limits-icon"
|
97
|
+
fill="#0072a3"
|
98
|
+
width="24px"
|
99
|
+
height="24px"
|
100
|
+
name="info-circle"
|
101
|
+
class="pointer"
|
102
|
+
@click.stop="isShowLimits = !isShowLimits"
|
103
|
+
/>
|
104
|
+
<Teleport to="body">
|
105
|
+
<atoms-tooltip-signpost
|
106
|
+
v-if="isShowLimits"
|
107
|
+
elem-id="limits-icon"
|
108
|
+
@hide="isShowLimits = false"
|
109
|
+
>
|
110
|
+
<div class="flex-direction-column">
|
111
|
+
<span v-for="item in newLicenseLocal.limits" :key="item">{{
|
112
|
+
item
|
113
|
+
}}</span>
|
114
|
+
</div>
|
115
|
+
</atoms-tooltip-signpost>
|
116
|
+
</Teleport>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
</template>
|
121
|
+
<script lang="ts" setup>
|
122
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
123
|
+
import type { UI_I_NewSystemLicense } from '~/components/common/pages/licensing/lib/models/interfaces'
|
124
|
+
|
125
|
+
const newLicenseLocal = defineModel<UI_I_NewSystemLicense>('newLicenseData', {
|
126
|
+
required: true,
|
127
|
+
})
|
128
|
+
const licenseKey = defineModel<string>('licenseKey', { required: true })
|
129
|
+
const errorMessage = defineModel<string[]>('validationError', {
|
130
|
+
required: true,
|
131
|
+
})
|
132
|
+
|
133
|
+
const emits = defineEmits<{
|
134
|
+
(event: 'validate', value: string): void
|
135
|
+
}>()
|
136
|
+
|
137
|
+
const { $text }: any = useNuxtApp()
|
138
|
+
|
139
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
140
|
+
|
141
|
+
const isShowFeatures = ref<boolean>(false)
|
142
|
+
const isShowLimits = ref<boolean>(false)
|
143
|
+
|
144
|
+
const licenseKeyText = computed<string>(() =>
|
145
|
+
$text.toCapitalize(localization.value.license.licenseKey)
|
146
|
+
)
|
147
|
+
|
148
|
+
const onUploadLicense = (event: Event): void => {
|
149
|
+
const file = event.target?.files[0]
|
150
|
+
if (file) {
|
151
|
+
const reader = new FileReader()
|
152
|
+
reader.onload = (data: any): void => {
|
153
|
+
licenseKey.value = data.target.result
|
154
|
+
setTimeout(() => {
|
155
|
+
onValidate()
|
156
|
+
}, 0)
|
157
|
+
}
|
158
|
+
reader.readAsText(file)
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
const onValidate = (): void => {
|
163
|
+
if (!licenseKey.value) return
|
164
|
+
|
165
|
+
emits('validate', licenseKey.value)
|
166
|
+
}
|
167
|
+
</script>
|
168
|
+
<style lang="scss" scoped>
|
169
|
+
.form {
|
170
|
+
.block {
|
171
|
+
display: flex;
|
172
|
+
flex-direction: row;
|
173
|
+
align-items: center;
|
174
|
+
justify-content: flex-start;
|
175
|
+
padding: 0.3rem 0 0.3rem 0;
|
176
|
+
|
177
|
+
span {
|
178
|
+
width: 200px;
|
179
|
+
}
|
180
|
+
|
181
|
+
.label {
|
182
|
+
margin: 3px 0 5px 0;
|
183
|
+
letter-spacing: normal;
|
184
|
+
width: 210px;
|
185
|
+
border: none;
|
186
|
+
display: block;
|
187
|
+
|
188
|
+
font-size: 0.55rem;
|
189
|
+
font-weight: 500;
|
190
|
+
line-height: 0.9rem;
|
191
|
+
}
|
192
|
+
|
193
|
+
.download-btn {
|
194
|
+
max-width: 24px;
|
195
|
+
min-width: 24px;
|
196
|
+
padding: 0;
|
197
|
+
margin-left: 6px;
|
198
|
+
|
199
|
+
.icon {
|
200
|
+
width: 20px;
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
.license-upload {
|
205
|
+
display: none;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
.block-wrap {
|
210
|
+
display: flex;
|
211
|
+
flex-direction: row;
|
212
|
+
justify-content: flex-start;
|
213
|
+
gap: 250px;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
</style>
|
@@ -0,0 +1,193 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="data-table-view">
|
3
|
+
<div class="data-table-view-inner">
|
4
|
+
<atoms-table-data-grid
|
5
|
+
v-model:selected-row="selectedActiveKey"
|
6
|
+
v-model:page-size="pagination.pageSize"
|
7
|
+
v-model:page="pagination.page"
|
8
|
+
type="radio"
|
9
|
+
class="data-table"
|
10
|
+
test-id="licensing-assign-table"
|
11
|
+
:head-items="headItems"
|
12
|
+
:body-items="bodyItems"
|
13
|
+
:total-items="props.totalItems"
|
14
|
+
:total-pages="props.totalPages"
|
15
|
+
hide-page-size
|
16
|
+
server-off
|
17
|
+
with-info
|
18
|
+
:fill-width="false"
|
19
|
+
>
|
20
|
+
<template #icon="{ item }">
|
21
|
+
<span :class="['icon', item.data.iconClassName]" />
|
22
|
+
<span class="text-ellipsis" :title="item.text">
|
23
|
+
{{ item.text }}
|
24
|
+
</span>
|
25
|
+
<!-- <span v-if="item.id === selectedActiveKey && !item.data.text" />-->
|
26
|
+
</template>
|
27
|
+
<template v-if="activeLicense" #hiddenInfo>
|
28
|
+
<h3 class="hidden-info-head">{{ localization.common.limit }}</h3>
|
29
|
+
|
30
|
+
<div
|
31
|
+
v-for="item in activeLicense.limits"
|
32
|
+
:key="item"
|
33
|
+
class="hidden-info-body"
|
34
|
+
>
|
35
|
+
{{ item }}
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<h3 class="hidden-info-head">
|
39
|
+
{{ localization.common.productFeatures }}
|
40
|
+
</h3>
|
41
|
+
|
42
|
+
<div
|
43
|
+
v-for="(item, key) in activeLicense.features"
|
44
|
+
:key="`${item}${key}`"
|
45
|
+
class="hidden-info-body"
|
46
|
+
>
|
47
|
+
{{ item }}
|
48
|
+
</div>
|
49
|
+
</template>
|
50
|
+
</atoms-table-data-grid>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</template>
|
54
|
+
|
55
|
+
<script lang="ts" setup>
|
56
|
+
import type {
|
57
|
+
UI_I_HeadItem,
|
58
|
+
UI_I_BodyItem,
|
59
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
60
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
61
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
62
|
+
import type { UI_I_SystemLicense } from '~/components/common/pages/licensing/lib/models/interfaces'
|
63
|
+
import * as table from '~/components/common/pages/licensing/modals/assign/tableView/lib/config/table'
|
64
|
+
|
65
|
+
const selectedActiveKey = defineModel<string>('selectedActiveKey', {
|
66
|
+
required: true,
|
67
|
+
})
|
68
|
+
const pagination = defineModel<UI_I_Pagination>('pagination', {
|
69
|
+
required: true,
|
70
|
+
})
|
71
|
+
|
72
|
+
const props = defineProps<{
|
73
|
+
dataTable: UI_I_SystemLicense[]
|
74
|
+
totalItems: number
|
75
|
+
totalPages: number
|
76
|
+
}>()
|
77
|
+
|
78
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
79
|
+
|
80
|
+
const activeLicense = computed<UI_I_SystemLicense | null>(() => {
|
81
|
+
return (
|
82
|
+
props.dataTable.find((item) => item.id === selectedActiveKey.value) || null
|
83
|
+
)
|
84
|
+
})
|
85
|
+
|
86
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
87
|
+
table.headItems(localization.value)
|
88
|
+
)
|
89
|
+
|
90
|
+
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
91
|
+
watch(
|
92
|
+
() => props.dataTable,
|
93
|
+
(newValue) => {
|
94
|
+
if (!newValue?.length) {
|
95
|
+
bodyItems.value = []
|
96
|
+
return
|
97
|
+
}
|
98
|
+
|
99
|
+
bodyItems.value = table.bodyItems(newValue)
|
100
|
+
|
101
|
+
// TODO рассмотреть(после монтирования компонента найти активную лицензию)
|
102
|
+
nextTick(() => {
|
103
|
+
const active = newValue.find((license) => license.isActive)
|
104
|
+
if (active) {
|
105
|
+
selectedActiveKey.value = active.id
|
106
|
+
}
|
107
|
+
})
|
108
|
+
},
|
109
|
+
{ deep: true, immediate: true }
|
110
|
+
)
|
111
|
+
</script>
|
112
|
+
|
113
|
+
<style lang="scss" scoped>
|
114
|
+
.data-table-view {
|
115
|
+
overflow: hidden;
|
116
|
+
height: inherit;
|
117
|
+
margin-bottom: 10px;
|
118
|
+
|
119
|
+
&-inner {
|
120
|
+
height: 290px;
|
121
|
+
}
|
122
|
+
|
123
|
+
:deep(.data-table) {
|
124
|
+
height: inherit;
|
125
|
+
|
126
|
+
.datagrid-outer-wrapper {
|
127
|
+
height: inherit;
|
128
|
+
}
|
129
|
+
|
130
|
+
.active .double-arrow {
|
131
|
+
margin: 2px 0;
|
132
|
+
height: 0.6rem;
|
133
|
+
transform: rotate(90deg);
|
134
|
+
width: 0.6rem;
|
135
|
+
fill: var(--modal-bg-color);
|
136
|
+
}
|
137
|
+
|
138
|
+
.double-arrow {
|
139
|
+
margin: 2px 0;
|
140
|
+
height: 0.6rem;
|
141
|
+
width: 0.6rem;
|
142
|
+
transform: rotate(90deg);
|
143
|
+
fill: var(--global-font-color);
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
.hidden-info {
|
149
|
+
&-head {
|
150
|
+
font-size: 0.8rem;
|
151
|
+
color: var(--global-font-color2) !important;
|
152
|
+
line-height: 1.6rem;
|
153
|
+
}
|
154
|
+
|
155
|
+
&-body {
|
156
|
+
div {
|
157
|
+
color: var(--global-font-color2) !important;
|
158
|
+
line-height: 1.2rem;
|
159
|
+
font-size: 13px;
|
160
|
+
font-weight: 400;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
.signpost {
|
166
|
+
:deep(h3) {
|
167
|
+
font-size: 1rem;
|
168
|
+
color: var(--global-font-color);
|
169
|
+
line-height: 1.7rem;
|
170
|
+
}
|
171
|
+
|
172
|
+
div {
|
173
|
+
line-height: 1.2rem;
|
174
|
+
font-size: 13px;
|
175
|
+
font-weight: 400;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
.icon {
|
180
|
+
width: 16px;
|
181
|
+
height: 16px;
|
182
|
+
display: block;
|
183
|
+
background-size: 100% auto;
|
184
|
+
margin: 5px;
|
185
|
+
}
|
186
|
+
|
187
|
+
.vertical-divider {
|
188
|
+
width: 1px;
|
189
|
+
height: 22px;
|
190
|
+
background: #bbb;
|
191
|
+
margin: 2px 2px 0 -5px;
|
192
|
+
}
|
193
|
+
</style>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import type {
|
2
|
+
UI_I_HeadItem,
|
3
|
+
UI_I_BodyItem,
|
4
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
5
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
6
|
+
import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
7
|
+
import type { UI_I_SystemLicense} from "~/components/common/pages/licensing/lib/models/interfaces";
|
8
|
+
import type {
|
9
|
+
UI_I_LicenseData,
|
10
|
+
UI_I_HiddenTextIcon,
|
11
|
+
} from '~/components/common/pages/licensing/modals/assign/tableView/lib/models/interfaces'
|
12
|
+
import { licenseTableItemsKeys as tableKeys } from '~/components/common/pages/licensing/modals/assign/tableView/lib/config/tableKeys'
|
13
|
+
|
14
|
+
const getItems = (
|
15
|
+
localization: UI_I_Localization
|
16
|
+
): [string, boolean, string, string][] => {
|
17
|
+
const { $text }: any = useNuxtApp()
|
18
|
+
return [
|
19
|
+
['', true, '40px', tableKeys[0]],
|
20
|
+
[localization.license.license, true, '200px', tableKeys[1]],
|
21
|
+
[localization.license.licenseKey, true, '280px', tableKeys[2]],
|
22
|
+
[localization.common.product, true, '200px', tableKeys[3]],
|
23
|
+
[$text.toCapitalize(localization.common.usage), true, '120px', tableKeys[4]],
|
24
|
+
[localization.common.capacity, true, '200px', tableKeys[5]],
|
25
|
+
]
|
26
|
+
}
|
27
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
28
|
+
const result: UI_I_HeadItem[] = []
|
29
|
+
getItems(localization).forEach((item, i) => {
|
30
|
+
const col = i === 0 || i === 1 ? 'icon' : `col${i}`
|
31
|
+
result.push(
|
32
|
+
constructHeadItem(
|
33
|
+
col,
|
34
|
+
item[0],
|
35
|
+
i === 0 ? '' : item[3],
|
36
|
+
false,
|
37
|
+
item[2],
|
38
|
+
undefined,
|
39
|
+
item[3]
|
40
|
+
)
|
41
|
+
)
|
42
|
+
})
|
43
|
+
return result
|
44
|
+
}
|
45
|
+
export const bodyItems = (data: UI_I_SystemLicense[]): UI_I_BodyItem[][] => {
|
46
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
47
|
+
|
48
|
+
data.forEach((license: UI_I_SystemLicense) => {
|
49
|
+
const licenseData: UI_I_LicenseData = {
|
50
|
+
name: 'hidden-text-triangle',
|
51
|
+
iconClassName: `vx-icon-${license.licenseIcon}`
|
52
|
+
}
|
53
|
+
const hiddenTextIcon: UI_I_HiddenTextIcon = {
|
54
|
+
name: 'doubleArrows',
|
55
|
+
// text: license[tableKeys[0]],
|
56
|
+
text: '',
|
57
|
+
}
|
58
|
+
bodyItems.push([
|
59
|
+
{
|
60
|
+
key: 'icon',
|
61
|
+
text: '',
|
62
|
+
data: hiddenTextIcon,
|
63
|
+
id: license.id,
|
64
|
+
testId: `table-item-${license.id}`,
|
65
|
+
},
|
66
|
+
{
|
67
|
+
key: 'icon',
|
68
|
+
text: license[tableKeys[1]],
|
69
|
+
id: license.id,
|
70
|
+
testId: `table-item-${license.id}`,
|
71
|
+
data: licenseData,
|
72
|
+
},
|
73
|
+
{
|
74
|
+
key: 'col2',
|
75
|
+
text: license[tableKeys[2]],
|
76
|
+
id: license.id,
|
77
|
+
testId: `table-item-${license.id}`,
|
78
|
+
},
|
79
|
+
{
|
80
|
+
key: 'col3',
|
81
|
+
text: license[tableKeys[3]],
|
82
|
+
id: license.id,
|
83
|
+
testId: `table-item-${license.id}`,
|
84
|
+
},
|
85
|
+
{
|
86
|
+
key: 'col4',
|
87
|
+
text: license[tableKeys[4]],
|
88
|
+
id: license.id,
|
89
|
+
testId: `table-item-${license.id}`,
|
90
|
+
},
|
91
|
+
{
|
92
|
+
key: 'col5',
|
93
|
+
text: license[tableKeys[5]],
|
94
|
+
id: license.id,
|
95
|
+
testId: `table-item-${license.id}`,
|
96
|
+
},
|
97
|
+
])
|
98
|
+
})
|
99
|
+
return bodyItems
|
100
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { UI_T_LicenseTableItemsTuple } from '~/components/common/pages/licensing/modals/assign/tableView/lib/models/types'
|
2
|
+
|
3
|
+
export const licenseTableItemsKeys: UI_T_LicenseTableItemsTuple = [
|
4
|
+
'features',
|
5
|
+
'license',
|
6
|
+
'key',
|
7
|
+
'product',
|
8
|
+
'usage',
|
9
|
+
'capacity',
|
10
|
+
]
|