bfg-common 1.4.839 → 1.4.841

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 (40) hide show
  1. package/assets/localization/local_be.json +17 -4
  2. package/assets/localization/local_en.json +17 -4
  3. package/assets/localization/local_hy.json +17 -4
  4. package/assets/localization/local_kk.json +17 -4
  5. package/assets/localization/local_ru.json +18 -5
  6. package/assets/localization/local_zh.json +17 -4
  7. package/components/atoms/collapse/CollapseNav.vue +4 -4
  8. package/components/atoms/dropdown/dropdown/Dropdown.vue +12 -0
  9. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
  10. package/components/atoms/table/dataGrid/lib/utils/export.ts +1 -1
  11. package/components/common/graph/GraphNew.vue +176 -176
  12. package/components/common/modals/confirmByInput/ConfirmByInput.vue +57 -177
  13. package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +103 -0
  14. package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +204 -0
  15. package/components/common/monitor/advanced/Advanced.vue +196 -170
  16. package/components/common/monitor/advanced/AdvancedNew.vue +181 -206
  17. package/components/common/monitor/advanced/AdvancedOld.vue +12 -40
  18. package/components/common/monitor/advanced/graphView/GraphView.vue +181 -170
  19. package/components/common/monitor/advanced/graphView/GraphViewNew.vue +35 -35
  20. package/components/common/monitor/advanced/graphView/GraphViewOld.vue +56 -56
  21. package/components/common/monitor/advanced/table/Table.vue +31 -31
  22. package/components/common/monitor/advanced/table/tableNew/TableNew.vue +85 -85
  23. package/components/common/monitor/advanced/table/tableNew/lib/config/options.ts +139 -139
  24. package/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody.ts +27 -27
  25. package/components/common/monitor/advanced/tools/Tools.vue +304 -163
  26. package/components/common/monitor/advanced/tools/ToolsNew.vue +220 -366
  27. package/components/common/monitor/advanced/tools/ToolsOld.vue +29 -165
  28. package/components/common/pages/tasks/Tasks.vue +3 -1
  29. package/components/common/pages/tasks/table/Table.vue +1 -0
  30. package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +23 -7
  31. package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +1 -0
  32. package/components/common/pages/tasks/table/lib/config/config.ts +2 -2
  33. package/components/common/portlets/customAttributes/Portlet.vue +9 -2
  34. package/components/common/portlets/customAttributes/lib/config/config.ts +7 -0
  35. package/components/common/portlets/tag/Portlet.vue +9 -2
  36. package/components/common/portlets/tag/lib/config/config.ts +7 -0
  37. package/components/common/tools/Actions.vue +5 -2
  38. package/lib/config/uiTable.ts +20 -20
  39. package/lib/models/store/interfaces.ts +1 -0
  40. package/package.json +2 -2
@@ -1,206 +1,86 @@
1
1
  <template>
2
- <atoms-modal
3
- show
4
- :test-id="`${props.testId}-modal`"
5
- :width="props.width"
6
- class="confirm-by-input"
2
+ <common-modals-confirm-by-input-new
3
+ v-if="isNewViewLocal"
4
+ v-model="confirmationForm"
5
+ :is-valid="isValid"
6
+ :title="props.title"
7
+ :description="props.description"
8
+ :sub-title="props.subTitle"
9
+ :modal-texts="props.modalTexts"
10
+ :test-id="props.testId"
11
+ @hide="emits('hide')"
12
+ @confirm="onConfirm"
13
+ />
14
+ <common-modals-confirm-by-input-old
15
+ v-else
16
+ v-model="confirmationForm"
17
+ :is-valid="isValid"
7
18
  :title="props.title"
8
- :second-title="props.subTitle"
19
+ :sub-title="props.subTitle"
20
+ :test-id="props.testId"
9
21
  :loading="props.loading"
10
- is-hide-close-icon
11
- @submit="onConfirm"
22
+ :width="props.width"
23
+ @hide="emits('hide')"
24
+ @confirm="onConfirm"
12
25
  >
13
- <template #modalBody>
14
- <div class="confirm-by-input__body">
15
- <atoms-the-icon
16
- name="exclamation-triangle"
17
- class="confirm-by-input__icon"
18
- />
19
-
20
- <div>
21
- <slot name="content"></slot>
22
-
23
- <div class="form-group">
24
- <label class="no-selection" for="confirmation">{{
25
- confirmationText
26
- }}</label>
27
- <div class="form-group__input">
28
- <input
29
- id="confirmation"
30
- v-model="confirmationForm"
31
- data-id="confirmation-input"
32
- type="text"
33
- autocomplete="off"
34
- @keyup.enter="onConfirm"
35
- />
36
- <div v-show="!isValid && confirmationForm" class="form-validate">
37
- <atoms-tooltip :test-id="`${props.testId}-tooltip`">
38
- <template #elem>
39
- <atoms-the-icon
40
- class="is-error tooltip-trigger"
41
- name="info"
42
- width="28px"
43
- height="28px"
44
- />
45
- </template>
46
- <template #content>
47
- {{ confirmDeletionInputError }}
48
- </template>
49
- </atoms-tooltip>
50
- </div>
51
- </div>
52
- </div>
53
- </div>
54
- </div>
55
- </template>
56
- <template #modalFooter>
57
- <button
58
- id="confirm-by-input-modal-close-button"
59
- :data-id="`${props.testId}-modal-close-button`"
60
- class="btn btn-outline"
61
- @click="onHide"
62
- >
63
- {{ localization.common.no }}
64
- </button>
65
- <button
66
- id="confirm-by-input-modal-apply-button"
67
- :data-id="`${props.testId}-modal-apply-button`"
68
- class="btn btn-primary"
69
- :class="props.loading && 'modal-dialog__loader'"
70
- :disabled="!isValid || props.loading"
71
- @click="onConfirm"
72
- >
73
- <atoms-loader-pre-loader
74
- v-if="props.loading"
75
- id="loader"
76
- :show="props.loading"
77
- class="button__loading"
78
- :test-id="`${props.testId}-spinner`"
79
- />
80
- <span v-else>
81
- {{ localization.common.yes }}
82
- </span>
83
- </button>
26
+ <template #content>
27
+ <slot name="content" />
84
28
  </template>
85
- </atoms-modal>
29
+ </common-modals-confirm-by-input-old>
86
30
  </template>
87
31
 
88
32
  <script setup lang="ts">
89
33
  import type { UI_I_Localization } from '~/lib/models/interfaces'
90
-
91
- const props = defineProps<{
92
- title: string
93
- subTitle: string
94
- testId: string
95
- width: string
96
- loading?: boolean
97
- }>()
34
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
35
+
36
+ const props = withDefaults(
37
+ defineProps<{
38
+ isNewView?: boolean
39
+ title?: string
40
+ description?: string
41
+ subTitle?: string
42
+ testId?: string
43
+ loading?: boolean
44
+ width?: string
45
+ modalTexts?: UI_I_ModalTexts
46
+ }>(),
47
+ {
48
+ isNewView: undefined,
49
+ title: '',
50
+ description: '',
51
+ subTitle: '',
52
+ testId: 'common-confirmation',
53
+ loading: false,
54
+ width: '580px',
55
+ modalTexts: {
56
+ button1: 'Cancel',
57
+ button2: 'Remove',
58
+ },
59
+ }
60
+ )
98
61
  const emits = defineEmits<{
99
62
  (event: 'confirm'): void
100
63
  (event: 'hide'): void
101
64
  }>()
102
65
 
103
66
  const localization = computed<UI_I_Localization>(() => useLocal())
67
+ const { $store }: any = useNuxtApp()
68
+
69
+ const isNewViewLocal = computed<boolean>(
70
+ () => props.isNewView ?? $store.getters['main/getIsNewView']
71
+ )
104
72
 
105
73
  const confirmationForm = ref<string>('')
106
74
  const isValid = computed<boolean>(() => {
107
75
  return confirmationForm.value === props.subTitle
108
76
  })
109
77
 
110
- const confirmationText = localization.value.common.confirmDeletionInput.replace(
111
- '{title}',
112
- props.subTitle
113
- )
114
- const confirmDeletionInputError =
115
- localization.value.common.confirmDeletionInputError.replace(
116
- '{title}',
117
- props.subTitle
118
- )
119
-
120
78
  const onConfirm = async (): Promise<void> => {
121
79
  if (!isValid.value) return
122
80
 
123
81
  emits('confirm')
124
82
  }
125
83
 
126
- const onHide = (): void => {
127
- emits('hide')
128
- }
129
84
  </script>
130
85
 
131
- <style lang="scss" scoped>
132
- @import 'assets/scss/common/mixins.scss';
133
- .confirm-by-input {
134
- :deep(.modal-header) {
135
- display: flex;
136
- justify-content: space-between;
137
- align-items: flex-start;
138
-
139
- .modal-title {
140
- color: var(--main-color-mode);
141
- font-size: 24px;
142
- max-width: 65%;
143
- }
144
- .secondary-title {
145
- color: var(--modal-secondary-title);
146
- font-size: 0.75rem;
147
- font-weight: lighter;
148
- user-select: none;
149
- }
150
- .separator {
151
- content: '';
152
- border-left: 1px solid #ccc;
153
- margin: 0 18px;
154
- height: 22px;
155
- }
156
-
157
- .close-icon {
158
- fill: var(--close-icon);
159
- width: 24px;
160
- height: 24px;
161
- }
162
- }
163
-
164
- &__body {
165
- @include flex($align: flex-start);
166
-
167
- .form-group {
168
- margin-top: 20px;
169
-
170
- label {
171
- font-weight: bold;
172
- font-size: 0.6rem;
173
- user-select: none;
174
- }
175
-
176
- &:not(:first-child) input {
177
- width: 100%;
178
- }
179
- &__input {
180
- display: flex;
181
- width: 100%;
182
- min-height: 30px;
183
- }
184
- }
185
- }
186
-
187
- &__icon {
188
- min-width: 48px;
189
- height: 48px;
190
- margin-right: 20px;
191
- fill: #c27b00;
192
- }
193
-
194
- .button {
195
- &__loading {
196
- :deep(.spinner) {
197
- width: 25px;
198
- height: 25px;
199
- min-width: 25px;
200
- min-height: 25px;
201
- margin-top: 5px;
202
- }
203
- }
204
- }
205
- }
206
- </style>
86
+ <style lang="scss" scoped></style>
@@ -0,0 +1,103 @@
1
+ <template>
2
+ <ui-popup
3
+ :test-id="props.testId"
4
+ icon-name="info-status"
5
+ :message="props.description"
6
+ :texts="modalTextsLocal"
7
+ @submit="onSubmit"
8
+ @hide="onHide"
9
+ >
10
+ <template #content>
11
+ <div class="confirm-modal__body-content">
12
+ <span>{{ props.title }}</span>
13
+ <span>{{ props.description }}</span>
14
+
15
+ <ui-input
16
+ v-model="confirmationFormLocal"
17
+ :test-id="`${props.testId}-confirm-input`"
18
+ :placeholder="localization.vsphereNa.nodeIPAddress"
19
+ :error="confirmInputErrorText"
20
+ class="confirm-modal__input"
21
+ input-style="rounded"
22
+ size="md"
23
+ />
24
+ </div>
25
+ </template>
26
+ </ui-popup>
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
31
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
32
+
33
+ const props = defineProps<{
34
+ testId: string
35
+ title: string
36
+ description: string
37
+ subTitle: string
38
+ isValid: boolean
39
+ modalTexts: UI_I_ModalTexts
40
+ }>()
41
+ const confirmationFormLocal = defineModel<string>({ required: true })
42
+ const emits = defineEmits<{
43
+ (event: 'confirm'): void
44
+ (event: 'hide-modal'): void
45
+ }>()
46
+
47
+ const localization = computed<UI_I_Localization>(() => useLocal())
48
+
49
+ const modalTextsLocal = computed<UI_I_ModalTexts>(() => props.modalTexts)
50
+
51
+ const isShowConfirmError = ref<boolean>(false)
52
+
53
+ const confirmInputErrorText = computed<string>(() => {
54
+ if (!isShowConfirmError.value) return ''
55
+
56
+ const { fieldRequired, incorrectConfirmation } = localization.value.common
57
+
58
+ return !confirmationFormLocal.value
59
+ ? fieldRequired
60
+ : !props.isValid
61
+ ? incorrectConfirmation.replace('{0}', props.subTitle)
62
+ : ''
63
+ })
64
+ const onHide = (): void => {
65
+ emits('hide-modal')
66
+ }
67
+ const onSubmit = (): void => {
68
+ isShowConfirmError.value = true
69
+
70
+ if (!confirmationFormLocal.value) {
71
+ return
72
+ }
73
+
74
+ emits('confirm')
75
+ }
76
+ </script>
77
+
78
+ <style scoped lang="scss">
79
+ .confirm-modal {
80
+ &__body-content {
81
+ padding: 16px 32px;
82
+ span {
83
+ display: block;
84
+ font-size: 14px;
85
+ font-weight: 400;
86
+ line-height: 16.94px;
87
+ text-align: center;
88
+ color: #9da6ad;
89
+
90
+ &:first-of-type {
91
+ font-size: 20px;
92
+ font-weight: 500;
93
+ line-height: 24.2px;
94
+ color: var(--modal-title);
95
+ margin-bottom: 8px;
96
+ }
97
+ }
98
+ }
99
+ &__input {
100
+ margin-top: 16px;
101
+ }
102
+ }
103
+ </style>
@@ -0,0 +1,204 @@
1
+ <template>
2
+ <atoms-modal
3
+ show
4
+ :test-id="`${props.testId}-modal`"
5
+ :width="props.width"
6
+ class="confirm-by-input"
7
+ :title="props.title"
8
+ :second-title="props.subTitle"
9
+ :loading="props.loading"
10
+ is-hide-close-icon
11
+ @submit="onConfirm"
12
+ >
13
+ <template #modalBody>
14
+ <div class="confirm-by-input__body">
15
+ <atoms-the-icon
16
+ name="exclamation-triangle"
17
+ class="confirm-by-input__icon"
18
+ />
19
+
20
+ <div>
21
+ <slot name="content"></slot>
22
+
23
+ <div class="form-group">
24
+ <label class="no-selection" for="confirmation">
25
+ {{ confirmationText }}
26
+ </label>
27
+ <div class="form-group__input">
28
+ <input
29
+ id="confirmation"
30
+ v-model="confirmationFormLocal"
31
+ data-id="confirmation-input"
32
+ type="text"
33
+ autocomplete="off"
34
+ @keyup.enter="onConfirm"
35
+ />
36
+ <div
37
+ v-show="!props.isValid && confirmationFormLocal"
38
+ class="form-validate"
39
+ >
40
+ <atoms-tooltip :test-id="`${props.testId}-tooltip`">
41
+ <template #elem>
42
+ <atoms-the-icon
43
+ class="is-error tooltip-trigger"
44
+ name="info"
45
+ width="28px"
46
+ height="28px"
47
+ />
48
+ </template>
49
+ <template #content>
50
+ {{ confirmDeletionInputError }}
51
+ </template>
52
+ </atoms-tooltip>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </template>
59
+ <template #modalFooter>
60
+ <button
61
+ id="confirm-by-input-modal-close-button"
62
+ :data-id="`${props.testId}-modal-close-button`"
63
+ class="btn btn-outline"
64
+ @click="onHide"
65
+ >
66
+ {{ localization.common.no }}
67
+ </button>
68
+ <button
69
+ id="confirm-by-input-modal-apply-button"
70
+ :data-id="`${props.testId}-modal-apply-button`"
71
+ class="btn btn-primary"
72
+ :class="props.loading && 'modal-dialog__loader'"
73
+ :disabled="!props.isValid || props.loading"
74
+ @click="onConfirm"
75
+ >
76
+ <atoms-loader-pre-loader
77
+ v-if="props.loading"
78
+ id="loader"
79
+ :show="props.loading"
80
+ class="button__loading"
81
+ :test-id="`${props.testId}-spinner`"
82
+ />
83
+ <span v-else>
84
+ {{ localization.common.yes }}
85
+ </span>
86
+ </button>
87
+ </template>
88
+ </atoms-modal>
89
+ </template>
90
+
91
+ <script setup lang="ts">
92
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
93
+
94
+ const props = defineProps<{
95
+ title: string
96
+ subTitle: string
97
+ isValid: boolean
98
+ testId: string
99
+ width: string
100
+ loading?: boolean
101
+ }>()
102
+ const confirmationFormLocal = defineModel<string>({ required: true })
103
+ const emits = defineEmits<{
104
+ (event: 'confirm'): void
105
+ (event: 'hide'): void
106
+ }>()
107
+
108
+ const localization = computed<UI_I_Localization>(() => useLocal())
109
+
110
+ const confirmationText = localization.value.common.confirmDeletionInput.replace(
111
+ '{title}',
112
+ props.subTitle
113
+ )
114
+ const confirmDeletionInputError =
115
+ localization.value.common.confirmDeletionInputError.replace(
116
+ '{title}',
117
+ props.subTitle
118
+ )
119
+
120
+ const onConfirm = (): void => {
121
+ emits('confirm')
122
+ }
123
+
124
+ const onHide = (): void => {
125
+ emits('hide')
126
+ }
127
+ </script>
128
+
129
+ <style lang="scss" scoped>
130
+ @import 'assets/scss/common/mixins.scss';
131
+ .confirm-by-input {
132
+ :deep(.modal-header) {
133
+ display: flex;
134
+ justify-content: space-between;
135
+ align-items: flex-start;
136
+
137
+ .modal-title {
138
+ color: var(--main-color-mode);
139
+ font-size: 24px;
140
+ max-width: 65%;
141
+ }
142
+ .secondary-title {
143
+ color: var(--modal-secondary-title);
144
+ font-size: 0.75rem;
145
+ font-weight: lighter;
146
+ user-select: none;
147
+ }
148
+ .separator {
149
+ content: '';
150
+ border-left: 1px solid #ccc;
151
+ margin: 0 18px;
152
+ height: 22px;
153
+ }
154
+
155
+ .close-icon {
156
+ fill: var(--close-icon);
157
+ width: 24px;
158
+ height: 24px;
159
+ }
160
+ }
161
+
162
+ &__body {
163
+ @include flex($align: flex-start);
164
+
165
+ .form-group {
166
+ margin-top: 20px;
167
+
168
+ label {
169
+ font-weight: bold;
170
+ font-size: 0.6rem;
171
+ user-select: none;
172
+ }
173
+
174
+ &:not(:first-child) input {
175
+ width: 100%;
176
+ }
177
+ &__input {
178
+ display: flex;
179
+ width: 100%;
180
+ min-height: 30px;
181
+ }
182
+ }
183
+ }
184
+
185
+ &__icon {
186
+ min-width: 48px;
187
+ height: 48px;
188
+ margin-right: 20px;
189
+ fill: #c27b00;
190
+ }
191
+
192
+ .button {
193
+ &__loading {
194
+ :deep(.spinner) {
195
+ width: 25px;
196
+ height: 25px;
197
+ min-width: 25px;
198
+ min-height: 25px;
199
+ margin-top: 5px;
200
+ }
201
+ }
202
+ }
203
+ }
204
+ </style>