bfg-common 1.4.332 → 1.4.333

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.
@@ -2763,5 +2763,8 @@
2763
2763
  "noSelectedSession": "Калі ласка, не забудзьцеся выбраць сеанс, каб праглядзець яго дэталі.",
2764
2764
  "endTime": "Час заканчэння",
2765
2765
  "channels": "Каналы ({0})"
2766
+ },
2767
+ "vmWizard": {
2768
+ "devices": "Прылады ({0})"
2766
2769
  }
2767
2770
  }
@@ -2767,5 +2767,8 @@
2767
2767
  "noSelectedSession": "Please make sure to select a session to view its details.",
2768
2768
  "endTime": "End time",
2769
2769
  "channels": "Channels ({0})"
2770
+ },
2771
+ "vmWizard": {
2772
+ "devices": "Devices ({0})"
2770
2773
  }
2771
2774
  }
@@ -2767,5 +2767,8 @@
2767
2767
  "noSelectedSession": "Խնդրում ենք համոզվեք, որ ընտրել եք նիստ՝ դրա մանրամասները դիտելու համար:",
2768
2768
  "endTime": "Ավարտի ժամանակը",
2769
2769
  "channels": "Ալիքներ ({0})"
2770
+ },
2771
+ "vmWizard": {
2772
+ "devices": "Սարքեր ({0})"
2770
2773
  }
2771
2774
  }
@@ -2766,5 +2766,8 @@
2766
2766
  "noSelectedSession": "Мәліметтерін көру үшін сеансты таңдағаныңызға көз жеткізіңіз.",
2767
2767
  "endTime": "Аяқталу уақыты",
2768
2768
  "channels": "Арналар ({0})"
2769
+ },
2770
+ "vmWizard": {
2771
+ "devices": "Құрылғылар ({0})"
2769
2772
  }
2770
2773
  }
@@ -2769,5 +2769,8 @@
2769
2769
  "noSelectedSession": "Обязательно выберите сеанс, чтобы просмотреть его подробности.",
2770
2770
  "endTime": "Время окончания",
2771
2771
  "channels": "Каналы ({0})"
2772
+ },
2773
+ "vmWizard": {
2774
+ "devices": "Устройства ({0})"
2772
2775
  }
2773
2776
  }
@@ -2765,5 +2765,8 @@
2765
2765
  "noSelectedSession": "请确保选择一个会话以查看其详细信息。",
2766
2766
  "endTime": "结束时间",
2767
2767
  "channels": "频道 ({0})"
2768
+ },
2769
+ "vmWizard": {
2770
+ "devices": "设备 ({0})"
2768
2771
  }
2769
2772
  }
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <common-layout-the-header-feedback-new
3
- v-if="isNewView"
3
+ v-if="props.isShowFeedback && isNewView"
4
4
  @hide="onHide"
5
5
  @submit="onSubmit"
6
6
  />
7
7
  <common-layout-the-header-feedback-old
8
- v-else
8
+ v-if="!isNewView"
9
9
  :is-show-feedback="props.isShowFeedback"
10
10
  :title="localization.common.sendFeedback"
11
11
  @show="emits('show')"
@@ -12,7 +12,18 @@
12
12
  >
13
13
  <template #content>
14
14
  <ui-modal-block-standard>
15
- <common-layout-the-header-feedback-new-description />
15
+ <common-layout-the-header-feedback-new-subtitle />
16
+
17
+ <common-layout-the-header-feedback-new-tabs
18
+ v-model="selectedTab"
19
+ class="metrics-tabs"
20
+ />
21
+
22
+ <common-layout-the-header-feedback-new-description
23
+ v-model="form.description"
24
+ />
25
+
26
+ <common-layout-the-header-feedback-new-email v-model="form.email" />
16
27
  </ui-modal-block-standard>
17
28
  </template>
18
29
 
@@ -29,19 +40,25 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
29
40
  // title: string
30
41
  // }>()
31
42
  // console.log(props)
32
- // const emits = defineEmits<{
33
- // (event: 'hide'): void
34
- // (event: 'submit', value: UI_I_FeedbackForm): void
35
- // }>()
43
+ const emits = defineEmits<{
44
+ (event: 'hide'): void
45
+ // (event: 'submit', value: UI_I_FeedbackForm): void
46
+ }>()
36
47
 
37
48
  const localization = computed<UI_I_Localization>(() => useLocal())
38
49
 
50
+ const form = ref({
51
+ description: '',
52
+ email: '',
53
+ })
54
+ const selectedTab = ref<any>('memory')
55
+
39
56
  const texts = {
40
57
  button1: localization.value.common.send,
41
58
  }
42
59
 
43
60
  const onHideModal = (): void => {
44
- // emits('hide')
61
+ emits('hide')
45
62
  }
46
63
  const onSubmit = (): void => {}
47
64
  </script>
@@ -1,53 +1,57 @@
1
1
  <template>
2
2
  <div class="description">
3
- <span class="description-label text-ellipsis">
4
- {{ localization.common.helpUsImprove }}
5
- </span>
6
- <ui-icon
7
- id="feedback-description-info-icon"
8
- name="info"
9
- width="18"
10
- height="18"
11
- :color="isShowInfo ? '#008FD6' : '#9DA6AD'"
12
- class="info-icon pointer"
13
- @click="isShowInfo = !isShowInfo"
14
- />
15
- <ui-popup-window
16
- v-model="isShowInfo"
17
- width="232px"
18
- :elem-id="'feedback-description-info-icon'"
19
- >
20
- <div class="common-widget-info">
21
- <div class="headline justify-between flex-align-center">
22
- <div class="flex-align-center">
23
- <ui-icon-icon3 name="info-2" width="16px" height="16px" />
24
- <span class="title">Feedback Help</span>
25
- </div>
26
- <ui-icon
27
- name="close"
28
- class="pointer hide-icon"
29
- width="16px"
30
- height="16px"
31
- @click="isShowInfo = false"
32
- />
33
- </div>
3
+ <h4 class="description__title">{{ localization.common.description }}</h4>
34
4
 
35
- <div class="common-widget-info-description">
36
- {{ infoDescription }}
37
- </div>
38
- </div>
39
- </ui-popup-window>
5
+ <ui-textarea
6
+ v-model="descriptionModelLocal"
7
+ test-id="feedback-description"
8
+ :disabled="!selectedTab"
9
+ :placeholder="descriptionTextPlaceholder"
10
+ :error="descriptionErrorText"
11
+ >
12
+ </ui-textarea>
40
13
  </div>
41
14
  </template>
42
15
 
43
16
  <script lang="ts" setup>
44
17
  import type { UI_I_Localization } from '~/lib/models/interfaces'
18
+ import type { UI_T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
19
+
20
+ const props = defineProps<{
21
+ selectedTab: UI_T_FeedbackTab
22
+ }>()
23
+ const descriptionModelLocal = defineModel<string>({ required: true })
45
24
 
46
25
  const localization = computed<UI_I_Localization>(() => useLocal())
47
26
 
48
- const isShowInfo = ref<boolean>(false)
27
+ const descriptionTextPlaceholder = computed<string>(() => {
28
+ if (props.selectedTab === 'warning-outline')
29
+ return localization.value.common.whatIsTheProblemHowCan
30
+ if (props.selectedTab === 'heart-outline')
31
+ return localization.value.common.tellUsWhatYouEnjoyedSo
32
+ return localization.value.common.selectFeedbackType
33
+ })
49
34
 
50
- const infoDescription = ref('')
35
+ const descriptionErrorText = computed<boolean>(() => {
36
+ return !descriptionModelLocal.value
37
+ ? localization.value.common.fieldRequired
38
+ : ''
39
+ })
51
40
  </script>
52
41
 
53
- <style lang="scss" scoped></style>
42
+ <style lang="scss" scoped>
43
+ .description {
44
+ margin-top: 32px;
45
+ &__title {
46
+ line-height: 38px;
47
+ margin-bottom: 16px;
48
+ font-size: 16px;
49
+ font-weight: 500;
50
+ color: #4d5d69;
51
+ }
52
+ :deep(.ui-main-textarea) {
53
+ resize: none;
54
+ height: 68px;
55
+ }
56
+ }
57
+ </style>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="email">
3
+ <h4 class="email__title">{{ localization.common.emailAddress }}</h4>
4
+
5
+ <ui-input
6
+ v-model="emailModelLocal"
7
+ type="text"
8
+ placeholder="placeholder"
9
+ test-id="feedback-email"
10
+ />
11
+ </div>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
16
+
17
+ const localization = computed<UI_I_Localization>(() => useLocal())
18
+
19
+ const emailModelLocal = defineModel<string>({ required: true })
20
+ </script>
21
+
22
+ <style scoped lang="scss">
23
+ .email {
24
+ margin-top: 32px;
25
+ &__title {
26
+ line-height: 38px;
27
+ margin-bottom: 16px;
28
+ font-size: 16px;
29
+ font-weight: 500;
30
+ color: #4d5d69;
31
+ }
32
+ }
33
+ </style>
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div class="subtitle">
3
+ <span class="subtitle__label">
4
+ {{ localization.common.helpUsImprove }}
5
+ </span>
6
+ <ui-icon
7
+ id="feedback-description-info-icon"
8
+ name="info"
9
+ width="18"
10
+ height="18"
11
+ :color="isShowInfo ? '#008FD6' : '#9DA6AD'"
12
+ class="info-icon pointer"
13
+ @click="isShowInfo = !isShowInfo"
14
+ />
15
+ <ui-popup-window
16
+ v-model="isShowInfo"
17
+ width="232px"
18
+ :elem-id="'feedback-description-info-icon'"
19
+ >
20
+ <div class="common-widget-info">
21
+ <div class="headline justify-between flex-align-center">
22
+ <div class="flex-align-center">
23
+ <ui-icon-icon3 name="info-2" width="16px" height="16px" />
24
+ <span class="title">{{ localization.common.feedbackHelp }}</span>
25
+ </div>
26
+ <ui-icon
27
+ name="close"
28
+ class="pointer hide-icon"
29
+ width="16px"
30
+ height="16px"
31
+ @click="isShowInfo = false"
32
+ />
33
+ </div>
34
+
35
+ <div class="common-widget-info-description">
36
+ {{ localization.common.anyFeedbackYouProvideMay }}
37
+ </div>
38
+ </div>
39
+ </ui-popup-window>
40
+ </div>
41
+ </template>
42
+
43
+ <script lang="ts" setup>
44
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
45
+
46
+ const localization = computed<UI_I_Localization>(() => useLocal())
47
+
48
+ const isShowInfo = ref<boolean>(false)
49
+ </script>
50
+
51
+ <style lang="scss" scoped>
52
+ .subtitle {
53
+ display: flex;
54
+ justify-content: space-between;
55
+ border-bottom: 1px solid #e9ebed;
56
+ padding-bottom: 12px;
57
+
58
+ &__label {
59
+ font-size: 12px;
60
+ font-weight: 400;
61
+ line-height: 14.52px;
62
+ color: #9da6ad;
63
+ }
64
+ .common-widget-info {
65
+ padding: 16px;
66
+
67
+ .title {
68
+ font-size: 14px;
69
+ font-weight: 500;
70
+ line-height: 16.94px;
71
+ color: var(--zabbix-text-color);
72
+ margin-left: 8px;
73
+ }
74
+
75
+ .common-widget-info-description {
76
+ font-size: 13px;
77
+ line-height: 15.73px;
78
+ color: var(--zabbix-text-color);
79
+ margin-top: 12px;
80
+ }
81
+ }
82
+ }
83
+ </style>
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <div class="tabs">
3
+ <h4 class="tabs__title">{{ localization.common.selectType }}</h4>
4
+
5
+ <div class="tabs__container">
6
+ <ui-block
7
+ v-for="item in tabs"
8
+ :key="item.iconName"
9
+ :class="{ selected: item.isSelected }"
10
+ @click="selectedTab = item.iconName"
11
+ >
12
+ <div class="main-info">
13
+ <ui-icon :name="item.iconName" width="18" height="18" />
14
+ <span class="main-info-label">{{ item.label }}</span>
15
+ </div>
16
+ </ui-block>
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script setup lang="ts">
22
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
23
+ import type { T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
24
+ // import type { I_Metric } from '~/components/layout/new/tabs/lib/models/interfaces'
25
+ import { tabsFunc } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/config/tabs'
26
+
27
+ const localization = computed<UI_I_Localization>(() => useLocal())
28
+
29
+ const selectedTab = defineModel<T_FeedbackTab>({ required: true })
30
+ const tabs = computed<any[]>(() =>
31
+ tabsFunc(localization.value, selectedTab.value)
32
+ )
33
+ </script>
34
+
35
+ <style scoped lang="scss">
36
+ .tabs {
37
+ margin-top: 16px;
38
+ &__title {
39
+ line-height: 38px;
40
+ margin-bottom: 16px;
41
+ font-size: 16px;
42
+ font-weight: 500;
43
+ color: #4d5d69;
44
+ }
45
+ &__container {
46
+ display: flex;
47
+ gap: 12px;
48
+ }
49
+
50
+ :deep(.block) {
51
+ width: max-content;
52
+ padding: 10px 12px;
53
+ color: #4d5d69;
54
+ cursor: pointer;
55
+ }
56
+ :deep(.block.selected) {
57
+ border: 1.5px solid #008fd6;
58
+ color: #008fd6;
59
+ cursor: default;
60
+
61
+ .main-info,
62
+ .main-info-label {
63
+ color: #008fd6;
64
+ }
65
+ }
66
+
67
+ .main-info {
68
+ display: flex;
69
+ align-items: center;
70
+ gap: 8px;
71
+
72
+ &-label {
73
+ font-size: 16px;
74
+ font-weight: 500;
75
+ line-height: 19.36px;
76
+ }
77
+ }
78
+ }
79
+ </style>
@@ -0,0 +1,25 @@
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
3
+
4
+ export const tabsFunc = (
5
+ localization: UI_I_Localization,
6
+ selectedTab: T_FeedbackTab
7
+ ): any[] => {
8
+ return [
9
+ {
10
+ iconName: 'warning-outline',
11
+ label: localization.common.problem,
12
+ isSelected: selectedTab === 'warning-outline',
13
+ },
14
+ {
15
+ iconName: 'heart-outline',
16
+ label: localization.common.complement,
17
+ isSelected: selectedTab === 'heart-outline',
18
+ },
19
+ {
20
+ iconName: 'light-bulb',
21
+ label: localization.common.idea,
22
+ isSelected: selectedTab === 'light-bulb',
23
+ },
24
+ ]
25
+ }
@@ -0,0 +1,17 @@
1
+ import type {
2
+ T_MetricTab
3
+ } from '~/components/common/pages/integration/zabbix/content/hosts/details/metrics/lib/models/types'
4
+
5
+ export interface I_Metric {
6
+ iconName: T_MetricTab
7
+ label: string
8
+ isSelected: boolean
9
+ on: {
10
+ label: string
11
+ color: '#239332' | '#BDC3C7'
12
+ }
13
+ off: {
14
+ label: string
15
+ color: '#EA3223' | '#BDC3C7'
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export type UI_T_FeedbackTab = 'warning-outline' | 'heart-outline' | 'light-bulb'
@@ -63,13 +63,19 @@
63
63
  <common-select-input
64
64
  v-model="model.frq_ordinal_number"
65
65
  :data="frequencyOnOrdinalNumber"
66
- :class="['radio__select', !isDisabledMonthlyDayField && 'disabled']"
66
+ :class="[
67
+ 'radio__select ordinary-day',
68
+ !isDisabledMonthlyDayField && 'disabled',
69
+ ]"
67
70
  />
68
71
 
69
72
  <common-select-input
70
73
  v-model="model.frq_week_day"
71
74
  :data="frequencyOnWeeksDays"
72
- :class="['radio__select', !isDisabledMonthlyDayField && 'disabled']"
75
+ :class="[
76
+ 'radio__select week-days',
77
+ !isDisabledMonthlyDayField && 'disabled',
78
+ ]"
73
79
  />
74
80
  </div>
75
81
  </div>
@@ -191,6 +197,18 @@ const setDefaultDateTime = () => {
191
197
  &__select {
192
198
  width: 100%;
193
199
  margin-top: 10px;
200
+ :deep(.select-input__inner) {
201
+ max-width: 100% !important;
202
+ }
203
+ &.ordinary-day :deep(select) {
204
+ min-width: 80px;
205
+ }
206
+ &.week-days {
207
+ margin-left: 15px;
208
+ :deep(select) {
209
+ min-width: 110px;
210
+ }
211
+ }
194
212
  select {
195
213
  width: 80px;
196
214
  }
@@ -25,7 +25,7 @@ export const generateWeeklyCronExpression = (
25
25
  const daysOfWeek = frg_on_week_days.join(',')
26
26
 
27
27
  return endTimestamp
28
- ? `* * * * ${daysOfWeek} ${startTimestamp}-${endTimestamp}:0-0-0-${data.frg_interval}`
28
+ ? `* * * * ${daysOfWeek} ${startTimestamp}-${endTimestamp}:0-0-${data.frg_interval}-0`
29
29
  : `* * * * ${daysOfWeek} ${startTimestamp}:0-0-0-${data.frg_interval}`
30
30
  }
31
31
 
@@ -54,7 +54,7 @@ export const generateMonthlyCronExpression = (
54
54
  )
55
55
  const endTimestamp = Math.floor(new Date(data.frg_end_time).getTime() / 1000)
56
56
 
57
- const daysOfWeek = `${frq_week_day}#${frq_ordinal_number}`
57
+ const ordinaryDaysOfMonth = `${frg_interval}#${frq_ordinal_number}`
58
58
 
59
59
  const timestamp = endTimestamp
60
60
  ? `${startTimestamp}-${endTimestamp}`
@@ -62,6 +62,6 @@ export const generateMonthlyCronExpression = (
62
62
 
63
63
  // Генерируем cron-выражение
64
64
  return data.frg_monthly_mode === 'week'
65
- ? `* * * * * ${timestamp}:0-0-${frg_interval}-${daysOfWeek}`
66
- : `* * ${frg_monthly_day} */${frg_interval} * ${timestamp}:0-0-0-0`
65
+ ? `* * * * ${frq_week_day} ${timestamp}:0-0-0-${ordinaryDaysOfMonth}`
66
+ : `* * ${frg_monthly_day} * * ${timestamp}:0-0-0-${frg_interval}`
67
67
  }
@@ -37,6 +37,7 @@ export interface UI_I_Localization {
37
37
  events: UI_I_ArbitraryObject<string>
38
38
  zabbix: UI_I_ArbitraryObject<string>
39
39
  remoteConsole: UI_I_ArbitraryObject<string>
40
+ vmWizard: UI_I_ArbitraryObject<string>
40
41
  }
41
42
  export interface UI_I_SendTaskParams {
42
43
  method: string
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.332",
4
+ "version": "1.4.333",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",