bfg-common 1.5.675 → 1.5.677

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,277 +1,277 @@
1
- <template>
2
- <div class="data-table-view">
3
- <atoms-table-data-grid
4
- v-model:selected-row="selectedRow"
5
- v-model:column-keys="columnKeys"
6
- v-model:page-size="paginationLocal.pageSize"
7
- v-model:page="paginationLocal.page"
8
- :head-items="headItems"
9
- :body-items="bodyItems"
10
- :total-items="props.totalItems"
11
- :total-pages="props.totalPages"
12
- :items-per-page="itemsPerPage"
13
- :loading="props.loading"
14
- test-id="bottom-panel-table"
15
- class="data-table"
16
- row-attribute-id-name="data-recent-tasks-id"
17
- hide-pagination
18
- server-off
19
- @sorting="onSorting"
20
- >
21
- <template #icon="{ item }">
22
- <div v-if="item.data.isIconSvg" class="data-table-view__col-icon">
23
- <atoms-the-icon :name="item.data.iconClassName" />
24
- </div>
25
- <span v-else :class="['datagrid-cell-icon', item.data.iconClassName]" />
26
- <a
27
- v-if="item.data.isLink"
28
- :id="item.data.id"
29
- :data-id="`rtask-${item.data.testId}`"
30
- :title="item.text"
31
- href="javascript:void(0)"
32
- class="text-ellipsis"
33
- @click="onSelectNodeOfTree(item)"
34
- >{{ item.text }}</a
35
- >
36
- <span
37
- v-else
38
- :data-id="`rtask-${item.data.testId}`"
39
- :title="item.text"
40
- class="text-ellipsis"
41
- >
42
- {{ item.text }}
43
- </span>
44
-
45
- <div v-if="item.data.operations?.length">
46
- <div
47
- :id="'status-details-help-icon' + item.id"
48
- class="status-details-help-icon signpost-container relative"
49
- >
50
- <atoms-the-icon
51
- :data-id="'toggle-status-details-help-icon' + item.id"
52
- fill="#0072a3"
53
- width="21px"
54
- height="21px"
55
- name="info-circle"
56
- class="cursor-pointer"
57
- @click.stop="
58
- item.data.isShowStatusDetails = !item.data.isShowStatusDetails
59
- "
60
- />
61
- <atoms-tooltip-signpost
62
- v-if="item.data.isShowStatusDetails"
63
- :elem-id="'status-details-help-icon' + item.id"
64
- test-id="select-datastore-type"
65
- @hide="item.data.isShowStatusDetails = false"
66
- >
67
- <ul class="status-details flex flex-col">
68
- <li
69
- v-for="(item2, key2) in item.data.operations"
70
- :key="key2"
71
- :data-id="item2.testId"
72
- class="status-detail-item flex flex-align-baseline"
73
- >
74
- <atoms-the-icon
75
- :name="item2.iconClassName"
76
- width="16px"
77
- height="16px"
78
- />
79
- <span>{{ item2.operation_type }}:</span>
80
- <span
81
- :title="item2.message"
82
- class="status-detail-item-message"
83
- >{{ item2.message || '--' }}</span
84
- >
85
- </li>
86
- </ul>
87
- </atoms-tooltip-signpost>
88
- </div>
89
- </div>
90
- </template>
91
-
92
- <template #action>
93
- <div class="flex-space-between flex-align-center">
94
- <div class="flex-align-center">
95
- <div class="select">
96
- <select
97
- id="bottom-panel-select-type"
98
- v-model="statusFilter"
99
- data-id="bottom-panel-select-type-select"
100
- class="clr-select"
101
- >
102
- <option :value="-1">{{ localization.common.all }}</option>
103
- <option :value="1">{{ localization.common.running }}</option>
104
- <option :value="3">{{ localization.common.failed }}</option>
105
- </select>
106
- </div>
107
- </div>
108
- </div>
109
- </template>
110
- </atoms-table-data-grid>
111
- </div>
112
- </template>
113
-
114
- <script lang="ts" setup>
115
- import type {
116
- UI_I_ColumnKey,
117
- UI_I_HeadItem,
118
- UI_I_BodyItem,
119
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
120
- import type { UI_I_Localization } from '~/lib/models/interfaces'
121
- import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
122
- import type { UI_I_TreeNodeShort } from '~/components/common/recursionTree/lib/models/interfaces'
123
- import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
124
- import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
125
- import type { UI_T_SelectedStatus } from '~/components/common/layout/bottomPanel/recentTasks/old/lib/models/types'
126
- import type { UI_I_SelectNodePayload } from '~/components/common/pages/home/widgets/warnings/table/lib/models/interfaces'
127
- import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
128
- import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
129
- import * as table from '~/components/common/layout/bottomPanel/recentTasks/old/lib/config/recentTaskTable'
130
-
131
- const statusFilter = defineModel<UI_T_SelectedStatus>('statusFilter', {
132
- required: true,
133
- })
134
-
135
- const props = defineProps<{
136
- dataTable: UI_I_RecentTaskItem<UI_T_NodeType>[]
137
- pagination: UI_I_Pagination
138
- totalItems: number
139
- totalPages: number
140
- loading: boolean
141
- }>()
142
- const emits = defineEmits<{
143
- (event: 'pagination', value: UI_I_Pagination | null): void
144
- (event: 'sort', value: string): void
145
- }>()
146
-
147
- const localization = computed<UI_I_Localization>(() => useLocal())
148
-
149
- const selectedRow = ref<number[]>([])
150
-
151
- const onSorting = (event: [number, boolean]): void => {
152
- const [column, status] = event
153
- const direction = status ? 'desc' : 'asc'
154
-
155
- const sort = `${column}.${direction}`
156
-
157
- emits('sort', sort)
158
- }
159
-
160
- const paginationLocal = ref<UI_I_Pagination | null>(null)
161
- watch(
162
- () => props.pagination,
163
- (newValue) => {
164
- paginationLocal.value = newValue
165
- },
166
- { immediate: true }
167
- )
168
- watch(
169
- paginationLocal,
170
- (newValue) => {
171
- emits('pagination', newValue)
172
- },
173
- { deep: true, immediate: true }
174
- )
175
-
176
- const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
177
- watch(localization, () => {
178
- columnKeys.value = table.columnKeys(localization.value)
179
- })
180
-
181
- const headItems = computed<UI_I_HeadItem[]>(() =>
182
- table.headItems(localization.value)
183
- )
184
-
185
- const { $store }: any = useNuxtApp()
186
- const timeFormat = computed<UI_T_TimeValue>(
187
- () => $store.getters['main/getTimeFormat']
188
- )
189
-
190
- const bodyItems = ref<UI_I_BodyItem[][]>([])
191
- watch(
192
- [
193
- (): UI_I_RecentTaskItem<UI_T_NodeType>[] => props.dataTable,
194
- statusFilter,
195
- timeFormat,
196
- localization,
197
- ],
198
- ([newValue1]) => {
199
- if (!newValue1?.length) {
200
- bodyItems.value = []
201
- return
202
- }
203
-
204
- bodyItems.value = table.bodyItems(newValue1, statusFilter.value)
205
- },
206
- { deep: true, immediate: true }
207
- )
208
-
209
- const onSelectNodeOfTree = (data: UI_I_BodyItem): void => {
210
- const { type, id, nav } = data.data
211
-
212
- const node: UI_I_TreeNodeShort = {
213
- id,
214
- type,
215
- }
216
-
217
- // useLocalStorage('sSpec', node)
218
-
219
- const path = `/inventory/type=${type};nav=${nav};id=${id}/summary`
220
-
221
- navigateTo(path)
222
-
223
- const payload: UI_I_SelectNodePayload = {
224
- node,
225
- type,
226
- }
227
- $store.dispatch('inventory/A_SELECT_NODE', payload)
228
- }
229
- </script>
230
-
231
- <style lang="scss" scoped>
232
- .data-table-view {
233
- height: inherit;
234
- .data-table {
235
- height: inherit;
236
- :deep(.datagrid-outer-wrapper) {
237
- height: inherit;
238
-
239
- .datagrid-footer__action {
240
- width: 100%;
241
-
242
- .select {
243
- margin-left: 10px;
244
- }
245
- }
246
- }
247
- }
248
- &__col-icon {
249
- min-width: 16px;
250
- height: 16px;
251
- margin-right: 2px;
252
- }
253
- &__action {
254
- padding-left: 0.3rem;
255
- }
256
-
257
- .status-details-help-icon {
258
- margin: 4px 0 0 2px;
259
- }
260
- .status-details {
261
- gap: 4px;
262
-
263
- .status-detail-item {
264
- gap: 4px;
265
-
266
- .status-detail-item-message {
267
- max-width: 200px;
268
- margin-left: 4px;
269
- }
270
-
271
- span {
272
- color: var(--table-color) !important;
273
- }
274
- }
275
- }
276
- }
277
- </style>
1
+ <template>
2
+ <div class="data-table-view">
3
+ <atoms-table-data-grid
4
+ v-model:selected-row="selectedRow"
5
+ v-model:column-keys="columnKeys"
6
+ v-model:page-size="paginationLocal.pageSize"
7
+ v-model:page="paginationLocal.page"
8
+ :head-items="headItems"
9
+ :body-items="bodyItems"
10
+ :total-items="props.totalItems"
11
+ :total-pages="props.totalPages"
12
+ :items-per-page="itemsPerPage"
13
+ :loading="props.loading"
14
+ test-id="bottom-panel-table"
15
+ class="data-table"
16
+ row-attribute-id-name="data-recent-tasks-id"
17
+ hide-pagination
18
+ server-off
19
+ @sorting="onSorting"
20
+ >
21
+ <template #icon="{ item }">
22
+ <div v-if="item.data.isIconSvg" class="data-table-view__col-icon">
23
+ <atoms-the-icon :name="item.data.iconClassName" />
24
+ </div>
25
+ <span v-else :class="['datagrid-cell-icon', item.data.iconClassName]" />
26
+ <a
27
+ v-if="item.data.isLink"
28
+ :id="item.data.id"
29
+ :data-id="`rtask-${item.data.testId}`"
30
+ :title="item.text"
31
+ href="javascript:void(0)"
32
+ class="text-ellipsis"
33
+ @click="onSelectNodeOfTree(item)"
34
+ >{{ item.text }}</a
35
+ >
36
+ <span
37
+ v-else
38
+ :data-id="`rtask-${item.data.testId}`"
39
+ :title="item.text"
40
+ class="text-ellipsis"
41
+ >
42
+ {{ item.text }}
43
+ </span>
44
+
45
+ <div v-if="item.data.operations?.length">
46
+ <div
47
+ :id="'status-details-help-icon' + item.id"
48
+ class="status-details-help-icon signpost-container relative"
49
+ >
50
+ <atoms-the-icon
51
+ :data-id="'toggle-status-details-help-icon' + item.id"
52
+ fill="#0072a3"
53
+ width="21px"
54
+ height="21px"
55
+ name="info-circle"
56
+ class="cursor-pointer"
57
+ @click.stop="
58
+ item.data.isShowStatusDetails = !item.data.isShowStatusDetails
59
+ "
60
+ />
61
+ <atoms-tooltip-signpost
62
+ v-if="item.data.isShowStatusDetails"
63
+ :elem-id="'status-details-help-icon' + item.id"
64
+ test-id="select-datastore-type"
65
+ @hide="item.data.isShowStatusDetails = false"
66
+ >
67
+ <ul class="status-details flex flex-col">
68
+ <li
69
+ v-for="(item2, key2) in item.data.operations"
70
+ :key="key2"
71
+ :data-id="item2.testId"
72
+ class="status-detail-item flex flex-align-baseline"
73
+ >
74
+ <atoms-the-icon
75
+ :name="item2.iconClassName"
76
+ width="16px"
77
+ height="16px"
78
+ />
79
+ <span>{{ item2.operation_type }}:</span>
80
+ <span
81
+ :title="item2.message"
82
+ class="status-detail-item-message"
83
+ >{{ item2.message || '--' }}</span
84
+ >
85
+ </li>
86
+ </ul>
87
+ </atoms-tooltip-signpost>
88
+ </div>
89
+ </div>
90
+ </template>
91
+
92
+ <template #action>
93
+ <div class="flex-space-between flex-align-center">
94
+ <div class="flex-align-center">
95
+ <div class="select">
96
+ <select
97
+ id="bottom-panel-select-type"
98
+ v-model="statusFilter"
99
+ data-id="bottom-panel-select-type-select"
100
+ class="clr-select"
101
+ >
102
+ <option :value="-1">{{ localization.common.all }}</option>
103
+ <option :value="1">{{ localization.common.running }}</option>
104
+ <option :value="3">{{ localization.common.failed }}</option>
105
+ </select>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </template>
110
+ </atoms-table-data-grid>
111
+ </div>
112
+ </template>
113
+
114
+ <script lang="ts" setup>
115
+ import type {
116
+ UI_I_ColumnKey,
117
+ UI_I_HeadItem,
118
+ UI_I_BodyItem,
119
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
120
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
121
+ import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
122
+ import type { UI_I_TreeNodeShort } from '~/components/common/recursionTree/lib/models/interfaces'
123
+ import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
124
+ import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
125
+ import type { UI_T_SelectedStatus } from '~/components/common/layout/bottomPanel/recentTasks/old/lib/models/types'
126
+ import type { UI_I_SelectNodePayload } from '~/components/common/pages/home/widgets/warnings/table/lib/models/interfaces'
127
+ import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
128
+ import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
129
+ import * as table from '~/components/common/layout/bottomPanel/recentTasks/old/lib/config/recentTaskTable'
130
+
131
+ const statusFilter = defineModel<UI_T_SelectedStatus>('statusFilter', {
132
+ required: true,
133
+ })
134
+
135
+ const props = defineProps<{
136
+ dataTable: UI_I_RecentTaskItem<UI_T_NodeType>[]
137
+ pagination: UI_I_Pagination
138
+ totalItems: number
139
+ totalPages: number
140
+ loading: boolean
141
+ }>()
142
+ const emits = defineEmits<{
143
+ (event: 'pagination', value: UI_I_Pagination | null): void
144
+ (event: 'sort', value: string): void
145
+ }>()
146
+
147
+ const localization = computed<UI_I_Localization>(() => useLocal())
148
+
149
+ const selectedRow = ref<number[]>([])
150
+
151
+ const onSorting = (event: [number, boolean]): void => {
152
+ const [column, status] = event
153
+ const direction = status ? 'desc' : 'asc'
154
+
155
+ const sort = `${column}.${direction}`
156
+
157
+ emits('sort', sort)
158
+ }
159
+
160
+ const paginationLocal = ref<UI_I_Pagination | null>(null)
161
+ watch(
162
+ () => props.pagination,
163
+ (newValue) => {
164
+ paginationLocal.value = newValue
165
+ },
166
+ { immediate: true }
167
+ )
168
+ watch(
169
+ paginationLocal,
170
+ (newValue) => {
171
+ emits('pagination', newValue)
172
+ },
173
+ { deep: true, immediate: true }
174
+ )
175
+
176
+ const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
177
+ watch(localization, () => {
178
+ columnKeys.value = table.columnKeys(localization.value)
179
+ })
180
+
181
+ const headItems = computed<UI_I_HeadItem[]>(() =>
182
+ table.headItems(localization.value)
183
+ )
184
+
185
+ const { $store }: any = useNuxtApp()
186
+ const timeFormat = computed<UI_T_TimeValue>(
187
+ () => $store.getters['main/getTimeFormat']
188
+ )
189
+
190
+ const bodyItems = ref<UI_I_BodyItem[][]>([])
191
+ watch(
192
+ [
193
+ (): UI_I_RecentTaskItem<UI_T_NodeType>[] => props.dataTable,
194
+ statusFilter,
195
+ timeFormat,
196
+ localization,
197
+ ],
198
+ ([newValue1]) => {
199
+ if (!newValue1?.length) {
200
+ bodyItems.value = []
201
+ return
202
+ }
203
+
204
+ bodyItems.value = table.bodyItems(newValue1, statusFilter.value)
205
+ },
206
+ { deep: true, immediate: true }
207
+ )
208
+
209
+ const onSelectNodeOfTree = (data: UI_I_BodyItem): void => {
210
+ const { type, id, nav } = data.data
211
+
212
+ const node: UI_I_TreeNodeShort = {
213
+ id,
214
+ type,
215
+ }
216
+
217
+ // useLocalStorage('sSpec', node)
218
+
219
+ const path = `/inventory/type=${type};nav=${nav};id=${id}/summary`
220
+
221
+ navigateTo(path)
222
+
223
+ const payload: UI_I_SelectNodePayload = {
224
+ node,
225
+ type,
226
+ }
227
+ $store.dispatch('inventory/A_SELECT_NODE', payload)
228
+ }
229
+ </script>
230
+
231
+ <style lang="scss" scoped>
232
+ .data-table-view {
233
+ height: inherit;
234
+ .data-table {
235
+ height: inherit;
236
+ :deep(.datagrid-outer-wrapper) {
237
+ height: inherit;
238
+
239
+ .datagrid-footer__action {
240
+ width: 100%;
241
+
242
+ .select {
243
+ margin-left: 10px;
244
+ }
245
+ }
246
+ }
247
+ }
248
+ &__col-icon {
249
+ min-width: 16px;
250
+ height: 16px;
251
+ margin-right: 2px;
252
+ }
253
+ &__action {
254
+ padding-left: 0.3rem;
255
+ }
256
+
257
+ .status-details-help-icon {
258
+ margin: 4px 0 0 2px;
259
+ }
260
+ .status-details {
261
+ gap: 4px;
262
+
263
+ .status-detail-item {
264
+ gap: 4px;
265
+
266
+ .status-detail-item-message {
267
+ max-width: 200px;
268
+ margin-left: 4px;
269
+ }
270
+
271
+ span {
272
+ color: var(--table-color) !important;
273
+ }
274
+ }
275
+ }
276
+ }
277
+ </style>
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <div
3
+ id="footer"
4
+ class="footer flex justify-between items-center fixed left-0 right-0 bottom-0"
5
+ >
6
+ <div class="content flex items-center gap-4">
7
+ <span class="company-info"
8
+ >{{ currentYear }} ©
9
+ <span class="company-name">{{ companyName }}</span></span
10
+ >
11
+
12
+ <span class="dote-divider">•</span>
13
+
14
+ <a
15
+ :href="supportLink"
16
+ data-id="support-link"
17
+ class="support-link"
18
+ target="_blank"
19
+ >
20
+ <ui-icon name="support" width="18" height="18" />
21
+ <span class="support-text">{{
22
+ localization.common.technicalSupport
23
+ }}</span></a
24
+ >
25
+ </div>
26
+
27
+ <div class="app-version-wrap flex-justify-end flex-align-center">
28
+ <span class="app-version"> {{ version }} </span>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script setup lang="ts">
34
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
35
+
36
+ const { version } = useAppVersion()
37
+
38
+ const localization = computed<UI_I_Localization>(() => useLocal())
39
+
40
+ const currentYear = new Date().getFullYear()
41
+
42
+ const config = useRuntimeConfig()
43
+
44
+ const companyName = computed<string>(
45
+ () => config.public[`COMPANY_NAME_${useEnvLanguage()}`] as string
46
+ )
47
+
48
+ const supportLink = computed<string>(() => {
49
+ return config.public.SUPPORT_SITE
50
+ })
51
+ </script>
52
+
53
+ <style scoped lang="scss">
54
+ .footer {
55
+ position: fixed;
56
+ background-color: #e9ebed;
57
+ padding: 11px 44px;
58
+
59
+ .content {
60
+ .company-info {
61
+ font-size: 14px;
62
+ line-height: 18px;
63
+ color: #9da6ad;
64
+ font-weight: 400;
65
+
66
+ .company-name {
67
+ font-weight: 300;
68
+ }
69
+ }
70
+
71
+ .dote-divider {
72
+ color: #9da6ad;
73
+ }
74
+
75
+ .support-link {
76
+ display: inline-flex;
77
+ align-items: center;
78
+ gap: 8px;
79
+ color: #9da6ad;
80
+ text-decoration: none;
81
+ font-weight: 500;
82
+ font-size: 14px;
83
+ line-height: 18px;
84
+
85
+ &:hover {
86
+ color: #008fd6;
87
+ }
88
+
89
+ .support-text {
90
+ margin-top: 4px;
91
+ }
92
+ }
93
+ }
94
+
95
+ .app-version-wrap {
96
+ .app-version {
97
+ font-size: 14px;
98
+ line-height: 18px;
99
+ color: #9da6ad;
100
+ margin-right: 8px;
101
+ }
102
+ }
103
+ }
104
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.675",
4
+ "version": "1.5.677",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",