mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
Add ServerPicker, CopyField, PortField and EnvEditor
One component per job, so pages stop hand-building them: - ServerPicker: which machine; local first, capacity, capability filter - CopyField: any value meant to be copied; secrets stay masked - PortField: host ports checked live against /ports/check, naming the app that holds a taken port and offering the next free one - EnvEditor: KEY=value rows for forms; a pasted .env fills the rows Call sites move onto them in the following commits.
This commit is contained in:
1 parent
2f52c87a39
commit
3f772c57f6
11 files changed
+730
-1
No files matched your search
@@ -603,3 +603,13 @@ export async function previewAppComposeSplit(appId) {
|
||||
export async function applyAppComposeSplit(appId) {
|
||||
return this.request(`/apps/${appId}/slots/compose-split`, { method: 'POST', body: { confirm: true } });
|
||||
}
|
||||
|
||||
// Host-port checks behind the shared PortField: is it valid, free, and who
|
||||
// holds it; and the next free port at or above `start`.
|
||||
export async function checkPort(port) {
|
||||
return this.request(`/ports/check?port=${encodeURIComponent(port)}`);
|
||||
}
|
||||
|
||||
export async function suggestPort(start = 8000) {
|
||||
return this.request(`/ports/suggest?start=${encodeURIComponent(start)}`);
|
||||
}
|
||||
Reference in new issue
Block a user