Badge
The badge column type displays text values as styled badge/tag elements. Useful for categories, labels, and versions.
| Field | Description | Scheme |
|---|---|---|
name* | Column name (must be a valid SQL identifier) |
|
type* | Data type that controls formatting and visualization |
|
badge | Badge styling configuration. Use | |
card.position | Where this column appears in the card layout: |
|
card.useForAccent | Set to |
|
description | Human-readable help text for the column |
|
filter | Enable server-side filtering for this column. Set | object |
hidden | Hide the column from the table view (default: false) |
|
icon | CEL expression that resolves to an icon name per row (e.g. |
|
primaryKey | Whether this column is part of the primary key (default: false). At least one column must be marked as primary key. |
|
unit | Unit label appended to the displayed value (e.g. |
|
url | Link to a config, another view, or a custom URL using CEL / Go templates | |
width | Display width, e.g. |
|
Example
backups.yamlapiVersion: mission-control.flanksource.com/v1
kind: View
metadata:
name: backups
namespace: mc
spec:
display:
title: Backups
icon: database
sidebar: true
cache:
maxAge: 1h
minAge: 1m
refreshTimeout: 10s
columns:
- name: id
type: string
description: The id of the database.
primaryKey: true
hidden: true
- name: database
type: string
description: The name of the helm release.
- name: date
type: datetime
description: The namespace name.
- name: status
type: status
description: The status of the backup.
- name: source
type: badge
description: The source of the backup.
queries:
backups:
changes:
search: change_type=BackupSuccessful
limit: 10
mapping:
database: row.name
date: row.created_at
status: row.details.status