burncloud_client_deploy/
deploy.rs

1use dioxus::prelude::*;
2
3#[component]
4pub fn DeployConfig() -> Element {
5    let mut selected_model = use_signal(|| "Qwen2.5-7B-Chat".to_string());
6    let mut port = use_signal(|| "8001".to_string());
7    let mut bind_address = use_signal(|| "127.0.0.1".to_string());
8
9    rsx! {
10        div { class: "page-header",
11            div { class: "flex justify-between items-center",
12                div {
13                    h1 { class: "text-large-title font-bold text-primary m-0",
14                        "部署配置"
15                    }
16                    p { class: "text-secondary m-0 mt-sm",
17                        "配置和部署大语言模型服务"
18                    }
19                }
20                div { class: "flex gap-md",
21                    button { class: "btn btn-secondary",
22                        "保存配置"
23                    }
24                    button { class: "btn btn-primary",
25                        span { "🚀" }
26                        "快速部署"
27                    }
28                }
29            }
30        }
31
32        div { class: "page-content",
33            div { class: "grid",
34                style: "grid-template-columns: 1fr; gap: var(--spacing-xl); max-width: 800px;",
35
36                // 模型选择
37                div { class: "card",
38                    div { class: "p-lg",
39                        h3 { class: "text-subtitle font-semibold mb-md", "模型选择" }
40                        div { class: "flex items-center gap-md",
41                            select {
42                                class: "input",
43                                style: "flex: 1;",
44                                value: "{selected_model}",
45                                option { value: "Qwen2.5-7B-Chat", "Qwen2.5-7B-Chat" }
46                                option { value: "DeepSeek-V2-Chat", "DeepSeek-V2-Chat" }
47                            }
48                            button { class: "btn btn-secondary", "配置参数" }
49                        }
50                    }
51                }
52
53                // 网络配置
54                div { class: "card",
55                    div { class: "p-lg",
56                        h3 { class: "text-subtitle font-semibold mb-md", "网络配置" }
57                        div { class: "grid gap-md",
58                            style: "grid-template-columns: 1fr 1fr;",
59                            div {
60                                label { class: "text-caption font-medium mb-xs", "绑定地址" }
61                                input {
62                                    class: "input",
63                                    value: "{bind_address}",
64                                    placeholder: "127.0.0.1"
65                                }
66                            }
67                            div {
68                                label { class: "text-caption font-medium mb-xs", "端口" }
69                                input {
70                                    class: "input",
71                                    value: "{port}",
72                                    placeholder: "8001"
73                                }
74                            }
75                        }
76                    }
77                }
78            }
79        }
80    }
81}