mirror of
https://github.com/gosticks/web.git
synced 2026-08-12 12:10:20 +00:00
Add DHCP rapid commit checkbox
Requires pi-hole/api#139 Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -343,7 +343,8 @@ function getDHCPInfo() {
|
||||
.word()
|
||||
.toLowerCase()
|
||||
.split(" ", 2)[0],
|
||||
ipv6_support: faker.random.boolean()
|
||||
ipv6_support: faker.random.boolean(),
|
||||
rapid_commit: faker.random.boolean()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ class DHCPInfo extends Component<WithNamespaces, DHCPInfoState> {
|
||||
router_ip: "",
|
||||
lease_time: 0,
|
||||
domain: "",
|
||||
ipv6_support: false
|
||||
ipv6_support: false,
|
||||
rapid_commit: false
|
||||
}
|
||||
};
|
||||
|
||||
@@ -298,6 +299,17 @@ class DHCPInfo extends Component<WithNamespaces, DHCPInfoState> {
|
||||
{t("IPv6 Support")}
|
||||
</Label>
|
||||
</FormGroup>
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
<Input
|
||||
type="checkbox"
|
||||
disabled={!this.state.settings.active}
|
||||
checked={this.state.settings.rapid_commit}
|
||||
onChange={this.onChange("rapid_commit", "checked")}
|
||||
/>
|
||||
{t("Rapid Commit")}
|
||||
</Label>
|
||||
</FormGroup>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={
|
||||
|
||||
@@ -24,7 +24,8 @@ const fakeData = {
|
||||
router_ip: "192.168.1.1",
|
||||
lease_time: "24",
|
||||
domain: "lan",
|
||||
ipv6_support: false
|
||||
ipv6_support: false,
|
||||
rapid_commit: false
|
||||
};
|
||||
|
||||
it("retrieves settings correctly", async () => {
|
||||
|
||||
Vendored
+1
@@ -67,6 +67,7 @@ interface ApiDhcpSettings {
|
||||
lease_time: number;
|
||||
domain: string;
|
||||
ipv6_support: boolean;
|
||||
rapid_commit: boolean;
|
||||
}
|
||||
|
||||
interface ApiFtlDbResponse {
|
||||
|
||||
Reference in New Issue
Block a user