bfg-common 1.6.41 → 1.6.42

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.
@@ -1,234 +1,234 @@
1
- <template>
2
- <div class="diagram-header">
3
- <div class="diagram-header-left">
4
- <atoms-the-icon
5
- :class="[
6
- 'diagram-header__arrow-icon',
7
- {
8
- open: props.isShowDiagram,
9
- },
10
- ]"
11
- :data-id="`${props.testId}-toggle-icon`"
12
- name="angle"
13
- @click="emits('toggle-diagram')"
14
- />
15
- <a>
16
- <span>
17
- {{ localization.common.standardSwitch }}:
18
- {{ props.diagramName }}
19
- </span>
20
- </a>
21
- </div>
22
- <div v-if="props.isShowDiagram" class="diagram-header__btn-container">
23
- <span class="vertical-separator"></span>
24
- <button
25
- id="add-networking-button"
26
- v-permission="
27
- 'Networks.CreateSysx Networks.CreatePortGroup Networks.UpdateSwitch Networks.CreateSwitch'
28
- "
29
- :data-id="`${props.testId}-add-networking-button`"
30
- type="button"
31
- @click="onShowModal('add-networking', props.diagramName)"
32
- >
33
- {{ localization.common.addNetworking }}
34
- </button>
35
- <button
36
- id="switch-edit-button"
37
- v-permission="'Networks.UpdateSwitch'"
38
- :data-id="`${props.testId}-edit-button`"
39
- type="button"
40
- @click="onShowModal('switch-edit')"
41
- >
42
- {{ localization.common.edit }}
43
- </button>
44
- <button
45
- id="switch-manage-physical-adapters-button"
46
- v-permission="'Networks.UpdateSwitch'"
47
- :data-id="`${props.testId}-manage-physical-adapters-button`"
48
- type="button"
49
- @click="onShowModal('switch-manage-physical-adapters')"
50
- >
51
- {{ localization.common.managePhysicalAdapters }}
52
- </button>
53
- <div class="diagram-main-actions-dots">
54
- <atoms-collapse-nav
55
- :close-after-click="true"
56
- :items="switchMainNavigation"
57
- :test-id="`${props.testId}-actions`"
58
- popup-class="diagram-main-actions__popup"
59
- @change="onShowModal"
60
- />
61
- </div>
62
- </div>
63
- </div>
64
- <hr class="horizontal-separator" />
65
- </template>
66
-
67
- <script setup lang="ts">
68
- import type { UI_I_Localization } from '~/lib/models/interfaces'
69
- import type {
70
- UI_I_NavigationItem,
71
- UI_I_ModalsInitialData,
72
- } from '~/components/common/diagramMain/lib/models/interfaces'
73
- import type { UI_T_Project } from '~/lib/models/types'
74
- import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
75
-
76
- const props = withDefaults(
77
- defineProps<{
78
- isShowDiagram: boolean
79
- diagramName: string
80
- testId: string
81
- project?: UI_T_Project
82
- }>(),
83
- {
84
- project: undefined,
85
- }
86
- )
87
-
88
- const emits = defineEmits<{
89
- (event: 'toggle-diagram'): void
90
- (
91
- event: 'show-modal',
92
- modalName: string,
93
- properties?: UI_I_ModalsInitialData
94
- ): void
95
- }>()
96
-
97
- const localization = computed<UI_I_Localization>(() => useLocal())
98
-
99
- const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
100
- switchMainNavigationFunc(localization.value, props.testId)
101
- )
102
-
103
- const onShowModal = (modalName: string, diagramName?: string) => {
104
- diagramName
105
- ? emits('show-modal', modalName, { switch_name: diagramName })
106
- : emits('show-modal', modalName)
107
- }
108
- </script>
109
-
110
- <style scoped lang="scss">
111
- :root.dark-theme {
112
- .diagram-header {
113
- &-left {
114
- a {
115
- span {
116
- color: #79c6e6;
117
-
118
- &:hover {
119
- color: #49afd9;
120
- }
121
- }
122
- }
123
- }
124
-
125
- &__btn-container {
126
- button {
127
- color: #89cbdf;
128
-
129
- &:hover {
130
- color: #57c8ea;
131
- }
132
- }
133
- }
134
- }
135
- }
136
-
137
- .diagram-header {
138
- display: flex;
139
- justify-self: flex-start;
140
- width: 100%;
141
- padding: 24px 16px 0;
142
- overflow-x: auto;
143
- overflow-y: hidden;
144
- scrollbar-width: none;
145
- -ms-overflow-style: none;
146
-
147
- &::-webkit-scrollbar {
148
- display: none;
149
- }
150
-
151
- a {
152
- color: #0072a3;
153
- cursor: pointer;
154
- font-weight: 700;
155
- user-select: none;
156
- line-height: 20px;
157
- span {
158
- font-weight: 700;
159
- white-space: nowrap;
160
- }
161
- }
162
-
163
- &-left {
164
- display: flex;
165
- flex-wrap: nowrap;
166
- color: #49afd9;
167
- }
168
-
169
- &__arrow-icon {
170
- width: 16px;
171
- min-width: 16px;
172
- height: 16px;
173
- min-height: 16px;
174
- margin-right: 4px;
175
- transform: rotate(90deg);
176
- align-self: center;
177
- fill: var(--triger-icon-color);
178
- cursor: pointer;
179
- &.open {
180
- transform: rotate(180deg);
181
- }
182
- }
183
-
184
- &__btn-container {
185
- display: flex;
186
-
187
- button {
188
- font-size: 11px;
189
- height: 24px;
190
- border: none;
191
- background: none;
192
- margin-right: 0;
193
- cursor: pointer;
194
- display: inline-block;
195
- white-space: nowrap;
196
- text-align: center;
197
- text-transform: uppercase;
198
- color: #49afd9;
199
- line-height: 20px;
200
- max-height: 16.8px;
201
- padding: 0 14px;
202
- font-weight: 500;
203
- letter-spacing: 1px;
204
-
205
- &:hover {
206
- color: #004d8a;
207
- }
208
- }
209
- }
210
- }
211
-
212
- .diagram-main-actions-dots {
213
- position: relative;
214
- transform: translate(62px, -11px);
215
- }
216
-
217
- .horizontal-separator {
218
- margin: 5px 10px 10px;
219
- border-left: 0;
220
- border-right: 0;
221
- border-color: #ddd;
222
- box-sizing: content-box;
223
- height: 0;
224
- overflow: visible;
225
- border-top: 0px solid #eee;
226
- width: 100%;
227
- }
228
-
229
- .vertical-separator {
230
- border: 1px solid #ddd;
231
- border-left: none;
232
- margin: 0 3px 0 14px;
233
- }
234
- </style>
1
+ <template>
2
+ <div class="diagram-header">
3
+ <div class="diagram-header-left">
4
+ <atoms-the-icon
5
+ :class="[
6
+ 'diagram-header__arrow-icon',
7
+ {
8
+ open: props.isShowDiagram,
9
+ },
10
+ ]"
11
+ :data-id="`${props.testId}-toggle-icon`"
12
+ name="angle"
13
+ @click="emits('toggle-diagram')"
14
+ />
15
+ <a>
16
+ <span>
17
+ {{ localization.common.standardSwitch }}:
18
+ {{ props.diagramName }}
19
+ </span>
20
+ </a>
21
+ </div>
22
+ <div v-if="props.isShowDiagram" class="diagram-header__btn-container">
23
+ <span class="vertical-separator"></span>
24
+ <button
25
+ id="add-networking-button"
26
+ v-permission="
27
+ 'Networks.CreateSysx Networks.CreatePortGroup Networks.UpdateSwitch Networks.CreateSwitch'
28
+ "
29
+ :data-id="`${props.testId}-add-networking-button`"
30
+ type="button"
31
+ @click="onShowModal('add-networking', props.diagramName)"
32
+ >
33
+ {{ localization.common.addNetworking }}
34
+ </button>
35
+ <button
36
+ id="switch-edit-button"
37
+ v-permission="'Networks.UpdateSwitch'"
38
+ :data-id="`${props.testId}-edit-button`"
39
+ type="button"
40
+ @click="onShowModal('switch-edit')"
41
+ >
42
+ {{ localization.common.edit }}
43
+ </button>
44
+ <button
45
+ id="switch-manage-physical-adapters-button"
46
+ v-permission="'Networks.UpdateSwitch'"
47
+ :data-id="`${props.testId}-manage-physical-adapters-button`"
48
+ type="button"
49
+ @click="onShowModal('switch-manage-physical-adapters')"
50
+ >
51
+ {{ localization.common.managePhysicalAdapters }}
52
+ </button>
53
+ <div class="diagram-main-actions-dots">
54
+ <atoms-collapse-nav
55
+ :close-after-click="true"
56
+ :items="switchMainNavigation"
57
+ :test-id="`${props.testId}-actions`"
58
+ popup-class="diagram-main-actions__popup"
59
+ @change="onShowModal"
60
+ />
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <hr class="horizontal-separator" />
65
+ </template>
66
+
67
+ <script setup lang="ts">
68
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
69
+ import type {
70
+ UI_I_NavigationItem,
71
+ UI_I_ModalsInitialData,
72
+ } from '~/components/common/diagramMain/lib/models/interfaces'
73
+ import type { UI_T_Project } from '~/lib/models/types'
74
+ import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
75
+
76
+ const props = withDefaults(
77
+ defineProps<{
78
+ isShowDiagram: boolean
79
+ diagramName: string
80
+ testId: string
81
+ project?: UI_T_Project
82
+ }>(),
83
+ {
84
+ project: undefined,
85
+ }
86
+ )
87
+
88
+ const emits = defineEmits<{
89
+ (event: 'toggle-diagram'): void
90
+ (
91
+ event: 'show-modal',
92
+ modalName: string,
93
+ properties?: UI_I_ModalsInitialData
94
+ ): void
95
+ }>()
96
+
97
+ const localization = computed<UI_I_Localization>(() => useLocal())
98
+
99
+ const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
100
+ switchMainNavigationFunc(localization.value, props.testId)
101
+ )
102
+
103
+ const onShowModal = (modalName: string, diagramName?: string) => {
104
+ diagramName
105
+ ? emits('show-modal', modalName, { switch_name: diagramName })
106
+ : emits('show-modal', modalName)
107
+ }
108
+ </script>
109
+
110
+ <style scoped lang="scss">
111
+ :root.dark-theme {
112
+ .diagram-header {
113
+ &-left {
114
+ a {
115
+ span {
116
+ color: #79c6e6;
117
+
118
+ &:hover {
119
+ color: #49afd9;
120
+ }
121
+ }
122
+ }
123
+ }
124
+
125
+ &__btn-container {
126
+ button {
127
+ color: #89cbdf;
128
+
129
+ &:hover {
130
+ color: #57c8ea;
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+
137
+ .diagram-header {
138
+ display: flex;
139
+ justify-self: flex-start;
140
+ width: 100%;
141
+ padding: 24px 16px 0;
142
+ overflow-x: auto;
143
+ overflow-y: hidden;
144
+ scrollbar-width: none;
145
+ -ms-overflow-style: none;
146
+
147
+ &::-webkit-scrollbar {
148
+ display: none;
149
+ }
150
+
151
+ a {
152
+ color: #0072a3;
153
+ cursor: pointer;
154
+ font-weight: 700;
155
+ user-select: none;
156
+ line-height: 20px;
157
+ span {
158
+ font-weight: 700;
159
+ white-space: nowrap;
160
+ }
161
+ }
162
+
163
+ &-left {
164
+ display: flex;
165
+ flex-wrap: nowrap;
166
+ color: #49afd9;
167
+ }
168
+
169
+ &__arrow-icon {
170
+ width: 16px;
171
+ min-width: 16px;
172
+ height: 16px;
173
+ min-height: 16px;
174
+ margin-right: 4px;
175
+ transform: rotate(90deg);
176
+ align-self: center;
177
+ fill: var(--triger-icon-color);
178
+ cursor: pointer;
179
+ &.open {
180
+ transform: rotate(180deg);
181
+ }
182
+ }
183
+
184
+ &__btn-container {
185
+ display: flex;
186
+
187
+ button {
188
+ font-size: 11px;
189
+ height: 24px;
190
+ border: none;
191
+ background: none;
192
+ margin-right: 0;
193
+ cursor: pointer;
194
+ display: inline-block;
195
+ white-space: nowrap;
196
+ text-align: center;
197
+ text-transform: uppercase;
198
+ color: #49afd9;
199
+ line-height: 20px;
200
+ max-height: 16.8px;
201
+ padding: 0 14px;
202
+ font-weight: 500;
203
+ letter-spacing: 1px;
204
+
205
+ &:hover {
206
+ color: #004d8a;
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ .diagram-main-actions-dots {
213
+ position: relative;
214
+ transform: translate(62px, -11px);
215
+ }
216
+
217
+ .horizontal-separator {
218
+ margin: 5px 10px 10px;
219
+ border-left: 0;
220
+ border-right: 0;
221
+ border-color: #ddd;
222
+ box-sizing: content-box;
223
+ height: 0;
224
+ overflow: visible;
225
+ border-top: 0px solid #eee;
226
+ width: 100%;
227
+ }
228
+
229
+ .vertical-separator {
230
+ border: 1px solid #ddd;
231
+ border-left: none;
232
+ margin: 0 3px 0 14px;
233
+ }
234
+ </style>
@@ -1,93 +1,93 @@
1
- <template>
2
- <div class="chart-legend">
3
- <span class="title">{{
4
- localization.inventoryMonitor.performanceChartLegend
5
- }}</span>
6
- <client-only>
7
- <atoms-table-data-grid
8
- v-model:selected-row="selectedRow"
9
- v-model:column-keys="columnKeys"
10
- v-model:page-size="pageSize"
11
- v-model:page="page"
12
- :head-items="headAInfo"
13
- :body-items="dataBody"
14
- :total-items="dataBody.length"
15
- :total-pages="1"
16
- type="checkbox"
17
- class="data-table"
18
- test-id="advances-table"
19
- hide-page-size
20
- >
21
- <template #col1="{ item }">
22
- <div
23
- :style="[{ backgroundColor: item.data.color }]"
24
- class="datagrid-column-color-block"
25
- ></div>
26
- </template>
27
- </atoms-table-data-grid>
28
- </client-only>
29
- </div>
30
- </template>
31
-
32
- <script setup lang="ts">
33
- import type { UI_I_Localization } from '~/lib/models/interfaces'
34
- import type {
35
- UI_I_HeadItem,
36
- UI_I_BodyItem,
37
- UI_I_ColumnKey,
38
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
39
- import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
40
- import * as table from '~/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable'
41
-
42
- const localization = computed<UI_I_Localization>(() => useLocal())
43
-
44
- const props = defineProps<{
45
- data: UI_I_PerformanceItem[]
46
- }>()
47
- const emits = defineEmits<{
48
- (event: 'select', value: number[]): void
49
- }>()
50
-
51
- const selectedRow = ref<number[]>([])
52
- const pageSize = ref<number>(100)
53
- const page = ref<number>(1)
54
- const headAInfo = computed<UI_I_HeadItem[]>(() =>
55
- table.headItems(localization.value)
56
- )
57
- const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
58
- watch(localization, () => {
59
- columnKeys.value = table.columnKeys(localization.value)
60
- })
61
- const dataBody = ref<UI_I_BodyItem[][]>([])
62
-
63
- watch(
64
- () => props.data,
65
- (newValue) => {
66
- if (!newValue) return
67
-
68
- dataBody.value = table.bodyItems(newValue)
69
- },
70
- { immediate: true }
71
- )
72
- watch(
73
- selectedRow,
74
- (newValue) => {
75
- emits('select', newValue)
76
- },
77
- { deep: true }
78
- )
79
- </script>
80
-
81
- <style scoped lang="scss">
82
- .chart-legend {
83
- .title {
84
- font-weight: 700;
85
- height: 20px;
86
- }
87
-
88
- .datagrid-column-color-block {
89
- width: 16px;
90
- height: 16px;
91
- }
92
- }
93
- </style>
1
+ <template>
2
+ <div class="chart-legend">
3
+ <span class="title">{{
4
+ localization.inventoryMonitor.performanceChartLegend
5
+ }}</span>
6
+ <client-only>
7
+ <atoms-table-data-grid
8
+ v-model:selected-row="selectedRow"
9
+ v-model:column-keys="columnKeys"
10
+ v-model:page-size="pageSize"
11
+ v-model:page="page"
12
+ :head-items="headAInfo"
13
+ :body-items="dataBody"
14
+ :total-items="dataBody.length"
15
+ :total-pages="1"
16
+ type="checkbox"
17
+ class="data-table"
18
+ test-id="advances-table"
19
+ hide-page-size
20
+ >
21
+ <template #col1="{ item }">
22
+ <div
23
+ :style="[{ backgroundColor: item.data.color }]"
24
+ class="datagrid-column-color-block"
25
+ ></div>
26
+ </template>
27
+ </atoms-table-data-grid>
28
+ </client-only>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup lang="ts">
33
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
34
+ import type {
35
+ UI_I_HeadItem,
36
+ UI_I_BodyItem,
37
+ UI_I_ColumnKey,
38
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
39
+ import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
40
+ import * as table from '~/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable'
41
+
42
+ const localization = computed<UI_I_Localization>(() => useLocal())
43
+
44
+ const props = defineProps<{
45
+ data: UI_I_PerformanceItem[]
46
+ }>()
47
+ const emits = defineEmits<{
48
+ (event: 'select', value: number[]): void
49
+ }>()
50
+
51
+ const selectedRow = ref<number[]>([])
52
+ const pageSize = ref<number>(100)
53
+ const page = ref<number>(1)
54
+ const headAInfo = computed<UI_I_HeadItem[]>(() =>
55
+ table.headItems(localization.value)
56
+ )
57
+ const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
58
+ watch(localization, () => {
59
+ columnKeys.value = table.columnKeys(localization.value)
60
+ })
61
+ const dataBody = ref<UI_I_BodyItem[][]>([])
62
+
63
+ watch(
64
+ () => props.data,
65
+ (newValue) => {
66
+ if (!newValue) return
67
+
68
+ dataBody.value = table.bodyItems(newValue)
69
+ },
70
+ { immediate: true }
71
+ )
72
+ watch(
73
+ selectedRow,
74
+ (newValue) => {
75
+ emits('select', newValue)
76
+ },
77
+ { deep: true }
78
+ )
79
+ </script>
80
+
81
+ <style scoped lang="scss">
82
+ .chart-legend {
83
+ .title {
84
+ font-weight: 700;
85
+ height: 20px;
86
+ }
87
+
88
+ .datagrid-column-color-block {
89
+ width: 16px;
90
+ height: 16px;
91
+ }
92
+ }
93
+ </style>
@@ -19,6 +19,7 @@
19
19
  :selected-host-name="props.selectedHostName"
20
20
  :hardware-health-tabs="tabItems"
21
21
  :generated-alert-text="generateAlertTextWithLink"
22
+ :project="props.project"
22
23
  @update-history-testimony-tools="
23
24
  emits('update-history-testimony-tools', $event)
24
25
  "
@@ -43,6 +44,7 @@
43
44
  :selected-host-name="props.selectedHostName"
44
45
  :hardware-health-tabs="hardwareHealthTabs"
45
46
  :generated-alert-text="generateAlertTextWithLink"
47
+ :project="props.project"
46
48
  @update-history-testimony-tools="
47
49
  emits('update-history-testimony-tools', $event)
48
50
  "
@@ -58,6 +60,7 @@ import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardw
58
60
  import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
59
61
  import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
60
62
  import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
63
+ import type { UI_T_Project } from '~/lib/models/types'
61
64
  import {
62
65
  hardwareHealthTabsFunc,
63
66
  hardwareHealthTabsNewFunc,
@@ -77,6 +80,7 @@ const props = defineProps<{
77
80
  validDateEnd: number
78
81
  formatDate: string
79
82
  selectedHostName: string
83
+ project: UI_T_Project
80
84
  }>()
81
85
 
82
86
  const emits = defineEmits<{
@@ -78,10 +78,16 @@
78
78
  :main-selected-row="mainSelectedRow"
79
79
  :counters-table-data="props.data"
80
80
  :selected-host-name="props.selectedHostName"
81
+ :project="props.project"
81
82
  @update-tools="emits('update-history-testimony-tools', $event)"
82
83
  />
83
84
 
84
- <div :class="['table-content pt-4 h-full overflow-hidden px-[6px]', activeTab ]">
85
+ <div
86
+ :class="[
87
+ 'table-content pt-4 h-full overflow-hidden px-[6px]',
88
+ activeTab,
89
+ ]"
90
+ >
85
91
  <common-pages-hardware-health-table-view-new
86
92
  :table-data="tableData || []"
87
93
  :total-items="tableData?.length || 0"
@@ -104,6 +110,7 @@ import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardw
104
110
  import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
105
111
  import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
106
112
  import type { UI_I_IndicatorAlerts } from '~/components/common/pages/hardwareHealth/indicators/lib/models/interfaces'
113
+ import type { UI_T_Project } from '~/lib/models/types'
107
114
 
108
115
  const activeTab = defineModel<UI_T_HardwareHealthTabMode>('activeTab', {
109
116
  required: true,
@@ -131,6 +138,7 @@ const props = defineProps<{
131
138
  selectedHostName: string
132
139
  hardwareHealthTabs: UI_I_TabItem[]
133
140
  generatedAlertText: UI_I_StorageSensorsAlert
141
+ project: UI_T_Project
134
142
  }>()
135
143
  const emits = defineEmits<{
136
144
  (
@@ -234,7 +242,8 @@ const statusCounts = computed<UI_I_IndicatorAlerts>(() => {
234
242
  }
235
243
 
236
244
  .table-content {
237
- &.alert-warning, &.history-testimony {
245
+ &.alert-warning,
246
+ &.history-testimony {
238
247
  :deep(.data-table-header th:not(:last-child)) {
239
248
  min-width: max-content !important;
240
249
  }
@@ -54,6 +54,7 @@
54
54
  :valid-date-end="props.validDateEnd"
55
55
  :format-date="props.formatDate"
56
56
  :selected-host-name="props.selectedHostName"
57
+ :project="props.project"
57
58
  @update-tools="emits('update-history-testimony-tools', $event)"
58
59
  />
59
60
 
@@ -79,6 +80,7 @@ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/model
79
80
  import type { UI_I_StorageSensorsAlert } from '~/components/common/pages/hardwareHealth/lib/models/interfaces'
80
81
  import type { UI_T_HardwareHealthTabMode } from '~/components/common/pages/hardwareHealth/lib/models/types'
81
82
  import type { UI_I_HardwareHealthHistoryTestimonyTools } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
83
+ import type { UI_T_Project } from '~/lib/models/types'
82
84
 
83
85
  const activeTab = defineModel<UI_T_HardwareHealthTabMode>('activeTab', {
84
86
  required: true,
@@ -106,6 +108,7 @@ const props = defineProps<{
106
108
  selectedHostName: string
107
109
  hardwareHealthTabs: UI_I_CollapseNavItem[]
108
110
  generatedAlertText: UI_I_StorageSensorsAlert
111
+ project: UI_T_Project
109
112
  }>()
110
113
 
111
114
  const emits = defineEmits<{
@@ -40,6 +40,7 @@
40
40
  :timespan-period-type="timespanPeriodType"
41
41
  :selected-row-power="selectedRowPower"
42
42
  :selected-row-temperature="selectedRowTemperature"
43
+ :project="props.project"
43
44
  @show-chart-modal="isShowChartModal = true"
44
45
  @hide-chart-modal="isShowChartModal = false"
45
46
  @update-tools="onUpdateTools"
@@ -47,7 +48,6 @@
47
48
  @power-selected-rows-local="powerSelectedRowsLocal = $event"
48
49
  @temperature-selected-rows-local="temperatureSelectedRowsLocal = $event"
49
50
  @update-period-type="timespanPeriodType = $event"
50
- @delete-option="onDeleteOption"
51
51
  @submit-options="onSubmitOptions"
52
52
  />
53
53
  <common-pages-hardware-health-history-testimony-graph-old
@@ -91,6 +91,7 @@
91
91
  :timespan-period-type="timespanPeriodType"
92
92
  :selected-row-power="selectedRowPower"
93
93
  :selected-row-temperature="selectedRowTemperature"
94
+ :project="props.project"
94
95
  @show-chart-modal="isShowChartModal = true"
95
96
  @hide-chart-modal="isShowChartModal = false"
96
97
  @update-tools="onUpdateTools"
@@ -98,7 +99,6 @@
98
99
  @power-selected-rows-local="powerSelectedRowsLocal = $event"
99
100
  @temperature-selected-rows-local="temperatureSelectedRowsLocal = $event"
100
101
  @update-period-type="timespanPeriodType = $event"
101
- @delete-option="onDeleteOption"
102
102
  @submit-options="onSubmitOptions"
103
103
  />
104
104
  </template>
@@ -117,6 +117,7 @@ import type {
117
117
  import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
118
118
  import type { UI_I_SensorsGraphPayload } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces'
119
119
  import type { UI_I_OptionsForm } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/interfaces'
120
+ import type { UI_T_Project } from '~/lib/models/types'
120
121
 
121
122
  const selectedView = defineModel<string>('selectedView')
122
123
 
@@ -133,6 +134,7 @@ const props = defineProps<{
133
134
  mainSelectedRow: number[]
134
135
  validDateEnd: number
135
136
  formatDate: string
137
+ project: UI_T_Project
136
138
  selectedHostName?: string
137
139
  }>()
138
140
  const emits = defineEmits<{
@@ -403,7 +405,5 @@ const onSubmitOptions = (data: UI_I_OptionsForm): void => {
403
405
  data
404
406
  )
405
407
  }
406
-
407
- const onDeleteOption = (): void => {}
408
408
  </script>
409
409
  <style scoped lang="scss"></style>
@@ -25,6 +25,7 @@
25
25
  :valid-date-end="props.validDateEnd"
26
26
  :format-date="props.formatDate"
27
27
  :selected-host-name="props.selectedHostName"
28
+ :project="props.project"
28
29
  @show-chart-modal="emits('show-chart-modal')"
29
30
  @hide-chart-modal="emits('hide-chart-modal')"
30
31
  @update-tools="emits('update-tools', $event)"
@@ -34,7 +35,6 @@
34
35
  emits('temperature-selected-rows-local', $event)
35
36
  "
36
37
  @update-period-type="emits('update-period-type', $event)"
37
- @delete-option="emits('delete-option')"
38
38
  @submit-options="emits('submit-options', $event)"
39
39
  />
40
40
 
@@ -88,6 +88,7 @@ import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardw
88
88
  import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
89
89
  import type { UI_I_SensorsGraphPayload } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces'
90
90
  import type { UI_I_OptionsForm } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/interfaces'
91
+ import type { UI_T_Project } from '~/lib/models/types'
91
92
 
92
93
  const selectedView = defineModel<string>('selectedView', { required: true })
93
94
 
@@ -130,6 +131,7 @@ const props = defineProps<{
130
131
  timespanPeriodType: string
131
132
  selectedRowPower: number[]
132
133
  selectedRowTemperature: number[]
134
+ project: UI_T_Project
133
135
  }>()
134
136
  const emits = defineEmits<{
135
137
  (event: 'show-chart-modal'): void
@@ -145,7 +147,6 @@ const emits = defineEmits<{
145
147
  value: UI_I_HardwareHealthSensorsGraph[]
146
148
  ): void
147
149
  (event: 'update-period-type', value: string): void
148
- (event: 'delete-option'): void
149
150
  (event: 'submit-options', value: UI_I_OptionsForm): void
150
151
  }>()
151
152
  </script>
@@ -25,6 +25,7 @@
25
25
  :valid-date-end="props.validDateEnd"
26
26
  :format-date="props.formatDate"
27
27
  :selected-host-name="props.selectedHostName"
28
+ :project="props.project"
28
29
  @show-chart-modal="emits('show-chart-modal')"
29
30
  @hide-chart-modal="emits('hide-chart-modal')"
30
31
  @update-tools="emits('update-tools', $event)"
@@ -34,7 +35,6 @@
34
35
  emits('temperature-selected-rows-local', $event)
35
36
  "
36
37
  @update-period-type="emits('update-period-type', $event)"
37
- @delete-option="emits('delete-option')"
38
38
  @submit-options="emits('submit-options', $event)"
39
39
  />
40
40
  <div
@@ -88,6 +88,7 @@ import type { UI_I_HardwareHealthSensors } from '~/components/common/pages/hardw
88
88
  import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
89
89
  import type { UI_I_SensorsGraphPayload } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces'
90
90
  import { containerMediumSize } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/config/containerSizes'
91
+ import type { UI_T_Project } from '~/lib/models/types'
91
92
 
92
93
  const selectedView = defineModel<string>('selectedView', { required: true })
93
94
 
@@ -130,6 +131,7 @@ const props = defineProps<{
130
131
  timespanPeriodType: string
131
132
  selectedRowPower: number[]
132
133
  selectedRowTemperature: number[]
134
+ project: UI_T_Project
133
135
  }>()
134
136
  const emits = defineEmits<{
135
137
  (event: 'show-chart-modal'): void
@@ -145,7 +147,6 @@ const emits = defineEmits<{
145
147
  value: UI_I_HardwareHealthSensorsGraph[]
146
148
  ): void
147
149
  (event: 'update-period-type', value: string): void
148
- (event: 'delete-option'): void
149
150
  (event: 'submit-options', value: UI_I_OptionsForm): void
150
151
  }>()
151
152
 
@@ -27,6 +27,7 @@
27
27
  :period-options="periodOptions"
28
28
  :selected-timespan-type="props.selectedTimespanType"
29
29
  :selected-host-name="props.selectedHostName"
30
+ :options-names="optionsNames"
30
31
  @show-chart-modal="emits('show-chart-modal')"
31
32
  @hide-chart-modal="emits('hide-chart-modal')"
32
33
  @update-tools="onUpdateTools"
@@ -36,8 +37,9 @@
36
37
  emits('temperature-selected-rows-local', $event)
37
38
  "
38
39
  @update-period-type="emits('update-period-type', $event)"
39
- @delete-option="emits('delete-option')"
40
40
  @submit-options="emits('submit-options', $event)"
41
+ @save-option-name="onSaveOptionName"
42
+ @delete-option="onDeleteOption"
41
43
  />
42
44
  <common-pages-hardware-health-history-testimony-tools-old
43
45
  v-else
@@ -67,6 +69,7 @@
67
69
  :period-options="periodOptions"
68
70
  :selected-timespan-type="props.selectedTimespanType"
69
71
  :selected-host-name="props.selectedHostName"
72
+ :options-names="optionsNames"
70
73
  @show-chart-modal="emits('show-chart-modal')"
71
74
  @hide-chart-modal="emits('hide-chart-modal')"
72
75
  @update-tools="onUpdateTools"
@@ -76,20 +79,23 @@
76
79
  emits('temperature-selected-rows-local', $event)
77
80
  "
78
81
  @update-period-type="emits('update-period-type', $event)"
79
- @delete-option="emits('delete-option')"
80
82
  @submit-options="emits('submit-options', $event)"
83
+ @save-option-name="onSaveOptionName"
84
+ @delete-option="onDeleteOption"
81
85
  />
82
86
  </template>
83
87
  <script setup lang="ts">
84
88
  import type { UI_I_Localization } from '~/lib/models/interfaces'
85
- import { periodFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
86
- import { getValidDateByOptionFunc } from '~/components/common/monitor/lib/config/getValidDateByOption'
87
- import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker'
88
89
  import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
89
90
  import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
90
91
  import type { UI_I_SensorsGraphPayload } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/models/interfaces'
91
92
  import type { UI_I_OptionsForm } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/interfaces'
92
93
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
94
+ import type { UI_T_Project } from '~/lib/models/types'
95
+ import { periodFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
96
+ import { getValidDateByOptionFunc } from '~/components/common/monitor/lib/config/getValidDateByOption'
97
+ import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker'
98
+ import { getCurrentOptionsStorageFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
93
99
 
94
100
  const selectedView = defineModel<string>('selectedView', { required: true })
95
101
 
@@ -118,6 +124,7 @@ const props = defineProps<{
118
124
  validDateEnd: number
119
125
  formatDate: string
120
126
  selectedHostName: string
127
+ project: UI_T_Project
121
128
  }>()
122
129
  const emits = defineEmits<{
123
130
  (event: 'show-chart-modal'): void
@@ -133,7 +140,6 @@ const emits = defineEmits<{
133
140
  value: UI_I_HardwareHealthSensorsGraph[]
134
141
  ): void
135
142
  (event: 'update-period-type', value: string): void
136
- (event: 'delete-option'): void
137
143
  (event: 'submit-options', value: UI_I_OptionsForm): void
138
144
  }>()
139
145
 
@@ -166,8 +172,9 @@ const onUpdateTools = (): void => {
166
172
  const periodValue = selectedPeriod.value
167
173
  const viewValue = selectedView.value
168
174
  const selectedValue = useLocalStorage(
169
- viewValue + 'ChartOptionsSensors',
170
- undefined
175
+ 'ChartOptionsSensors' + viewValue,
176
+ undefined,
177
+ props.project === 'sphere'
171
178
  )
172
179
 
173
180
  const fields = selectedValue
@@ -214,5 +221,20 @@ const onUpdateTools = (): void => {
214
221
 
215
222
  emits('update-tools', tools)
216
223
  }
224
+
225
+ const optionsNames = ref<string[]>([])
226
+
227
+ const onSaveOptionName = (): void => {
228
+ optionsNames.value = getCurrentOptionsStorageFunc()
229
+ }
230
+
231
+ const onDeleteOption = (): void => {
232
+ optionsNames.value = getCurrentOptionsStorageFunc()
233
+ }
234
+
235
+ onMounted(() => {
236
+ optionsNames.value = getCurrentOptionsStorageFunc()
237
+ onUpdateTools()
238
+ })
217
239
  </script>
218
240
  <style scoped lang="scss"></style>
@@ -78,13 +78,12 @@
78
78
  "
79
79
  @update-period-type="emits('update-period-type', $event)"
80
80
  @delete-option="emits('delete-option')"
81
- @save-option-name="onSaveOptionName"
81
+ @save-option-name="emits('save-option-name')"
82
82
  @submit-options="emits('submit-options', $event)"
83
83
  />
84
84
  </template>
85
85
  <script setup lang="ts">
86
86
  import { viewFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
87
- import { getCurrentOptionsStorageFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
88
87
  import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
89
88
  import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/hardwareHealth/historyTestimony/lib/models/interfaces'
90
89
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
@@ -119,6 +118,7 @@ const props = defineProps<{
119
118
  chartTitleDate: string
120
119
  periodOptions: UI_I_OptionItem[]
121
120
  selectedHostName: string
121
+ optionsNames: string[]
122
122
  }>()
123
123
  const emits = defineEmits<{
124
124
  (event: 'show-chart-modal'): void
@@ -134,16 +134,15 @@ const emits = defineEmits<{
134
134
  value: UI_I_HardwareHealthSensorsGraph[]
135
135
  ): void
136
136
  (event: 'update-period-type', value: string): void
137
- (event: 'delete-option'): void
138
137
  (event: 'submit-options', value: UI_I_OptionsForm): void
138
+ (event: 'save-option-name'): void
139
+ (event: 'delete-option'): void
139
140
  }>()
140
141
 
141
142
  const localization = computed<UI_I_Localization>(() => useLocal())
142
143
 
143
- const optionsNames = ref<string[]>([])
144
-
145
144
  const viewOptions = computed<UI_I_OptionItem[]>(() =>
146
- viewFunc(localization.value, optionsNames.value)
145
+ viewFunc(localization.value, props.optionsNames)
147
146
  )
148
147
 
149
148
  watch(
@@ -154,7 +153,7 @@ watch(
154
153
  if (newValue) currentValue = newValue
155
154
  else if (
156
155
  selectedView.value &&
157
- optionsNames.value.includes(selectedView.value)
156
+ props.optionsNames.includes(selectedView.value)
158
157
  )
159
158
  currentValue = selectedView.value
160
159
  else currentValue = selectedView.value || viewOptions.value[0]?.value
@@ -163,15 +162,6 @@ watch(
163
162
  },
164
163
  { immediate: true }
165
164
  )
166
-
167
- const onSaveOptionName = (): void => {
168
- optionsNames.value = getCurrentOptionsStorageFunc()
169
- }
170
-
171
- onMounted(() => {
172
- optionsNames.value = getCurrentOptionsStorageFunc()
173
- emits('update-tools')
174
- })
175
165
  </script>
176
166
  <style scoped lang="scss">
177
167
  .advanced-filters {
@@ -91,7 +91,7 @@
91
91
  "
92
92
  @update-period-type="emits('update-period-type', $event)"
93
93
  @delete-option="emits('delete-option')"
94
- @save-option-name="onSaveOptionName"
94
+ @save-option-name="emits('save-option-name')"
95
95
  @submit-options="emits('submit-options', $event)"
96
96
  />
97
97
  </template>
@@ -102,10 +102,7 @@ import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/
102
102
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
103
103
  import type { UI_I_OptionsForm } from '~/components/common/monitor/advanced/tools/chartOptionsModal/lib/models/interfaces'
104
104
  import type { UI_T_Chart } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/models/types'
105
- import {
106
- getCurrentOptionsStorageFunc,
107
- viewFunc,
108
- } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
105
+ import { viewFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
109
106
 
110
107
  const selectedView = defineModel<string>('selectedView', { required: true })
111
108
  const selectedPeriod = defineModel<string>('selectedPeriod', { required: true })
@@ -135,6 +132,7 @@ const props = defineProps<{
135
132
  chartTitleDate: string
136
133
  periodOptions: UI_I_OptionItem[]
137
134
  selectedHostName: string
135
+ optionsNames: string[]
138
136
  }>()
139
137
 
140
138
  const emits = defineEmits<{
@@ -151,16 +149,15 @@ const emits = defineEmits<{
151
149
  value: UI_I_HardwareHealthSensorsGraph[]
152
150
  ): void
153
151
  (event: 'update-period-type', value: string): void
154
- (event: 'delete-option'): void
155
152
  (event: 'submit-options', value: UI_I_OptionsForm): void
153
+ (event: 'save-option-name'): void
154
+ (event: 'delete-option'): void
156
155
  }>()
157
156
 
158
157
  const localization = computed<UI_I_Localization>(() => useLocal())
159
158
 
160
- const optionsNames = ref<string[]>([])
161
-
162
159
  const viewOptions = computed<UI_I_OptionItem[]>(() =>
163
- viewFunc(localization.value, optionsNames.value)
160
+ viewFunc(localization.value, props.optionsNames)
164
161
  )
165
162
 
166
163
  watch(
@@ -170,7 +167,7 @@ watch(
170
167
  if (newValue) currentValue = newValue
171
168
  else if (
172
169
  selectedView.value &&
173
- optionsNames.value.includes(selectedView.value)
170
+ props.optionsNames.includes(selectedView.value)
174
171
  )
175
172
  currentValue = selectedView.value
176
173
  else currentValue = selectedView.value || viewOptions.value[0]?.value
@@ -179,15 +176,6 @@ watch(
179
176
  },
180
177
  { immediate: true }
181
178
  )
182
-
183
- const onSaveOptionName = (): void => {
184
- optionsNames.value = getCurrentOptionsStorageFunc()
185
- }
186
-
187
- onMounted(() => {
188
- optionsNames.value = getCurrentOptionsStorageFunc()
189
- emits('update-tools')
190
- })
191
179
  </script>
192
180
 
193
181
  <style scoped lang="scss">
@@ -94,7 +94,11 @@ import type { UI_I_HardwareHealthSensorsGraph } from '~/components/common/pages/
94
94
  import { metricsFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/lib/config/optionsMetrics'
95
95
  import { checkDateFunc } from '~/components/common/monitor/overview/filters/customIntervalModal/lib/config/dateChecker'
96
96
  import { getValidDateByOptionFunc } from '~/components/common/monitor/lib/config/getValidDateByOption'
97
- import { getCurrentOptionsStorageFunc } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
97
+ import {
98
+ getCurrentOptionsStorageFunc,
99
+ removeSelectedOptionsFromStorageFunc,
100
+ getSelectedOptionsValueFromStorageFunc,
101
+ } from '~/components/common/pages/hardwareHealth/historyTestimony/tools/lib/config/toolbar'
98
102
 
99
103
  const props = defineProps<{
100
104
  selectedChartOptionName: string
@@ -141,6 +145,7 @@ const { $store }: any = useNuxtApp()
141
145
  const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
142
146
 
143
147
  const routeType = '' + useRoute().params.type
148
+ const routeId = '' + useRoute().params.id
144
149
 
145
150
  const localization = computed<UI_I_Localization>(() => useLocal())
146
151
 
@@ -389,6 +394,8 @@ const onSaveOptions = (name: string): void => {
389
394
  chartType,
390
395
  counters,
391
396
  metric: selectedMetric.value,
397
+ validShowName: name,
398
+ nodeId: routeId,
392
399
  timespan: {
393
400
  periodType: localTimespanPeriodType.value,
394
401
  units: localCustomTime.value,
@@ -396,7 +403,7 @@ const onSaveOptions = (name: string): void => {
396
403
  type: timespanType.value,
397
404
  },
398
405
  }
399
- useLocalStorage(`${name}ChartOptionsSensors`, saveOptionsData)
406
+ useLocalStorage(`ChartOptionsSensors${name}`, saveOptionsData)
400
407
  optionsNames.value = getCurrentOptionsStorageFunc()
401
408
  localSelectedChartOptionName.value = name
402
409
  emits('save-option-name')
@@ -418,7 +425,7 @@ const setDefaultOptions = (): void => {
418
425
  }
419
426
 
420
427
  const setCustomOptions = (name: string): void => {
421
- const selectedValue = useLocalStorage(name + 'ChartOptionsSensors', undefined)
428
+ const selectedValue = getSelectedOptionsValueFromStorageFunc(name, routeId)
422
429
 
423
430
  if (selectedValue.routeType !== routeType) return
424
431
 
@@ -462,7 +469,7 @@ watch(
462
469
  )
463
470
 
464
471
  const onDeleteChartName = (name: string): void => {
465
- window.localStorage.removeItem(name + 'ChartOptionsSensors')
472
+ removeSelectedOptionsFromStorageFunc(name, routeId)
466
473
  optionsNames.value = getCurrentOptionsStorageFunc()
467
474
  setSelectOptions()
468
475
  emits('delete-option')
@@ -70,13 +70,56 @@ export const viewFunc = (
70
70
  }
71
71
 
72
72
  export const getCurrentOptionsStorageFunc = (): string[] => {
73
+ const routeId = useRoute().params.id
74
+ const routeType = useRoute().params.type
75
+
73
76
  const optionsNames = []
74
77
  for (const key of Object.entries(localStorage)) {
75
78
  if (key[0].includes('ChartOptionsSensors')) {
76
- if (key[0].includes('ChartOptionsSensors')) {
77
- optionsNames.push(key[0].replace('ChartOptionsSensors', ''))
78
- }
79
+ const values = JSON.parse(key[1])
80
+
81
+ if (
82
+ values.value.routeType === routeType &&
83
+ values.value.nodeId === routeId
84
+ )
85
+ optionsNames.push(values.value.validShowName)
79
86
  }
80
87
  }
81
88
  return optionsNames
82
89
  }
90
+
91
+ export const removeSelectedOptionsFromStorageFunc = (
92
+ selectedName: string,
93
+ routeId: string
94
+ ): void => {
95
+ for (const key of Object.entries(localStorage)) {
96
+ if (key[0].includes('ChartOptionsSensors')) {
97
+ let values = JSON.parse(key[1])
98
+
99
+ if (
100
+ values.value.validShowName === selectedName &&
101
+ values.value.nodeId === routeId
102
+ )
103
+ window.localStorage.removeItem(key[0])
104
+ }
105
+ }
106
+ }
107
+
108
+ export const getSelectedOptionsValueFromStorageFunc = (
109
+ selectedName: string,
110
+ routeId: string
111
+ ): string[] => {
112
+ let result = null
113
+ for (const key of Object.entries(localStorage)) {
114
+ if (key[0].includes('ChartOptionsSensors')) {
115
+ let values = JSON.parse(key[1])
116
+
117
+ if (
118
+ values.value.validShowName === selectedName &&
119
+ values.value.nodeId === routeId
120
+ )
121
+ result = values.value
122
+ }
123
+ }
124
+ return result
125
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.6.41",
4
+ "version": "1.6.42",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -1,81 +0,0 @@
1
- <template>
2
- <atoms-modal
3
- :title="localization.inventoryMonitor.saveOptionsAs"
4
- width="575px"
5
- show
6
- @hide="onHide"
7
- @submit="onSave"
8
- >
9
- <template #modalBody>
10
- <common-pages-hardware-health-history-testimony-tools-chart-options-modal-actions-save-options-modal
11
- v-show="isShowAlerts"
12
- :alerts="alerts"
13
- @remove="onRemoveAlerts"
14
- />
15
- <div class="form-control">
16
- <label class="save-option-name-label" for="chartOptionsName"
17
- >{{ localization.common.chartOptionsName }}:</label
18
- >
19
- <input
20
- id="chartOptionsName"
21
- v-model="name"
22
- data-id="chart-options-name"
23
- type="text"
24
- />
25
- </div>
26
- </template>
27
- </atoms-modal>
28
- </template>
29
-
30
- <script setup lang="ts">
31
- import type { UI_I_Localization } from '~/lib/models/interfaces'
32
-
33
- const emits = defineEmits<{
34
- (event: 'hide'): void
35
- (event: 'save', value: string): void
36
- }>()
37
-
38
- const localization = computed<UI_I_Localization>(() => useLocal())
39
-
40
- const name = ref<string>('')
41
- const isShowAlerts = ref<boolean>(false)
42
- const alerts = ref<string[]>([])
43
-
44
- const onHide = (): void => {
45
- emits('hide')
46
- }
47
- const onSave = (): void => {
48
- if (!name.value) {
49
- alerts.value = [localization.value.common.settingsNameErrorDesc]
50
- isShowAlerts.value = true
51
-
52
- return
53
- }
54
-
55
- emits('save', name.value)
56
- }
57
-
58
- const onRemoveAlerts = (): void => {
59
- isShowAlerts.value = false
60
- alerts.value = []
61
- }
62
- </script>
63
-
64
- <style scoped lang="scss">
65
- :deep(.modal-dialog) {
66
- .alert {
67
- margin-bottom: 20px;
68
- }
69
-
70
- .form-control {
71
- display: flex;
72
-
73
- .save-option-name-label {
74
- white-space: nowrap;
75
- }
76
- #chartOptionsName {
77
- width: 100%;
78
- }
79
- }
80
- }
81
- </style>