bfg-common 1.4.734 → 1.4.799
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/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/localization/local_be.json +2 -16
- package/assets/localization/local_en.json +2 -16
- package/assets/localization/local_hy.json +2 -16
- package/assets/localization/local_kk.json +2 -16
- package/assets/localization/local_ru.json +2 -16
- package/assets/localization/local_zh.json +2 -16
- package/components/atoms/select/TheSelect.vue +1 -10
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/{monitor/advanced/tools/chartOptionsModal → chartOptionsModal}/counters/timespan/form/Form.vue +544 -539
- package/components/common/{pages/hardwareHealth/historyTestimony/tools/chartOptionsModal → chartOptionsModal}/counters/timespan/form/lib/config/dateForm.ts +116 -115
- package/components/common/diagramMain/Header.vue +211 -211
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- 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 +330 -330
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
- package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
- package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +398 -398
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
- package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
- 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/port/Ports.vue +47 -47
- package/components/common/monitor/advanced/Advanced.vue +5 -0
- package/components/common/monitor/advanced/tools/Tools.vue +9 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +9 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +2 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +95 -93
- package/components/common/monitor/overview/filters/Filters.vue +3 -0
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +15 -5
- package/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker.ts +24 -14
- package/components/common/pages/hardwareHealth/HardwareHealth.vue +12 -5
- package/components/common/pages/hardwareHealth/historyTestimony/Graph.vue +456 -451
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +387 -380
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +13 -6
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/Counters.vue +94 -94
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/Timespan.vue +66 -66
- package/components/common/pages/tasks/Tasks.vue +0 -9
- package/components/common/pages/tasks/table/Table.vue +1 -0
- package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +6 -10
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +8 -8
- package/components/common/vm/actions/add/Add.vue +0 -2
- package/components/common/vm/actions/clone/Clone.vue +0 -2
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +0 -3
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +0 -2
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +0 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +1 -9
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +2 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +1 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +4 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +10 -52
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +5 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +5 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +2 -9
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +4 -11
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionOld.vue +1 -1
- package/components/common/vm/actions/editSettings/EditSettings.vue +0 -3
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +0 -2
- package/components/common/vm/actions/editSettings/new/New.vue +0 -2
- package/package.json +3 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/lib/config/dateForm.ts +0 -114
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/counters/timespan/form/Form.vue +0 -539
|
@@ -1,115 +1,116 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_ArbitraryObject,
|
|
3
|
-
UI_I_Localization,
|
|
4
|
-
} from '~/lib/models/interfaces'
|
|
5
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
6
|
-
|
|
7
|
-
export const timespanFunc = (
|
|
8
|
-
localization: UI_I_Localization
|
|
9
|
-
): UI_I_OptionItem[] => [
|
|
10
|
-
{
|
|
11
|
-
text: localization.inventoryMonitor.realTime,
|
|
12
|
-
value: 'real_time',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
text: localization.inventoryMonitor.lastDay,
|
|
16
|
-
value: 'last_day',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
text: localization.inventoryMonitor.lastWeek,
|
|
20
|
-
value: 'last_week',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
text: localization.inventoryMonitor.lastMonth,
|
|
24
|
-
value: 'last_month',
|
|
25
|
-
},
|
|
26
|
-
// {
|
|
27
|
-
// text: localization.inventoryMonitor.lastYear,
|
|
28
|
-
// value: 'last_year',
|
|
29
|
-
// },
|
|
30
|
-
{
|
|
31
|
-
text: localization.inventoryMonitor.customInterval,
|
|
32
|
-
value: 'custom_interval',
|
|
33
|
-
},
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
export const customTimeFunc = (
|
|
37
|
-
localization: UI_I_Localization,
|
|
38
|
-
value: number,
|
|
39
|
-
lang: string
|
|
40
|
-
): UI_I_OptionItem[] => {
|
|
41
|
-
const isLangRu = lang === 'ru_RU'
|
|
42
|
-
|
|
43
|
-
const hourText = isLangRu
|
|
44
|
-
? getCorrectRuForm(value, 'hour')
|
|
45
|
-
: localization.common.hours2
|
|
46
|
-
const dayText = isLangRu
|
|
47
|
-
? getCorrectRuForm(value, 'day')
|
|
48
|
-
: localization.common.days2
|
|
49
|
-
const weekText = isLangRu
|
|
50
|
-
? getCorrectRuForm(value, 'week')
|
|
51
|
-
: localization.common.weeks2
|
|
52
|
-
const monthText = isLangRu
|
|
53
|
-
? getCorrectRuForm(value, 'month')
|
|
54
|
-
: localization.common.months2
|
|
55
|
-
|
|
56
|
-
return [
|
|
57
|
-
{
|
|
58
|
-
text: hourText,
|
|
59
|
-
value: 'hours',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
text: dayText,
|
|
63
|
-
value: 'days',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
text: weekText,
|
|
67
|
-
value: 'weeks',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
text: monthText,
|
|
71
|
-
value: 'months',
|
|
72
|
-
},
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export const chartTypeFunc = (
|
|
77
|
-
localization: UI_I_Localization
|
|
78
|
-
): UI_I_OptionItem[] => [
|
|
79
|
-
{
|
|
80
|
-
text: localization.inventoryMonitor.lineGraph,
|
|
81
|
-
value: 'line_graph',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
text: localization.inventoryMonitor.stackedGraph,
|
|
85
|
-
value: 'stacked_graph',
|
|
86
|
-
},
|
|
87
|
-
]
|
|
88
|
-
|
|
89
|
-
const getCorrectRuForm = (value: number, type: string): string => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_ArbitraryObject,
|
|
3
|
+
UI_I_Localization,
|
|
4
|
+
} from '~/lib/models/interfaces'
|
|
5
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
6
|
+
|
|
7
|
+
export const timespanFunc = (
|
|
8
|
+
localization: UI_I_Localization
|
|
9
|
+
): UI_I_OptionItem[] => [
|
|
10
|
+
{
|
|
11
|
+
text: localization.inventoryMonitor.realTime,
|
|
12
|
+
value: 'real_time',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
text: localization.inventoryMonitor.lastDay,
|
|
16
|
+
value: 'last_day',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
text: localization.inventoryMonitor.lastWeek,
|
|
20
|
+
value: 'last_week',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
text: localization.inventoryMonitor.lastMonth,
|
|
24
|
+
value: 'last_month',
|
|
25
|
+
},
|
|
26
|
+
// {
|
|
27
|
+
// text: localization.inventoryMonitor.lastYear,
|
|
28
|
+
// value: 'last_year',
|
|
29
|
+
// },
|
|
30
|
+
{
|
|
31
|
+
text: localization.inventoryMonitor.customInterval,
|
|
32
|
+
value: 'custom_interval',
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
export const customTimeFunc = (
|
|
37
|
+
localization: UI_I_Localization,
|
|
38
|
+
value: number,
|
|
39
|
+
lang: string
|
|
40
|
+
): UI_I_OptionItem[] => {
|
|
41
|
+
const isLangRu = lang === 'ru_RU'
|
|
42
|
+
|
|
43
|
+
const hourText = isLangRu
|
|
44
|
+
? getCorrectRuForm(value, 'hour')
|
|
45
|
+
: localization.common.hours2
|
|
46
|
+
const dayText = isLangRu
|
|
47
|
+
? getCorrectRuForm(value, 'day')
|
|
48
|
+
: localization.common.days2
|
|
49
|
+
const weekText = isLangRu
|
|
50
|
+
? getCorrectRuForm(value, 'week')
|
|
51
|
+
: localization.common.weeks2
|
|
52
|
+
const monthText = isLangRu
|
|
53
|
+
? getCorrectRuForm(value, 'month')
|
|
54
|
+
: localization.common.months2
|
|
55
|
+
|
|
56
|
+
return [
|
|
57
|
+
{
|
|
58
|
+
text: hourText,
|
|
59
|
+
value: 'hours',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
text: dayText,
|
|
63
|
+
value: 'days',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
text: weekText,
|
|
67
|
+
value: 'weeks',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
text: monthText,
|
|
71
|
+
value: 'months',
|
|
72
|
+
},
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const chartTypeFunc = (
|
|
77
|
+
localization: UI_I_Localization
|
|
78
|
+
): UI_I_OptionItem[] => [
|
|
79
|
+
{
|
|
80
|
+
text: localization.inventoryMonitor.lineGraph,
|
|
81
|
+
value: 'line_graph',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
text: localization.inventoryMonitor.stackedGraph,
|
|
85
|
+
value: 'stacked_graph',
|
|
86
|
+
},
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
const getCorrectRuForm = (value: number, type: string): string => {
|
|
90
|
+
// TODO поправить используя correctRuUnit из плагина date
|
|
91
|
+
const forms: UI_I_ArbitraryObject<string[]> = {
|
|
92
|
+
hour: ['Час', 'Часа', 'Часов'],
|
|
93
|
+
day: ['День', 'Дня', 'Дней'],
|
|
94
|
+
week: ['Неделя', 'Недели', 'Недель'],
|
|
95
|
+
month: ['Месяц', 'Месяца', 'Месяцев'],
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
let text: string
|
|
99
|
+
|
|
100
|
+
if (!value) {
|
|
101
|
+
return getCorrectRuForm[type]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (value % 10 === 1 && value % 100 !== 11) {
|
|
105
|
+
text = forms[type][0]
|
|
106
|
+
} else if (
|
|
107
|
+
[2, 3, 4].includes(value % 10) &&
|
|
108
|
+
![12, 13, 14].includes(value % 100)
|
|
109
|
+
) {
|
|
110
|
+
text = forms[type][1]
|
|
111
|
+
} else {
|
|
112
|
+
text = forms[type][2]
|
|
113
|
+
}
|
|
114
|
+
getCorrectRuForm[type] = text
|
|
115
|
+
return text
|
|
116
|
+
}
|
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<template v-if="!props.inPortlet">
|
|
3
|
-
<div class="diagram-header">
|
|
4
|
-
<div class="diagram-header-left">
|
|
5
|
-
<atoms-the-icon
|
|
6
|
-
name="angle"
|
|
7
|
-
:class="[
|
|
8
|
-
'diagram-header__arrow-icon',
|
|
9
|
-
{
|
|
10
|
-
open: props.isShowDiagram,
|
|
11
|
-
},
|
|
12
|
-
]"
|
|
13
|
-
:data-id="`${props.testId}-toggle-icon`"
|
|
14
|
-
@click="onToggleDiagram"
|
|
15
|
-
/>
|
|
16
|
-
<a>
|
|
17
|
-
<span>
|
|
18
|
-
{{ localization.common.standardSwitch }}:
|
|
19
|
-
{{ props.diagramName }}
|
|
20
|
-
</span>
|
|
21
|
-
</a>
|
|
22
|
-
</div>
|
|
23
|
-
<div v-if="props.isShowDiagram" class="diagram-header__btn-container">
|
|
24
|
-
<span class="vertical-separator"></span>
|
|
25
|
-
<button
|
|
26
|
-
id="add-networking-button"
|
|
27
|
-
:data-id="`${props.testId}-add-networking-button`"
|
|
28
|
-
type="button"
|
|
29
|
-
@click="onShowModal('add-networking', props.diagramName)"
|
|
30
|
-
>
|
|
31
|
-
{{ localization.common.addNetworking }}
|
|
32
|
-
</button>
|
|
33
|
-
<button
|
|
34
|
-
id="switch-edit-button"
|
|
35
|
-
:data-id="`${props.testId}-edit-button`"
|
|
36
|
-
type="button"
|
|
37
|
-
@click="onShowModal('switch-edit')"
|
|
38
|
-
>
|
|
39
|
-
{{ localization.common.edit }}
|
|
40
|
-
</button>
|
|
41
|
-
<button
|
|
42
|
-
id="switch-manage-physical-adapters-button"
|
|
43
|
-
:data-id="`${props.testId}-manage-physical-adapters-button`"
|
|
44
|
-
type="button"
|
|
45
|
-
@click="onShowModal('switch-manage-physical-adapters')"
|
|
46
|
-
>
|
|
47
|
-
{{ localization.common.managePhysicalAdapters }}
|
|
48
|
-
</button>
|
|
49
|
-
<div class="diagram-main-actions-dots">
|
|
50
|
-
<atoms-collapse-nav
|
|
51
|
-
popup-class="diagram-main-actions__popup"
|
|
52
|
-
:close-after-click="true"
|
|
53
|
-
:items="switchMainNavigation"
|
|
54
|
-
:test-id="`${props.testId}-actions`"
|
|
55
|
-
@change="onShowModal"
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
<hr class="horizontal-separator" />
|
|
61
|
-
</template>
|
|
62
|
-
</template>
|
|
63
|
-
|
|
64
|
-
<script setup lang="ts">
|
|
65
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
66
|
-
import type {
|
|
67
|
-
UI_I_NavigationItem,
|
|
68
|
-
UI_I_ModalsInitialData,
|
|
69
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
70
|
-
import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
|
|
71
|
-
|
|
72
|
-
const props = defineProps<{
|
|
73
|
-
inPortlet: boolean
|
|
74
|
-
isShowDiagram: boolean
|
|
75
|
-
diagramName: string
|
|
76
|
-
testId: string
|
|
77
|
-
}>()
|
|
78
|
-
|
|
79
|
-
const emits = defineEmits<{
|
|
80
|
-
(event: 'toggle-diagram'): void
|
|
81
|
-
(
|
|
82
|
-
event: 'show-modal',
|
|
83
|
-
modalName: string,
|
|
84
|
-
properties?: UI_I_ModalsInitialData
|
|
85
|
-
): void
|
|
86
|
-
}>()
|
|
87
|
-
|
|
88
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
89
|
-
|
|
90
|
-
const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
|
|
91
|
-
switchMainNavigationFunc(localization.value, props.testId)
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
const onToggleDiagram = () => emits('toggle-diagram')
|
|
95
|
-
|
|
96
|
-
const onShowModal = (modalName: string, diagramName?: string) =>
|
|
97
|
-
diagramName
|
|
98
|
-
? emits('show-modal', modalName, { switch_name: diagramName })
|
|
99
|
-
: emits('show-modal', modalName)
|
|
100
|
-
</script>
|
|
101
|
-
|
|
102
|
-
<style scoped lang="scss">
|
|
103
|
-
:root.dark-theme {
|
|
104
|
-
.diagram-header {
|
|
105
|
-
&-left {
|
|
106
|
-
a {
|
|
107
|
-
span {
|
|
108
|
-
color: #79c6e6;
|
|
109
|
-
|
|
110
|
-
&:hover {
|
|
111
|
-
color: #49afd9;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&__btn-container {
|
|
118
|
-
button {
|
|
119
|
-
color: #89cbdf;
|
|
120
|
-
|
|
121
|
-
&:hover {
|
|
122
|
-
color: #57c8ea;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.diagram-header {
|
|
130
|
-
display: flex;
|
|
131
|
-
padding-left: 8px;
|
|
132
|
-
a {
|
|
133
|
-
color: #0072a3;
|
|
134
|
-
cursor: pointer;
|
|
135
|
-
font-weight: 700;
|
|
136
|
-
user-select: none;
|
|
137
|
-
line-height: 20px;
|
|
138
|
-
span {
|
|
139
|
-
font-weight: 700;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&-left {
|
|
144
|
-
display: flex;
|
|
145
|
-
flex-wrap: nowrap;
|
|
146
|
-
color: #49afd9;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&__arrow-icon {
|
|
150
|
-
width: 16px;
|
|
151
|
-
height: 16px;
|
|
152
|
-
margin-right: 4px;
|
|
153
|
-
transform: rotate(90deg);
|
|
154
|
-
align-self: center;
|
|
155
|
-
fill: var(--triger-icon-color);
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
&.open {
|
|
158
|
-
transform: rotate(180deg);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&__btn-container {
|
|
163
|
-
display: flex;
|
|
164
|
-
|
|
165
|
-
button {
|
|
166
|
-
font-size: 11px;
|
|
167
|
-
height: 24px;
|
|
168
|
-
border: none;
|
|
169
|
-
background: none;
|
|
170
|
-
margin-right: 0;
|
|
171
|
-
cursor: pointer;
|
|
172
|
-
display: inline-block;
|
|
173
|
-
white-space: nowrap;
|
|
174
|
-
text-align: center;
|
|
175
|
-
text-transform: uppercase;
|
|
176
|
-
color: #49afd9;
|
|
177
|
-
line-height: 20px;
|
|
178
|
-
max-height: 16.8px;
|
|
179
|
-
padding: 0 14px;
|
|
180
|
-
font-weight: 500;
|
|
181
|
-
letter-spacing: 1px;
|
|
182
|
-
|
|
183
|
-
&:hover {
|
|
184
|
-
color: #004d8a;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.diagram-main-actions-dots {
|
|
191
|
-
position: relative;
|
|
192
|
-
transform: translate(62px, -11px);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.horizontal-separator {
|
|
196
|
-
margin: 5px 10px 10px;
|
|
197
|
-
border-left: 0;
|
|
198
|
-
border-right: 0;
|
|
199
|
-
border-color: #ddd;
|
|
200
|
-
box-sizing: content-box;
|
|
201
|
-
height: 0;
|
|
202
|
-
overflow: visible;
|
|
203
|
-
border-top: 0px solid #eee;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.vertical-separator {
|
|
207
|
-
border: 1px solid #ddd;
|
|
208
|
-
border-left: none;
|
|
209
|
-
margin: 0 3px 0 14px;
|
|
210
|
-
}
|
|
211
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<template v-if="!props.inPortlet">
|
|
3
|
+
<div class="diagram-header">
|
|
4
|
+
<div class="diagram-header-left">
|
|
5
|
+
<atoms-the-icon
|
|
6
|
+
name="angle"
|
|
7
|
+
:class="[
|
|
8
|
+
'diagram-header__arrow-icon',
|
|
9
|
+
{
|
|
10
|
+
open: props.isShowDiagram,
|
|
11
|
+
},
|
|
12
|
+
]"
|
|
13
|
+
:data-id="`${props.testId}-toggle-icon`"
|
|
14
|
+
@click="onToggleDiagram"
|
|
15
|
+
/>
|
|
16
|
+
<a>
|
|
17
|
+
<span>
|
|
18
|
+
{{ localization.common.standardSwitch }}:
|
|
19
|
+
{{ props.diagramName }}
|
|
20
|
+
</span>
|
|
21
|
+
</a>
|
|
22
|
+
</div>
|
|
23
|
+
<div v-if="props.isShowDiagram" class="diagram-header__btn-container">
|
|
24
|
+
<span class="vertical-separator"></span>
|
|
25
|
+
<button
|
|
26
|
+
id="add-networking-button"
|
|
27
|
+
:data-id="`${props.testId}-add-networking-button`"
|
|
28
|
+
type="button"
|
|
29
|
+
@click="onShowModal('add-networking', props.diagramName)"
|
|
30
|
+
>
|
|
31
|
+
{{ localization.common.addNetworking }}
|
|
32
|
+
</button>
|
|
33
|
+
<button
|
|
34
|
+
id="switch-edit-button"
|
|
35
|
+
:data-id="`${props.testId}-edit-button`"
|
|
36
|
+
type="button"
|
|
37
|
+
@click="onShowModal('switch-edit')"
|
|
38
|
+
>
|
|
39
|
+
{{ localization.common.edit }}
|
|
40
|
+
</button>
|
|
41
|
+
<button
|
|
42
|
+
id="switch-manage-physical-adapters-button"
|
|
43
|
+
:data-id="`${props.testId}-manage-physical-adapters-button`"
|
|
44
|
+
type="button"
|
|
45
|
+
@click="onShowModal('switch-manage-physical-adapters')"
|
|
46
|
+
>
|
|
47
|
+
{{ localization.common.managePhysicalAdapters }}
|
|
48
|
+
</button>
|
|
49
|
+
<div class="diagram-main-actions-dots">
|
|
50
|
+
<atoms-collapse-nav
|
|
51
|
+
popup-class="diagram-main-actions__popup"
|
|
52
|
+
:close-after-click="true"
|
|
53
|
+
:items="switchMainNavigation"
|
|
54
|
+
:test-id="`${props.testId}-actions`"
|
|
55
|
+
@change="onShowModal"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<hr class="horizontal-separator" />
|
|
61
|
+
</template>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script setup lang="ts">
|
|
65
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
66
|
+
import type {
|
|
67
|
+
UI_I_NavigationItem,
|
|
68
|
+
UI_I_ModalsInitialData,
|
|
69
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
70
|
+
import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
|
|
71
|
+
|
|
72
|
+
const props = defineProps<{
|
|
73
|
+
inPortlet: boolean
|
|
74
|
+
isShowDiagram: boolean
|
|
75
|
+
diagramName: string
|
|
76
|
+
testId: string
|
|
77
|
+
}>()
|
|
78
|
+
|
|
79
|
+
const emits = defineEmits<{
|
|
80
|
+
(event: 'toggle-diagram'): void
|
|
81
|
+
(
|
|
82
|
+
event: 'show-modal',
|
|
83
|
+
modalName: string,
|
|
84
|
+
properties?: UI_I_ModalsInitialData
|
|
85
|
+
): void
|
|
86
|
+
}>()
|
|
87
|
+
|
|
88
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
89
|
+
|
|
90
|
+
const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
|
|
91
|
+
switchMainNavigationFunc(localization.value, props.testId)
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
const onToggleDiagram = () => emits('toggle-diagram')
|
|
95
|
+
|
|
96
|
+
const onShowModal = (modalName: string, diagramName?: string) =>
|
|
97
|
+
diagramName
|
|
98
|
+
? emits('show-modal', modalName, { switch_name: diagramName })
|
|
99
|
+
: emits('show-modal', modalName)
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style scoped lang="scss">
|
|
103
|
+
:root.dark-theme {
|
|
104
|
+
.diagram-header {
|
|
105
|
+
&-left {
|
|
106
|
+
a {
|
|
107
|
+
span {
|
|
108
|
+
color: #79c6e6;
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
color: #49afd9;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&__btn-container {
|
|
118
|
+
button {
|
|
119
|
+
color: #89cbdf;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
color: #57c8ea;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.diagram-header {
|
|
130
|
+
display: flex;
|
|
131
|
+
padding-left: 8px;
|
|
132
|
+
a {
|
|
133
|
+
color: #0072a3;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
font-weight: 700;
|
|
136
|
+
user-select: none;
|
|
137
|
+
line-height: 20px;
|
|
138
|
+
span {
|
|
139
|
+
font-weight: 700;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&-left {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-wrap: nowrap;
|
|
146
|
+
color: #49afd9;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&__arrow-icon {
|
|
150
|
+
width: 16px;
|
|
151
|
+
height: 16px;
|
|
152
|
+
margin-right: 4px;
|
|
153
|
+
transform: rotate(90deg);
|
|
154
|
+
align-self: center;
|
|
155
|
+
fill: var(--triger-icon-color);
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
&.open {
|
|
158
|
+
transform: rotate(180deg);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&__btn-container {
|
|
163
|
+
display: flex;
|
|
164
|
+
|
|
165
|
+
button {
|
|
166
|
+
font-size: 11px;
|
|
167
|
+
height: 24px;
|
|
168
|
+
border: none;
|
|
169
|
+
background: none;
|
|
170
|
+
margin-right: 0;
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
display: inline-block;
|
|
173
|
+
white-space: nowrap;
|
|
174
|
+
text-align: center;
|
|
175
|
+
text-transform: uppercase;
|
|
176
|
+
color: #49afd9;
|
|
177
|
+
line-height: 20px;
|
|
178
|
+
max-height: 16.8px;
|
|
179
|
+
padding: 0 14px;
|
|
180
|
+
font-weight: 500;
|
|
181
|
+
letter-spacing: 1px;
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
color: #004d8a;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.diagram-main-actions-dots {
|
|
191
|
+
position: relative;
|
|
192
|
+
transform: translate(62px, -11px);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.horizontal-separator {
|
|
196
|
+
margin: 5px 10px 10px;
|
|
197
|
+
border-left: 0;
|
|
198
|
+
border-right: 0;
|
|
199
|
+
border-color: #ddd;
|
|
200
|
+
box-sizing: content-box;
|
|
201
|
+
height: 0;
|
|
202
|
+
overflow: visible;
|
|
203
|
+
border-top: 0px solid #eee;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.vertical-separator {
|
|
207
|
+
border: 1px solid #ddd;
|
|
208
|
+
border-left: none;
|
|
209
|
+
margin: 0 3px 0 14px;
|
|
210
|
+
}
|
|
211
|
+
</style>
|