Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added grouping in default_config page #9

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions crates/experimentation_platform/src/db/models.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
use crate::db::schema::*;
use chrono::{DateTime, NaiveDateTime, Utc};

use diesel::{
query_builder::QueryId, Insertable, Queryable, QueryableByName, Selectable,
};
use diesel::{Insertable, Queryable, QueryableByName, Selectable};
use serde::{Deserialize, Serialize};
use serde_json::Value;

#[derive(
Debug,
Clone,
Copy,
PartialEq,
Deserialize,
Serialize,
diesel_derive_enum::DbEnum,
QueryId,
Debug, Clone, Copy, PartialEq, Deserialize, Serialize, diesel_derive_enum::DbEnum,
)]
#[DbValueStyle = "UPPERCASE"]
#[ExistingTypePath = "crate::db::schema::sql_types::ExperimentStatusType"]
Expand Down
4 changes: 2 additions & 2 deletions crates/frontend/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use crate::pages::function::{
};
use crate::pages::Dimensions::Dimensions::Dimensions;
use crate::pages::{
ContextOverride::context_override::ContextOverride,
DefaultConfig::DefaultConfig::DefaultConfig, Experiment::ExperimentPage,
default_config::default_config::DefaultConfig,
ContextOverride::context_override::ContextOverride, Experiment::ExperimentPage,
Home::Home::Home,
};
use crate::types::Envs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub fn default_config_form<NF>(
#[prop(default = String::new())] config_pattern: String,
#[prop(default = String::new())] config_value: String,
#[prop(default = None)] function_name: Option<Value>,
#[prop(default = None)] prefix: Option<String>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[prop(default = None)] prefix: Option<String>,
#[prop(default = String::new())] prefix: String,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional parameter makes more sense here.

handle_submit: NF,
) -> impl IntoView
where
Expand Down Expand Up @@ -65,7 +66,9 @@ where

let on_submit = move |ev: MouseEvent| {
ev.prevent_default();
let f_name = config_key.get();
let f_name = prefix
.clone()
.map_or_else(|| config_key.get(), |prefix| prefix + &config_key.get());
let f_type = config_type.get();
let f_pattern = config_pattern.get();
let f_value = config_value.get();
Expand Down
214 changes: 0 additions & 214 deletions crates/frontend/src/pages/DefaultConfig/DefaultConfig.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/frontend/src/pages/DefaultConfig/mod.rs

This file was deleted.

Loading
Loading