.
{{ fieldTypeInfo.label }}
{{ field.name }}
@@ -134,14 +137,42 @@ const isFieldSelected = computed(() =>
);
const fieldTypeInfo = computed(() => {
- if (props.field.name === props.timestampColumn) return { label: "T", color: "#3498db" };
+ if (props.field.name === props.timestampColumn)
+ return {
+ label: "T",
+ color: "var(--o2-field-type-timestamp-bg)",
+ textColor: "var(--o2-field-type-timestamp-text)",
+ };
const t = (props.field.dataType || "").toLowerCase();
- if (t === "boolean") return { label: "B", color: "#e74c3c" };
- if (t.includes("float")) return { label: "~", color: "#9b59b6" };
- if (t.includes("int") || t.includes("uint")) return { label: "#", color: "#e67e22" };
+ if (t === "boolean")
+ return {
+ label: "B",
+ color: "var(--o2-field-type-boolean-bg)",
+ textColor: "var(--o2-field-type-boolean-text)",
+ };
+ if (t.includes("float"))
+ return {
+ label: "~",
+ color: "var(--o2-field-type-float-bg)",
+ textColor: "var(--o2-field-type-float-text)",
+ };
+ if (t.includes("int") || t.includes("uint"))
+ return {
+ label: "#",
+ color: "var(--o2-field-type-number-bg)",
+ textColor: "var(--o2-field-type-number-text)",
+ };
if (t.includes("timestamp") || t === "date32" || t === "date64")
- return { label: "T", color: "#3498db" };
- return { label: "S", color: "#27ae60" };
+ return {
+ label: "T",
+ color: "var(--o2-field-type-timestamp-bg)",
+ textColor: "var(--o2-field-type-timestamp-text)",
+ };
+ return {
+ label: "S",
+ color: "var(--o2-field-type-string-bg)",
+ textColor: "var(--o2-field-type-string-text)",
+ };
});
@@ -177,7 +208,7 @@ const fieldTypeInfo = computed(() => {
height: 1rem;
border-radius: 0.2rem;
font-size: 0.6rem;
- font-weight: 700;
+ font-weight: 800;
color: #fff;
margin-right: 0.3rem;
flex-shrink: 0;
diff --git a/web/src/plugins/logs/patterns/PatternCard.vue b/web/src/plugins/logs/patterns/PatternCard.vue
index 2bad3f2f6e..b3355a366c 100644
--- a/web/src/plugins/logs/patterns/PatternCard.vue
+++ b/web/src/plugins/logs/patterns/PatternCard.vue
@@ -44,7 +44,7 @@ along with this program. If not, see
.
{{ pattern.frequency.toLocaleString() }}
@@ -54,7 +54,7 @@ along with this program. If not, see .
{{ pattern.percentage.toFixed(2) }}%
diff --git a/web/src/styles/_variables.scss b/web/src/styles/_variables.scss
index e63c1be099..7f3715ea09 100644
--- a/web/src/styles/_variables.scss
+++ b/web/src/styles/_variables.scss
@@ -504,6 +504,17 @@ $json-object-dark: #D1D5DB; // Light gray
--o2-tag-grey-1: #E2E8F0;
--o2-tag-grey-2: #eaebec;
+ // Field Type Badge Colors
+ --o2-field-type-string-bg: oklch(95% 0.052 163.051);
+ --o2-field-type-string-text: oklch(59.6% 0.145 163.225);
+ --o2-field-type-boolean-bg: #e74c3c;
+ --o2-field-type-boolean-text: #fff;
+ --o2-field-type-float-bg: oklch(94.6% 0.033 307.174);
+ --o2-field-type-float-text: oklch(55.8% 0.288 302.321);
+ --o2-field-type-number-bg: oklch(95.4% 0.038 75.164);
+ --o2-field-type-number-text: oklch(64.6% 0.222 41.116);
+ --o2-field-type-timestamp-bg: oklch(93.2% 0.032 255.585);
+ --o2-field-type-timestamp-text: oklch(54.6% 0.245 262.881);
// Span Colors for Traces (Light Mode)
--o2-span-1: #{$o2-span-1};