bfg-common 1.1.101 → 1.1.103

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.
@@ -3,4 +3,7 @@ export interface UI_I_TableInfoItem {
3
3
  value: any
4
4
  isProperty?: boolean
5
5
  key?: string
6
+ localization?: string
7
+ localizationTemplate?: string
8
+ isCapital?: boolean
6
9
  }
@@ -633,11 +633,11 @@ export const countersItemsFunc = (
633
633
  }
634
634
 
635
635
  export const getDefaultMetricName = (type: string, view: string): string => {
636
+ const someNames = ['memory', 'disk', 'network']
637
+
636
638
  if (type === 'datacenter') return 'cpu'
637
- else if (type === 'host') {
638
- if (view === 'cpuUsageInPercent') return 'cpu'
639
- return view
640
- }
639
+ else if (view === 'cpuUsageInPercent') return 'cpu'
640
+ else if (someNames.includes(view)) return view
641
641
 
642
642
  return ''
643
643
  }
@@ -130,10 +130,20 @@ const chartFour = ref<any>(null)
130
130
  const currentChartName = ref<string>('')
131
131
 
132
132
  const getCurrentChart = (chart: any): any => {
133
- if (currentChartName.value === 'one') return (chartOne.value = chart)
134
- if (currentChartName.value === 'two') return (chartTwo.value = chart)
135
- if (currentChartName.value === 'three') return (chartThree.value = chart)
136
- if (currentChartName.value === 'four') return (chartFour.value = chart)
133
+ switch (currentChartName.value) {
134
+ case 'one':
135
+ chartOne.value = chart
136
+ break
137
+ case 'two':
138
+ chartTwo.value = chart
139
+ break
140
+ case 'three':
141
+ chartThree.value = chart
142
+ break
143
+ case 'four':
144
+ chartFour.value = chart
145
+ break
146
+ }
137
147
  }
138
148
 
139
149
  const oneSettingsLocal = ref<UI_I_GraphDataSettingItem | null>(null)
@@ -174,10 +184,20 @@ const setCurrentGraphData = (
174
184
  props.formatTime
175
185
  )
176
186
 
177
- if (name === 'one') oneGraphData.value = graphData
178
- if (name === 'two') twoGraphData.value = graphData
179
- if (name === 'three') threeGraphData.value = graphData
180
- if (name === 'four') fourGraphData.value = graphData
187
+ switch (name) {
188
+ case 'one':
189
+ oneGraphData.value = graphData
190
+ break
191
+ case 'two':
192
+ twoGraphData.value = graphData
193
+ break
194
+ case 'three':
195
+ threeGraphData.value = graphData
196
+ break
197
+ case 'four':
198
+ fourGraphData.value = graphData
199
+ break
200
+ }
181
201
  }
182
202
 
183
203
  const outputSize = (): void => {
@@ -210,10 +230,20 @@ const updateGraphsData = (
210
230
  name: string
211
231
  ): void => {
212
232
  if (!data?.data) {
213
- if (name === 'one') oneGraphData.value = null
214
- if (name === 'two') twoGraphData.value = null
215
- if (name === 'three') threeGraphData.value = null
216
- if (name === 'four') fourGraphData.value = null
233
+ switch (name) {
234
+ case 'one':
235
+ oneGraphData.value = null
236
+ break
237
+ case 'two':
238
+ twoGraphData.value = null
239
+ break
240
+ case 'three':
241
+ threeGraphData.value = null
242
+ break
243
+ case 'four':
244
+ fourGraphData.value = null
245
+ break
246
+ }
217
247
  return
218
248
  }
219
249
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.101",
4
+ "version": "1.1.103",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",