bfg-common 1.6.77 → 1.6.78
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/assets/localization/local_be.json +4461 -4213
- package/assets/localization/local_en.json +4466 -4217
- package/assets/localization/local_hy.json +4465 -4217
- package/assets/localization/local_kk.json +4464 -4216
- package/assets/localization/local_ru.json +4464 -4216
- package/assets/localization/local_zh.json +4462 -4214
- package/assets/scss/common/global.scss +11 -0
- package/assets/scss/common/normalize.scss +3 -0
- package/assets/scss/common/theme.scss +2 -2
- package/components/atoms/stack/StackBlock.vue +1 -1
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
- package/components/atoms/tooltip/TooltipError.vue +3 -0
- package/components/common/adapterManager/AdapterManager.vue +473 -473
- package/components/common/adapterManager/AdapterManagerNew.vue +86 -0
- package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
- package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -38
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
- package/components/common/adapterManager/lib/config/index.ts +19 -19
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
- package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
- package/components/common/adapterManager/ui/actions/bar/Bar.vue +2 -0
- package/components/common/adapterManager/ui/actions/bar/BarNew.vue +3 -2
- package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
- package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
- package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
- package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
- package/components/common/adapterManager/ui/table/Table.vue +88 -88
- package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
- package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
- package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -186
- package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
- package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
- package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
- package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
- package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
- package/components/common/certificate/Certificate.vue +6 -16
- package/components/common/certificate/{Info/Old.vue → CertificateInfo.vue} +34 -6
- package/components/common/certificate/{tools/Tools.vue → Tools.vue} +23 -18
- package/components/common/certificate/lib/config/tabsPannel.ts +22 -0
- package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +6 -0
- package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +219 -192
- package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +6 -4
- package/components/common/configure/physicalAdapters/buttons/Buttons.vue +1 -0
- package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +26 -1
- package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +30 -1
- package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +5 -0
- package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +19 -0
- package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +12 -1
- package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
- package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +12 -5
- package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +4 -1
- package/components/common/diagramMain/Diagram.vue +169 -85
- package/components/common/diagramMain/DiagramMain.vue +40 -10
- package/components/common/diagramMain/adapter/Adapter.vue +123 -123
- package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/adapter/Contents.vue +212 -212
- package/components/common/diagramMain/adapter/Lines.vue +81 -81
- package/components/common/diagramMain/adapter/block/Block.vue +27 -27
- package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
- package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
- package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
- package/components/common/diagramMain/header/Header.vue +49 -0
- package/components/common/diagramMain/header/HeaderNew.vue +155 -0
- package/components/common/diagramMain/{Header.vue → header/HeaderOld.vue} +78 -67
- package/components/common/diagramMain/highlights/Highlights.vue +151 -151
- package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
- package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
- package/components/common/diagramMain/lib/config/index.ts +81 -81
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/config/positions.ts +194 -194
- package/components/common/diagramMain/lib/models/enums.ts +44 -44
- package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +331 -331
- package/components/common/diagramMain/modals/Modals.vue +483 -479
- package/components/common/diagramMain/modals/UnsavedChangesModal.vue +32 -0
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +104 -102
- package/components/common/diagramMain/modals/editSettings/EditSettingsNew.vue +285 -0
- package/components/common/diagramMain/modals/editSettings/EditSettingsOld.vue +254 -0
- package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModal.vue +31 -0
- package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModalNew.vue +82 -0
- package/components/common/diagramMain/modals/editSettings/{ConfirmTeamingSettingsModal.vue → confirmTeamingSettingsModal/ConfirmTeamingSettingsModalOld.vue} +2 -5
- package/components/common/diagramMain/modals/editSettings/lib/config/config.ts +15 -0
- package/components/common/diagramMain/modals/editSettings/lib/models/interfaces.ts +6 -0
- package/components/common/diagramMain/modals/editSettings/lib/utils/utils.ts +177 -0
- package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModal.vue +137 -0
- package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModalNew.vue +91 -0
- package/components/common/diagramMain/modals/editSettings/{EditSettingsModal.vue → modal/EditSettingsModalOld.vue} +12 -51
- package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkProperties.vue +158 -0
- package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkPropertiesNew.vue +262 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{NetworkProperties.vue → networkProperties/NetworkPropertiesOld.vue} +12 -113
- package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettings.vue +192 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettingsNew.vue +388 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/{IpvFourSettings.vue → ipvFourSettings/IpvFourSettingsOld.vue} +11 -152
- package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortProperties.vue +139 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortPropertiesNew.vue +286 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/{PortProperties.vue → portProperties/PortPropertiesOld.vue} +12 -103
- package/components/common/diagramMain/modals/editSettings/tabs/security/Security.vue +209 -0
- package/components/common/diagramMain/modals/editSettings/tabs/security/SecurityNew.vue +233 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{Security.vue → security/SecurityOld.vue} +25 -48
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchProperties.vue +128 -0
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesNew.vue +235 -0
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesOld.vue +87 -0
- package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailover.vue +99 -0
- package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailoverNew.vue +319 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{TeamingFailover.vue → teamingFailover/TeamingFailoverOld.vue} +11 -48
- package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShaping.vue +173 -0
- package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShapingNew.vue +348 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{TrafficShaping.vue → trafficShaping/TrafficShapingOld.vue} +12 -134
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +43 -2
- package/components/common/diagramMain/modals/lib/config/index.ts +2 -1
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
- package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
- package/components/common/diagramMain/modals/lib/utils/index.ts +34 -4
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
- package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +106 -106
- package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
- package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
- package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
- package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +50 -50
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/network/Lines.vue +107 -107
- package/components/common/diagramMain/network/Network.vue +141 -141
- package/components/common/diagramMain/network/block/Block.vue +37 -37
- package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
- package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
- package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
- package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
- package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
- package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
- package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
- package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/diagramMain/skeleton/Header.vue +31 -0
- package/components/common/diagramMain/skeleton/Switch.vue +75 -0
- package/components/common/diagramMain/switch/Switch.vue +180 -180
- package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
- package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
- package/components/common/layout/theHeader/modals/reconnect/New.vue +38 -30
- package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +8 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/New.vue +4 -0
- package/components/common/layout/theHeader/userMenu/modals/preferences/Old.vue +9 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +11 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +7 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +8 -5
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +9 -5
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +5 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +9 -6
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +3 -1
- package/components/common/modals/Rename.vue +3 -1
- package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
- package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
- package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +4 -4
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +4 -4
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +184 -253
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +1 -1
- package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +9 -0
- package/components/common/pages/scheduledTasks/table/new/New.vue +12 -10
- package/components/common/pages/tasks/Tasks.vue +4 -1
- package/components/common/pages/tasks/table/Table.vue +25 -23
- package/components/common/readyToComplete/New.vue +1 -0
- package/components/common/split/horizontal/New.vue +1 -1
- package/components/common/split/horizontal/Old.vue +1 -1
- package/components/common/split/vertical/New.vue +42 -8
- package/components/common/split/vertical/Old.vue +31 -2
- package/components/common/split/vertical/Vertical.vue +4 -0
- package/components/common/tools/Actions.vue +7 -3
- package/components/common/tools/lib/models/interfaces.ts +1 -0
- package/components/common/vm/actions/add/New.vue +21 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +14 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/New.vue +5 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Old.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/New.vue +2 -0
- package/components/common/vm/actions/common/select/options/New.vue +14 -12
- package/components/common/vm/actions/common/select/options/Old.vue +16 -15
- package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +13 -15
- package/components/common/vm/actions/confirm/Confirm.vue +3 -0
- package/components/common/vm/actions/rename/Old.vue +1 -0
- package/components/common/vm/snapshots/DetailView.vue +6 -6
- package/components/common/wizards/datastore/add/New.vue +6 -0
- package/components/common/wizards/datastore/add/lib/config/steps.ts +1 -1
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
- package/components/common/wizards/network/add/Add.vue +13 -2
- package/components/common/wizards/network/add/AddNew.vue +22 -26
- package/components/common/wizards/network/add/lib/config/initialData.ts +6 -4
- package/components/common/wizards/network/add/lib/config/steps.ts +1 -1
- package/components/common/wizards/network/add/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
- package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue +5 -1
- package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +2 -8
- package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsOld.vue +3 -0
- package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +2 -8
- package/components/common/wizards/network/add/steps/portProperties/PortPropertiesOld.vue +6 -2
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +10 -3
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +4 -0
- package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +5 -1
- package/components/common/wizards/network/add/validations/common.ts +1 -1
- package/components/common/wizards/vm/migrate/New.vue +13 -3
- package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +5 -0
- package/components/common/wizards/vm/migrate/lib/config/steps.ts +3 -2
- package/components/common/wizards/vm/migrate/steps/computeResource/New.vue +2 -1
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +40 -21
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +340 -0
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +44 -14
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums.ts +4 -0
- package/components/common/wizards/vm/migrate/steps/priority/New.vue +7 -2
- package/components/common/wizards/vm/migrate/steps/selectStorage/New.vue +22 -7
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/New.vue +6 -0
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/New.vue +4 -1
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/lib/config/datastoreTable.ts +12 -16
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/New.vue +10 -5
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +16 -11
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +7 -1
- package/components/common/wizards/vm/migrate/steps/selectStorage/selectedPerDisk/New.vue +17 -10
- package/components/common/wizards/vm/migrate/steps/type/TypeNew.vue +1 -0
- package/components/common/wizards/vm/migrate/vmOrigin/New.vue +35 -15
- package/lib/models/store/tasks/enums.ts +3 -0
- package/lib/models/store/tasks/types.ts +7 -6
- package/package.json +2 -2
- package/plugins/directives.ts +3 -5
- package/public/spice-console/application/agent.js +18 -17
- package/store/tasks/actions.ts +26 -8
- package/store/tasks/mappers/recentTasks.ts +1 -0
- package/components/common/certificate/Info/Info.vue +0 -61
- package/components/common/certificate/Info/new/New.vue +0 -285
- package/components/common/certificate/Info/new/lib/config/index.ts +0 -59
- package/components/common/certificate/Info/new/lib/models/interfaces.ts +0 -3
- package/components/common/certificate/Info/new/lib/utils/index.ts +0 -10
- package/components/common/certificate/Old.vue +0 -27
- package/components/common/certificate/new/New.vue +0 -30
- package/components/common/certificate/new/Skeleton.vue +0 -155
- package/components/common/certificate/tools/New.vue +0 -48
- package/components/common/certificate/tools/Old.vue +0 -39
- package/components/common/certificate/tools/lib/config/tabsPannel.ts +0 -20
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +0 -164
package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShaping.vue
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="traffic-shaping">
|
|
3
|
+
<component
|
|
4
|
+
:is="currentComponent"
|
|
5
|
+
v-model="fieldsValues"
|
|
6
|
+
:is-switch="props.isSwitch"
|
|
7
|
+
:is-show-error-message="isShowErrorMessage"
|
|
8
|
+
:error-messages="props.errorMessages"
|
|
9
|
+
:flag-send-data="props.flagSendData"
|
|
10
|
+
@hide-error-message-alert="onHideErrorMessageAlert"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
17
|
+
import type {
|
|
18
|
+
UI_I_ModalsInitialData,
|
|
19
|
+
UI_I_TrafficShapingFields,
|
|
20
|
+
UI_I_EditSettingsErrorMessage,
|
|
21
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
22
|
+
import type { UI_T_TrafficShapingFieldName } from '~/components/common/diagramMain/lib/models/types'
|
|
23
|
+
import { trafficShapingFieldsInitialFunc } from '~/components/common/diagramMain/modals/lib/config'
|
|
24
|
+
|
|
25
|
+
const props = withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
isShowErrorMessageAlert: boolean | boolean[]
|
|
28
|
+
errorMessages: UI_I_EditSettingsErrorMessage
|
|
29
|
+
isSwitch: boolean
|
|
30
|
+
initialData?: UI_I_ModalsInitialData
|
|
31
|
+
hasErrorMessages?: boolean
|
|
32
|
+
flagSendData?: boolean
|
|
33
|
+
}>(),
|
|
34
|
+
{
|
|
35
|
+
initialData: () => ({}),
|
|
36
|
+
isSwitch: false,
|
|
37
|
+
hasErrorMessages: undefined,
|
|
38
|
+
flagSendData: false,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
const emits = defineEmits<{
|
|
43
|
+
(
|
|
44
|
+
event: 'change-error-messages',
|
|
45
|
+
errorMessage: string,
|
|
46
|
+
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
47
|
+
): void
|
|
48
|
+
(event: 'hide-error-message-alert'): void
|
|
49
|
+
(
|
|
50
|
+
event: 'change-edit-traffic-shaping-data',
|
|
51
|
+
trafficShapingData: UI_I_TrafficShapingFields
|
|
52
|
+
): void
|
|
53
|
+
}>()
|
|
54
|
+
|
|
55
|
+
const { $store }: any = useNuxtApp()
|
|
56
|
+
|
|
57
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
58
|
+
|
|
59
|
+
const currentComponent = computed(() =>
|
|
60
|
+
isNewView.value
|
|
61
|
+
? defineAsyncComponent(() => import('./TrafficShapingNew.vue'))
|
|
62
|
+
: defineAsyncComponent(() => import('./TrafficShapingOld.vue'))
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
66
|
+
|
|
67
|
+
const isShowErrorMessage = computed<boolean>(
|
|
68
|
+
() =>
|
|
69
|
+
props.hasErrorMessages &&
|
|
70
|
+
(isNewView.value
|
|
71
|
+
? props.isShowErrorMessageAlert[2]
|
|
72
|
+
: props.isShowErrorMessageAlert)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const fieldsValues = ref<UI_I_TrafficShapingFields>(
|
|
76
|
+
trafficShapingFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
const onHideErrorMessageAlert = (): void => emits('hide-error-message-alert')
|
|
80
|
+
|
|
81
|
+
const onChangeData = (data: UI_I_TrafficShapingFields) =>
|
|
82
|
+
emits('change-edit-traffic-shaping-data', data)
|
|
83
|
+
|
|
84
|
+
const messageTexts = (local: UI_I_Localization) => ({
|
|
85
|
+
average: local.common.averageInvalidError,
|
|
86
|
+
peak: local.common.peakInvalidError,
|
|
87
|
+
burstSize: local.common.burstSizeInvalidError,
|
|
88
|
+
averageBig: local.common.averageBigInvalidError,
|
|
89
|
+
peakBig: local.common.peakBigInvalidError,
|
|
90
|
+
burstSizeBig: local.common.burstSizeBigInvalidError,
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const changeErrorMessage = (
|
|
94
|
+
errorMessage: string,
|
|
95
|
+
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
96
|
+
) => emits('change-error-messages', errorMessage, fieldName)
|
|
97
|
+
|
|
98
|
+
const MAX_BANDWIDTH = 9_007_199_254_740_991
|
|
99
|
+
const setMessageOnChangedField = (
|
|
100
|
+
values: number[],
|
|
101
|
+
index: number,
|
|
102
|
+
name: UI_T_TrafficShapingFieldName,
|
|
103
|
+
text1: string,
|
|
104
|
+
text2: string
|
|
105
|
+
): void => {
|
|
106
|
+
if (
|
|
107
|
+
!fieldsValues.value.status.checked ||
|
|
108
|
+
fieldsValues.value.status.selected === 0
|
|
109
|
+
) {
|
|
110
|
+
changeErrorMessage('', 'average')
|
|
111
|
+
changeErrorMessage('', 'peak')
|
|
112
|
+
changeErrorMessage('', 'burstSize')
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (values[index] >= 1 && values[index] <= MAX_BANDWIDTH) {
|
|
117
|
+
changeErrorMessage('', name)
|
|
118
|
+
} else if (values[index] < 1) {
|
|
119
|
+
changeErrorMessage(text1, name)
|
|
120
|
+
} else if (values[index] > MAX_BANDWIDTH) {
|
|
121
|
+
changeErrorMessage(text2, name)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
watch(
|
|
126
|
+
fieldsValues,
|
|
127
|
+
(newFieldsValues: UI_I_TrafficShapingFields): void => {
|
|
128
|
+
const { average, peak, burstSize } = newFieldsValues
|
|
129
|
+
const arrayValues = [average, peak, burstSize]
|
|
130
|
+
|
|
131
|
+
setMessageOnChangedField(
|
|
132
|
+
arrayValues,
|
|
133
|
+
0,
|
|
134
|
+
'average',
|
|
135
|
+
messageTexts(localization.value).average,
|
|
136
|
+
messageTexts(localization.value).averageBig
|
|
137
|
+
)
|
|
138
|
+
setMessageOnChangedField(
|
|
139
|
+
arrayValues,
|
|
140
|
+
1,
|
|
141
|
+
'peak',
|
|
142
|
+
messageTexts(localization.value).peak,
|
|
143
|
+
messageTexts(localization.value).peakBig
|
|
144
|
+
)
|
|
145
|
+
setMessageOnChangedField(
|
|
146
|
+
arrayValues,
|
|
147
|
+
2,
|
|
148
|
+
'burstSize',
|
|
149
|
+
messageTexts(localization.value).burstSize,
|
|
150
|
+
messageTexts(localization.value).burstSizeBig
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
onChangeData(newFieldsValues)
|
|
154
|
+
!props.hasErrorMessages && onHideErrorMessageAlert()
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
deep: true,
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
onMounted(() => {
|
|
162
|
+
onChangeData(fieldsValues.value)
|
|
163
|
+
})
|
|
164
|
+
onUnmounted((): void => {
|
|
165
|
+
onHideErrorMessageAlert()
|
|
166
|
+
})
|
|
167
|
+
</script>
|
|
168
|
+
|
|
169
|
+
<style scoped lang="scss">
|
|
170
|
+
.traffic-shaping {
|
|
171
|
+
width: 100%;
|
|
172
|
+
}
|
|
173
|
+
</style>
|
package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShapingNew.vue
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="content">
|
|
3
|
+
<div class="content-fields">
|
|
4
|
+
<div class="content-fields-title">
|
|
5
|
+
{{ localization.common.trafficShaping }}
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div v-if="props.isShowErrorMessage" class="content-fields-alert">
|
|
9
|
+
<div
|
|
10
|
+
v-for="messageObject in validationMessagesArray"
|
|
11
|
+
:key="messageObject.key"
|
|
12
|
+
class="content-fields-alert-item"
|
|
13
|
+
>
|
|
14
|
+
<ui-alert
|
|
15
|
+
:messages="[messageObject.message]"
|
|
16
|
+
test-id="traffic-shaping-alert"
|
|
17
|
+
size="md"
|
|
18
|
+
@hide="onHideMessage(messageObject.key)"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="content-fields-block">
|
|
24
|
+
<div class="col">
|
|
25
|
+
<h4
|
|
26
|
+
:class="[
|
|
27
|
+
'content-subtitle col-left text',
|
|
28
|
+
{
|
|
29
|
+
'without-padding': !props.isSwitch,
|
|
30
|
+
},
|
|
31
|
+
]"
|
|
32
|
+
>
|
|
33
|
+
{{ localization.common.status }}
|
|
34
|
+
</h4>
|
|
35
|
+
<div
|
|
36
|
+
:class="[
|
|
37
|
+
'col-right text',
|
|
38
|
+
{
|
|
39
|
+
'without-padding': !props.isSwitch,
|
|
40
|
+
},
|
|
41
|
+
]"
|
|
42
|
+
>
|
|
43
|
+
<div v-if="!props.isSwitch" class="field-checkbox">
|
|
44
|
+
<ui-checkbox
|
|
45
|
+
v-model="fieldsValues.status.checked"
|
|
46
|
+
test-id="status-input"
|
|
47
|
+
:label-text="localization.common.override"
|
|
48
|
+
size="md"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<ui-switch
|
|
53
|
+
v-model="status"
|
|
54
|
+
test-id="traffic-shaping-select"
|
|
55
|
+
:disabled="!fieldsValues.status.checked"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<ui-line margin="16px 0" />
|
|
61
|
+
|
|
62
|
+
<div class="col">
|
|
63
|
+
<h4 class="content-subtitle col-left">
|
|
64
|
+
{{ localization.common.averageBandwidthKbit }}
|
|
65
|
+
</h4>
|
|
66
|
+
<div class="col-right combobox">
|
|
67
|
+
<ui-input
|
|
68
|
+
id="average-input"
|
|
69
|
+
v-model="fieldsValues.average"
|
|
70
|
+
test-id="average-input"
|
|
71
|
+
type="number"
|
|
72
|
+
:placeholder="localization.common.kbitS"
|
|
73
|
+
size="md"
|
|
74
|
+
error-type="tooltip"
|
|
75
|
+
:error="
|
|
76
|
+
fieldsValues.status.checked &&
|
|
77
|
+
fieldsValues.status.selected !== 0 &&
|
|
78
|
+
props.errorMessages.average
|
|
79
|
+
"
|
|
80
|
+
:disabled="
|
|
81
|
+
!fieldsValues.status.checked ||
|
|
82
|
+
fieldsValues.status.selected === 0
|
|
83
|
+
"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<ui-line margin="16px 0" />
|
|
89
|
+
|
|
90
|
+
<div class="col">
|
|
91
|
+
<h4 class="content-subtitle col-left">
|
|
92
|
+
{{ localization.common.peakBandwidthKbit }}
|
|
93
|
+
</h4>
|
|
94
|
+
<div class="col-right combobox">
|
|
95
|
+
<ui-input
|
|
96
|
+
id="peak-input"
|
|
97
|
+
v-model="fieldsValues.peak"
|
|
98
|
+
test-id="peak-input"
|
|
99
|
+
type="number"
|
|
100
|
+
:placeholder="localization.common.kbitS"
|
|
101
|
+
size="md"
|
|
102
|
+
error-type="tooltip"
|
|
103
|
+
:error="
|
|
104
|
+
fieldsValues.status.checked &&
|
|
105
|
+
fieldsValues.status.selected !== 0 &&
|
|
106
|
+
props.errorMessages.peak
|
|
107
|
+
"
|
|
108
|
+
:disabled="
|
|
109
|
+
!fieldsValues.status.checked ||
|
|
110
|
+
fieldsValues.status.selected === 0
|
|
111
|
+
"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<ui-line margin="16px 0" />
|
|
117
|
+
|
|
118
|
+
<div class="col">
|
|
119
|
+
<h4 class="content-subtitle col-left">
|
|
120
|
+
{{ localization.common.burstSizeKb }}
|
|
121
|
+
</h4>
|
|
122
|
+
<div class="col-right combobox">
|
|
123
|
+
<ui-input
|
|
124
|
+
id="burst-input"
|
|
125
|
+
v-model="fieldsValues.burstSize"
|
|
126
|
+
test-id="burst-input"
|
|
127
|
+
type="number"
|
|
128
|
+
:placeholder="localization.common.kb"
|
|
129
|
+
size="md"
|
|
130
|
+
error-type="tooltip"
|
|
131
|
+
:error="
|
|
132
|
+
fieldsValues.status.checked &&
|
|
133
|
+
fieldsValues.status.selected !== 0 &&
|
|
134
|
+
props.errorMessages.burstSize
|
|
135
|
+
"
|
|
136
|
+
:disabled="
|
|
137
|
+
!fieldsValues.status.checked ||
|
|
138
|
+
fieldsValues.status.selected === 0
|
|
139
|
+
"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<script setup lang="ts">
|
|
149
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
150
|
+
import type {
|
|
151
|
+
UI_I_TrafficShapingFields,
|
|
152
|
+
UI_I_EditSettingsErrorMessage,
|
|
153
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
154
|
+
import { validationMessagesArrayNewFunc } from '~/components/common/diagramMain/modals/lib/utils'
|
|
155
|
+
|
|
156
|
+
const props = defineProps<{
|
|
157
|
+
isShowErrorMessage: boolean
|
|
158
|
+
errorMessages: UI_I_EditSettingsErrorMessage
|
|
159
|
+
isSwitch: boolean
|
|
160
|
+
flagSendData: boolean
|
|
161
|
+
}>()
|
|
162
|
+
|
|
163
|
+
const emits = defineEmits<{
|
|
164
|
+
(event: 'hide-error-message-alert'): void
|
|
165
|
+
}>()
|
|
166
|
+
|
|
167
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
168
|
+
|
|
169
|
+
const fieldsValues = defineModel<UI_I_TrafficShapingFields>()
|
|
170
|
+
|
|
171
|
+
const status = computed({
|
|
172
|
+
get() {
|
|
173
|
+
return !!fieldsValues.value.status.selected
|
|
174
|
+
},
|
|
175
|
+
set(newValue) {
|
|
176
|
+
fieldsValues.value.status.selected = Number(newValue)
|
|
177
|
+
},
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
const keys = ref<keyof UI_I_EditSettingsErrorMessage>([
|
|
181
|
+
'average',
|
|
182
|
+
'peak',
|
|
183
|
+
'burstSize',
|
|
184
|
+
])
|
|
185
|
+
|
|
186
|
+
const validationMessagesArray = computed(() =>
|
|
187
|
+
validationMessagesArrayNewFunc(keys.value, props.errorMessages)
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
const onHideMessage = (
|
|
191
|
+
messageKey: keyof UI_I_EditSettingsErrorMessage
|
|
192
|
+
): void => {
|
|
193
|
+
keys.value = keys.value
|
|
194
|
+
.filter((key) => key !== messageKey)
|
|
195
|
+
.filter((key) => props.errorMessages[key])
|
|
196
|
+
|
|
197
|
+
if (keys.value.length === 0) {
|
|
198
|
+
emits('hide-error-message-alert')
|
|
199
|
+
keys.value = ['average', 'peak', 'burstSize']
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
watch(
|
|
204
|
+
() => props.flagSendData,
|
|
205
|
+
() => {
|
|
206
|
+
keys.value = ['average', 'peak', 'burstSize']
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
</script>
|
|
210
|
+
|
|
211
|
+
<style scoped lang="scss">
|
|
212
|
+
.content {
|
|
213
|
+
width: 100%;
|
|
214
|
+
|
|
215
|
+
&-fields-title {
|
|
216
|
+
font-weight: 400;
|
|
217
|
+
font-size: 20px;
|
|
218
|
+
line-height: 24px;
|
|
219
|
+
letter-spacing: 0;
|
|
220
|
+
color: var(--title-form-first-color);
|
|
221
|
+
margin-bottom: 16px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&-title {
|
|
225
|
+
display: block;
|
|
226
|
+
margin: 16px 0;
|
|
227
|
+
font-weight: 500;
|
|
228
|
+
font-size: 16px;
|
|
229
|
+
line-height: 20px;
|
|
230
|
+
letter-spacing: 0;
|
|
231
|
+
color: var(--title-form-first-color);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&-subtitle {
|
|
235
|
+
font-weight: 400;
|
|
236
|
+
font-size: 13px;
|
|
237
|
+
line-height: 16px;
|
|
238
|
+
letter-spacing: 0;
|
|
239
|
+
vertical-align: middle;
|
|
240
|
+
color: var(--title-form-first-color);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.col {
|
|
244
|
+
display: flex;
|
|
245
|
+
column-gap: 16px;
|
|
246
|
+
|
|
247
|
+
&-left {
|
|
248
|
+
padding-top: 10px;
|
|
249
|
+
width: calc((100% - 8px) / 3);
|
|
250
|
+
text-overflow: ellipsis;
|
|
251
|
+
white-space: nowrap;
|
|
252
|
+
overflow: hidden;
|
|
253
|
+
|
|
254
|
+
&.text {
|
|
255
|
+
padding: 8px 0;
|
|
256
|
+
line-height: 20px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&.without-padding {
|
|
260
|
+
padding: 0;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&-right {
|
|
265
|
+
width: calc(((100% - 8px) / 3) * 2);
|
|
266
|
+
|
|
267
|
+
&.text {
|
|
268
|
+
padding: 8px 0;
|
|
269
|
+
max-width: 400px;
|
|
270
|
+
line-height: 20px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&.combobox {
|
|
274
|
+
max-width: 200px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.field-checkbox {
|
|
278
|
+
margin-bottom: 16px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&.without-padding {
|
|
282
|
+
padding: 0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&-fields {
|
|
288
|
+
&-alert {
|
|
289
|
+
margin-bottom: 8px;
|
|
290
|
+
|
|
291
|
+
&-item:not(:last-of-type) {
|
|
292
|
+
margin-bottom: 12px;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&-block {
|
|
297
|
+
padding-top: 8px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&-col {
|
|
301
|
+
display: flex;
|
|
302
|
+
column-gap: 12px;
|
|
303
|
+
|
|
304
|
+
&-left {
|
|
305
|
+
width: 60%;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
&-right {
|
|
309
|
+
width: 40%;
|
|
310
|
+
|
|
311
|
+
&.text {
|
|
312
|
+
max-width: 400px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&.combobox {
|
|
316
|
+
max-width: 200px;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@media (max-width: 896px) {
|
|
324
|
+
.content-fields {
|
|
325
|
+
&-col {
|
|
326
|
+
display: flex;
|
|
327
|
+
row-gap: 12px;
|
|
328
|
+
flex-direction: column;
|
|
329
|
+
|
|
330
|
+
&-left {
|
|
331
|
+
width: 100%;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&-right {
|
|
335
|
+
width: 100%;
|
|
336
|
+
|
|
337
|
+
&.text {
|
|
338
|
+
max-width: 400px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&.combobox {
|
|
342
|
+
max-width: 200px;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
</style>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="wizard-content__container">
|
|
3
3
|
<div class="wizard-content">
|
|
4
4
|
<atoms-alert
|
|
5
|
-
v-if="isShowErrorMessage"
|
|
5
|
+
v-if="props.isShowErrorMessage"
|
|
6
6
|
:items="validationMessagesArray"
|
|
7
7
|
status="alert-danger"
|
|
8
8
|
test-id="traffic-shaping-alert"
|
|
9
|
-
@remove="
|
|
9
|
+
@remove="emits('hide-error-message-alert')"
|
|
10
10
|
/>
|
|
11
11
|
<form id="traffic-shaping-form" action="">
|
|
12
12
|
<div class="horizontal-flex-container">
|
|
@@ -249,151 +249,29 @@
|
|
|
249
249
|
<script setup lang="ts">
|
|
250
250
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
251
251
|
import type {
|
|
252
|
-
UI_I_ModalsInitialData,
|
|
253
252
|
UI_I_TrafficShapingFields,
|
|
254
253
|
UI_I_EditSettingsErrorMessage,
|
|
255
254
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
256
|
-
import type { UI_T_TrafficShapingFieldName } from '~/components/common/diagramMain/lib/models/types'
|
|
257
255
|
import { validationMessagesArrayFunc } from '~/components/common/diagramMain/modals/lib/utils'
|
|
258
|
-
import { trafficShapingFieldsInitialFunc } from '~/components/common/diagramMain/modals/lib/config'
|
|
259
256
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
isSwitch: boolean
|
|
266
|
-
initialData?: UI_I_ModalsInitialData
|
|
267
|
-
hasErrorMessages?: boolean
|
|
268
|
-
}>(),
|
|
269
|
-
{
|
|
270
|
-
initialData: () => ({}),
|
|
271
|
-
isSwitch: false,
|
|
272
|
-
hasErrorMessages: undefined,
|
|
273
|
-
}
|
|
274
|
-
)
|
|
257
|
+
const props = defineProps<{
|
|
258
|
+
isShowErrorMessage: boolean
|
|
259
|
+
errorMessages: UI_I_EditSettingsErrorMessage
|
|
260
|
+
isSwitch: boolean
|
|
261
|
+
}>()
|
|
275
262
|
|
|
276
|
-
// Validation
|
|
277
263
|
const emits = defineEmits<{
|
|
278
|
-
(
|
|
279
|
-
event: 'change-error-messages',
|
|
280
|
-
errorMessage: string,
|
|
281
|
-
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
282
|
-
): void
|
|
283
264
|
(event: 'hide-error-message-alert'): void
|
|
284
|
-
(
|
|
285
|
-
event: 'change-edit-traffic-shaping-data',
|
|
286
|
-
trafficShapingData: UI_I_TrafficShapingFields
|
|
287
|
-
): void
|
|
288
265
|
}>()
|
|
289
266
|
|
|
290
|
-
const
|
|
267
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
268
|
+
|
|
269
|
+
const fieldsValues = defineModel<UI_I_TrafficShapingFields>()
|
|
270
|
+
|
|
271
|
+
const validationMessagesArray = computed<string[]>(() =>
|
|
291
272
|
validationMessagesArrayFunc(
|
|
292
273
|
['average', 'peak', 'burstSize'],
|
|
293
274
|
props.errorMessages
|
|
294
275
|
)
|
|
295
276
|
)
|
|
296
|
-
|
|
297
|
-
// UI_I_Localization
|
|
298
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
299
|
-
|
|
300
|
-
// For showing component validation errors on the top of modal
|
|
301
|
-
const isShowErrorMessage = computed<boolean>(
|
|
302
|
-
() => props.isShowErrorMessageAlert && props.hasErrorMessages
|
|
303
|
-
)
|
|
304
|
-
|
|
305
|
-
const fieldsValues = ref<UI_I_TrafficShapingFields>(
|
|
306
|
-
trafficShapingFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
307
|
-
)
|
|
308
|
-
|
|
309
|
-
const onHideErrorMessageAlert = (): void => emits('hide-error-message-alert')
|
|
310
|
-
|
|
311
|
-
const onChangeData = (data: UI_I_TrafficShapingFields) =>
|
|
312
|
-
emits('change-edit-traffic-shaping-data', data)
|
|
313
|
-
|
|
314
|
-
const messageTexts = (local: UI_I_Localization) => ({
|
|
315
|
-
average: local.common.averageInvalidError,
|
|
316
|
-
peak: local.common.peakInvalidError,
|
|
317
|
-
burstSize: local.common.burstSizeInvalidError,
|
|
318
|
-
averageBig: local.common.averageBigInvalidError,
|
|
319
|
-
peakBig: local.common.peakBigInvalidError,
|
|
320
|
-
burstSizeBig: local.common.burstSizeBigInvalidError,
|
|
321
|
-
})
|
|
322
|
-
|
|
323
|
-
const changeErrorMessage = (
|
|
324
|
-
errorMessage: string,
|
|
325
|
-
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
326
|
-
) => emits('change-error-messages', errorMessage, fieldName)
|
|
327
|
-
|
|
328
|
-
const MAX_BANDWIDTH = 9_007_199_254_740_991
|
|
329
|
-
const setMessageOnChangedField = (
|
|
330
|
-
values: number[],
|
|
331
|
-
index: number,
|
|
332
|
-
name: UI_T_TrafficShapingFieldName,
|
|
333
|
-
text1: string,
|
|
334
|
-
text2: string
|
|
335
|
-
): void => {
|
|
336
|
-
if (
|
|
337
|
-
!fieldsValues.value.status.checked ||
|
|
338
|
-
fieldsValues.value.status.selected === 0
|
|
339
|
-
) {
|
|
340
|
-
changeErrorMessage('', 'average')
|
|
341
|
-
changeErrorMessage('', 'peak')
|
|
342
|
-
changeErrorMessage('', 'burstSize')
|
|
343
|
-
return
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (values[index] >= 1 && values[index] <= MAX_BANDWIDTH) {
|
|
347
|
-
changeErrorMessage('', name)
|
|
348
|
-
} else if (values[index] < 1) {
|
|
349
|
-
changeErrorMessage(text1, name)
|
|
350
|
-
} else if (values[index] > MAX_BANDWIDTH) {
|
|
351
|
-
changeErrorMessage(text2, name)
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
watch(
|
|
356
|
-
fieldsValues,
|
|
357
|
-
(newFieldsValues: UI_I_TrafficShapingFields): void => {
|
|
358
|
-
const { average, peak, burstSize } = newFieldsValues
|
|
359
|
-
const arrayValues = [average, peak, burstSize]
|
|
360
|
-
|
|
361
|
-
setMessageOnChangedField(
|
|
362
|
-
arrayValues,
|
|
363
|
-
0,
|
|
364
|
-
'average',
|
|
365
|
-
messageTexts(localization.value).average,
|
|
366
|
-
messageTexts(localization.value).averageBig
|
|
367
|
-
)
|
|
368
|
-
setMessageOnChangedField(
|
|
369
|
-
arrayValues,
|
|
370
|
-
1,
|
|
371
|
-
'peak',
|
|
372
|
-
messageTexts(localization.value).peak,
|
|
373
|
-
messageTexts(localization.value).peakBig
|
|
374
|
-
)
|
|
375
|
-
setMessageOnChangedField(
|
|
376
|
-
arrayValues,
|
|
377
|
-
2,
|
|
378
|
-
'burstSize',
|
|
379
|
-
messageTexts(localization.value).burstSize,
|
|
380
|
-
messageTexts(localization.value).burstSizeBig
|
|
381
|
-
)
|
|
382
|
-
|
|
383
|
-
onChangeData(newFieldsValues)
|
|
384
|
-
!props.hasErrorMessages && onHideErrorMessageAlert()
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
deep: true,
|
|
388
|
-
}
|
|
389
|
-
)
|
|
390
|
-
|
|
391
|
-
onMounted(() => {
|
|
392
|
-
onChangeData(fieldsValues.value)
|
|
393
|
-
})
|
|
394
|
-
onUnmounted((): void => {
|
|
395
|
-
onHideErrorMessageAlert()
|
|
396
|
-
})
|
|
397
277
|
</script>
|
|
398
|
-
|
|
399
|
-
<style scoped lang="scss"></style>
|