Skip to content

Commit fb92627

Browse files
committed
fix: [plugins] Design change for warning tags
1 parent 0cb75ec commit fb92627

File tree

5 files changed

+49
-23
lines changed

5 files changed

+49
-23
lines changed

plugins/plugins/frontend/public/javascripts/countly.models.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@
318318

319319
// Tooltip color mappings
320320
var TOOLTIP_COLORS = {
321-
dataIngestion: "color-yellow-100",
322-
uiFiltering: "color-blue-100",
323-
serverPerformance: "color-red-100"
321+
dataIngestion: { bgColor: '#FCF5E5', textColor: '#E49700' },
322+
serverPerformance: { bgColor: '#FBECE5', textColor: '#D23F00' },
323+
uiFiltering: { bgColor: '#E1EFFF', textColor: '#0166D6' }
324324
};
325325

326326
/**

plugins/plugins/frontend/public/javascripts/countly.views.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@
540540
return warnings.map(function(warning) {
541541
return {
542542
tooltipText: CV.i18n(warning.text),
543-
color: tooltipColors[warning.type],
543+
bgColor: tooltipColors[warning.type].bgColor,
544+
textColor: tooltipColors[warning.type].textColor,
544545
label: countlyPlugins.getTooltipLabel(warning.type)
545546
};
546547
});

plugins/plugins/frontend/public/localization/plugins.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ configs.tooltip.server-performance-warning = Adjusting this value may impact sys
247247
configs.tooltip.data-ingestion-warning = Adjusting this value may affect data processing
248248
configs.tooltip.ui-filtering-warning = Adjusting this value controls how much data is shown in the UI
249249
configs.tooltip.data-ingestion = Data Processing
250-
configs.tooltip.ui-filtering = UI Display
251-
configs.tooltip.server-performance = Performance Impact
250+
configs.tooltip.ui-filtering = Interface
251+
configs.tooltip.server-performance = Performance
252252

253253
systemlogs.action.change_configs = Setting Changed
254254
systemlogs.action.change_plugins = Plugins Changed

plugins/plugins/frontend/public/stylesheets/main.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,26 @@
7373
}
7474
}
7575

76+
.config-section {
77+
&__header {
78+
width: max-content;
79+
}
80+
}
81+
82+
.configuration-warning-container {
83+
border-radius: 4px;
84+
display: flex;
85+
height: 20px;
86+
width: auto;
87+
88+
&__text {
89+
font-size: 10px;
90+
font-weight: 500;
91+
margin: 4px 6px;
92+
text-transform: uppercase;
93+
}
94+
}
95+
7696
.apikey {
7797
.el-input {
7898
width: 320px;

plugins/plugins/frontend/public/templates/configurations.html

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,31 @@ <h3 v-if="predefinedStructure[selectedConfig].groups.length > 1 || group.label"
5151
v-for="key in group.list" :key="key"
5252
class="bu-columns bu-is-vcentered bu-p-5 config-section">
5353
<div class="bu-column bu-is-7">
54-
<div
55-
v-if="getWarningTags(selectedConfig, key).length"
56-
class="bu-is-flex bu-is-align-items-center bu-is-justify-content-start bu-mb-2">
57-
<div
58-
v-for="(tag, index) in getWarningTags(selectedConfig, key)"
59-
:key="index"
60-
class="bu-is-flex bu-is-align-items-center bu-is-justify-content-center"
61-
v-tooltip="tag.tooltipText"
62-
>
63-
<i
64-
class="cly-io cly-io-exclamation text-big"
65-
:class="tag.color"
66-
/>
67-
<span class="bu-ml-1 bu-mr-4 text-smallest" :class="tag.color">{{ tag.label }}</span>
68-
</div>
69-
</div>
70-
<div class="bu-has-text-weight-medium bu-is-flex bu-is-align-items-center" :data-test-id="'settings-title-label-' + key.toLowerCase().replaceAll('_', '-')">
54+
<div class="bu-has-text-weight-medium bu-is-flex bu-is-align-items-center config-section__header" :data-test-id="'settings-title-label-' + key.toLowerCase().replaceAll('_', '-')">
7155
<div>
7256
<span class="bu-mr-2"> {{ getLabelName(key) }} </span>
7357
</div>
58+
<div class="bu-is-flex bu-is-align-items-center">
59+
<div
60+
v-for="(tag, index) in getWarningTags(selectedConfig, key)"
61+
:key="index"
62+
class="bu-is-flex bu-is-align-items-center bu-is-justify-content-center bu-mr-2"
63+
>
64+
<div
65+
:style="{ backgroundColor: tag.bgColor }"
66+
v-tooltip="tag.tooltipText"
67+
class="configuration-warning-container"
68+
69+
>
70+
<span
71+
class="configuration-warning-container__text"
72+
:style="{ color: tag.textColor }"
73+
>
74+
{{ tag.label }}
75+
</span>
76+
</div>
77+
</div>
78+
</div>
7479
</div>
7580
<p class="bu-has-text-weight-normal bu-mt-2 bu-mb-0" v-html="getHelperLabel(key)" v-if="getHelperLabel(key)" :data-test-id="'settings-description-label-' + key.toLowerCase().replaceAll('_', '-')"></p>
7681
<div v-if="checkIfOverwritten(key)" class="config-section-overwritten">

0 commit comments

Comments
 (0)