bfg-common 1.0.25 → 1.0.26

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.
Files changed (78) hide show
  1. package/assets/localization/local_be.json +160 -1
  2. package/assets/localization/local_en.json +160 -1
  3. package/assets/localization/local_hy.json +160 -1
  4. package/assets/localization/local_kk.json +160 -1
  5. package/assets/localization/local_ru.json +160 -1
  6. package/assets/localization/local_zh.json +160 -1
  7. package/components/atoms/alert/Notification.vue +167 -167
  8. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  9. package/components/atoms/combobox/Combobox.vue +131 -131
  10. package/components/atoms/datepicker/Datepicker.vue +612 -612
  11. package/components/atoms/list/SelectList.vue +62 -62
  12. package/components/atoms/modal/bySteps/BySteps.vue +234 -234
  13. package/components/atoms/nav/NavBar.vue +116 -116
  14. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  15. package/components/atoms/notificationBar/NotificationBar.vue +175 -175
  16. package/components/atoms/perPage/PerPage.vue +52 -52
  17. package/components/atoms/popup/SimplePopup.vue +90 -90
  18. package/components/atoms/step/VerticalStep.vue +104 -104
  19. package/components/atoms/switch/Switch.vue +107 -107
  20. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
  21. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  22. package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -83
  23. package/components/atoms/tabs/Tabs.vue +189 -189
  24. package/components/atoms/tooltip/Signpost.vue +224 -224
  25. package/components/common/accordion/Accordion.vue +176 -176
  26. package/components/common/accordion/Recursion.vue +195 -195
  27. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  28. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  29. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  30. package/components/common/browse/Browse.vue +182 -182
  31. package/components/common/browse/blocks/Title.vue +66 -66
  32. package/components/common/diagramMain/Header.vue +160 -160
  33. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  34. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  35. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  36. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  37. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  38. package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -94
  39. package/components/common/diagramMain/network/Contents.vue +238 -238
  40. package/components/common/feedback/Buttons.vue +232 -232
  41. package/components/common/feedback/Message.vue +468 -468
  42. package/components/common/feedback/VisitPortal.vue +54 -54
  43. package/components/common/modals/Rename.vue +165 -165
  44. package/components/common/monitor/advanced/Advanced.vue +33 -18
  45. package/components/common/monitor/advanced/GraphView.vue +78 -146
  46. package/components/common/monitor/advanced/tools/Tools.vue +41 -20
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +35 -19
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +22 -21
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +44 -35
  50. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/items.ts +637 -0
  51. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig.ts +13 -15
  52. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +19 -6
  53. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/types.ts +3 -5
  54. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +4 -1
  55. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +381 -388
  56. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +18 -8
  57. package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics.ts +52 -58
  58. package/components/common/monitor/advanced/tools/chartOptionsModal/models/types.ts +3 -0
  59. package/components/common/monitor/models/interfaces.ts +2 -0
  60. package/components/common/perPage/PerPage.vue +51 -51
  61. package/components/common/recursionTree/RecursionTree.vue +201 -201
  62. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  63. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  64. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  65. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  66. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  67. package/models/store/storage/interfaces.ts +32 -32
  68. package/package.json +1 -1
  69. package/public/spice-console/application/application.js +1 -1
  70. package/public/spice-console/application/codec.js +257 -257
  71. package/public/spice-console/lib/rasterEngine.js +907 -907
  72. package/public/spice-console-minify/application/application.min.js +1 -1
  73. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  74. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  75. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  76. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  77. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  78. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
@@ -1,28 +1,22 @@
1
1
  <template>
2
- <div class="charts-view">
3
- <client-only>
4
- <template v-if="!props.loading">
5
- <div
6
- v-for="item in graphData"
7
- :key="item.title"
8
- class="chart-container graph-advanced"
9
- >
10
- <common-graph
11
- :chart="chart"
12
- :data="item"
13
- :update="updateHelper"
14
- :export-type="exportType"
15
- :selected-row="selectedRow"
16
- />
17
- </div>
18
- </template>
19
- </client-only>
2
+ <div ref="chartsView">
3
+ <template v-if="!props.loading && chartData">
4
+ <common-graph
5
+ :chart="chart"
6
+ :data="chartData"
7
+ :update="chartHelper"
8
+ :export-type="exportType"
9
+ :selected-row="selectedRow"
10
+ />
11
+ </template>
20
12
  </div>
21
13
  </template>
22
14
 
23
15
  <script setup lang="ts">
24
- import type { UI_I_Localization } from '~/models/interfaces'
25
- import { graphDataFunc } from '~/components/common/graph/utils/renderGraph'
16
+ import { useElementSize } from '@vueuse/core'
17
+ import { format } from 'date-fns'
18
+ import { UI_I_Localization } from '~/models/interfaces'
19
+ import { graphDataFunc } from 'bfg-nuxt-3-graph/graph/utils/renderGraph'
26
20
  import {
27
21
  I_LineGraph,
28
22
  I_SeriesLine,
@@ -32,118 +26,97 @@ const localization = computed<UI_I_Localization>(() => useLocal())
32
26
 
33
27
  const props = defineProps<{
34
28
  loading: boolean
35
- data: I_SeriesLine
36
- update: number
29
+ data: I_SeriesLine | null
37
30
  export: string
38
31
  selectedRow: number[]
32
+ darkMode: boolean
33
+ formattedDatetime: any
34
+ getDateFormat: any
35
+ language: string
39
36
  }>()
40
37
 
41
- onMounted(() => {
42
- isReady = true
43
- setResizeObserve()
44
- })
45
-
46
- const updateHelper = ref<number>(0)
47
-
48
- const graphData = ref<I_LineGraph[]>([])
38
+ const chartData = ref<I_LineGraph | null>(null)
49
39
 
50
40
  const isFullScreen = ref<boolean>(false)
51
41
  const chart = ref<any>(null)
52
- const updateGraphsData = (): void => {
53
- if (!isReady) return
54
-
55
- const resizeElementWidth = document
56
- .getElementById('center-pane')
57
- ?.getBoundingClientRect().width
58
- if (
59
- isFullScreen.value ||
60
- !isReady ||
61
- cacheElementWidth === resizeElementWidth
62
- )
63
- return
42
+ const chartHelper = ref<number>(0)
64
43
 
65
- cacheElementWidth = resizeElementWidth || 0
66
- const themeMode = useLocalStorage('themeMode')
67
- const isDarkMode = themeMode === 'dark-theme'
68
-
69
- const element = document.querySelector('.chart-container.graph-advanced')
70
- const elementWidth = element
71
- ? Math.round(element.getBoundingClientRect().width)
72
- : 1200
73
-
74
- graphData.value = []
75
- graphData.value.push(
76
- graphDataFunc(
77
- props.data,
78
- isDarkMode,
79
- localization.value,
80
- isFullScreen,
81
- true,
82
- false,
83
- false,
84
- '',
85
- '',
86
- elementWidth,
87
- chart
88
- )
89
- )
44
+ const fullScreenCallBack = (newValue: any): void => {
45
+ typeof newValue === 'boolean' && (isFullScreen.value = newValue)
90
46
  }
91
47
 
92
- let timeInterval = true
93
- let cacheElementWidth = 0
94
- let isReady = false
95
- const outputSize = (): void => {
96
- if (!timeInterval || !isReady) return
97
-
98
- timeInterval = false
99
- setTimeout(() => {
100
- updateHelper.value++
101
-
102
- timeInterval = true
103
- if (!chart.value || !chart.value?.hasLoaded) return
104
-
105
- chart.value.reflow()
106
- }, 1000)
48
+ const chartCallback = (newValue: any): void => {
49
+ newValue && (chart.value = newValue)
107
50
  }
108
51
 
109
- const setResizeObserve = (): void => {
110
- const el = document.getElementById('center-pane')
52
+ let dateFormat = ''
53
+
54
+ const startChart = (): void => {
55
+ if (!props.data) return
56
+
57
+ chartData.value = graphDataFunc(
58
+ props.data,
59
+ props.darkMode,
60
+ localization.value,
61
+ fullScreenCallBack,
62
+ true,
63
+ false,
64
+ false,
65
+ '',
66
+ '',
67
+ 0,
68
+ chartCallback,
69
+ props.formattedDatetime,
70
+ format,
71
+ dateFormat
72
+ )
111
73
 
112
- if (!el) {
113
- setTimeout(setResizeObserve, 0)
114
- return
115
- }
116
- timeInterval = true
117
- new ResizeObserver(outputSize).observe(el)
74
+ chartHelper.value++
118
75
  }
119
76
 
120
- const updateGraph = (): void => {
121
- outputSize()
122
- cacheElementWidth = 0
123
-
124
- updateGraphsData()
125
- }
126
77
  watch(
127
78
  () => props.data,
128
- (val) => {
129
- if (!val) return
79
+ (newValue) => {
80
+ if (!newValue) return
130
81
 
131
- updateGraph()
82
+ startChart()
132
83
  },
133
84
  { immediate: true }
134
85
  )
86
+
135
87
  watch(
136
- () => props.update,
137
- () => updateGraph()
88
+ () => props.darkMode,
89
+ () => {
90
+ startChart()
91
+ }
138
92
  )
139
93
 
140
94
  watch(
141
- () => props.loading,
142
- (val) => {
143
- isReady = !val
95
+ () => props.language,
96
+ () => {
97
+ dateFormat = props.getDateFormat(props.language)
98
+ startChart()
144
99
  }
145
100
  )
146
101
 
102
+ const chartsView = ref(null)
103
+ const { width } = useElementSize(chartsView)
104
+
105
+ watch(width, (newValue) => {
106
+ if (!chart.value?.isResizing) return
107
+
108
+ chart.value.setSize(1, chart.chartHeight)
109
+
110
+ if (isFullScreen.value) {
111
+ chart.value.setSize(window.innerWidth, chart.chartHeight)
112
+ return
113
+ }
114
+
115
+ setTimeout(() => {
116
+ chart.value.setSize(newValue, chart.chartHeight)
117
+ }, 1000)
118
+ })
119
+
147
120
  const exportType = ref<string>('')
148
121
  watch(
149
122
  () => props.export,
@@ -156,45 +129,4 @@ watch(
156
129
  )
157
130
  </script>
158
131
 
159
- <style scoped lang="scss">
160
- .charts-view {
161
- position: relative;
162
- display: flex;
163
- flex-direction: row;
164
- flex-wrap: wrap;
165
- justify-content: space-between;
166
- overflow: auto;
167
- height: 100%;
168
-
169
- .chart-container {
170
- box-sizing: border-box;
171
- flex-grow: 1;
172
- min-height: 300px;
173
- height: 100%;
174
- min-width: 300px;
175
- width: 100%;
176
- position: relative;
177
-
178
- &:first-child:last-child {
179
- height: 100%;
180
- width: 100%;
181
- }
182
-
183
- &:first-child:nth-last-child(2),
184
- &:nth-child(2):last-child {
185
- width: 50%;
186
- height: 100%;
187
- }
188
- }
189
- }
190
- @media (min-width: 1280px) {
191
- .charts-view .chart-container {
192
- width: 50%;
193
- }
194
- }
195
- @media (min-height: 800px) {
196
- .charts-view .chart-container {
197
- height: 50%;
198
- }
199
- }
200
- </style>
132
+ <style scoped lang="scss"></style>
@@ -2,8 +2,12 @@
2
2
  <div class="horizontal-flex-container overview-chart-title-bar">
3
3
  <div class="chart-title-content">
4
4
  <client-only>
5
- <span class="chart-title">{{ props.chartTitle }},</span>
6
- <span class="chart-title uppercase">{{ chartTitleDate }}</span>
5
+ <span v-if="props.chartTitle" class="chart-title"
6
+ >{{ props.chartTitle }},</span
7
+ >
8
+ <span v-if="chartTitleDate" class="chart-title uppercase">{{
9
+ chartTitleDate
10
+ }}</span>
7
11
  </client-only>
8
12
  </div>
9
13
  <div class="horizontal-flex-container">
@@ -11,7 +15,11 @@
11
15
  >{{ localization.period }}:</label
12
16
  >
13
17
  <div class="select">
14
- <select id="periodSelect" v-model="selectedPeriod">
18
+ <select
19
+ id="periodSelect"
20
+ v-model="selectedPeriod"
21
+ :disabled="props.disabledPeriod"
22
+ >
15
23
  <option
16
24
  v-for="(item, index) in periodOptions"
17
25
  :key="index"
@@ -34,7 +42,11 @@
34
42
  >{{ localization.view }}:</label
35
43
  >
36
44
  <div class="select">
37
- <select id="viewSelect" v-model="selectedView">
45
+ <select
46
+ id="viewSelect"
47
+ v-model="selectedView"
48
+ :disabled="props.disabledView"
49
+ >
38
50
  <option
39
51
  v-for="(item, index) in viewOptions"
40
52
  :key="index"
@@ -72,10 +84,12 @@
72
84
  <common-monitor-advanced-tools-chart-options-modal
73
85
  v-if="isShowModal"
74
86
  :type="props.type"
75
- :loading="optionsLoading"
76
- :counters="props.counters"
77
- :counters-loading="props.countersLoading"
87
+ :language="props.language"
88
+ :selected-counters-keys="props.selectedCountersKeys"
89
+ :selected-metric="props.selectedMetric"
78
90
  @hide="isShowModal = false"
91
+ @select-row="emits('select-row', $event)"
92
+ @select-metric="emits('select-metric', $event)"
79
93
  />
80
94
  </template>
81
95
 
@@ -83,28 +97,37 @@
83
97
  import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
84
98
  import { UI_I_Localization } from '~/models/interfaces'
85
99
  import { UI_I_MonitorGraphPayload } from '~/components/common/monitor/models/interfaces'
100
+ import { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/models/interfaces'
101
+ import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
102
+ import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
103
+ import {
104
+ T_ChartHost,
105
+ T_ChartVm,
106
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
86
107
  import { getValidDateByOptionFunc } from '~/components/common/monitor/config/getValidDateByOption'
87
108
  import {
88
109
  periodFunc,
89
110
  viewFunc,
90
111
  exportFunc,
91
112
  } from '~/components/common/monitor/advanced/tools/config/advancedToolbar'
92
- import { UI_I_DropMenu } from '~/components/common/monitor/advanced/tools/models/interfaces'
93
- import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
94
113
 
95
114
  const props = defineProps<{
96
115
  type: UI_T_AdvancedType
97
116
  startDate: number
98
117
  chartTitle: string
99
- counters: any
100
- countersLoading: boolean
118
+ language: string
119
+ selectedCountersKeys: number[]
120
+ selectedMetric: T_ChartHost | T_ChartVm
121
+ disabledPeriod?: boolean
122
+ disabledView?: boolean
101
123
  }>()
102
124
 
103
125
  const emits = defineEmits<{
104
126
  (event: 'update-tools', obj: UI_I_MonitorGraphPayload): void
105
127
  (event: 'exporting', str: string): void
106
128
  (event: 'open-advanced-page'): void
107
- (event: 'get-options'): void
129
+ (event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
130
+ (event: 'select-metric', value: string): void
108
131
  }>()
109
132
 
110
133
  const localization = computed<UI_I_Localization>(() => useLocal())
@@ -136,15 +159,17 @@ watch(
136
159
 
137
160
  watch(
138
161
  () => [selectedPeriod.value, selectedView.value],
139
- (val: string[]) => {
140
- const validPeriodData = getValidDateByOptionFunc(val[0])
162
+ (newValue: string[]) => {
163
+ const validPeriodData = getValidDateByOptionFunc(newValue[0])
164
+
141
165
  const period = [
142
166
  Math.round(validPeriodData[0] / 1000),
143
167
  Math.round(validPeriodData[1] / 1000),
144
168
  ]
145
169
  const tools: UI_I_MonitorGraphPayload = {
146
170
  period,
147
- view: val[1],
171
+ periodType: newValue[0],
172
+ view: newValue[1],
148
173
  }
149
174
  emits('update-tools', tools)
150
175
  },
@@ -167,12 +192,8 @@ const onExportMenuItem = (item: UI_I_DropMenu<any>): void =>
167
192
  emits('exporting', item.action)
168
193
 
169
194
  const isShowModal = ref<boolean>(false)
170
- const optionsLoading = ref<boolean>(false)
171
- const onShowChartOptions = async (): Promise<void> => {
195
+ const onShowChartOptions = (): void => {
172
196
  isShowModal.value = true
173
- optionsLoading.value = true
174
- emits('get-options')
175
- optionsLoading.value = false
176
197
  }
177
198
  </script>
178
199
 
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div class="chart-options-modal">
3
3
  <atoms-modal
4
- :class="[{ 'loader-on': props.loading }]"
5
4
  width="1150px"
6
5
  :show="true"
7
6
  :title="localization.chartOptions"
@@ -14,24 +13,20 @@
14
13
  :alerts="alerts"
15
14
  @remove="onRemoveAlerts"
16
15
  />
17
-
18
- <atoms-loader-pre-loader
19
- v-show="props.loading"
20
- id="loader"
21
- class="content-area__loading"
22
- :show="true"
23
- />
24
- <div v-show="!props.loading">
16
+ <div>
25
17
  <common-monitor-advanced-tools-chart-options-modal-actions />
26
18
 
27
19
  <div class="horizontal-flex-container chart-options-content">
28
20
  <common-monitor-advanced-tools-chart-options-modal-metrics
29
- :type="props.type"
21
+ v-model:selected-metric="selectedMetric"
22
+ :metrics-items="metricsItems"
30
23
  />
31
24
  <common-monitor-advanced-tools-chart-options-modal-counters
32
- v-model:selected-counters="selectedCounters"
33
- :counters="props.counters"
34
- :loading="props.countersLoading"
25
+ :chart="selectedMetric"
26
+ :language="props.language"
27
+ :type="props.type"
28
+ :selected-keys="props.selectedCountersKeys"
29
+ @select-row="selectedRows = $event"
35
30
  />
36
31
  </div>
37
32
  </div>
@@ -43,21 +38,35 @@
43
38
  <script setup lang="ts">
44
39
  import { UI_I_Localization } from '~/models/interfaces'
45
40
  import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
41
+ import { UI_I_VerticalTabs } from '~/components/atoms/tabs/models/interfaces'
42
+ import { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
43
+ import {
44
+ T_ChartHost,
45
+ T_ChartVm,
46
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
47
+ import { metricsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics'
46
48
 
47
49
  const props = defineProps<{
48
- loading: boolean
49
50
  type: UI_T_AdvancedType
50
- counters: any
51
- countersLoading: boolean
51
+ language: string
52
+ selectedCountersKeys: number[]
53
+ selectedMetric: T_ChartHost | T_ChartVm
52
54
  }>()
53
55
 
54
56
  const emits = defineEmits<{
55
57
  (event: 'hide'): void
58
+ (event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
59
+ (event: 'select-metric', value: string): void
56
60
  }>()
57
61
 
58
62
  const localization = computed<UI_I_Localization>(() => useLocal())
59
63
 
60
- const selectedCounters = ref<number[]>([])
64
+ const metricsItems = computed<UI_I_VerticalTabs[]>(() =>
65
+ metricsFunc(localization.value, props.type)
66
+ )
67
+ const selectedMetric = ref<T_ChartHost | T_ChartVm>(
68
+ props.selectedMetric || '' + metricsItems.value[0]?.value
69
+ )
61
70
 
62
71
  const isShowAlerts = ref<boolean>(false)
63
72
  const alerts = ref<string[]>([''])
@@ -71,16 +80,23 @@ const onHide = (): void => {
71
80
  emits('hide')
72
81
  }
73
82
 
83
+ const selectedRows = ref<UI_I_AdvancedCounterItem[]>([])
84
+
74
85
  const checkValidations = (): boolean => {
75
- if (selectedCounters.value.length) return true
86
+ if (selectedRows.value.length) return true
76
87
 
77
88
  alerts.value = [localization.value.noCountersSelected]
78
89
  isShowAlerts.value = true
79
90
 
80
91
  return false
81
92
  }
93
+
82
94
  const onSave = (): void => {
83
- checkValidations() && onHide()
95
+ if (!checkValidations()) return
96
+
97
+ emits('select-metric', selectedMetric.value)
98
+ emits('select-row', selectedRows.value)
99
+ onHide()
84
100
  }
85
101
  </script>
86
102
 
@@ -1,40 +1,41 @@
1
1
  <template>
2
2
  <div class="vertical-flex-container chart-option-counters-container">
3
3
  <common-monitor-advanced-tools-chart-options-modal-counters-table
4
- v-model:selected-counters="selectedCountersLocal"
5
- :counters="props.counters"
6
- :loading="props.loading"
7
- @change="onUpdateSelectedOption"
4
+ :chart="props.chart"
5
+ :type="props.type"
6
+ :selected-keys="props.selectedKeys"
7
+ @select-row="emits('select-row', $event)"
8
8
  />
9
9
  <common-monitor-advanced-tools-chart-options-modal-counters-timespan
10
+ :language="props.language"
10
11
  :selected="selectedOptions"
11
12
  />
12
13
  </div>
13
14
  </template>
14
15
 
15
16
  <script setup lang="ts">
17
+ import {
18
+ T_ChartHost,
19
+ T_ChartVm,
20
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
21
+ import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
22
+ import {
23
+ UI_I_AdvancedCounterItem,
24
+ UI_I_AdvancedTargetObject,
25
+ } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces'
26
+
16
27
  const props = defineProps<{
17
- counters: any
18
- loading: boolean
19
- selectedCounters: number[]
28
+ language: string
29
+ chart: T_ChartHost | T_ChartVm
30
+ type: UI_T_AdvancedType
31
+ selectedKeys: number[]
20
32
  }>()
33
+
21
34
  const emits = defineEmits<{
22
- (event: 'update:selected-counters', value: number[]): void
35
+ (event: 'select-row', value: UI_I_AdvancedCounterItem[]): void
23
36
  }>()
24
37
 
25
- const selectedCountersLocal = computed<number[]>({
26
- get() {
27
- return props.selectedCounters
28
- },
29
- set(newValue) {
30
- emits('update:selected-counters', newValue)
31
- },
32
- })
33
-
34
- const selectedOptions = ref<number[]>([])
35
- const onUpdateSelectedOption = (val: number[]): void => {
36
- selectedOptions.value = val
37
- }
38
+ const selectedOptions = ref<UI_I_AdvancedTargetObject[][]>([])
38
39
  </script>
39
40
 
40
41
  <style scoped lang="scss">