bfg-common 1.6.49 → 1.6.50
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 +255 -9
- package/assets/localization/local_en.json +264 -17
- package/assets/localization/local_hy.json +257 -11
- package/assets/localization/local_kk.json +255 -9
- package/assets/localization/local_ru.json +264 -18
- package/assets/localization/local_zh.json +255 -9
- package/assets/scss/common/global.scss +11 -0
- package/assets/scss/common/theme.scss +2 -2
- package/components/atoms/stack/StackBlock.vue +1 -1
- package/components/atoms/tooltip/TooltipError.vue +3 -0
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +1 -1
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +0 -1
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +1 -0
- package/components/common/certificate/CertificateInfo.vue +7 -1
- 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 +167 -85
- package/components/common/diagramMain/DiagramMain.vue +34 -10
- 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/modals/Modals.vue +4 -0
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +2 -2
- 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/vmKernelAdapter.ts +1 -1
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
- package/components/common/diagramMain/skeleton/Header.vue +31 -0
- package/components/common/diagramMain/skeleton/Switch.vue +75 -0
- 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/monitor/advanced/tools/Tools.vue +10 -9
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +16 -19
- package/components/common/monitor/advanced/tools/lib/config/advancedToolbar.ts +62 -9
- 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/HardwareHealth.vue +4 -0
- package/components/common/pages/hardwareHealth/HardwareHealthNew.vue +12 -3
- package/components/common/pages/hardwareHealth/HardwareHealthOld.vue +3 -0
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +4 -4
- package/components/common/pages/hardwareHealth/historyTestimony/GraphNew.vue +4 -3
- package/components/common/pages/hardwareHealth/historyTestimony/GraphOld.vue +3 -2
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +32 -8
- package/components/common/pages/hardwareHealth/historyTestimony/tools/ToolsNew.vue +11 -18
- package/components/common/pages/hardwareHealth/historyTestimony/tools/ToolsOld.vue +10 -19
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +19 -7
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +1 -1
- package/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar.ts +68 -5
- 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/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/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/storage/new/lib/config/table.ts +13 -15
- package/components/common/vm/actions/confirm/Confirm.vue +3 -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/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/SaveOptionsModal.vue +0 -81
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="tooltip-info">
|
|
3
|
-
<span
|
|
2
|
+
<div :class="['tooltip-info', { isOpen: isShowTooltipLocal }]">
|
|
3
|
+
<span
|
|
4
|
+
class="tooltip-info__title"
|
|
5
|
+
@click.stop="isShowTooltipLocal = !isShowTooltipLocal"
|
|
6
|
+
>
|
|
7
|
+
{{ localization.common.vmOrigin }}
|
|
8
|
+
</span>
|
|
4
9
|
<ui-icon
|
|
5
10
|
id="vm-origin-info-trigger"
|
|
6
|
-
|
|
11
|
+
class="tooltip-info__icon pointer"
|
|
7
12
|
name="info"
|
|
8
|
-
width="
|
|
9
|
-
height="
|
|
13
|
+
width="16"
|
|
14
|
+
height="16"
|
|
10
15
|
@click.stop="isShowTooltipLocal = !isShowTooltipLocal"
|
|
11
16
|
/>
|
|
12
17
|
<ui-popup-window
|
|
@@ -40,7 +45,7 @@
|
|
|
40
45
|
:key="item2.name"
|
|
41
46
|
class="flex items-center mt-2"
|
|
42
47
|
>
|
|
43
|
-
<span :class="item2.iconName"></span>
|
|
48
|
+
<span :class="['icon-row', item2.iconName]"></span>
|
|
44
49
|
<span class="item-name">{{ item2.name }}</span>
|
|
45
50
|
</div>
|
|
46
51
|
</div>
|
|
@@ -67,22 +72,29 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
67
72
|
@import 'assets/scss/common/mixins.scss';
|
|
68
73
|
.tooltip-info {
|
|
69
74
|
@include flex($align: center);
|
|
75
|
+
column-gap: 8px;
|
|
76
|
+
&:hover {
|
|
77
|
+
.tooltip-info__title,
|
|
78
|
+
.tooltip-info__icon {
|
|
79
|
+
color: var(--close-icon);
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&.isOpen {
|
|
84
|
+
.tooltip-info__title,
|
|
85
|
+
.tooltip-info__icon {
|
|
86
|
+
color: var(--btn-primary-fill-bg-color);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
70
89
|
&__title {
|
|
71
90
|
font-family: 'Inter', sans-serif;
|
|
72
|
-
color:
|
|
91
|
+
color: #9da6ad; // for dark and light mode
|
|
73
92
|
font-weight: 500;
|
|
74
93
|
font-size: 12px;
|
|
75
94
|
white-space: nowrap;
|
|
76
|
-
margin-right: 4px;
|
|
77
95
|
}
|
|
78
96
|
&__icon {
|
|
79
97
|
color: var(--form-icon-color);
|
|
80
|
-
&:hover {
|
|
81
|
-
color: var(--close-icon);
|
|
82
|
-
}
|
|
83
|
-
&.active {
|
|
84
|
-
color: var(--btn-primary-fill-bg-color);
|
|
85
|
-
}
|
|
86
98
|
}
|
|
87
99
|
|
|
88
100
|
.common-widget-info {
|
|
@@ -99,14 +111,22 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
99
111
|
&__content {
|
|
100
112
|
.item-row {
|
|
101
113
|
margin-top: 12px;
|
|
114
|
+
&:first-child {
|
|
115
|
+
margin-top: 20px;
|
|
116
|
+
}
|
|
102
117
|
}
|
|
103
118
|
.title-row {
|
|
104
119
|
font-family: 'Inter', sans-serif;
|
|
105
|
-
color:
|
|
120
|
+
color: #9da6ad; // for dark and light mode
|
|
106
121
|
font-weight: 500;
|
|
107
122
|
font-size: 13px;
|
|
123
|
+
line-height: 18px;
|
|
108
124
|
margin-bottom: 8px;
|
|
109
125
|
}
|
|
126
|
+
.icon-row {
|
|
127
|
+
width: 20px;
|
|
128
|
+
height: 20px;
|
|
129
|
+
}
|
|
110
130
|
|
|
111
131
|
.item-name {
|
|
112
132
|
font-family: 'Inter', sans-serif;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export type UI_T_TasksStateLoading = 'tasks' | 'recentTasks'
|
|
2
2
|
export type UI_T_TaskStatus =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
| 0 // queued
|
|
4
|
+
| 1 // running
|
|
5
|
+
| 2 // completed
|
|
6
|
+
| 3 // failed
|
|
7
|
+
| 4 // canceled
|
|
8
|
+
| 5 // retrying
|
|
9
|
+
| 6 // warning
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.50",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@vueuse/core": "10.1.2",
|
|
19
19
|
"@vueuse/nuxt": "10.1.2",
|
|
20
20
|
"bfg-nuxt-3-graph": "1.0.27",
|
|
21
|
-
"bfg-uikit": "1.1.
|
|
21
|
+
"bfg-uikit": "1.1.29",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
23
|
"eslint-plugin-myrules": "file:./eslint",
|
|
24
24
|
"nuxt": "3.11.2",
|
package/plugins/directives.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DirectiveBinding } from '@vue/runtime-core'
|
|
2
|
-
import type {UI_I_Localization} from
|
|
2
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
3
|
|
|
4
4
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
5
5
|
nuxtApp.vueApp.directive('development', {
|
|
@@ -22,8 +22,7 @@ function applyDevelopmentState(el: HTMLElement, isDevelopment: boolean) {
|
|
|
22
22
|
|
|
23
23
|
el.setAttribute('title', localization.value.common.inDevelopment)
|
|
24
24
|
el.setAttribute('disabled', 'true')
|
|
25
|
-
el.
|
|
26
|
-
el.style.cursor = 'not-allowed'
|
|
25
|
+
el.classList.add('in-development')
|
|
27
26
|
|
|
28
27
|
// Оборачиваем, чтобы не навешивать несколько обработчиков
|
|
29
28
|
const preventClick = (e: MouseEvent) => {
|
|
@@ -40,8 +39,7 @@ function applyDevelopmentState(el: HTMLElement, isDevelopment: boolean) {
|
|
|
40
39
|
|
|
41
40
|
function cleanupDevelopment(el: HTMLElement) {
|
|
42
41
|
el.removeAttribute('title')
|
|
43
|
-
el.
|
|
44
|
-
el.style.cursor = ''
|
|
42
|
+
el.classList.remove('in-development')
|
|
45
43
|
|
|
46
44
|
const handler = (el as any)._developmentClickHandler
|
|
47
45
|
if (handler) {
|
|
@@ -70,6 +70,7 @@ wdi.Agent = $.spcExtend(wdi.EventObject.prototype, {
|
|
|
70
70
|
|
|
71
71
|
setResolution: function(width, height) {
|
|
72
72
|
//TODO move this to a setting
|
|
73
|
+
// SC-2122
|
|
73
74
|
if(width < 800) {
|
|
74
75
|
width = 800;
|
|
75
76
|
}
|
|
@@ -80,23 +81,23 @@ wdi.Agent = $.spcExtend(wdi.EventObject.prototype, {
|
|
|
80
81
|
|
|
81
82
|
//adapt resolution, TODO: this needs to be refractored
|
|
82
83
|
var packetData = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
type: wdi.AgentMessageTypes.VD_AGENT_MONITORS_CONFIG,
|
|
85
|
+
opaque: 0,
|
|
86
|
+
data: new wdi.VDAgentMonitorsConfig({
|
|
87
|
+
num_of_monitors: 1,
|
|
88
|
+
flags: 0,
|
|
89
|
+
data: new wdi.VDAgentMonConfig({
|
|
90
|
+
width: width,
|
|
91
|
+
height: height,
|
|
92
|
+
// Custom code
|
|
93
|
+
// depth: 64,
|
|
94
|
+
depth: 32,
|
|
95
|
+
// Custom code end
|
|
96
|
+
x: 0,
|
|
97
|
+
y: 0,
|
|
98
|
+
}),
|
|
99
|
+
}),
|
|
100
|
+
}
|
|
100
101
|
this.sendAgentPacket(packetData);
|
|
101
102
|
},
|
|
102
103
|
|
package/store/tasks/actions.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
} from '~/lib/models/store/tasks/interfaces'
|
|
19
19
|
import type { UI_I_TasksState } from '~/store/tasks/lib/models/interfaces'
|
|
20
20
|
import type { UI_I_RefreshStack } from '~/store/main/lib/interfaces'
|
|
21
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
21
22
|
import { tasksConstructor } from '~/store/tasks/mappers/tasks'
|
|
22
23
|
import { recentTasks } from '~/store/tasks/mappers/recentTasks'
|
|
23
24
|
|
|
@@ -28,9 +29,13 @@ export default {
|
|
|
28
29
|
state: UI_I_TasksState
|
|
29
30
|
dispatch: <T>(arg0: string, arg1: T, arg2: UI_I_CommitOptions) => void
|
|
30
31
|
},
|
|
31
|
-
payload:
|
|
32
|
+
payload: {
|
|
33
|
+
data: UI_I_DataTableQuery
|
|
34
|
+
project: UI_T_Project
|
|
35
|
+
}
|
|
32
36
|
): Promise<API_UI_I_Error | void> {
|
|
33
|
-
const {
|
|
37
|
+
const { data, project } = payload
|
|
38
|
+
const { page, pageSize, sortBy, filter } = data
|
|
34
39
|
|
|
35
40
|
const query: UI_I_TableQuery = {
|
|
36
41
|
page_size: pageSize,
|
|
@@ -38,7 +43,21 @@ export default {
|
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
if (sortBy) query.sortBy = sortBy
|
|
41
|
-
if (filter)
|
|
46
|
+
if (filter) {
|
|
47
|
+
if (project === 'procurator') {
|
|
48
|
+
query.filter = filter
|
|
49
|
+
} else {
|
|
50
|
+
const filters = filter.split(',')
|
|
51
|
+
filters.forEach((item) => {
|
|
52
|
+
const [field, value] = item.split('.')
|
|
53
|
+
|
|
54
|
+
if (field && value) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
query[field] = value
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
42
61
|
|
|
43
62
|
const queryJson: string = JSON.stringify({ type: 'tasks', ...query })
|
|
44
63
|
const lastQuery: string = context.state.taskQuery || ''
|
|
@@ -63,7 +82,9 @@ export default {
|
|
|
63
82
|
value: true,
|
|
64
83
|
})
|
|
65
84
|
},
|
|
66
|
-
onResponse({
|
|
85
|
+
onResponse({
|
|
86
|
+
response,
|
|
87
|
+
}: API_UI_I_Response<API_UI_I_Task<string> | null>) {
|
|
67
88
|
const tasks = tasksConstructor(response._data)
|
|
68
89
|
|
|
69
90
|
context.commit('M_SET_TASKS_LIST', tasks)
|
|
@@ -140,10 +161,7 @@ export default {
|
|
|
140
161
|
payload: string
|
|
141
162
|
): Promise<void> {
|
|
142
163
|
// Скрываем кнопку cancel
|
|
143
|
-
context.commit(
|
|
144
|
-
'M_HIDE_CANCEL_RECENT_TASK_BY_ID',
|
|
145
|
-
payload
|
|
146
|
-
)
|
|
164
|
+
context.commit('M_HIDE_CANCEL_RECENT_TASK_BY_ID', payload)
|
|
147
165
|
const { error } = await useMyFetch<
|
|
148
166
|
API_UI_I_RecentTask<string>,
|
|
149
167
|
API_UI_I_Error
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-modal
|
|
3
|
-
:title="localization.inventoryMonitor.saveOptionsAs"
|
|
4
|
-
width="575px"
|
|
5
|
-
show
|
|
6
|
-
@hide="onHide"
|
|
7
|
-
@submit="onSave"
|
|
8
|
-
>
|
|
9
|
-
<template #modalBody>
|
|
10
|
-
<common-pages-hardware-health-history-testimony-tools-chart-options-modal-actions-save-options-modal
|
|
11
|
-
v-show="isShowAlerts"
|
|
12
|
-
:alerts="alerts"
|
|
13
|
-
@remove="onRemoveAlerts"
|
|
14
|
-
/>
|
|
15
|
-
<div class="form-control">
|
|
16
|
-
<label class="save-option-name-label" for="chartOptionsName"
|
|
17
|
-
>{{ localization.common.chartOptionsName }}:</label
|
|
18
|
-
>
|
|
19
|
-
<input
|
|
20
|
-
id="chartOptionsName"
|
|
21
|
-
v-model="name"
|
|
22
|
-
data-id="chart-options-name"
|
|
23
|
-
type="text"
|
|
24
|
-
/>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
</atoms-modal>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script setup lang="ts">
|
|
31
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
32
|
-
|
|
33
|
-
const emits = defineEmits<{
|
|
34
|
-
(event: 'hide'): void
|
|
35
|
-
(event: 'save', value: string): void
|
|
36
|
-
}>()
|
|
37
|
-
|
|
38
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
39
|
-
|
|
40
|
-
const name = ref<string>('')
|
|
41
|
-
const isShowAlerts = ref<boolean>(false)
|
|
42
|
-
const alerts = ref<string[]>([])
|
|
43
|
-
|
|
44
|
-
const onHide = (): void => {
|
|
45
|
-
emits('hide')
|
|
46
|
-
}
|
|
47
|
-
const onSave = (): void => {
|
|
48
|
-
if (!name.value) {
|
|
49
|
-
alerts.value = [localization.value.common.settingsNameErrorDesc]
|
|
50
|
-
isShowAlerts.value = true
|
|
51
|
-
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
emits('save', name.value)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const onRemoveAlerts = (): void => {
|
|
59
|
-
isShowAlerts.value = false
|
|
60
|
-
alerts.value = []
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<style scoped lang="scss">
|
|
65
|
-
:deep(.modal-dialog) {
|
|
66
|
-
.alert {
|
|
67
|
-
margin-bottom: 20px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.form-control {
|
|
71
|
-
display: flex;
|
|
72
|
-
|
|
73
|
-
.save-option-name-label {
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
}
|
|
76
|
-
#chartOptionsName {
|
|
77
|
-
width: 100%;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
</style>
|