Add service_type field to separate data from presentation
Changes: - Add service_type field to SubServiceData: 'nginx_site', 'container', 'image' - Agent sends pure data without display formatting - Dashboard checks service_type to decide presentation - Docker images now display without status icon (service_type='image') - Remove unused image_size_str from docker images tuple Clean separation: agent provides data, dashboard handles display logic.
This commit is contained in:
@@ -149,6 +149,9 @@ pub struct SubServiceData {
|
||||
pub name: String,
|
||||
pub service_status: Status,
|
||||
pub metrics: Vec<SubServiceMetric>,
|
||||
/// Type of sub-service: "nginx_site", "container", "image"
|
||||
#[serde(default)]
|
||||
pub service_type: String,
|
||||
}
|
||||
|
||||
/// Individual metric for a sub-service
|
||||
|
||||
Reference in New Issue
Block a user