bfg-common 1.1.63 → 1.1.64

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 (92) hide show
  1. package/assets/localization/local_be.json +1 -1
  2. package/assets/localization/local_hy.json +1 -1
  3. package/assets/localization/local_kk.json +1 -1
  4. package/assets/localization/local_ru.json +1 -1
  5. package/components/atoms/alert/Notification.vue +167 -167
  6. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  7. package/components/atoms/datepicker/Datepicker.vue +612 -612
  8. package/components/atoms/list/SelectList.vue +62 -62
  9. package/components/atoms/nav/NavBar.vue +116 -116
  10. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  11. package/components/atoms/notificationBar/NotificationBar.vue +175 -175
  12. package/components/atoms/perPage/PerPage.vue +52 -52
  13. package/components/atoms/popup/SimplePopup.vue +90 -90
  14. package/components/atoms/step/VerticalStep.vue +104 -104
  15. package/components/atoms/switch/Switch.vue +107 -107
  16. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +206 -206
  17. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  18. package/components/atoms/tabs/Tabs.vue +189 -189
  19. package/components/atoms/tooltip/Signpost.vue +224 -224
  20. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  21. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  22. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  23. package/components/common/browse/Browse.vue +182 -182
  24. package/components/common/browse/blocks/Title.vue +66 -66
  25. package/components/common/diagramMain/Diagram.vue +186 -186
  26. package/components/common/diagramMain/DiagramMain.vue +986 -986
  27. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  28. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  29. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  30. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  31. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  32. package/components/common/diagramMain/network/Contents.vue +238 -238
  33. package/components/common/feedback/Buttons.vue +232 -232
  34. package/components/common/feedback/Message.vue +468 -468
  35. package/components/common/feedback/VisitPortal.vue +54 -54
  36. package/components/common/graph/Graph.vue +18 -20
  37. package/components/common/help/navbar/left/Left.vue +159 -159
  38. package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
  39. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +359 -359
  40. package/components/common/modals/Rename.vue +165 -165
  41. package/components/common/monitor/advanced/Advanced.vue +3 -33
  42. package/components/common/monitor/advanced/GraphView.vue +4 -4
  43. package/components/common/monitor/advanced/table/Table.vue +5 -5
  44. package/components/common/monitor/advanced/tools/Tools.vue +27 -91
  45. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +17 -101
  46. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +7 -25
  47. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils.ts +0 -55
  48. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +1 -1
  49. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +3 -32
  50. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +8 -25
  51. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +19 -41
  52. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces.ts +1 -1
  53. package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +38 -50
  54. package/components/common/monitor/config/getValidDateByOption.ts +6 -105
  55. package/components/common/monitor/overview/filters/Filters.vue +6 -6
  56. package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +8 -8
  57. package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts +1 -1
  58. package/components/common/perPage/PerPage.vue +51 -51
  59. package/components/common/recursionTree/RecursionTree.vue +201 -201
  60. package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +641 -642
  61. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +245 -274
  62. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +375 -375
  63. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
  64. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
  65. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
  66. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
  67. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -447
  68. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +1 -1
  69. package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
  70. package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +203 -195
  71. package/components/common/vm/actions/add/select/storage/config/config.ts +154 -154
  72. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  73. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  74. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  75. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  76. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  77. package/models/store/interfaces.ts +37 -37
  78. package/models/store/storage/interfaces.ts +32 -32
  79. package/models/store/types.ts +32 -32
  80. package/modules/fixContentBuild/utils/methods.ts +114 -114
  81. package/package.json +1 -1
  82. package/public/spice-console/application/codec.js +257 -257
  83. package/public/spice-console/lib/rasterEngine.js +907 -907
  84. package/public/spice-console/network/spicechannel.js +369 -369
  85. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  86. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  87. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  88. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  89. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  90. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
  91. package/utils/contentBuild.ts +34 -34
  92. package/components/common/monitor/advanced/tools/utils/countCores.ts +0 -7
@@ -1,165 +1,165 @@
1
- <template>
2
- <atoms-modal
3
- :test-id="`${props.testId}-rename`"
4
- width="576px"
5
- class="rename"
6
- :show="true"
7
- :title="localization.rename"
8
- :second-title="name"
9
- @submit="onRename"
10
- @hide="onHide"
11
- >
12
- <template #modalBody>
13
- <div class="rename__body">
14
- <form
15
- :id="`${props.testId}-rename-form`"
16
- class="clr-form clr-form-horizontal"
17
- @submit.prevent
18
- >
19
- <slot v-if="$slots.description" name="description"></slot>
20
-
21
- <div class="clr-row clr-error clr-form-control">
22
- <label
23
- for="rename"
24
- :class="['clr-control-label', `clr-col-md-${labelWidth}`]"
25
- >{{ labelName }}</label
26
- >
27
- <div class="clr-control-container clr-col-8">
28
- <div class="form-group__input">
29
- <input
30
- id="rename"
31
- v-model="form.name.value"
32
- type="text"
33
- :class="nameErrorText && 'clr-input'"
34
- @blur="initValidation"
35
- @input="initValidation"
36
- />
37
- <div v-show="nameErrorText" class="form-validate">
38
- <atoms-the-icon
39
- class="is-error tooltip-trigger"
40
- name="info"
41
- />
42
- </div>
43
- </div>
44
- <div
45
- v-show="nameErrorText"
46
- class="form-group__input-error clr-subtext"
47
- >
48
- {{ nameErrorText }}
49
- </div>
50
- </div>
51
- </div>
52
- </form>
53
- </div>
54
- </template>
55
- </atoms-modal>
56
- </template>
57
-
58
- <script lang="ts" setup>
59
- import { UI_I_ValidationTouchResult } from '~/models/plugins/validation/interfaces'
60
- import { UI_I_Localization } from '~/models/interfaces'
61
- import { UI_I_RenameForm } from '~/components/common/modals/models/interfaces'
62
- import { defaultFormRenameFunc } from '~/components/common/modals/config/defaultForm'
63
- import { labelWidthFunc } from '~/components/common/modals/config/renameLabelWidth'
64
-
65
- const props = withDefaults(
66
- defineProps<{
67
- testId: string
68
- name: string
69
- label?: string
70
- }>(),
71
- {
72
- label: 'enterNewName',
73
- }
74
- )
75
- const emits = defineEmits<{
76
- (event: 'hide'): void
77
- (event: 'apply-changes', value: string): void
78
- }>()
79
-
80
- const localization = computed<UI_I_Localization>(() => useLocal())
81
- const { $validation } = useNuxtApp()
82
-
83
- const validation = $validation.call({})
84
- const defaultForm: UI_I_RenameForm = defaultFormRenameFunc(
85
- localization.value,
86
- props?.name || ''
87
- )
88
- const form = ref<UI_I_RenameForm>(useDeepCopy(defaultForm))
89
-
90
- const setForm = () => {
91
- form.value = useDeepCopy(defaultForm)
92
- validation.setForm(form)
93
- }
94
- setForm()
95
-
96
- const validForm = ref<UI_I_ValidationTouchResult | null>(null)
97
-
98
- const labelName = computed<string>(() => localization.value[props.label])
99
-
100
- /* Validation for Name input */
101
- const initValidation = () => {
102
- validForm.value = validation.touch()
103
- }
104
-
105
- const nameErrorText = computed<string>(() => {
106
- return validForm.value?.errors?.name?.[0] || ''
107
- })
108
- /* Validation Name input end */
109
-
110
- const labelWidth = computed<number>(() => labelWidthFunc(labelName.value))
111
-
112
- const onRename = (): void => {
113
- const { isValid = true } = validForm?.value || {}
114
-
115
- if (!isValid) return
116
- emits('apply-changes', form.value.name.value)
117
- }
118
-
119
- const onHide = (): void => {
120
- emits('hide')
121
- }
122
- </script>
123
-
124
- <style lang="scss" scoped>
125
- @import '~/assets/scss/common/mixins.scss';
126
- .rename {
127
- &__body {
128
- @include flex($dir: column);
129
- .clr-form-control {
130
- @include flex($dir: row);
131
-
132
- .clr-control-container {
133
- min-height: 48px;
134
- }
135
- .form-group {
136
- &__input {
137
- @include flex();
138
- input {
139
- width: 100%;
140
- }
141
- .form-validate {
142
- svg {
143
- width: 24px;
144
- height: 24px;
145
- }
146
- }
147
- &-error {
148
- margin-top: 0;
149
- }
150
- }
151
- }
152
- }
153
- }
154
- :deep(.modal-content) {
155
- .modal-title {
156
- white-space: nowrap;
157
- }
158
- .secondary-title {
159
- word-break: break-all;
160
- font-size: 18px;
161
- font-weight: 300;
162
- }
163
- }
164
- }
165
- </style>
1
+ <template>
2
+ <atoms-modal
3
+ :test-id="`${props.testId}-rename`"
4
+ width="576px"
5
+ class="rename"
6
+ :show="true"
7
+ :title="localization.rename"
8
+ :second-title="name"
9
+ @submit="onRename"
10
+ @hide="onHide"
11
+ >
12
+ <template #modalBody>
13
+ <div class="rename__body">
14
+ <form
15
+ :id="`${props.testId}-rename-form`"
16
+ class="clr-form clr-form-horizontal"
17
+ @submit.prevent
18
+ >
19
+ <slot v-if="$slots.description" name="description"></slot>
20
+
21
+ <div class="clr-row clr-error clr-form-control">
22
+ <label
23
+ for="rename"
24
+ :class="['clr-control-label', `clr-col-md-${labelWidth}`]"
25
+ >{{ labelName }}</label
26
+ >
27
+ <div class="clr-control-container clr-col-8">
28
+ <div class="form-group__input">
29
+ <input
30
+ id="rename"
31
+ v-model="form.name.value"
32
+ type="text"
33
+ :class="nameErrorText && 'clr-input'"
34
+ @blur="initValidation"
35
+ @input="initValidation"
36
+ />
37
+ <div v-show="nameErrorText" class="form-validate">
38
+ <atoms-the-icon
39
+ class="is-error tooltip-trigger"
40
+ name="info"
41
+ />
42
+ </div>
43
+ </div>
44
+ <div
45
+ v-show="nameErrorText"
46
+ class="form-group__input-error clr-subtext"
47
+ >
48
+ {{ nameErrorText }}
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </form>
53
+ </div>
54
+ </template>
55
+ </atoms-modal>
56
+ </template>
57
+
58
+ <script lang="ts" setup>
59
+ import { UI_I_ValidationTouchResult } from '~/models/plugins/validation/interfaces'
60
+ import { UI_I_Localization } from '~/models/interfaces'
61
+ import { UI_I_RenameForm } from '~/components/common/modals/models/interfaces'
62
+ import { defaultFormRenameFunc } from '~/components/common/modals/config/defaultForm'
63
+ import { labelWidthFunc } from '~/components/common/modals/config/renameLabelWidth'
64
+
65
+ const props = withDefaults(
66
+ defineProps<{
67
+ testId: string
68
+ name: string
69
+ label?: string
70
+ }>(),
71
+ {
72
+ label: 'enterNewName',
73
+ }
74
+ )
75
+ const emits = defineEmits<{
76
+ (event: 'hide'): void
77
+ (event: 'apply-changes', value: string): void
78
+ }>()
79
+
80
+ const localization = computed<UI_I_Localization>(() => useLocal())
81
+ const { $validation } = useNuxtApp()
82
+
83
+ const validation = $validation.call({})
84
+ const defaultForm: UI_I_RenameForm = defaultFormRenameFunc(
85
+ localization.value,
86
+ props?.name || ''
87
+ )
88
+ const form = ref<UI_I_RenameForm>(useDeepCopy(defaultForm))
89
+
90
+ const setForm = () => {
91
+ form.value = useDeepCopy(defaultForm)
92
+ validation.setForm(form)
93
+ }
94
+ setForm()
95
+
96
+ const validForm = ref<UI_I_ValidationTouchResult | null>(null)
97
+
98
+ const labelName = computed<string>(() => localization.value[props.label])
99
+
100
+ /* Validation for Name input */
101
+ const initValidation = () => {
102
+ validForm.value = validation.touch()
103
+ }
104
+
105
+ const nameErrorText = computed<string>(() => {
106
+ return validForm.value?.errors?.name?.[0] || ''
107
+ })
108
+ /* Validation Name input end */
109
+
110
+ const labelWidth = computed<number>(() => labelWidthFunc(labelName.value))
111
+
112
+ const onRename = (): void => {
113
+ const { isValid = true } = validForm?.value || {}
114
+
115
+ if (!isValid) return
116
+ emits('apply-changes', form.value.name.value)
117
+ }
118
+
119
+ const onHide = (): void => {
120
+ emits('hide')
121
+ }
122
+ </script>
123
+
124
+ <style lang="scss" scoped>
125
+ @import '~/assets/scss/common/mixins.scss';
126
+ .rename {
127
+ &__body {
128
+ @include flex($dir: column);
129
+ .clr-form-control {
130
+ @include flex($dir: row);
131
+
132
+ .clr-control-container {
133
+ min-height: 48px;
134
+ }
135
+ .form-group {
136
+ &__input {
137
+ @include flex();
138
+ input {
139
+ width: 100%;
140
+ }
141
+ .form-validate {
142
+ svg {
143
+ width: 24px;
144
+ height: 24px;
145
+ }
146
+ }
147
+ &-error {
148
+ margin-top: 0;
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ :deep(.modal-content) {
155
+ .modal-title {
156
+ white-space: nowrap;
157
+ }
158
+ .secondary-title {
159
+ word-break: break-all;
160
+ font-size: 18px;
161
+ font-weight: 300;
162
+ }
163
+ }
164
+ }
165
+ </style>
@@ -26,13 +26,7 @@
26
26
  :period-type="props.periodType"
27
27
  :selected-custom-time="props.selectedCustomTime"
28
28
  :selected-chart-option-name="props.selectedChartOptionName"
29
- :custom-date-from="props.customDateFrom"
30
- :custom-date-to="props.customDateTo"
31
- :custom-time-from="props.customTimeFrom"
32
- :custom-time-to="props.customTimeTo"
33
- :total-cores="totalCores"
34
- :host-id="props.hostId"
35
- @update-tools="emits('update-tools', $event)"
29
+ @update-tools="onUpdateTools"
36
30
  @exporting="onExporting"
37
31
  @open-advanced-page="onGetEmptyPage"
38
32
  @select-row="emits('select-row', $event)"
@@ -44,11 +38,6 @@
44
38
  @update-custom-time="emits('update-custom-time', $event)"
45
39
  @select-chart-name="emits('select-chart-name', $event)"
46
40
  @delete-option="emits('delete-option')"
47
- @update-custom-date-from="emits('update-custom-date-from', $event)"
48
- @update-custom-date-to="emits('update-custom-date-to', $event)"
49
- @update-custom-time-from="emits('update-custom-time-from', $event)"
50
- @update-custom-time-to="emits('update-custom-time-to', $event)"
51
- @submit-options="emits('submit-options', $event)"
52
41
  />
53
42
 
54
43
  <div v-show="!props.data" class="empty-container">
@@ -96,7 +85,6 @@ import {
96
85
  T_ChartHost,
97
86
  T_ChartVm,
98
87
  } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
99
- import { getCountCores } from '~/components/common/monitor/advanced/tools/utils/countCores'
100
88
 
101
89
  const props = defineProps<{
102
90
  type: UI_T_AdvancedType
@@ -115,11 +103,6 @@ const props = defineProps<{
115
103
  periodType: string
116
104
  selectedCustomTime: string
117
105
  selectedChartOptionName: string
118
- customDateFrom: string
119
- customDateTo: string
120
- customTimeFrom: string
121
- customTimeTo: string
122
- hostId: string
123
106
  disabledPeriod?: boolean
124
107
  disabledView?: boolean
125
108
  }>()
@@ -137,25 +120,12 @@ const emits = defineEmits<{
137
120
  (event: 'update-custom-time', value: string): void
138
121
  (event: 'select-chart-name', value: string): void
139
122
  (event: 'delete-option'): void
140
- (event: 'update-custom-date-from', value: string): void
141
- (event: 'update-custom-date-to', value: string): void
142
- (event: 'update-custom-time-from', value: string): void
143
- (event: 'update-custom-time-to', value: string): void
144
- (event: 'submit-options', value: string): void
145
123
  }>()
146
124
 
147
125
  const localization = computed<UI_I_Localization>(() => useLocal())
148
126
 
149
- const totalCores = ref<number>(0)
150
- watch(
151
- () => props.data,
152
- (newValue) => {
153
- if (!newValue) return
154
-
155
- totalCores.value = getCountCores(newValue)
156
- },
157
- { immediate: true }
158
- )
127
+ const onUpdateTools = (tools: UI_I_MonitorGraphPayload): void =>
128
+ emits('update-tools', tools)
159
129
 
160
130
  const exportGraph = ref<string>('')
161
131
  const onExporting = (key: string): void => {
@@ -6,7 +6,7 @@
6
6
  :data="chartData"
7
7
  :update="chartHelper"
8
8
  :export-type="exportType"
9
- :selected-row="props.selectedRow"
9
+ :selected-row="selectedRow"
10
10
  />
11
11
  </template>
12
12
  </div>
@@ -129,10 +129,10 @@ watch(width, (newValue) => {
129
129
  const exportType = ref<string>('')
130
130
  watch(
131
131
  () => props.export,
132
- (newValue) => {
133
- if (!newValue) return
132
+ (val) => {
133
+ if (!val) return
134
134
 
135
- exportType.value = newValue
135
+ exportType.value = val
136
136
  },
137
137
  { immediate: true }
138
138
  )
@@ -59,17 +59,17 @@ const dataBody = ref<UI_I_BodyItem[][]>([])
59
59
 
60
60
  watch(
61
61
  () => props.data,
62
- (newValue) => {
63
- if (!newValue) return
62
+ (val) => {
63
+ if (!val) return
64
64
 
65
- dataBody.value = table.bodyItems(newValue)
65
+ dataBody.value = table.bodyItems(val)
66
66
  },
67
67
  { immediate: true }
68
68
  )
69
69
  watch(
70
70
  selectedRow,
71
- (newValue) => {
72
- emits('select', newValue)
71
+ (val) => {
72
+ emits('select', val)
73
73
  },
74
74
  { deep: true }
75
75
  )
@@ -19,7 +19,6 @@
19
19
  id="periodSelect"
20
20
  v-model="selectedPeriod"
21
21
  :disabled="props.disabledPeriod"
22
- @change="onChangePeriod"
23
22
  >
24
23
  <option
25
24
  v-for="(item, index) in periodOptions"
@@ -47,7 +46,6 @@
47
46
  id="viewSelect"
48
47
  v-model="selectedView"
49
48
  :disabled="props.disabledView"
50
- @change="onChangeView"
51
49
  >
52
50
  <option
53
51
  v-for="(item, index) in viewOptions"
@@ -95,12 +93,6 @@
95
93
  :period-type="props.periodType"
96
94
  :selected-custom-time="props.selectedCustomTime"
97
95
  :selected-chart-option-name="props.selectedChartOptionName"
98
- :custom-date-from="props.customDateFrom"
99
- :custom-date-to="props.customDateTo"
100
- :custom-time-from="props.customTimeFrom"
101
- :custom-time-to="props.customTimeTo"
102
- :total-cores="props.totalCores"
103
- :host-id="props.hostId"
104
96
  @hide="isShowModal = false"
105
97
  @select-row="emits('select-row', $event)"
106
98
  @select-metric="emits('select-metric', $event)"
@@ -112,11 +104,6 @@
112
104
  @select-chart-name="onSelectChartName"
113
105
  @delete-option="onDeleteOption"
114
106
  @save-option-name="onSaveOptionName"
115
- @update-custom-date-from="emits('update-custom-date-from', $event)"
116
- @update-custom-date-to="emits('update-custom-date-to', $event)"
117
- @update-custom-time-from="emits('update-custom-time-from', $event)"
118
- @update-custom-time-to="emits('update-custom-time-to', $event)"
119
- @submit-options="emits('submit-options', $event)"
120
107
  />
121
108
  </template>
122
109
 
@@ -138,7 +125,6 @@ import {
138
125
  exportFunc,
139
126
  getCurrentOptionsStorageFunc,
140
127
  } from '~/components/common/monitor/advanced/tools/config/advancedToolbar'
141
- import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker'
142
128
 
143
129
  const props = defineProps<{
144
130
  type: UI_T_AdvancedType
@@ -153,12 +139,6 @@ const props = defineProps<{
153
139
  periodType: string
154
140
  selectedCustomTime: string
155
141
  selectedChartOptionName: string
156
- customDateFrom: string
157
- customDateTo: string
158
- customTimeFrom: string
159
- customTimeTo: string
160
- totalCores: number
161
- hostId: string
162
142
  disabledPeriod?: boolean
163
143
  disabledView?: boolean
164
144
  }>()
@@ -176,11 +156,6 @@ const emits = defineEmits<{
176
156
  (event: 'update-custom-time', value: string): void
177
157
  (event: 'select-chart-name', value: string): void
178
158
  (event: 'delete-option'): void
179
- (event: 'update-custom-date-from', value: string): void
180
- (event: 'update-custom-date-to', value: string): void
181
- (event: 'update-custom-time-from', value: string): void
182
- (event: 'update-custom-time-to', value: string): void
183
- (event: 'submit-options', value: string): void
184
159
  }>()
185
160
 
186
161
  const routeType = '' + useRoute().params.type
@@ -224,7 +199,7 @@ const onDeleteOption = (): void => {
224
199
 
225
200
  const selectedPeriod = ref<string>('')
226
201
  const periodOptions = computed<UI_I_OptionItem[]>(() =>
227
- periodFunc(localization.value, props.selectedTimespanType)
202
+ periodFunc(localization.value)
228
203
  )
229
204
  watch(
230
205
  () => periodOptions.value,
@@ -233,15 +208,6 @@ watch(
233
208
  },
234
209
  { immediate: true }
235
210
  )
236
- watch(
237
- () => props.selectedTimespanType,
238
- (newValue) => {
239
- if (!newValue) return
240
-
241
- selectedPeriod.value = newValue
242
- updateTools()
243
- }
244
- )
245
211
 
246
212
  const isShowModal = ref<boolean>(false)
247
213
  watch(isShowModal, (newValue) => {
@@ -249,63 +215,34 @@ watch(isShowModal, (newValue) => {
249
215
  selectedView.value = viewOptions.value[0].value
250
216
  })
251
217
 
252
- const selectedObjects = ref<string>('')
253
-
254
- const updateTools = (): void => {
255
- const periodValue = selectedPeriod.value
256
- const viewValue = selectedView.value
257
- const selectedValue = useLocalStorage(
258
- viewValue + 'ChartOptions',
259
- undefined,
260
- false
261
- )
262
-
263
- const fields = selectedValue
264
- ? selectedValue.counters.map((item) => item.name).join(', ')
265
- : ''
266
- const validPeriodData = getValidDateByOptionFunc(
267
- periodValue,
268
- selectedValue,
269
- props.unitsCount,
270
- props.selectedCustomTime
271
- )
272
-
273
- const period = [
274
- Math.round(validPeriodData[0] / 1000),
275
- Math.round(validPeriodData[1] / 1000),
276
- ]
277
-
278
- if (periodValue === 'custom_interval' && props.periodType === 'period') {
279
- const checkDateResult = checkDateFunc(
280
- localization.value,
281
- props.customDateFrom,
282
- props.customDateTo,
283
- props.customTimeFrom,
284
- props.customTimeTo
218
+ watch(
219
+ () => [selectedPeriod.value, selectedView.value],
220
+ (newValue: string[]) => {
221
+ const selectedValue = useLocalStorage(
222
+ newValue[1] + 'ChartOptions',
223
+ undefined,
224
+ false
285
225
  )
286
- if (Array.isArray(checkDateResult)) {
287
- period[0] = Math.round(checkDateResult[0] / 1000)
288
- period[1] = Math.round(checkDateResult[1] / 1000)
226
+ const fields = selectedValue
227
+ ? selectedValue.counters.map((item) => item.name).join(', ')
228
+ : ''
229
+
230
+ const validPeriodData = getValidDateByOptionFunc(newValue[0])
231
+
232
+ const period = [
233
+ Math.round(validPeriodData[0] / 1000),
234
+ Math.round(validPeriodData[1] / 1000),
235
+ ]
236
+ const tools: UI_I_MonitorGraphPayload = {
237
+ fields,
238
+ period,
239
+ periodType: newValue[0],
240
+ view: newValue[1],
289
241
  }
290
- }
291
-
292
- const tools: UI_I_MonitorGraphPayload = {
293
- fields,
294
- period,
295
- periodType: periodValue,
296
- view: viewValue,
297
- }
298
- emits('update-timespan-type', selectedPeriod.value)
299
- emits('update-tools', tools)
300
- }
301
-
302
- const onChangePeriod = (): void => {
303
- updateTools()
304
- }
305
-
306
- const onChangeView = (): void => {
307
- updateTools()
308
- }
242
+ emits('update-tools', tools)
243
+ },
244
+ { immediate: true }
245
+ )
309
246
 
310
247
  const chartTitleDate = computed<string>(() => {
311
248
  if (!props.startDate) return ''
@@ -332,7 +269,6 @@ const onSaveOptionName = (): void => {
332
269
 
333
270
  onMounted(() => {
334
271
  optionsNames.value = getCurrentOptionsStorageFunc(routeType)
335
- updateTools()
336
272
  })
337
273
  </script>
338
274