Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Make web ui serving configurable #2769

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion crates/admin/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ where

// Merge Web UI router
#[cfg(feature = "serve-web-ui")]
let router = router.merge(crate::web_ui::web_ui_router());
let router = if !opts.disable_web_ui {
router.merge(crate::web_ui::web_ui_router())
} else {
router
};

// Merge meta API router
let router = router.merge(rest_api::create_router(rest_state));
Expand Down
7 changes: 7 additions & 0 deletions crates/types/src/config/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ pub struct AdminOptions {
#[cfg_attr(feature = "schemars", schemars(with = "String"))]
pub default_partition_replication: PartitionReplication,

/// Disable serving the Restate Web UI on the admin port. Default is `false`.
pub disable_web_ui: bool,

#[cfg(any(test, feature = "test-util"))]
pub disable_cluster_controller: bool,
}
Expand Down Expand Up @@ -164,6 +167,7 @@ impl Default for AdminOptions {
default_partition_replication: PartitionReplication::default(),
#[cfg(any(test, feature = "test-util"))]
disable_cluster_controller: false,
disable_web_ui: false,
log_tail_update_interval: Duration::from_secs(5 * 60).into(),
}
}
Expand Down Expand Up @@ -191,6 +195,7 @@ impl From<AdminOptionsShadow> for AdminOptions {
log_trim_threshold: value.log_trim_threshold,
log_tail_update_interval: value.log_tail_update_interval,
default_partition_replication: value.default_partition_replication,
disable_web_ui: value.disable_web_ui,
#[cfg(any(test, feature = "test-util"))]
disable_cluster_controller: value.disable_cluster_controller,
}
Expand Down Expand Up @@ -229,6 +234,8 @@ struct AdminOptionsShadow {

default_partition_replication: PartitionReplication,

disable_web_ui: bool,

#[cfg(any(test, feature = "test-util"))]
disable_cluster_controller: bool,
}
Loading