improve Targets Management
This commit is contained in:
@@ -70,7 +70,6 @@ export function TargetsPage() {
|
||||
<summary className="collapse-head">
|
||||
<div>
|
||||
<h3>New Target</h3>
|
||||
<p>Connection settings for a PostgreSQL instance.</p>
|
||||
</div>
|
||||
<span className="collapse-chevron" aria-hidden="true">v</span>
|
||||
</summary>
|
||||
@@ -79,32 +78,26 @@ export function TargetsPage() {
|
||||
<div className="field">
|
||||
<label>Name</label>
|
||||
<input placeholder="e.g. Prod-DB" value={form.name} onChange={(e) => setForm({ ...form, name: e.target.value })} required />
|
||||
<small>Unique display name in the dashboard.</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Host</label>
|
||||
<input placeholder="e.g. 172.16.0.106 or db.internal" value={form.host} onChange={(e) => setForm({ ...form, host: e.target.value })} required />
|
||||
<small>Must be reachable from the backend container.</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Port</label>
|
||||
<input placeholder="5432" value={form.port} onChange={(e) => setForm({ ...form, port: Number(e.target.value) })} type="number" required />
|
||||
<small>Default PostgreSQL port is 5432 (or your mapped host port).</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>DB Name</label>
|
||||
<input placeholder="e.g. postgres or appdb" value={form.dbname} onChange={(e) => setForm({ ...form, dbname: e.target.value })} required />
|
||||
<small>Database name to monitor.</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Username</label>
|
||||
<input placeholder="e.g. postgres" value={form.username} onChange={(e) => setForm({ ...form, username: e.target.value })} required />
|
||||
<small>DB user with read permissions on stats views.</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>Password</label>
|
||||
<input placeholder="Password" type="password" value={form.password} onChange={(e) => setForm({ ...form, password: e.target.value })} required />
|
||||
<small>Stored encrypted in the core database.</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label>SSL Mode</label>
|
||||
@@ -117,8 +110,7 @@ export function TargetsPage() {
|
||||
If you see "rejected SSL upgrade", switch to <code>disable</code>.
|
||||
</small>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label> </label>
|
||||
<div className="field submit-field">
|
||||
<button className="primary-btn">Create target</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user