fix(kubernetes): remove redundant TS cast and fix cargo fmt failures
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m28s
Test / frontend-typecheck (pull_request) Successful in 1m36s
PR Review Automation / review (pull_request) Successful in 4m1s
Test / rust-fmt-check (pull_request) Successful in 10m59s
Test / rust-clippy (pull_request) Successful in 12m49s
Test / rust-tests (pull_request) Successful in 14m17s
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m28s
Test / frontend-typecheck (pull_request) Successful in 1m36s
PR Review Automation / review (pull_request) Successful in 4m1s
Test / rust-fmt-check (pull_request) Successful in 10m59s
Test / rust-clippy (pull_request) Successful in 12m49s
Test / rust-tests (pull_request) Successful in 14m17s
- Remove redundant `as Set<ResourceType>` cast in kubernetesStore initial state; the generic parameter already constrains the type - Reformat watcher.rs vec! literal and Watcher::new call to satisfy rustfmt line-length rules (CI was failing cargo fmt --check)
This commit is contained in:
parent
8753a05a04
commit
468a69d89e
@ -72,7 +72,13 @@ pub async fn start_all_resources_watcher(
|
||||
) -> Result<mpsc::Receiver<serde_json::Value>> {
|
||||
let (tx, rx) = mpsc::channel(100);
|
||||
|
||||
let resources = vec!["pods", "services", "deployments", "replicasets", "daemonsets"];
|
||||
let resources = vec![
|
||||
"pods",
|
||||
"services",
|
||||
"deployments",
|
||||
"replicasets",
|
||||
"daemonsets",
|
||||
];
|
||||
|
||||
for resource_type in resources {
|
||||
let watcher_tx = tx.clone();
|
||||
@ -80,7 +86,8 @@ pub async fn start_all_resources_watcher(
|
||||
let namespace = "default".to_string();
|
||||
|
||||
tokio::spawn(async move {
|
||||
let watcher = Watcher::new(cluster_id, namespace, resource_type.to_string(), watcher_tx);
|
||||
let watcher =
|
||||
Watcher::new(cluster_id, namespace, resource_type.to_string(), watcher_tx);
|
||||
if let Err(e) = watcher.start().await {
|
||||
tracing::error!("Watcher for {} failed: {}", resource_type, e);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ export const useKubernetesStore = create<KubernetesState>()((set, get) => ({
|
||||
namespaces: {},
|
||||
|
||||
// Loaded resources tracking
|
||||
loadedResources: new Set<ResourceType>() as Set<ResourceType>,
|
||||
loadedResources: new Set<ResourceType>(),
|
||||
|
||||
// Terminal sessions
|
||||
terminalSessions: {},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user