diff --git a/crates/frontend/src/components/experiment.rs b/crates/frontend/src/components/experiment.rs index bb042320..51c90b6d 100644 --- a/crates/frontend/src/components/experiment.rs +++ b/crates/frontend/src/components/experiment.rs @@ -67,165 +67,165 @@ where gen_variant_table(&experiment.with_value(|v| v.variants.clone())).unwrap(); view! { -
-

- {experiment.with_value(|v| v.name.clone())} - {experiment.with_value(|v| v.status.to_string())} -

-
-
- - {move || { - let handle_start = handle_start.clone(); - let handle_conclude = handle_conclude.clone(); - let handle_ramp = handle_ramp.clone(); - let handle_edit = handle_edit.clone(); - match experiment.with_value(|v| v.status) { - ExperimentStatusType::CREATED => { - view! { - - + - } - .into_view() + + Start + } - ExperimentStatusType::INPROGRESS => { - view! { - - - } - .into_view() + .into_view() + } + ExperimentStatusType::INPROGRESS => { + view! { + + } - ExperimentStatusType::CONCLUDED => { - view! { -
-
Chosen Variant
-
- {match experiment.with_value(|v| v.chosen_variant.clone()) { - Some(ref v) => v.to_string(), - None => String::new(), - }} - -
+ .into_view() + } + ExperimentStatusType::CONCLUDED => { + view! { +
+
Chosen Variant
+
+ {match experiment.with_value(|v| v.chosen_variant.clone()) { + Some(ref v) => v.to_string(), + None => String::new(), + }} +
- } - .into_view() +
} + .into_view() } - }} + } + }} +
+
+
+
Experiment ID
+
{experiment.with_value(|v| v.id.clone())}
-
-
-
Experiment ID
-
{experiment.with_value(|v| v.id.clone())}
-
-
-
Current Traffic Percentage
-
- {experiment.with_value(|v| v.traffic_percentage)} -
+
+
Current Traffic Percentage
+
+ {experiment.with_value(|v| v.traffic_percentage)}
-
-
Created by
-
- {experiment.with_value(|v| v.created_by.clone())} -
+
+
+
Created by
+
+ {experiment.with_value(|v| v.created_by.clone())}
-
-
Created at
-
- {format!("{}", experiment.with_value(|v| v.created_at.format("%v")))} -
+
+
+
Created at
+
+ {format!("{}", experiment.with_value(|v| v.created_at.format("%v")))}
-
-
Last Modified
-
+
+
+
Last Modified
+
- {format!("{}", experiment.with_value(|v| v.last_modified.format("%v")))} + {format!("{}", experiment.with_value(|v| v.last_modified.format("%v")))} -
-
-
-

Context

-
- - {contexts - .iter() - .map(|condition| { - let Condition { dimension, operands, .. } = condition; - let operand_views = operands - .iter() - .filter_map(|op| { - match op { - Operand::Dimension(_) => None, - Operand::Value(v) => { - Some( - view! { -
{v.html_display()}
- }, - ) - } +
+
+
+

Context

+
+ + {contexts + .iter() + .map(|condition| { + let Condition { dimension, operands, .. } = condition; + let operand_views = operands + .iter() + .filter_map(|op| { + match op { + Operand::Dimension(_) => None, + Operand::Value(v) => { + Some( + view! { +
{v.html_display()}
+ }, + ) } - }) - .collect_view(); - view! { -
-
{dimension}
- {operand_views} -
- } - }) - .collect_view()} + } + }) + .collect_view(); + view! { +
+
{dimension}
+ {operand_views} +
+ } + }) + .collect_view()} -
-
-
-

Variants

- - + +
+
+

Variants

+ +
- - } + + } } diff --git a/crates/frontend/src/pages/context_override.rs b/crates/frontend/src/pages/context_override.rs index c3a79a0b..5dd213f2 100644 --- a/crates/frontend/src/pages/context_override.rs +++ b/crates/frontend/src/pages/context_override.rs @@ -199,7 +199,8 @@ pub fn context_override() -> impl IntoView { let on_context_edit = Callback::new(move |data: (Context, Map)| { let (context, overrides) = data; - let conditions = Conditions::from_context_json(&context.condition.into()).unwrap(); + let conditions = + Conditions::from_context_json(&context.condition.into()).unwrap(); selected_context_ws.set(Some(Data { context: conditions, @@ -212,7 +213,8 @@ pub fn context_override() -> impl IntoView { let on_context_clone = Callback::new(move |data: (Context, Map)| { let (context, overrides) = data; - let conditions = Conditions::from_context_json(&context.condition.into()).unwrap(); + let conditions = + Conditions::from_context_json(&context.condition.into()).unwrap(); selected_context_ws.set(Some(Data { context: conditions,