[PR #1519] [MERGED] feat: Integrate DNS record management into site configuration #1319

Closed
opened 2026-02-26 12:11:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/0xJacky/nginx-ui/pull/1519
Author: @NemerYTamimi
Created: 1/11/2026
Status: Merged
Merged: 1/14/2026
Merged by: @0xJacky

Base: devHead: feature/integrate-dns-with-site


📝 Commits (5)

  • f614ea6 feat: Integrate DNS record management into site configuration
  • f2bab63 fix: remove unnecessary type assertion for selectedDomainId and selectedRecordId
  • 74edd87 feat: add computed properties for selectedDomainId and selectedRecordId to handle null values
  • 193f486 refactor: simplify setter syntax for computed properties of selectedDomainId and selectedRecordId
  • c6b0213 fix: update computed properties to return undefined for null values in selectedDomainId and selectedRecordId

📊 Changes

10 files changed (+1325 additions, -21 deletions)

View changed files

📝 api/sites/site.go (+74 -5)
📝 app/src/api/site.ts (+5 -0)
📝 app/src/components/NgxConfigEditor/directive/DirectiveEditorItem.vue (+34 -2)
📝 app/src/views/site/site_add/SiteAdd.vue (+125 -9)
app/src/views/site/site_add/components/DNSRecordIntegration.vue (+382 -0)
app/src/views/site/site_edit/components/RightPanel/DNS.vue (+677 -0)
📝 app/src/views/site/site_edit/components/RightPanel/RightPanel.vue (+4 -0)
📝 app/src/views/site/site_edit/components/SiteEditor/SiteEditor.vue (+6 -0)
📝 app/src/views/site/site_edit/components/SiteEditor/store.ts (+8 -0)
📝 model/site.go (+10 -5)

📄 Description

  • Enhanced SiteAdd.vue to include DNS record integration, allowing users to select or create DNS records linked to the site.
  • Added DNSRecordIntegration component for managing DNS records, including selection and creation of new records.
  • Implemented DNS linking functionality in the RightPanel component, enabling users to link existing DNS records to their site configuration.
  • Updated SiteEditor to provide DNS link status to child components.
  • Extended the site model to include fields for linked DNS domain and record information.
  • Added logic to handle DNS record recreation if a linked record is missing.

Note

Introduces DNS record integration across backend and UI for site configurations.

  • Backend: Extends model.Site with dns_* fields; SaveSite accepts/persists DNS link data and sets dns_record_exists; GetSite verifies record existence via internal/dns and updates status.
  • Site creation: SiteAdd.vue adds a DNS step using DNSRecordIntegration to select/create records, auto-updating server_name and passing DNS data on save.
  • Site editing: New RightPanel/DNS.vue to link existing records, create/recreate missing ones, and clear links; editor store now carries DNS fields and saves them.
  • UX safeguards: DirectiveEditorItem.vue locks server_name and shows a lock icon when DNS is linked.
  • API/types: Updates app/src/api/site.ts to include DNS fields in Site.
  • Also exposes proxy targets in GetSite response unchanged, now reused in UI.

Written by Cursor Bugbot for commit c6b0213761. This will update automatically on new commits. Configure here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/0xJacky/nginx-ui/pull/1519 **Author:** [@NemerYTamimi](https://github.com/NemerYTamimi) **Created:** 1/11/2026 **Status:** ✅ Merged **Merged:** 1/14/2026 **Merged by:** [@0xJacky](https://github.com/0xJacky) **Base:** `dev` ← **Head:** `feature/integrate-dns-with-site` --- ### 📝 Commits (5) - [`f614ea6`](https://github.com/0xJacky/nginx-ui/commit/f614ea6e96779a04ca236f53aaf690c9d43f7760) feat: Integrate DNS record management into site configuration - [`f2bab63`](https://github.com/0xJacky/nginx-ui/commit/f2bab6364965ad097f5dac682e3534236113222f) fix: remove unnecessary type assertion for selectedDomainId and selectedRecordId - [`74edd87`](https://github.com/0xJacky/nginx-ui/commit/74edd877b0b1ac6812749e4597c593197cf1a804) feat: add computed properties for selectedDomainId and selectedRecordId to handle null values - [`193f486`](https://github.com/0xJacky/nginx-ui/commit/193f486ade0bd274f030b9ddbff7ef76e9c1f034) refactor: simplify setter syntax for computed properties of selectedDomainId and selectedRecordId - [`c6b0213`](https://github.com/0xJacky/nginx-ui/commit/c6b0213761e7a046c372d54b0c534478b912fe82) fix: update computed properties to return undefined for null values in selectedDomainId and selectedRecordId ### 📊 Changes **10 files changed** (+1325 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `api/sites/site.go` (+74 -5) 📝 `app/src/api/site.ts` (+5 -0) 📝 `app/src/components/NgxConfigEditor/directive/DirectiveEditorItem.vue` (+34 -2) 📝 `app/src/views/site/site_add/SiteAdd.vue` (+125 -9) ➕ `app/src/views/site/site_add/components/DNSRecordIntegration.vue` (+382 -0) ➕ `app/src/views/site/site_edit/components/RightPanel/DNS.vue` (+677 -0) 📝 `app/src/views/site/site_edit/components/RightPanel/RightPanel.vue` (+4 -0) 📝 `app/src/views/site/site_edit/components/SiteEditor/SiteEditor.vue` (+6 -0) 📝 `app/src/views/site/site_edit/components/SiteEditor/store.ts` (+8 -0) 📝 `model/site.go` (+10 -5) </details> ### 📄 Description - Enhanced SiteAdd.vue to include DNS record integration, allowing users to select or create DNS records linked to the site. - Added DNSRecordIntegration component for managing DNS records, including selection and creation of new records. - Implemented DNS linking functionality in the RightPanel component, enabling users to link existing DNS records to their site configuration. - Updated SiteEditor to provide DNS link status to child components. - Extended the site model to include fields for linked DNS domain and record information. - Added logic to handle DNS record recreation if a linked record is missing. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces DNS record integration across backend and UI for site configurations. > > - **Backend**: Extends `model.Site` with `dns_*` fields; `SaveSite` accepts/persists DNS link data and sets `dns_record_exists`; `GetSite` verifies record existence via `internal/dns` and updates status. > - **Site creation**: `SiteAdd.vue` adds a DNS step using `DNSRecordIntegration` to select/create records, auto-updating `server_name` and passing DNS data on save. > - **Site editing**: New `RightPanel/DNS.vue` to link existing records, create/recreate missing ones, and clear links; editor store now carries DNS fields and saves them. > - **UX safeguards**: `DirectiveEditorItem.vue` locks `server_name` and shows a lock icon when DNS is linked. > - **API/types**: Updates `app/src/api/site.ts` to include DNS fields in `Site`. > - Also exposes proxy targets in `GetSite` response unchanged, now reused in UI. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c6b0213761e7a046c372d54b0c534478b912fe82. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 12:11:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#1319
No description provided.