bfg-common 1.6.113 → 1.6.114
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-4.svg +38 -17
- package/assets/img/icons/icons-sprite-light-4.svg +49 -17
- package/assets/localization/local_be.json +43 -4
- package/assets/localization/local_en.json +43 -4
- package/assets/localization/local_hy.json +43 -4
- package/assets/localization/local_kk.json +43 -4
- package/assets/localization/local_ru.json +43 -4
- package/assets/localization/local_zh.json +43 -4
- package/components/common/configure/advancedSystemSettings/AdvancedSystemSettings.vue +25 -17
- package/components/common/configure/advancedSystemSettings/New.vue +41 -0
- package/components/common/configure/advancedSystemSettings/Old.vue +36 -0
- package/components/common/configure/advancedSystemSettings/modals/edit/Edit.vue +4 -4
- package/components/common/configure/advancedSystemSettings/modals/edit/New.vue +42 -23
- package/components/common/configure/advancedSystemSettings/modals/edit/Old.vue +5 -3
- package/components/common/configure/advancedSystemSettings/tableView/TableView.vue +27 -2
- package/components/common/configure/advancedSystemSettings/tableView/{old/field → field}/Field.vue +20 -50
- package/components/common/configure/advancedSystemSettings/tableView/field/New.vue +88 -0
- package/components/common/configure/advancedSystemSettings/tableView/field/Old.vue +73 -0
- package/components/common/configure/advancedSystemSettings/tableView/field/lib/config/index.ts +10 -0
- package/components/common/configure/advancedSystemSettings/tableView/field/lib/models/enums.ts +14 -0
- package/components/common/configure/advancedSystemSettings/tableView/new/New.vue +60 -130
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/index.ts +112 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/Old.vue +14 -41
- package/components/common/configure/advancedSystemSettings/tools/New.vue +64 -3
- package/components/common/configure/advancedSystemSettings/tools/Old.vue +2 -2
- package/components/common/configure/advancedSystemSettings/tools/Tools.vue +2 -2
- package/components/common/configure/physicalAdapters/modals/edit/lib/config/config.ts +59 -59
- package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +353 -345
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +327 -323
- package/components/common/graph/Graph.vue +19 -8
- package/components/common/graph/{graphNew/GraphNew.vue → new/New.vue} +3 -3
- package/components/common/modals/confirmation/Confirmation.vue +1 -0
- package/components/common/monitor/advanced/Advanced.vue +9 -49
- package/components/common/monitor/advanced/graphView/GraphView.vue +8 -12
- package/components/common/monitor/advanced/graphView/{GraphViewNew.vue → New.vue} +1 -1
- package/components/common/monitor/advanced/table/Table.vue +9 -8
- package/components/common/monitor/advanced/table/{tableNew/TableNew.vue → new/New.vue} +6 -5
- package/components/common/monitor/advanced/table/{tableNew → new}/lib/config/options.ts +1 -1
- package/components/common/monitor/advanced/table/{tableOld/TableOld.vue → old/Old.vue} +6 -3
- package/components/common/monitor/advanced/tools/{ToolsNew.vue → New.vue} +4 -0
- package/components/common/monitor/advanced/tools/{ToolsOld.vue → Old.vue} +2 -0
- package/components/common/monitor/advanced/tools/Tools.vue +11 -53
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +9 -13
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/{ActionsNew.vue → New.vue} +6 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +12 -44
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +8 -7
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew/TableNew.vue → new/New.vue} +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew → new}/config/tableData.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableOld/TableOld.vue → old/Old.vue} +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableOld → old}/lib/config/tableConfig.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +9 -36
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +8 -9
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew/ObjectNew.vue → new/New.vue} +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew → new}/lib/config/tableData.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectOld/ObjectOld.vue → old/Old.vue} +1 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +8 -7
- package/components/common/monitor/advanced/tools/chartOptionsModal/{NotificationNew.vue → notification/New.vue} +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/{Notification.vue → notification/Notification.vue} +8 -6
- package/components/common/monitor/advanced/tools/chartOptionsModal/{NotificationOld.vue → notification/Old.vue} +1 -5
- package/components/common/monitor/overview/OverviewNew.vue +1 -1
- package/components/common/monitor/overview/OverviewOld.vue +1 -1
- package/components/common/monitor/overview/filters/FiltersNew.vue +1 -0
- package/components/common/monitor/overview/filters/FiltersOld.vue +1 -0
- package/components/common/pages/hardwareHealth/historyTestimony/GraphNew.vue +2 -2
- package/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/hostTable.ts +0 -308
- package/components/common/configure/advancedSystemSettings/tableView/old/field/lib/models/enums.ts +0 -14
- package/components/common/graph/lib/utils/renderGraph.ts +0 -393
- /package/components/common/graph/{GraphOld.vue → Old.vue} +0 -0
- /package/components/common/graph/{graphNew → new}/EmptyBlock.vue +0 -0
- /package/components/common/graph/{graphNew → new}/lib/models/enums.ts +0 -0
- /package/components/common/monitor/advanced/{AdvancedNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/{AdvancedOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/graphView/{GraphViewOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/table/{tableNew → new}/lib/utils/constructBody.ts +0 -0
- /package/components/common/monitor/advanced/table/{tableOld → old}/lib/config/performanceDatatable.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/{ChartOptionsModalNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/{ChartOptionsModalOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/actions/{ActionsOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/{CountersNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/{CountersOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew → new}/config/options.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew → new}/utils/constructTable.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableOld → old}/lib/models/types.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/{TimespanNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/{TimespanOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew → new}/lib/config/options.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew → new}/lib/utils/constructTable.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/{MetricsNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/{MetricsOld.vue → Old.vue} +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_DataTableBody,
|
|
3
|
+
UI_I_DataTableOptions,
|
|
4
|
+
UI_I_DataTableHeader,
|
|
5
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
+
import type { UI_I_AdvancedSystemSetting } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces'
|
|
8
|
+
|
|
9
|
+
export const getHeaderDataFunc = (
|
|
10
|
+
localization: UI_I_Localization,
|
|
11
|
+
isEdit: boolean
|
|
12
|
+
): UI_I_DataTableHeader[] => [
|
|
13
|
+
{
|
|
14
|
+
col: 'col0',
|
|
15
|
+
colName: 'key',
|
|
16
|
+
text: localization.advancedSystemSettings.key,
|
|
17
|
+
isSortable: true,
|
|
18
|
+
sort: 'asc',
|
|
19
|
+
width: isEdit ? '50%' : '15%',
|
|
20
|
+
show: true,
|
|
21
|
+
filter: false,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
col: 'col1',
|
|
25
|
+
colName: 'value',
|
|
26
|
+
text: localization.advancedSystemSettings.value,
|
|
27
|
+
isSortable: true,
|
|
28
|
+
sort: 'asc',
|
|
29
|
+
width: isEdit ? '50%' : '15%',
|
|
30
|
+
show: true,
|
|
31
|
+
filter: false,
|
|
32
|
+
},
|
|
33
|
+
...(!isEdit
|
|
34
|
+
? [
|
|
35
|
+
{
|
|
36
|
+
col: 'col2',
|
|
37
|
+
colName: 'summary',
|
|
38
|
+
text: localization.advancedSystemSettings.summary,
|
|
39
|
+
isSortable: true,
|
|
40
|
+
sort: 'asc',
|
|
41
|
+
width: '70%',
|
|
42
|
+
show: true,
|
|
43
|
+
filter: false,
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
: []),
|
|
47
|
+
]
|
|
48
|
+
export const optionsFunc = (isEdit: boolean): UI_I_DataTableOptions => ({
|
|
49
|
+
selectType: 'checkbox',
|
|
50
|
+
perPageOptions: [
|
|
51
|
+
{ text: '20', value: 20, default: true },
|
|
52
|
+
{ text: '50', value: 50 },
|
|
53
|
+
{ text: '100', value: 100 },
|
|
54
|
+
],
|
|
55
|
+
inBlock: !isEdit,
|
|
56
|
+
isSelectable: false,
|
|
57
|
+
showPagination: !isEdit,
|
|
58
|
+
showPageInfo: !isEdit,
|
|
59
|
+
isSortable: true,
|
|
60
|
+
server: false,
|
|
61
|
+
isResizable: true,
|
|
62
|
+
showSearch: false,
|
|
63
|
+
showColumnManager: !isEdit,
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
export const getBodyDataFunc = (
|
|
67
|
+
items: UI_I_AdvancedSystemSetting[],
|
|
68
|
+
isEdit: boolean
|
|
69
|
+
): UI_I_DataTableBody[] => {
|
|
70
|
+
const result: UI_I_DataTableBody[] = []
|
|
71
|
+
|
|
72
|
+
items.forEach((item: UI_I_AdvancedSystemSetting, key: number) => {
|
|
73
|
+
const editData = {
|
|
74
|
+
key: item.key,
|
|
75
|
+
type: item.type,
|
|
76
|
+
value: item.value,
|
|
77
|
+
validation: item.validation,
|
|
78
|
+
// options: item.options,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
result.push({
|
|
82
|
+
row: key,
|
|
83
|
+
data: [
|
|
84
|
+
{
|
|
85
|
+
key: 'col0',
|
|
86
|
+
col: 'col0',
|
|
87
|
+
text: item.key,
|
|
88
|
+
testId: `advanced-system-settings-table-item-${key}`,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: isEdit ? 'value' : 'col1',
|
|
92
|
+
col: 'col1',
|
|
93
|
+
text: item.value,
|
|
94
|
+
testId: `advanced-system-settings-table-item-${key}`,
|
|
95
|
+
data: isEdit ? editData : null,
|
|
96
|
+
},
|
|
97
|
+
...(!isEdit
|
|
98
|
+
? [
|
|
99
|
+
{
|
|
100
|
+
key: 'col2',
|
|
101
|
+
col: 'col2',
|
|
102
|
+
text: item.summary,
|
|
103
|
+
testId: `advanced-system-settings-table-item-${key}`,
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
: []),
|
|
107
|
+
],
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
return result
|
|
112
|
+
}
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
server-off
|
|
14
14
|
>
|
|
15
15
|
<template #value="{ item }">
|
|
16
|
-
<common-configure-advanced-system-settings-table-view-
|
|
16
|
+
<common-configure-advanced-system-settings-table-view-field
|
|
17
17
|
:data="item.data"
|
|
18
|
-
@change="
|
|
19
|
-
@error-message="
|
|
18
|
+
@change="emits('change-setting', $event, item.data.key)"
|
|
19
|
+
@error-message="emits('update-invalid-fields', $event, item.data.key)"
|
|
20
20
|
/>
|
|
21
21
|
</template>
|
|
22
22
|
</atoms-table-data-grid>
|
|
@@ -29,26 +29,12 @@ import type {
|
|
|
29
29
|
UI_I_HeadItem,
|
|
30
30
|
UI_I_BodyItem,
|
|
31
31
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
32
|
-
import type {
|
|
33
|
-
|
|
34
|
-
UI_I_Localization,
|
|
35
|
-
} from '~/lib/models/interfaces'
|
|
36
|
-
import type {
|
|
37
|
-
API_UI_I_DataTable,
|
|
38
|
-
UI_I_Pagination,
|
|
39
|
-
} from '~/lib/models/table/interfaces'
|
|
32
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
33
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
40
34
|
import type { UI_I_AdvancedSystemSetting } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces'
|
|
41
35
|
import type { UI_I_AdvancedSystemSettingsEditData } from '~/components/common/configure/advancedSystemSettings/tableView/old/lib/models/interfaces'
|
|
42
36
|
import * as table from '~/components/common/configure/advancedSystemSettings/tableView/old/lib/config/table'
|
|
43
37
|
|
|
44
|
-
const settings = defineModel<API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>>(
|
|
45
|
-
'settings',
|
|
46
|
-
{ required: true }
|
|
47
|
-
)
|
|
48
|
-
const invalidFields = defineModel<string[]>('invalid-fields', {
|
|
49
|
-
required: false,
|
|
50
|
-
})
|
|
51
|
-
|
|
52
38
|
const props = defineProps<{
|
|
53
39
|
dataTable: UI_I_AdvancedSystemSetting[]
|
|
54
40
|
totalItems: number
|
|
@@ -56,28 +42,16 @@ const props = defineProps<{
|
|
|
56
42
|
isEdit: boolean
|
|
57
43
|
}>()
|
|
58
44
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
): void
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
item.value = value
|
|
68
|
-
}
|
|
69
|
-
return item
|
|
70
|
-
})
|
|
71
|
-
}
|
|
45
|
+
const emits = defineEmits<{
|
|
46
|
+
(
|
|
47
|
+
event: 'change-setting',
|
|
48
|
+
value1: UI_I_AdvancedSystemSettingsEditData['value'],
|
|
49
|
+
value2: string
|
|
50
|
+
): void
|
|
51
|
+
(event: 'update-invalid-fields', value1: string, value2: string): void
|
|
52
|
+
}>()
|
|
72
53
|
|
|
73
|
-
const
|
|
74
|
-
const onUpdateInvalidFields = (value: string, key: string): void => {
|
|
75
|
-
invalidFieldsLocal.value[key] = value
|
|
76
|
-
if (invalidFields.value)
|
|
77
|
-
invalidFields.value = Object.values(invalidFieldsLocal.value).filter(
|
|
78
|
-
(error) => error
|
|
79
|
-
)
|
|
80
|
-
}
|
|
54
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
81
55
|
|
|
82
56
|
const paginationLocal = ref<UI_I_Pagination>({
|
|
83
57
|
page: 1,
|
|
@@ -108,7 +82,6 @@ watch(
|
|
|
108
82
|
@include flex($dir: column);
|
|
109
83
|
overflow: hidden;
|
|
110
84
|
height: inherit;
|
|
111
|
-
max-height: 250px;
|
|
112
85
|
.data-table {
|
|
113
86
|
@include flex($dir: column);
|
|
114
87
|
flex-direction: column;
|
|
@@ -1,5 +1,66 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-wrap justify-between gap-4 mb-4">
|
|
3
|
+
<h3 class="advanced-system-settings-title text-[18px] font-[500]">
|
|
4
|
+
{{ props.title }}
|
|
5
|
+
</h3>
|
|
2
6
|
|
|
3
|
-
<
|
|
7
|
+
<ui-button
|
|
8
|
+
test-id="advanced-system-settings-edit-toggle"
|
|
9
|
+
variant="text"
|
|
10
|
+
is-without-sizes
|
|
11
|
+
is-without-height
|
|
12
|
+
@click="emits('show-edit-modal')"
|
|
13
|
+
>
|
|
14
|
+
<ui-icon name="settings" width="18px" height="18px" />
|
|
15
|
+
</ui-button>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
4
18
|
|
|
5
|
-
<
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
const props = defineProps<{
|
|
21
|
+
title: string
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const emits = defineEmits<{
|
|
25
|
+
(event: 'show-edit-modal'): void
|
|
26
|
+
}>()
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style>
|
|
30
|
+
:root {
|
|
31
|
+
--advanced-system-settings-title: #4d5d69;
|
|
32
|
+
--advanced-system-settings-edit-border: #e9ebed;
|
|
33
|
+
--advanced-system-settings-edit-bg: #ffffff;
|
|
34
|
+
--advanced-system-settings-edit-color: #213444;
|
|
35
|
+
--advanced-system-settings-edit-hover-bg: #f6f7f8;
|
|
36
|
+
--advanced-system-settings-edit-hover-color: #1b2a37;
|
|
37
|
+
}
|
|
38
|
+
:root.dark-theme {
|
|
39
|
+
--advanced-system-settings-title: #e9eaec;
|
|
40
|
+
--advanced-system-settings-edit-border: #e9ebed1f;
|
|
41
|
+
--advanced-system-settings-edit-bg: #1b2a373d;
|
|
42
|
+
--advanced-system-settings-edit-color: #e9eaec;
|
|
43
|
+
--advanced-system-settings-edit-hover-bg: #283948;
|
|
44
|
+
--advanced-system-settings-edit-hover-color: #ffffff;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
47
|
+
|
|
48
|
+
<style scoped lang="scss">
|
|
49
|
+
.advanced-system-settings-title {
|
|
50
|
+
color: var(--advanced-system-settings-title);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
#advanced-system-settings-edit-toggle {
|
|
54
|
+
padding: 8px;
|
|
55
|
+
width: 34px;
|
|
56
|
+
height: 34px;
|
|
57
|
+
border: 1px solid var(--advanced-system-settings-edit-border);
|
|
58
|
+
color: var(--advanced-system-settings-edit-color);
|
|
59
|
+
background-color: var(--advanced-system-settings-edit-bg);
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: var(--advanced-system-settings-edit-hover-bg);
|
|
63
|
+
color: var(--advanced-system-settings-edit-hover-color);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<template #action>
|
|
4
4
|
<button
|
|
5
5
|
class="btn btn-sm btn-secondary ng-star-inserted"
|
|
6
|
-
@click="emits('show-edit')"
|
|
6
|
+
@click="emits('show-edit-modal')"
|
|
7
7
|
>
|
|
8
8
|
{{ localization.common.edit }}...
|
|
9
9
|
</button>
|
|
@@ -19,7 +19,7 @@ const props = defineProps<{
|
|
|
19
19
|
}>()
|
|
20
20
|
|
|
21
21
|
const emits = defineEmits<{
|
|
22
|
-
(event: 'show-edit'): void
|
|
22
|
+
(event: 'show-edit-modal'): void
|
|
23
23
|
}>()
|
|
24
24
|
|
|
25
25
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<component
|
|
3
3
|
:is="currentComponent"
|
|
4
4
|
:title="localization.common.advancedSystemSettings"
|
|
5
|
-
@show-edit="emits('show-edit')"
|
|
5
|
+
@show-edit-modal="emits('show-edit-modal')"
|
|
6
6
|
/>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
11
11
|
|
|
12
12
|
const emits = defineEmits<{
|
|
13
|
-
(event: 'show-edit'): void
|
|
13
|
+
(event: 'show-edit-modal'): void
|
|
14
14
|
}>()
|
|
15
15
|
|
|
16
16
|
const { $store }: any = useNuxtApp()
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import type { UI_I_OptionItem } from '~/
|
|
2
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
-
import type {
|
|
4
|
-
UI_I_ConfiguredSpeedOption,
|
|
5
|
-
UI_I_SrOption,
|
|
6
|
-
} from '~/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces'
|
|
7
|
-
|
|
8
|
-
export const configuredSpeedOptionsFunc = (
|
|
9
|
-
localization: UI_I_Localization,
|
|
10
|
-
auto: boolean
|
|
11
|
-
): (UI_I_ConfiguredSpeedOption | UI_I_OptionItem)[] => {
|
|
12
|
-
return auto
|
|
13
|
-
? [
|
|
14
|
-
{
|
|
15
|
-
value: '10000full',
|
|
16
|
-
text: `10000 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
17
|
-
},
|
|
18
|
-
]
|
|
19
|
-
: [
|
|
20
|
-
{
|
|
21
|
-
value: '1000full',
|
|
22
|
-
text: `1000 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: '100half',
|
|
26
|
-
text: `100 ${localization.common.mbits}, ${localization.common.halfDuplex}`,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
value: '100full',
|
|
30
|
-
text: `100 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
value: '
|
|
34
|
-
text: `10 ${localization.common.mbits}, ${localization.common.halfDuplex}`,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
value: '10full',
|
|
38
|
-
text: `10 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
value: 'auto',
|
|
42
|
-
text: localization.common.autoNegotiate,
|
|
43
|
-
},
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const srOptionsFunc = (
|
|
48
|
-
localization: UI_I_Localization,
|
|
49
|
-
isNewView = false
|
|
50
|
-
): (UI_I_SrOption | UI_I_OptionItem)[] => [
|
|
51
|
-
{
|
|
52
|
-
value: isNewView ? '0' : false,
|
|
53
|
-
text: localization.common.disabled,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
value: isNewView ? '1' : true,
|
|
57
|
-
text: localization.common.enabled,
|
|
58
|
-
},
|
|
59
|
-
]
|
|
1
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
+
import type {
|
|
4
|
+
UI_I_ConfiguredSpeedOption,
|
|
5
|
+
UI_I_SrOption,
|
|
6
|
+
} from '~/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces'
|
|
7
|
+
|
|
8
|
+
export const configuredSpeedOptionsFunc = (
|
|
9
|
+
localization: UI_I_Localization,
|
|
10
|
+
auto: boolean
|
|
11
|
+
): (UI_I_ConfiguredSpeedOption | UI_I_OptionItem)[] => {
|
|
12
|
+
return auto
|
|
13
|
+
? [
|
|
14
|
+
{
|
|
15
|
+
value: '10000full',
|
|
16
|
+
text: `10000 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
17
|
+
},
|
|
18
|
+
]
|
|
19
|
+
: [
|
|
20
|
+
{
|
|
21
|
+
value: '1000full',
|
|
22
|
+
text: `1000 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: '100half',
|
|
26
|
+
text: `100 ${localization.common.mbits}, ${localization.common.halfDuplex}`,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: '100full',
|
|
30
|
+
text: `100 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: '10half',
|
|
34
|
+
text: `10 ${localization.common.mbits}, ${localization.common.halfDuplex}`,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: '10full',
|
|
38
|
+
text: `10 ${localization.common.mbits}, ${localization.common.fullDuplex}`,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: 'auto',
|
|
42
|
+
text: localization.common.autoNegotiate,
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const srOptionsFunc = (
|
|
48
|
+
localization: UI_I_Localization,
|
|
49
|
+
isNewView = false
|
|
50
|
+
): (UI_I_SrOption | UI_I_OptionItem)[] => [
|
|
51
|
+
{
|
|
52
|
+
value: isNewView ? '0' : false,
|
|
53
|
+
text: localization.common.disabled,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: isNewView ? '1' : true,
|
|
57
|
+
text: localization.common.enabled,
|
|
58
|
+
},
|
|
59
|
+
]
|