Skip to content

Commit

Permalink
Adjust DNS view
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini committed Jul 13, 2023
1 parent 30b858c commit ecae39d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 51 deletions.
81 changes: 41 additions & 40 deletions src/components/NameServerGroupUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,46 @@ const NameServerGroupUpdate = () => {
{ errors }: any
) => (
<Row>
<Col span={24} style={{ marginBottom: "15px" }}>
<Form.Item name="enabled" label="">
<div
style={{
display: "flex",
gap: "15px",
}}
>
<Switch
onChange={handleChangeDisabled}
defaultChecked={formNSGroup.enabled}
size="small"
checked={formNSGroup.enabled}
/>
<div>
<label
style={{
color: "rgba(0, 0, 0, 0.88)",
fontSize: "14px",
fontWeight: "500",
}}
>
Enabled
</label>
<Paragraph
type={"secondary"}
style={{
marginTop: "-2",
fontWeight: "400",
marginBottom: "0",
}}
>
{formNSGroup.enabled
? "Disable this server if you don't want the configuration to apply immediately"
: " Enable this server if you want the configuration to apply immediately"}
</Paragraph>
</div>
</div>
</Form.Item>
</Col>
<Col>
<div style={{ width: "100%", maxWidth: "360px" }}>
<label
Expand Down Expand Up @@ -713,46 +753,7 @@ const NameServerGroupUpdate = () => {
</Select>
</Form.Item>
</Col>
<Col span={24} style={{ marginBottom: "15px" }}>
<Form.Item name="enabled" label="">
<div
style={{
display: "flex",
gap: "15px",
}}
>
<Switch
onChange={handleChangeDisabled}
defaultChecked={formNSGroup.enabled}
size="small"
checked={formNSGroup.enabled}
/>
<div>
<label
style={{
color: "rgba(0, 0, 0, 0.88)",
fontSize: "14px",
fontWeight: "500",
}}
>
Enabled
</label>
<Paragraph
type={"secondary"}
style={{
marginTop: "-2",
fontWeight: "400",
marginBottom: "0",
}}
>
{formNSGroup.enabled
? "Disable this server if you don't want it to apply immediately"
: " Enable this server if you want it to apply immediately"}
</Paragraph>
</div>
</div>
</Form.Item>
</Col>

<Col
style={{
width: "100%",
Expand Down
19 changes: 8 additions & 11 deletions src/views/Nameservers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,6 @@ export const Nameservers = () => {
<Column
title="Name"
dataIndex="name"
align="center"
onFilter={(value: string | number | boolean, record) =>
(record as any).name.includes(value)
}
Expand Down Expand Up @@ -642,10 +641,17 @@ export const Nameservers = () => {
);
}}
/>
<Column
title="Match domains"
dataIndex="domains"
align="center"
render={(text, record: NameserverGroupDataTable) => {
return renderPopoverDomains(text, record.domains, record);
}}
/>
<Column
title="Nameservers"
dataIndex="nameservers"
align="center"
render={(nameservers: NameServer[]) => (
<>
{nameservers.map((nameserver) => (
Expand All @@ -654,18 +660,9 @@ export const Nameservers = () => {
</>
)}
/>
<Column
title="Match domains"
dataIndex="domains"
align="center"
render={(text, record: NameserverGroupDataTable) => {
return renderPopoverDomains(text, record.domains, record);
}}
/>
<Column
title="Distribution groups"
dataIndex="groupsCount"
align="center"
render={(text, record: NameserverGroupDataTable) => {
return renderPopoverGroups(text, record.groups, record);
}}
Expand Down

0 comments on commit ecae39d

Please sign in to comment.