Skip to content

Add parameter position handling and UI updates for server configuration#205

Open
psdzzm wants to merge 2 commits intocym1102:masterfrom
psdzzm:master
Open

Add parameter position handling and UI updates for server configuration#205
psdzzm wants to merge 2 commits intocym1102:masterfrom
psdzzm:master

Conversation

@psdzzm
Copy link

@psdzzm psdzzm commented Jan 30, 2026

Add Parameter Position Control

What's Changed

Added ability to control where custom parameters are inserted in nginx configuration blocks, including support for templates and upstream configurations.

Features

  • New position field in Param model (0 = append to end, 1 = prepend to beginning)
  • UI dropdown to select parameter position in server, location, and upstream configurations
  • Template support: "Add Template" and "Add Template as Parameter" now include position control

Files Modified

Backend

  • src/main/java/com/cym/model/Param.java - Added position field
  • src/main/java/com/cym/service/ConfService.java - Position-aware insertion for location and upstream blocks

Server Page

  • src/main/resources/WEB-INF/view/adminPage/server/index.html
  • src/main/resources/static/js/adminPage/server/index.js

Upstream Page

  • src/main/resources/WEB-INF/view/adminPage/upstream/index.html
  • src/main/resources/static/js/adminPage/upstream/index.js

Shared

  • src/main/resources/static/js/adminPage/select_template.js - Conditional position column for templates
  • src/main/resources/messages*.properties - i18n strings

Backward Compatibility

✅ Existing parameters default to append behavior (position = 0 or null)

@cym1102
Copy link
Owner

cym1102 commented Feb 3, 2026

改的有点多, 我有空先看看再说

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants